unnecessary space in bar chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
dpop
Posts: 20
Joined: Thu Jun 03, 2004 4:05 pm
Contact:

unnecessary space in bar chart

Post by dpop » Wed Sep 15, 2004 2:49 pm

hi
i have a bar chart that displays say 100 elements(bars). the problem is that on the right and left of the chart i have some un-necessary/unoccupied space that i don't want to display. seems that for a smaller number of bars the extra-space is smaller.
here is a pic that better shows what i mean

same picture shows indifferent to using setItemMargin, setCategoryItem

Image

thanks

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Wed Sep 15, 2004 3:44 pm

Try:

Code: Select all

plot.getDomainAxis().setLowerMargin(lowerMargin);
plot.getDomainAxis().setUpperMargin(upperMargin);

dpop
Posts: 20
Joined: Thu Jun 03, 2004 4:05 pm
Contact:

it worked

Post by dpop » Wed Sep 15, 2004 4:00 pm

it worked, thanks

Locked