Focal Point
[CLOSED] Dual Y-axis for horizontal bar chart for ?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4577052886

November 07, 2017, 03:51 AM
Developer
[CLOSED] Dual Y-axis for horizontal bar chart for ?
Dual Y-axis can we use horizontal bar chart?

i want with axis,
X-axis = %
Y1-axis = car filed
Y2-axis =BODY filed



DEFINE FILE CAR
C_TEST1/D4.2 = IF RETAIL_COST EQ 0 THEN 0 ELSE (RETAIL_COST/(DEALER_COST*100));
END



GRAPH FILE CAR
SUM CAR.BODY.C_TEST1
BY CAR.COMP.CAR
WHERE CAR NE 'BMW';
ON GRAPH SET LOOKGRAPH HBAR
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 *
setMarkerDisplay(true);
setUseSeriesShapes(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1ExcludeMinLabel(true);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
-*
setTextFormatPreset(getY1Label(),3);
-*
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setFontSizeAbsolute(getO1Label(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
$
ENDSTYLE
END

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8202
November 07, 2017, 05:55 AM
Tulsi

I have tried a chart according to your condition . hope this code will work for you. my webfcous version is 8201m and it is a jschart .

GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.SPECS.BHP
CAR.SPECS.RPM
BY CAR.COMP.CAR
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=row, $
TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getY1MajorGrid(),true);
setAxisSide(getO1Axis(),1);
setDisplay(getO1Title(),false);
*GRAPH_JS_FINAL
"xaxis": {
"title": {
"visible": false
}
},
"pieProperties": {
"holeSize": "0%"
},
"blaProperties": {
"seriesLayout": "percent",
"orientation": "horizontal"
},
"agnosticSettings": {
"chartTypeFullName": "Bar_Percent_Horizontal"
}
*END
ENDSTYLE
END
-RUN


webfcous 8202m
windows 7
November 09, 2017, 12:39 AM
Developer
This is not working in webfocus 8.02
i think the key word "BUCKET" not working in webfocus 8.02

any alternate solution to achieve

Plz help


quote:
Originally posted by Tulsi:

I have tried a chart according to your condition . hope this code will work for you. my webfcous version is 8201m and it is a jschart .

GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.SPECS.BHP
CAR.SPECS.RPM
BY CAR.COMP.CAR
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=row, $
TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getY1MajorGrid(),true);
setAxisSide(getO1Axis(),1);
setDisplay(getO1Title(),false);
*GRAPH_JS_FINAL
"xaxis": {
"title": {
"visible": false
}
},
"pieProperties": {
"holeSize": "0%"
},
"blaProperties": {
"seriesLayout": "percent",
"orientation": "horizontal"
},
"agnosticSettings": {
"chartTypeFullName": "Bar_Percent_Horizontal"
}
*END
ENDSTYLE
END
-RUN

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


WebFOCUS 8202
November 09, 2017, 03:08 AM
Tony A
quote:
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT

WF 8.02? No such release.

Remove the section that I have highlighted and rerun. This works OK.

Might it be a suggestion that you seek out some structured training? This was a simple change to the supplied example by Tulsi that should have been easy to spot.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 09, 2017, 05:44 AM
Developer
i don't think so if we remove that code its not working
i think because of this
TYPE=DATA, COLUMN=N1, BUCKET=row, $
TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $


quote:
Originally posted by Tony A:
quote:
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT

WF 8.02? No such release.

Remove the section that I have highlighted and rerun. This works OK.

Might it be a suggestion that you seek out some structured training? This was a simple change to the supplied example by Tulsi that should have been easy to spot.

T



WebFOCUS 8202
November 09, 2017, 07:05 AM
Tony A
quote:
WebFOCUS 7.6.9

So which release are you actually using, 7.6.9 or 8.2?

If you are on 7.6.9 as per your signature then, yes, that is why it doesn't work in that release.

Have you tried using the GUI to construct this chart or just hand coded it?

WF 7.6.9 is a very old release (and is functionally stabilised?) and it is probably not in common use now - hence no responses as to example code for that release.

I would also urge you to insist to your management team that you require training and not just to be pointed at the Forum and told "learn from there". Not only will you benefit but you company will too.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 09, 2017, 07:11 AM
Developer
8.02 ver
quote:
Originally posted by Tony A:
quote:
WebFOCUS 7.6.9

So which release are you actually using, 7.6.9 or 8.2?

If you are on 7.6.9 as per your signature then, yes, that is why it doesn't work in that release.

Have you tried using the GUI to construct this chart or just hand coded it?

WF 7.6.9 is a very old release (and is functionally stabilised?) and it is probably not in common use now - hence no responses as to example code for that release.

I would also urge you to insist to your management team that you require training and not just to be pointed at the Forum and told "learn from there". Not only will you benefit but you company will too.

T



WebFOCUS 8202
November 09, 2017, 09:23 AM
Tony A
In App Studio, click on the question mark in the top right and then choose about. Then post the Version and Gen values in reply (hint, don't reply with quote).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10