All,
Please see the example CAR Graph file code pasted below. There are 2 BY fields in the Graph code and i have set GMERGE=ON. My requirement is to sort the legend descending by RETAIL_COST but display the CAR names in the legend. But ,currently i am getting the RETAIL_COST values getting displayed in the legend. Any help is much appreciated.
GRAPH FILE CAR
SUM
COMPUTE MTRC/D12 = SALES;
BY HIGHEST RETAIL_COST AS '' NOPRINT
BY CAR
ACROSS COUNTRY AS ''
FOOTING
""
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO ON
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 950
ON GRAPH SET VAXIS 250
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBIDefault.txt");
setTransparentBorderColor(getChartBackground(),false);
-*setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(0);
setPlace(true);
setDisplay(getY1Label(),true);
setTextString(getO1Title(),"");
setTextString(getY1Title(),"");
setDisplay(getTitle(),true);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),10);
setPlaceResize(getTitle(),0);
setDisplay(getO1MajorGrid(),true);
setDisplay(getO1MinorGrid(),false);
setLineWidth(getY1MajorGrid(),0);
setLineBasicStrokeType(getY1MajorGrid(),0);
setMajorGridDrawEveryCount(getY1MajorGrid(),1);
setGridStyle(getY1MajorGrid(),0);
setDisplay(getY1MinorGrid(),false);
setDisplay(getO1Label(),true);
setDisplay(getLegendArea(),true);
setFontSizeInPoints(getDataText(0),30);
setPlaceResize(getDataText(0),0);
setFontSizeAbsolute(getDataText(0),false);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),8);
setPlaceResize(getO1Label(),0);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeInPoints(getY1Label(),8);
setPlaceResize(getY1Label(),0);
setTextFormatPattern(getY1Label()," 0000");
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),8);
setPlaceResize(getLegendText(),0);
setDataLineThickness(5);
setTextRotation(getO1Label(),0);
setLegendDisplay(getSeries(1),true);
-* determines angle of X axis labels
setTextRotation(getO1Label(),3);
-*******************************************
-* Legend commands
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),8);
setLegendPosition(2);
setPlaceResize(getLegendText(),0);
setRect(getLegendArea(), new Rectangle(0, 0, 2000, 16000));
-* synchs the series marker shapes (setMarkerSize) with the legend
-*setUseSeriesShapes(true);
ENDSTYLE
END
Webfocus 7702
Unix
All outputs