Focal Point
[SOLVED] Adjustment of Graph Scale

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

August 22, 2012, 04:26 PM
Mary
[SOLVED] Adjustment of Graph Scale
Hi All,

I have a report which has a stacked bar chart. Two of the parameters(warehouse number and Org number) are passed to the chart from the Listbox in the dashboard. My graph should display the qty shipped on the week from the warehouse and Org selected. When My parameter is ALL/_FOC_NULL, The report is displaying in a nice way.

But when there is a specific value is passed, the graph y axis minimum scale starts with the sum.(sum of qty). So the graph is showing nothing as the min value of the scale is the highest total.

I want the graph to always start from the zero, whatever is passed as the parameter. This is an existing report done by another person. I am not able to open in any of the Graph Editor, cause so many other definitions, DM and &var are tied around the graph.

So I am editing thru Text editor. If any one can give me an idea which property or settings do I need to change.

We are using Web focus 7.7.03 on
windows 7.

Thanks

This message has been edited. Last edited by: Kerry,
August 22, 2012, 04:36 PM
Prarie
I believe it is this
setScaleFromZero(true);  

August 23, 2012, 01:23 PM
Mary
Hi Prarie,

Thanks for the reply. But this setScaleFromZero is not working for me. I think it is because it has dynamic calculation for the legends and some other calculations for the looping as it is a stacked bar chart.

Here is a piece of code from program. If you or any others have a new idea , please share it here in the Forum.

GRAPH FILE OUTBOUND
HEADING
"&D_MEASURES - Total &TMOD <+0> -* Created by Advanced Graph Assistant
SUM

-REPEAT :Show_Modes FOR &N FROM 1 TO &MODES_NUM ;
MODE&N AS '&MODE&N.EVAL'
-:Show_Modes
BY SHIPDATE NOPRINT
BY OUTBOUND.OUTBOUND.DIS_DATE AS 'Ship Date'
WHERE OT_TYPE EQ 'SCHED'
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 560
ON GRAPH SET VAXIS 278
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBIRIADarkOceanRounded.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
setDepthRadius(0);
setDepthAngle(0);
setDisplay(getY1MajorGrid(),false);
setDisplay(getO1MajorGrid(),false);
setTransparentFillColor(getFrame(),true);
setTransparentBorderColor(getFrame(),true);
setTextRotation(getO1Label(),3);
setFontName(getY1Label(),"Arial");
setFontSizeAbsolute(getY1Label(),true);
setFontSizeInPoints(getY1Label(),8);
setPlaceResize(getY1Label(),0);
setFontName(getO1Label(),"Arial");
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),8);
setPlaceResize(getO1Label(),0);
setRiserWidth(50);
setRiserBarGroupSpacing(20);
setFillColor(getLegendArea(),new Color(0,0,0));
setFontName(getLegendText(),"Arial");
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),8);
setPlaceResize(getLegendText(),0);
setFillColor(getLegendText(),new Color(255,255,255));
setFillColor(getSeries(2),new Color(0,255,0));
setFillColor(getSeries(3),new Color(0,0,255));
setFillColor(getSeries(0),new Color(255,128,0));
setFillColor(getSeries(1),new Color(255,0,0));
setFillColor(getSeries(4),new Color(128,128,128));
setFillColor(getSeries(5),new Color(255,255,0));
setFillColor(getSeries(6),new Color(128,0,128));
setFillColor(getSeries(7),new Color(255,128,255));
ENDSTYLE
ON GRAPH SET STYLE *

Thanks ,
Mary...
August 23, 2012, 06:43 PM
Mary
Hi

I found the answer from the manual Webfocus Graphics. I added the following line to my chart property, it solved my problem.

setY1MustIncludeZero(true);

Thanks
May 15, 2015, 12:49 AM
spunkkaran
quote:
setY1MustIncludeZero(true);


Thank you Mary this helped Smiler


Webfocus 7.7