Focal Point
Stacked Bar Graph

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

April 04, 2005, 09:21 PM
Prarie
Stacked Bar Graph
I am trying to do a Stacked Bar Graph with 3 fields. I want the Sum of each field to appear for EACH of it's section...but it adds them up bottem to top. Is there a way around this?
GRAPH FILE FGRAPH
HEADING CENTER
"Hourly Call Volume"
SUM ACDCALLS ABNCALLS VOICE
ACROSS TIME

ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D ON
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
April 04, 2005, 09:53 PM
Denver RSE
Prarie,

Try clicking on the Properties Tab, then on the Settings Subtab. Place a check mark in the first box, "Show Data Values".

Is that what you're looking for?
April 04, 2005, 10:02 PM
Prarie
I didn't post the rest of my Sytlesheet.
setDataTextDisplay (true);
setMarkerDisplay(true);

I'm getting Data Values...the problem is it adds them up. The first Value on the Stack is correct, the Second and Third are cumulative totals. I want each value on the stack to represent the Field.
April 04, 2005, 10:29 PM
Denver RSE
Interesting. I received similar results. I did notice that the values are represented on MouseOver, but they are still aggregated at top.

I was able to get the values to represent correctly by slightly modifying the graph layout (basically not using stacked).

I made one value of the Y axis a bar, another value a line. Not exactly what you are trying to do. If I find something, I will post. Sorry I couldn't help.
April 05, 2005, 06:12 AM
<JG>
you need another API call which is - setStackedDataValueSum(false);
April 05, 2005, 01:09 PM
Prarie
JC that was it! Thanks so much. Smiler
Denver Thanks for trying.

Is there any good resource to reference all these API calls?
April 05, 2005, 01:14 PM
<JG>
If you look in the devstudio bin subdirectory there is an old version called JavaGraphAPI.pdf about 900 pages.
Or better still download the new 5.3 version from IBI's doc services wf53graph.pdf (DN4500605.0904) over 1300 pages
April 05, 2005, 01:48 PM
Prarie
Thanks. I was hoping for the Readers Digest Version.
April 05, 2005, 02:40 PM
Prarie
JG...do you Know how to move the data on the Bar?
It is printing on the top and some are over lapping.

Thanks.
April 05, 2005, 03:02 PM
<JG>
yup.

setDataTextPosition(x);

where x is a value from 0 to 5 (0 is the default).

I would think either 3 , 4 or 5 would suit you.
April 05, 2005, 03:51 PM
Prarie
That worked Great. You are the Champ!
April 05, 2005, 10:34 PM
susannah
second that. JG stands for Java Guru !
March 21, 2006, 04:09 PM
Nailzz
I too have created a stacked bar graph and using JG guru's setStackedDataValuesSum(false) worked like a charm, but now I need to increase the font size. Does anybody know any code or how or where I can go to get the "Show Data Value" to increase their font size?


WebFOCUS 7.1.3 on Win 2000
March 21, 2006, 04:46 PM
Nailzz
quote:
Does anybody know any code or how or where I can go to get the "Show Data Value" to increase their font size?;


Imagine what you can do when you do some research. Found my own answer.

setTextFormatPreset(getDataText (2), 5);
setTextFormatPreset(getDataText (1), 6);
setTextFormatPreset(getDataText (0), 2);
setDataTextDisplay (true);
setViewableSeries (3);
setDataTextPosition(5);
setFontSizeAbsolute(getDataText (1), true);
setFontSizeAbsolute(getDataText (2), true);
setFontSizeAbsolute(getDataText (0), true);
setFontSize(getDataText (2), 14);
setFontSize(getDataText (1), 14);
setFontSize(getDataText (0), 14);


WebFOCUS 7.1.3 on Win 2000