A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
PhilDeFer
- Posts: 6
- Joined: Sat Mar 07, 2009 1:12 am
Post
by PhilDeFer » Sun Apr 05, 2009 11:06 pm
Hi, I want to have my bars expanded when displayed on a bar chart.
Here is what I want to get (obtained using a StackedBarChart) :
Here is what Im getting with the BarChart :

-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Mon Apr 06, 2009 8:05 am
You have 3 series and 3 categories in your dataset - nine items in total. Six of your dataset items have null values and the renderer is leaving space for those. You have two options:
(1) Write a custom renderer that ignores null values and doesn't allocate any space for them;
(2) Populate your dataset so that it has just one series with three items.
-
PhilDeFer
- Posts: 6
- Joined: Sat Mar 07, 2009 1:12 am
Post
by PhilDeFer » Mon Apr 06, 2009 9:54 am
This helped a lot !
Thank you !