Kristi Carter Posted December 15, 2020 Posted December 15, 2020 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.
Manoj Chaurasia Posted December 16, 2020 Posted December 16, 2020 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);
Kristi Carter Posted December 16, 2020 Author Posted December 16, 2020 Thanks for the info. I gave it a try and below is what it did, it is not quite working yet how I need it. Before adding the code. - After adding the code:
David Beagan Posted December 16, 2020 Posted December 16, 2020 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
Kristi Carter Posted December 17, 2020 Author Posted December 17, 2020 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.
David Beagan Posted December 17, 2020 Posted December 17, 2020 You would have to use Dialogue Manager and variables to selectively invoke the small integer solution when the chart runs. This could get a bit involved. So you have to consider is the solution provided by Mod Chuck, with whole numbers that repeat, good enough. Or is this a must have that justifies more work.
Kristi Carter Posted December 17, 2020 Author Posted December 17, 2020 I dont think it is something currently that needs to spend a lot of time on. I was just hoping someone knew of a option that would work.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now