Focal Point
[SOLVED] using 4 fields with a stacked bar and line chart

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

September 09, 2016, 09:12 AM
Jay Potter
[SOLVED] using 4 fields with a stacked bar and line chart
I have a chart that has 4 fields. The first 3 fields should create a stacked bar. The last field is for a line. I have tried all the different LOOKGRAPH options and the closest that I get is with the commands below. It shows the first field has a bar and the last 3 fields are displayed as separate lines. I have tried to play with the setAxisAssignment numbers, but that hasn't worked either. Any suggestions?


ON GRAPH HOLD AS GRPH1 FORMAT HTML
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 800.0
ON GRAPH SET VAXIS 400.0
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET LOOKGRAPH VLINSTK2

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

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
September 09, 2016, 09:52 AM
Tom Flynn
Jay,
Here is an example, see Bolded line...

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR2AX
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesType(2,2);
*END
ENDSTYLE
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
September 09, 2016, 10:47 AM
Jay Potter
God I love FocalPoint! Thanks a lot that helped me. The following worked for me.

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


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster