Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

We have scenarios when drilling into other charts, where the...


Kristi Carter

Recommended Posts

We have scenarios when drilling into other charts, where there are small number, and when it shows it has half decimal numbers like the below. I dont want to force this to increment by one, as the drill report could also show as higher numbers (see below).

 

The same report could look like tis depending on what is chosen:

 

Is there an option somewhere to set to always use whole numbers

Below is the area I was trying to use, however I dont see an option to use just whole numbers.

Link to comment
Share on other sites

Kristi

I found this on the techsupport site I havent tried it but wanted to pass it along.

Solution Notes

Symptom Section

The Y axis of the GRAPH is displaying decimal postions.

Problem Section

How do you display whole numbers on the Y axis

Solution Section

Use the following code:

setTextFormatPreset(getY1Label(),-1);

setTextFormatPattern(getY1Label(),"#");

-* Y1 Axis control

setScaleMaxAuto(getY1Axis(), false);

setScaleMax(getY1Axis(),4);

setY1MajorGridStepAuto(false);

setY1MajorGridStep(1);

Link to comment
Share on other sites

How about this, it seems to work:

GRAPH FILE ibisamp/ggsales

SUM CNT.DST.GGSALES.SALES01.CITY

BY GGSALES.SALES01.ST

ON GRAPH PCHOLD FORMAT JSCHART

ON GRAPH SET VZERO OFF

ON GRAPH SET GRWIDTH 1

ON GRAPH SET LOOKGRAPH BAR

ON GRAPH SET AUTOFIT ON

ON GRAPH SET STYLE *

*GRAPH_SCRIPT

setPlace(true);

setScaleMax(getY1Axis(),4); /* This sets the top number on the chart */

*END

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$

TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $

TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $

TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $

*GRAPH_SCRIPT

setReportParsingErrors(false);

setSelectionEnableMove(false);

*GRAPH_JS_FINAL

"axisList": {"y1": {"intervalMode": "count", /* Then set the intervalValue to one */

"intervalValue": 5} }, /* greater than the setScaleMax above. */

"blaProperties": {

"orientation": "horizontal"

},

*END

ENDSTYLE

END

 

 

image.png1201928 15.1 KB

Link to comment
Share on other sites

Thanks David for your suggestion. I tried this out and it did work when I drilled into a small number, however when I drilled into a value that was a large number, it is not dynamically knowing and changing it to work for larger numbers. Below is what it looks like when using your sample. Notice that the tool tip shows that there are 207, but the axis only showing 1,2,3,4.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...