Hello,
Need to set up the different colors for the stacks in the pareto graph. Like for Each model mostly Red color stack but others should be different color. For Car model - 3.0 SI 4 DOOR Red color and rest of other model different color.
(I need to give the different color for each stack bar like default will be in red color and for other grouping different color.)
Also want to know is it possible to show the stacked information when hover over it like it has Group by Country and stacked by Model. So when it over bar it shows only country and value, is it possible to show the up the country.model - value.
Looking for suggestions. Thanks in advance for your inputs.
Here is the code from "JG" for pareto graph by generating your own data series and labels.
APP PREPENDPATH IBISAMP
-RUN
TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
ON TABLE HOLD AS DC
END
-RUN
TABLE FILE DC
SUM
COMPUTE PARTO/I9= LAST PARTO + DEALER_COST;
BY HIGHEST DEALER_COST
BY COUNTRY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS LINEDATA
END
-RUN
TABLE FILE LINEDATA
PRINT
COMPUTE GROUP/I2= (LAST GROUP +1); NOPRINT
COMPUTE POS/I2=GROUP -1; NOPRINT
COMPUTE SERIES0/A50='setData(0,' || EDIT(POS) || ','|| EDIT(PARTO) || ');';
BY HIGHEST DEALER_COST NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS SERIES0 FORMAT ALPHA
END
-RUN
TABLE FILE LINEDATA
PRINT
COMPUTE GROUP/I2= (LAST GROUP +1); NOPRINT
COMPUTE POS/I2=GROUP -1; NOPRINT
COMPUTE SERIES0/A80='setGroupLabel('|| EDIT(POS) || ',"' || COUNTRY || '");';
BY HIGHEST DEALER_COST NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS LABELS FORMAT ALPHA
END
-RUN
TABLE FILE CAR
SUM
COMPUTE PARTO/I9= DEALER_COST;
BY COUNTRY
SUM DEALER_COST
BY COUNTRY
BY MODEL
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS BARDATA
END
-RUN
TABLE FILE BARDATA
PRINT
COMPUTE SERIES/I2= IF COUNTRY NE LAST COUNTRY THEN LAST SERIES +1 ELSE LAST SERIES; NOPRINT
COMPUTE GROUP/I2=IF SERIES EQ LAST SERIES THEN LAST GROUP +1 ELSE 0 ;NOPRINT
COMPUTE GROUPP/I2=GROUP + 1; NOPRINT
COMPUTE SERIESP/I2=SERIES - 1; NOPRINT
COMPUTE SERIES0/A50='setData(' || EDIT(GROUPP) || ',' || EDIT(SERIESP) || ','|| EDIT(DEALER_COST) || ');';
BY HIGHEST PARTO NOPRINT
BY COUNTRY NOPRINT
BY MODEL NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GROUPS FORMAT ALPHA
END
-RUN
GRAPH FILE LINEDATA
SUM PARTO AS ''
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT JPEG
ON GRAPH SET GRAPHSTYLE *
setSeriesType(0,2);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(false);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setLegendDisplay(false);
setLegendTextAutofit(true);
setPlace(true);
-INCLUDE SERIES0
-INCLUDE GROUPS
-INCLUDE LABELS
setDataRangeToExtent();
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END
Thanks,
WF 7.6.2
WF 7.6.2/ OS WIN2003.
DM 7.6.2