Display "Total" on a stacked bar chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ccapano
Posts: 12
Joined: Mon Sep 12, 2005 9:22 pm
Location: Frederick, Maryland
Contact:

Display "Total" on a stacked bar chart

Post by ccapano » Fri Sep 30, 2005 3:44 am

I currently have a stacked bar chart with x sections on each bar. I have each individual section displaying the value by using:

// disable bar outlines...
BarRenderer renderer = (BarRenderer) barPlot.getRenderer();
renderer.setDrawBarOutline(false);
renderer.setItemLabelsVisible(true);

CategoryLabelGenerator gen = new StandardCategoryLabelGenerator("{2}",new DecimalFormat("0"));
renderer.setLabelGenerator(gen);
renderer.setPositiveItemLabelPosition(
new ItemLabelPosition(
ItemLabelAnchor.CENTER,
TextAnchor.CENTER,
TextAnchor.CENTER,
0.0));

Is there a way that i can display the total of all sections above each bar?


(Total here)
___
| |
| |

Locked