Focal Point
[SOLVED] How to tell Webfocus I want a non-ordinal x axis...

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

May 19, 2009, 01:12 PM
Anatess
[SOLVED] How to tell Webfocus I want a non-ordinal x axis...
I thought this was going to be easy... but I cannot find the setting!

I want a non-ordinal X axis. I'm using the graph editor (7.1.4) to create my graph. Then I add some specific settings manually that I need. So, when I use the graph editor, it always sets the X axis as an ordinal axis. Well, I don't want an ordinal axis, I want a regular one. But, I couldn't figure out how to change it.

Here's sample code:

 -* File testgraph.fex
GRAPH FILE CAR
SUM SALES
ACROSS RETAIL_COST
ON GRAPH SET LOOKGRAPH VLINE
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 PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getX1Title(),true);
setPlace(false);
setGridStepAuto(getX1MajorGrid(),false);
setGridStep(getX1MajorGrid(),10000);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10000);

ENDSTYLE
ON GRAPH SET STYLE *
     PAGESIZE='Letter',
     LEFTMARGIN=0.250000,
     RIGHTMARGIN=0.250000,
     TOPMARGIN=0.250000,
     BOTTOMMARGIN=0.250000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
ENDSTYLE
END
 


I want Retail Cost to be non-ordinal so the grid steps will be the same as the Y axis.

Thanks in advance.

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


WF 8.1.05 Windows
May 19, 2009, 11:07 PM
Waz
Anatess, Is this what you wanted ?

I changed the graph type to SCATTER, and turned lines on.

GRAPH FILE CAR
SUM CAR.BODY.SALES
ACROSS CAR.BODY.RETAIL_COST
ON GRAPH SET LOOKGRAPH SCATTERS
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 PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setFontSizeAbsolute(getX1Title(),true);
setGridStepAuto(getX1MajorGrid(),false);
setGridStep(getX1MajorGrid(),10000);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10000);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getX1Title(),true);
setO1LabelAutofit(true);
setPlace(false);
ENDSTYLE
ON GRAPH SET STYLE *
     PAGESIZE='Letter',
     LEFTMARGIN=0.250000,
     RIGHTMARGIN=0.250000,
     TOPMARGIN=0.250000,
     BOTTOMMARGIN=0.250000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
ENDSTYLE
END


Did it in 7.6.9.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

May 20, 2009, 01:59 AM
Anatess
Well, yes, that's exactly what I want. But, I have other fields that I visualize as area and bar on the same graph and I can't have those options in a scatter graph. So, I can't change it to a scatter.


WF 8.1.05 Windows
May 20, 2009, 02:45 PM
VLozovsky
quote:
ordinal X axis. I'm using the graph editor (7.1.4) to create my graph. Then I add

I already communicated to Anatess via e-mail, but wanted to post an answer here as well in case someone else is looking for a similar solution.

I recommended to use ‘IN-RANGES-OF’ command. This will turn the linear X-Axis scale into non-linear by grouping together the field values based on the interval specified by the command. In the example provided originallt, I used ACROSS RETAIL_COST IN-RANGES-OF 1000.
May 21, 2009, 01:37 PM
Anatess
Vlozovsky, it worked perfectly! Thank you very much. I'm going to mark this SOLVED.


WF 8.1.05 Windows