Focal Point
[SOLVED] hiding zero in 3D stacked bar graph

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

March 12, 2009, 07:42 AM
ajayantony
[SOLVED] hiding zero in 3D stacked bar graph
Hi,
3D stacked bar graph is showing bar for zero along the zero axis line.
I want just a gap to be displayed for zero values.
I tried vzero=off,setZeroValueDataTextDisplay(false), its does not work?
Any solution to this problem?

This message has been edited. Last edited by: Kerry,
March 12, 2009, 10:06 AM
Prarie
Well haven't had to say this in a while...please go to your profile and update your signature with what version of WebFocus. You are using. setZeroValueDataTextDisplay(false) should work. Will you post the rest of your style sheet please?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Given below is the code, i have used setZeroValueDataTextDisplay(false) in it but its not working.

If you run the below piece of code, you can see bar along the zero line corresponding to SALES 0$, how can these be avoided?
-----------------------

-SET &ECHO = ALL

GRAPH FILE CAR
SUM
SALES
ACROSS CAR
BY COUNTRY
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET HAXIS 475
ON GRAPH SET VAXIS 280
ON GRAPH SET UNITS PIXELS
ON GRAPH SET VZERO OFF
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBITrueColors.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(10);
setPlace(true);
setTextString(getTitle(),"Sales by Product");
setDisplay(getTitle(),true);
setTransparentBorderColor(getChartBackground(),false);
setSeriesLooping(31);
setFillColor(getSeries(0),new Color(255,0,0));
setFillColor(getFrame(),new Color(238,238,238));
setFillColor(getSeries(1),new Color(0,128,64));
setFillColor(getSeries(2),new Color(128,0,0));
setO1MajorGridDisplay(false);
setFillColor(getSeries(0),new Color(238,150,192));
setFillColor(getSeries(1),new Color(190,193,244));
setFillColor(getSeries(2),new Color(88,203,135));
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentFillColor(getFrame(),true);
setBorderColor(getFrame(),new Color(192,192,192));
setTransparentBorderColor(getFrameSide(),true);
setTransparentBorderColor(getFrameBottom(),true);
setBorderColor(getO1AxisLine(),new Color(192,192,192));
setBorderColor(getY1AxisLine(),new Color(192,192,192));
setBorderColor(getY1MajorGrid(),new Color(192,192,192));
setTextFormatPreset(getDataText(),-1);
setTextFormatPattern(getDataText(),"###,###,###,###.##");
setBorderColor(getChartBackground(),new Color(192,192,192));
setTransparentBorderColor(getFrameBottom(),false);
setFillColor(getFrameBottom(),new Color(192,192,192));
setTransparentFillColor(getFrameBottom(),true);
setZeroValueDataTextDisplay(false);
ENDSTYLE
END
-EXIT

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


WebFOCUS 7.6.6
Windows XP
Output: Excel, PDF, HTML
Try this.
it will start at the true value not 0. If there are no 0's

setY1MustIncludeZero(false);
setY1MustIncludeZero(false); is also not working.
If you run the above code, with setY1MustIncludeZero(false); we still get bars for zero , for example see country - england, car - jensen combination for which Sales $0, but we still get a blue bar along the zero line.
Is there a way to avoid this?


WebFOCUS 7.6.6
Windows XP
Output: Excel, PDF, HTML
Yes that code will only get you the effect if there are no 0's then it does not reflect the 0. Not sure how to do exactly what you want. Perhaps someone else will come along with a solution.
Are you wanting the spaces for the columns to show or do you just want the six columns where total sales gt 0?

T
I want columns gt 0 only to be shown. Thats the requirement.
But i would also like to know how can we show spaces for the columns as well, just in case a requirement like this comes up.
Thanks.

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


WebFOCUS 7.6.6
Windows XP
Output: Excel, PDF, HTML
Add the next three lines to your request as you posted it earlier in this thread:
setScaleMinAuto(getY1Axis(),false);
setScaleMin(getY1Axis(),0.01);
setDisplayOffScale(getY1Axis(),false);

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
My problem is partially resolved.
If you run the above code, in the graph generated, if you look at the bar pertaining to 'Toyota', you could see on top surface of the bar is 'blue'.
'Blue' corresponds to West Germany, if you check the table, West Germany has 'null' records pertaining to 'Toyota'. So my requirement is , the blue color shouldnt come.
Is this possible?


WebFOCUS 7.6.6
Windows XP
Output: Excel, PDF, HTML
quote:
I want columns gt 0 only to be shown. Thats the requirement.
If that is your real requirement then -
WHERE SALES GT 0

For your own benefit I would advise you to download a copy of the advanced graphing manual from IB's website. You will need valid maintenance to be able to do this.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
T,

He wants to show only those records that have values gt 0, but also show place holders for those records that do not meet this requirement.
And your remark about the advanced graph manual is valid of course.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
GamP,

That's why I asked him the question towards the beginning. In his latest reply he said he only needed those columns gt 0 (which is why I quoted his post) and the answer to that is WHERE SALES GT 0.

I know he also would like to know how to have "missing" columns in his output ...
quote:
just in case a requirement like this comes up.
which is a different story. I am not sure that he can achieve it totally within a 3D graph. 2D quite easily using VZERO setting but I haven't tried it with 3D and the advanced graphing engine.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10