Focal Point
[SOLVED] Graph - Y axis Label decimal Points

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

February 02, 2012, 06:40 AM
Sivashankari Venkataraman
[SOLVED] Graph - Y axis Label decimal Points
please find attached the sample code and the graph image with this post. I want
Y axis values to be displayed as 0.00,0.05,0.10,0.15,0.20 instead of
0,0.05,0.1,0.15,0.2 .
i.e i want the 2 decimal place to be constant across the whole Y axis. I have
used the Code bit
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");

But i am not able to get the desired format in Y axis. Please advice.
**************************************
DEFINE FILE CAR
EXA/D12.2=(SALES/100000)+0.01;
END
GRAPH FILE CAR
SUM COMPUTE EXA1/D12.2 =EXA;
BY CAR
WHERE EXA GT 0.01
WHERE TOTAL EXA1 LT 0.5
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET 3D OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRMERGE ON
ON GRAPH SET VZERO OFF
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 700
ON GRAPH SET GRAPHSTYLE *
setAxisSide(getY2Axis(),1);
setAxisSide(getY4Axis(),1);
setFillType(getChartBackground(),1);
setFillColor(getChartBackground(),new Color(255,255,255));
setBorderColor(getLegendArea(),new Color(204,204,204));
setFillColor(getDataText(),new Color(0,0,0));
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"0.##");
ENDSTYLE
END
*******************************************

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


Webfocus 7702
Unix
All outputs
February 02, 2012, 06:59 AM
Tom Flynn
setTextFormatPattern(getY1Label(),"0.00");


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
February 03, 2012, 04:16 AM
Sivashankari Venkataraman
Thanks. It works
Regards
Shankari


Webfocus 7702
Unix
All outputs