How to NOT show zero in item Label of bar chart ?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Ann

How to NOT show zero in item Label of bar chart ?

Post by Ann » Thu Oct 06, 2005 1:23 am

I have a stacked bar chart and i am showing the item lable. I am using the StandardCategoryItemLabelGenerator
Is there a way to NOT show the item label if the value is 0 (zero) ? Right now, it looks very strange when the lower bar has a value of 10, labeled, and on top of that is nothig but a 0.
Which method i can overwrite to not show the value if it is 0 ?
The data will not consist of any negative numbers.

thanks
Ann.

Ann

Post by Ann » Fri Oct 07, 2005 5:52 am

Can someone help me out please ?

thanks
Ann

pmlb
Posts: 31
Joined: Thu Aug 25, 2005 5:18 pm
Location: France

Post by pmlb » Fri Oct 07, 2005 3:34 pm

You could extend StandardCategoryItemLabelGenerator and override generateLabel() method to make it return null when the value is 0
Pierre-Marie

Locked