Focal Point
[SOLVED] Force the y-axis value to an only two integer value

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

February 05, 2009, 11:19 AM
Mayor
[SOLVED] Force the y-axis value to an only two integer value
Hello,

I have used:

setCustomDataText(getY1Label(), true);
setTextFormatPreset(getY1Label(),1);
setTextFormatPattern(getY1Label(),"###");

to change
from : 0.00, 0.20, 0.40, 0.60, 0.80, 1
to : 0 , 0 , 0 , 1 , 1 ,1

what is the style command to change that to just

0 1

Thanks in advance

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



Production & Development: WebFocus 7.6.4
February 05, 2009, 11:43 AM
Francis Mariani
Wouldn't you do this in the WebFOCUS code - define a field that is I2 and sum by/across that field?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 05, 2009, 12:32 PM
Mayor
Okay I see, if that's the case then...I have the following statement:

SUM CNT.OS_USERNAME

What would be the correct way to define cnt.os_username to get a integer that would allow me just 0 and 1 to appear, once each?



Production & Development: WebFocus 7.6.4
February 05, 2009, 12:45 PM
Francis Mariani
Good question! For non-graphs, CNT always outputs integers so I'm not sure what's going on.

TABLE FILE CAR
SUM
CNT.MODEL
BY COUNTRY
ACROSS CAR
END
gives you integers,

GRAPH FILE CAR
SUM
CNT.MODEL
BY COUNTRY
ACROSS CAR
END
gives you decimals.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 05, 2009, 01:10 PM
Francis Mariani
-* File graph02.fex
SET GRMERGE = ON

GRAPH FILE CAR
SUM CNT.MODEL
ACROSS COUNTRY
BY CAR
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRWIDTH 0
ON GRAPH SET GRAPHSTYLE *
setLegendMarkerPosition(2);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
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(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END

Something in this code makes the numbers appear as integers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 05, 2009, 01:28 PM
Mayor
oh okay thanks Francis! I see I see...So, what would be the correct way for me to approach the graph portion, in order to get a count for os_username that would be in fact an integer?



Production & Development: WebFocus 7.6.4
February 05, 2009, 02:43 PM
GinnyJakes
The default format for COUNT or CNT. is an integer.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
February 05, 2009, 03:05 PM
FrankDutch
I think this would work too.

SUM CNT.MODEL/I5S

else

SUM
COMPUTE TELL/D7c=CNT.MODEL;

...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

February 05, 2009, 04:05 PM
Mayor
Thanks Ginny and Thank you Francis



Production & Development: WebFocus 7.6.4
February 05, 2009, 04:10 PM
GinnyJakes
You can also put this command in your profile or your program to make the count field always I8.

SET COUNTWIDTH = ON



Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
February 10, 2009, 09:52 PM
Mayor
Thanks Ginny



Production & Development: WebFocus 7.6.4