Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Dual-Axis Graph Goal Line

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Dual-Axis Graph Goal Line
 Login/Join
 
Silver Member
posted
Hi, I have the dual axis graph below. Two questions:
- Is there a way to add a goal line of, say, 55.1% that would display as a line across the graph?
- I can't get the % to display for the Y2 Axis or Y2 Data Points. If I do, it converts the Y2 Axis Numbers from 54.8 to 548%.

Thanks in advance for any ideas you might have!

  

APP PREPENDPATH IBISAMP
-*
-* ================================================================================
-* Move the data from SQLOUT to MYSQL which can be read into variables
-* ================================================================================
TABLE FILE CAR
PRINT
	COMPUTE D9MONTH/A12 = COUNTRY;
	COMPUTE D9PROD1/D12.0 = DEALER_COST;
	COMPUTE D9DROS1/D12.0 = RETAIL_COST;
ON TABLE HOLD AS MELTSUMM0401 FORMAT FOCUS
END
-*
-* ====================================================================================================
-* Display Graph
-* ====================================================================================================
GRAPH FILE MELTSUMM0401
SUM D9PROD1 AS 'Lbs Melted' D9DROS1 AS 'Lbs Dross' COMPUTE C9PCT/D12.2= D9DROS1 * 100 / ( D9DROS1 + D9PROD1 ); AS 'Dross Pct'
ACROSS D9MONTH AS 'Month'
FOOTING
"Total dross lbs from central melt and holding furnaces, oily scrap, sows, turnings, and painted/assembled  "
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setY1MajorGridStepAuto(false);
setY1MajorGridStep(2);
setY2MajorGridStepAuto(false);
setY2MajorGridStep(2);
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDisplay(getDataText(2), true);
setStackedDataValueSum(false);
setTextFormatPreset(getY1Label(), -1);
setTextFormatPattern(getY1Label(),"#,###.##");
setTextFormatPreset(getY2Label(), -1);
setTextFormatPattern(getY2Label(),"#.##");
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelRotate(0);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(2,1);
setSeriesType(2,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(true);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setTitleString("Aluminum Melt - Monthly Tracking Report");
setFontSizeAbsolute(getTitle(),true);
setSubtitleString("Melt Loss Weights Include All Material Sent For Tolling");
setFontSizeAbsolute(getSubtitle(),true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Aluminum Melt - Monthly Tracking Report',
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
$
TYPE=FOOTING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     SIZE=8,
     COLOR='BLACK',
$
ENDSTYLE
END

This message has been edited. Last edited by: bbollmann,


Brian Bollmann
Spartan Light Metal Products
WebFocus 7.6.4 / iSeries / WebSphere
 
Posts: 34 | Registered: May 09, 2008Report This Post
Expert
posted Hide Post
Brian, try adding this to the graphstyle.
setReferenceLine (getY2Axis(), 0, 55.1);
setLineWidth (getReferenceLine (getY2Axis(), 0), 3);
setFillColor (getReferenceLine (getY2Axis(), 0), new Color (255, 0, 0));


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<JG>
posted
For the % issue, If you want to display the values as a % then you have to supply the values divided by 100.

This is exactly the way that Excel works if you give a cell a format of %.
 
Report This Post
Silver Member
posted Hide Post
Thanks Waz, your suggestion for goal line worked nicely.

Any more suggestions on how to deal with the percentage. I modified per JG suggestion as below and the Y2 Axis displays nicely, but I can't get the graph points to display w/ 55.4% etc.

Thanks!

APP PREPENDPATH IBISAMP
-*
-* ================================================================================
-* Move the data from SQLOUT to MYSQL which can be read into variables
-* ================================================================================
-SET &TRENDLINE = 55.1
TABLE FILE CAR
PRINT
	COMPUTE D9MONTH/A12 = COUNTRY;
	COMPUTE D9PROD1/D12.0 = DEALER_COST;
	COMPUTE D9DROS1/D12.0 = RETAIL_COST;
ON TABLE HOLD AS MELTSUMM0401 FORMAT FOCUS
END
-*
-* ====================================================================================================
-* Display Graph
-* ====================================================================================================
GRAPH FILE MELTSUMM0401
SUM D9PROD1 AS 'Lbs Melted' D9DROS1 AS 'Lbs Dross' COMPUTE C9PCT/D12.2%=D9DROS1 / ( D9DROS1 + D9PROD1 ); AS 'Dross Pct'
ACROSS D9MONTH AS 'Month'
FOOTING
"Total dross lbs from central melt and holding furnaces, oily scrap, sows, turnings, and painted/assembled  "
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setReferenceLine (getY2Axis(), 0, &TRENDLINE);
setLineWidth (getReferenceLine (getY2Axis(), 0), 3);
setFillColor (getReferenceLine (getY2Axis(), 0), new Color (255, 0, 0));
setY1MajorGridStepAuto(false);
setY1MajorGridStep(2);
setY2MajorGridStepAuto(false);
setY2MajorGridStep(2);
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDisplay(getDataText(2), true);
setStackedDataValueSum(false);
setTextFormatPattern(getY1Label(),"#,###.##");
setTextFormatPattern(getY2Label(),"#.##%");
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelRotate(0);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(2,1);
setSeriesType(2,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),1);
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(true);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setTextFormatPreset(getY2Label(),3);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setTitleString("Aluminum Melt - Monthly Tracking Report");
setFontSizeAbsolute(getTitle(),true);
setSubtitleString("Melt Loss Weights Include All Material Sent For Tolling");
setFontSizeAbsolute(getSubtitle(),true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Aluminum Melt - Monthly Tracking Report',
$
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=N3 GE 0,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
$
TYPE=FOOTING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     SIZE=8,
     COLOR='BLACK',
$
ENDSTYLE
END


  


Brian Bollmann
Spartan Light Metal Products
WebFocus 7.6.4 / iSeries / WebSphere
 
Posts: 34 | Registered: May 09, 2008Report This Post
Expert
posted Hide Post
I posted a solution to this here, seems the only way was to not use the Graph % format, but use a custom format.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
Can someone tell me why my .551 Reference Line follows the same path as the Dross Pct line?

 
APP PREPENDPATH IBISAMP
-*
-* ================================================================================
-* Move the data from SQLOUT to MYSQL which can be read into variables
-* ================================================================================
-SET &TRENDLINE = 55.1
TABLE FILE CAR
PRINT
	COMPUTE D9MONTH/A12 = COUNTRY;
-*	COMPUTE D9PROD1/D12.0 = DEALER_COST;
	COMPUTE D9PROD1/D12.0 = SALES;
	COMPUTE D9DROS1/D12.0 = RETAIL_COST * 2;
	COMPUTE D9MLOS1/D10.3 = .551;
ON TABLE HOLD AS MELTSUMM0401 FORMAT FOCUS
END
-*
-* ====================================================================================================
-* Display Graph
-* ====================================================================================================
GRAPH FILE MELTSUMM0401
SUM 
	D9PROD1 AS 'Lbs Melted' 
	D9DROS1 AS 'Lbs Dross' 
	COMPUTE C9PCT/D12.2= D9DROS1 / ( D9DROS1 + D9PROD1 ); AS 'Dross Pct'
	MIN.D9MLOS1
ACROSS D9MONTH AS 'Month'
FOOTING
"Total dross lbs from central melt and holding furnaces, oily scrap, sows, turnings, and painted/assembled  "
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *

-*setReferenceLine (getY2Axis(), 0, &TRENDLINE);
-*setLineWidth (getReferenceLine (getY2Axis(), 0), 3);
-*setFillColor (getReferenceLine (getY2Axis(), 0), new Color (255, 0, 0));

setY1MajorGridStepAuto(false);
setY1MajorGridStep(2);
setY2MajorGridStepAuto(false);
setY2MajorGridStep(2);
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDisplay(getDataText(2), true);
setStackedDataValueSum(false);
setTextFormatPattern(getY1Label(),"#,###.##");
setTextFormatPattern(getY2Label(),"#.##");
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelRotate(0);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);

setAxisAssignment(0,0);
setSeriesType(0,1);

setAxisAssignment(1,0);
setSeriesType(1,1);

setAxisAssignment(2,1);
setSeriesType(2,2);

setAxisAssignment(3,1);
setSeriesType(3,2);

setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),1);
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(true);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setTextFormatPreset(getY2Label(),3);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setTitleString("Aluminum Melt - Monthly Tracking Report");
setFontSizeAbsolute(getTitle(),true);
setSubtitleString("Melt Loss Weights Include All Material Sent For Tolling");
setFontSizeAbsolute(getSubtitle(),true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Aluminum Melt - Monthly Tracking Report',
$
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=N3 GE 0,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
$
TYPE=FOOTING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     SIZE=8,
     COLOR='BLACK',
$
ENDSTYLE
END
 


Brian Bollmann
Spartan Light Metal Products
WebFocus 7.6.4 / iSeries / WebSphere
 
Posts: 34 | Registered: May 09, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Dual-Axis Graph Goal Line

Copyright © 1996-2020 Information Builders