Focal Point
[SOLVED] Graph Y Axis Scale increment should be Fixed.

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

March 02, 2009, 06:25 PM
Viral
[SOLVED] Graph Y Axis Scale increment should be Fixed.
Hello,

I am creating the graph and try to show the Y Axis as Hours. But Scale increment is auto generate. How to make sure that is increments by 1(one) hour instead of decimal hours.
Also I have Grid OFF in the graph.
Pls. tell me any suggestion so that Y axis scale increment should be not auto and it will be fixed increment.

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


WF 7.6.2/ OS WIN2003.
DM 7.6.2
March 02, 2009, 07:05 PM
Tom Flynn
Viral,

You can try these API's:
  
setScaleMin ( getY1Axis(), 1);
setScaleMax ( getY1Axis(), 12);


Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
March 02, 2009, 07:30 PM
Viral
Hi Tom,

Thanks for your quick response. I tried to put code as you mentioned but still behaves same.

I tried Following piece of code with My O1Axis, Y1Axis, Y2Axis
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),1);
setScaleMin ( getY1Axis(), 1);
setScaleMax ( getY1Axis(), 12)



But still didn't work, below is my code to generate graph ( it's pareto Graph)

GRAPH FILE HOLD1
SUM DCNT AS ''
BY FAILURECODE22 AS ''
ON GRAPH SET LOOKGRAPH PARETO
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 HAXIS 625
ON GRAPH SET VAXIS 325
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *

-SET &I=1;
-SET &J=0;
-REPEAT ENDGROUP &LIM TIMES
setGroupLabel(&J,"&NEWFAILURECODE.&I");
setMarkerDisplay(true);
setConnectLineMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setY1LabelDisplay(true);
setY2LabelDisplay(false);
setY1AxisSide(0);
setY1MajorGridDisplay(false);
setY2MajorGridDisplay(false);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);



setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),1);
setScaleMin ( getY1Axis(), 1);
setScaleMax ( getY1Axis(), 12)

setTextRotation(getO1Label(),0);
setFillColor(getSeries(0),new Color(255,0,0));
setTitleString("8in Equipment Error Code Failure Hours");
setTextJustHoriz(getTitle(),1);
setFontSizeAbsolute(getTitle(),true);
setFillColor(getParetoLineMarker(),new Color(0,0,255));
setRect(getTitle(),new Rectangle(-15111,13550,29850,1800));
setRect(getFrame(), new Rectangle(-13625 -13250 28500 25500));
-*setRiserWidth(40);
setSeriesLineWidthDefault(1);

-SET &I=&I+1;
-SET &J=&J+1;
-ENDGROUP
setDataRangeToExtent();
ENDSTYLE
ON GRAPH HOLD AS GRAPH1 FORMAT HTMTABLE
END

Let me know if you find that I am doing which causes and thanks for your quick reply.


WF 7.6.2/ OS WIN2003.
DM 7.6.2
March 02, 2009, 07:40 PM
Tom Flynn
Viral,

I don't see it, right off the bat. I don't think I would include it in your loop though, I'd place it outside the loop.

Here is the link to the documentation WebFOCUS/IBI uses in their graphics:

3D Graphics

Maybe another pair of eyes will assist?

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
March 06, 2009, 02:23 PM
Viral
I still searching the way to limit the scale intervals. Looks like the pareto chart having the issue, tried in the simple graph without pareto it worked. But any suggestion still welcome.


WF 7.6.2/ OS WIN2003.
DM 7.6.2