Barchart : Lots of space inbetween bars. Need solution

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

Barchart : Lots of space inbetween bars. Need solution

Post by sumanseshadri » Tue Apr 11, 2006 1:34 am

Hi all,

I have a bar graph that works well when there is a lot of data. But very bad when very few data.

In the chart that works well, I have pairs of bars, meaning, In each category , I have two bars , as a pair, with no space inbetween them. renderer.setItemMargin(0); here I have 12 pairs of bars and it works fine.

I generate these charts dynamically. But when there are only 2 bars rendered, I expect the 2 bars to be side by side. But that does not happen. There is a looot of space inbetween the bars.

Why ? I need a solution. Please help. Is this a bug ? Is there a work around ?
Last edited by sumanseshadri on Tue Apr 11, 2006 1:52 am, edited 1 time in total.

sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

Post by sumanseshadri » Tue Apr 11, 2006 1:34 am

And how can I upload images ?

sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

Post by sumanseshadri » Tue Apr 11, 2006 2:09 am

I added dummy values. So, now its ok.

Locked