Hi,
Iam sorting by Y Axis values. Iam not able to implement this feature in stacked bar chart.
Iam creating a stacked bar chart with sum(sales) along the Y Axis. And CAR along the X Axis, Stacked by MODEL.
But Iam getting this error :
Possible Error on
n(,0.0,"B210 2 DOO");
This is the code that Iam using.
-* HTML Tool
-* Created by Graph Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! displayTree=0
TABLE FILE CAR
SUM SALES
CAR
BY HIGHEST TOTAL SALES NOPRINT
BY MODEL
ON TABLE HOLD AS H1
END
TABLE FILEF H1
SUM SALES
CAR
BY HIGHEST TOTAL SALES NOPRINT
BY MODEL
ON TABLE SAVE
END
-RUN
-SET &SER_CNT=&LINES;
-SET &I=0;
-* Put all the countries in unique variables.
-REPEAT GRAPH &SER_CNT TIMES
-READ SAVE NOCLOSE &CNAME.A10.
-IF &RETCODE NE 0 GOTO GRAPH;
-SET &I=&I+1;
-SET &CNAME.&I=&CNAME;
-GRAPH
GRAPH FILE H1
SUM SALES
BY HIGHEST TOTAL SALES NOPRINT
BY CAR
ACROSS MODEL
HEADING
"STACKED CHART
"
""
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET 3D OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRWIDTH 1
ON GRAPH SET GRMERGE ON
ON GRAPH SET VZERO ON
ON GRAPH SET GRAPHSTYLE *
setSeriesType(0,1);
setSeriesType(1,1);
setLegendDisplay(true);
setLegendMarkerPosition(0);
setMarkerDisplay(true);
setUseSeriesShapes(false);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setY1LabelDisplay(true);
setY1AxisSide(0);
setTextFormatPreset(getY1Label(),1);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setFontSize(getO1Label(),12);
setFontSizeAbsolute(getO1Label(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
-* This is where we start the loop to populate the setGroupLabel method once
for each series on the graph.
-* Since series numbers are relative to zero, we have to have two counters.
-* &J will count the series.
-* &I will match the index variable name set above.
-SET &I=1;
-SET &J=0;
-REPEAT ENDGROUP &SER_CNT TIMES
setGroupLabel(&J,"&CNAME.&I");
-SET &I=&I+1;
-SET &J=&J+1;
-ENDGROUP
ENDSTYLE
END
-* End Graph Assistant
Please let me know if I need to make any modification in the code.
Thanks
Poongs.
WF8103 -UNIX,HTML,EXCEL,PDF.