Focal Point
[CLOSED] Graph Sorting

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

December 14, 2016, 11:05 AM
BI_Developer
[CLOSED] Graph Sorting
Hello

I tried many ways and looked into posts in this forum as well but not able to sort the graph. I did a DEFINE field TYPE_SORT on TYPE and used it. It sorts the graph but data from TYPE_SORT appear in the legend. I tried COLUMNS way but I get inconsistent format error. TYPE is A5 field and has 5 unique values which won't change. So I tried it too as shown in 2nd graph request below.
GRAPH FILE TAB_NAME
SUM
SALE
BY TYPE_SORT NOPRINT
BY TYPE
ACROSS YEAR
END

GRAPH FILE TAB_NAME
SUM
SALE
BY TYPE
ACROSS YEAR
COLUMNS 'AVR' AND 'TOP' AND 'HIGH1' AND '3000' AND 'WEAK1'
END  


Please suggest.

Thanks

This message has been edited. Last edited by: BI_Developer,


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
December 14, 2016, 01:55 PM
MartinY
Not sure to understand what you're trying to accomplish since there is no sample of your attempted result.

But anyway, here something that I thing you are attempting to accomplish
DEFINE FILE CAR
REGION /A10 = DECODE COUNTRY ('FRANCE' '2' 'ITALY' '2' 'ENGLAND' '2' 'W GERMANY' '1' 'JAPAN' '1');
END
GRAPH FILE CAR
SUM SALES       AS 'Sales'
BY REGION  NOPRINT
BY COUNTRY AS ''
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 870
ON GRAPH SET VAXIS 605
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(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);
setGridStepAuto(getY1MajorGrid(),false);
setDisplay(getY2AxisLine(),true);
setDisplayOffScale(getY2Axis(),true);
setLineWidth(getY1MajorGrid(),0);
setDisplay(getY1MinorGrid(),false);
setDisplay(getY1MajorGrid(),true);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),10);
setDisplay(getO1Label(),true);
setDisplay(getY1Label(),true);
setPlace(false);
setDepthRadius(0);
setDepthAngle(0);
setDisplay(getO1Title(),false);
ENDSTYLE
END

Key points are:
BY REGION  NOPRINT
...
ON GRAPH SET GRXAXIS 2
...
setDisplay(getO1Title(),false);



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007