I have a pie chart that I'm creating. The business wants it sorted by the major and minor class code but they want to see the minor description in the legend instead of the code. I combined the major and minor code into one field and I'm sorting the report by that field so the graph is sorted correctly, but how do I get the description to appear in the legend instead of the codes? Thanks.
SET PAGE-NUM=NOPAGE
SET PRINTPLUS=ON
SET COMPOUND=OPEN
SET LOOKGRAPH=PIE
SET 3D=OFF
GRAPH FILE HOLD220
SUM PCT.MKT_VL AS ""
BY MAJMINCLASS AS ""
WHERE MKT_VL IS-NOT MISSING AND MKT_VL GT 0
ON GRAPH SET VAXIS 4
ON GRAPH SET HAXIS 6
ON GRAPH SET GRAPHSTYLE *
setFillColor(getSeries(0),new Color(0,0,255)); blue
setFillColor(getSeries(1),new Color(0 255 0)); lime green
setFillColor(getSeries(2),new Color(255,0,255)); fuscia
setFillColor(getSeries(3),new Color(255,255,0)); yellow
setFillColor(getSeries(4),new Color(0,255,255)); aqua
setFillColor(getSeries(5),new Color(50,153,204)); sky blue
setFillColor(getSeries(6),new Color(255,0,0)); red
setFillColor(getSeries(7),new Color(0,0,128)); navy
setFillColor(getSeries(8),new Color(0,128,128)); teal
setFillColor(getSeries(9),new Color(128,0,0)); maroon
setFillColor(getSeries(10),new Color(192,192,192)); silver
setFillColor(getSeries(11),new Color(128,0,128)); purple
setFillColor(getSeries(12),new Color(0,128,0)); green
setFillColor(getSeries(13),new Color(127,255,0)); medium spring green
setRect(getFrame(),new Rectangle(-12000,-8000,21000,18000));
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(false);
setUseSeriesBorderDefaults(true);
setFillMissingData(0);
setLegendPosition(2);
setPlace(true);
ENDSTYLE
ON GRAPH SAVE AS ALLOCGR FORMAT SVG
END
webfocus 8.105M; os: windows; pdf, html, exl2k, csv