Focal Point
[SOLVED] Graph Scale Question

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

March 10, 2009, 05:08 PM
Commando Dave
[SOLVED] Graph Scale Question
I would like to enforce a scale on my graph in discreet integers from 1 to 4, with 4 being the top of the scale. I've figgured out how to enforce the integer portion of my problem with the graphstyle statements:

setGridStep(getY1MajorGrid(),1.0);
setGridStepAuto(getY1MajorGrid(),false);

However, I want to force the max of the scale at a certain point rather than just letting it be dynamic (in my example 4).

The code sniglet below gets you to where I am. The result set has two datapoints both at a value of 2 (seats). I want the graph to indicate that 4 would be a max amount. So, the graph would have major grids at 1,2,3,4 (actually 4 would be the top of the scale and not a major grid).

GRAPH FILE CAR
SUM CAR.BODY.SEATS
ACROSS CAR.CARREC.MODEL
WHERE (CAR.ORIGIN.COUNTRY EQ 'ENGLAND');
WHERE (CAR.CARREC.MODEL EQ 'TR7' OR 'V12XKE AUTO');
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setGridStep(getY1MajorGrid(),1.0);
setGridStepAuto(getY1MajorGrid(),false);
ENDSTYLE
END

Anybody have a clue on this one?

TIA

-cDave

This message has been edited. Last edited by: Kerry,
March 11, 2009, 02:07 PM
Laure
How about

-DEFAULT &VALUE = 6;

GRAPH FILE CAR
SUM CAR.BODY.SEATS
ACROSS CAR.CARREC.MODEL
WHERE (CAR.ORIGIN.COUNTRY EQ 'ENGLAND');
WHERE (CAR.CARREC.MODEL EQ 'TR7' OR 'V12XKE AUTO');
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setGridStep(getY1MajorGrid(),1.0);
setGridStepAuto(getY1MajorGrid(),false);

setY1ScaleMaxAuto(false);
setY1ScaleMax(&VALUE);


ENDSTYLE
END


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
March 12, 2009, 10:54 AM
Commando Dave
Beauty! Thanks a bunch Laure! That is just what I needed.