how to control the width of the columns of the bar chart

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

how to control the width of the columns of the bar chart

Post by zhengyu xia » Thu Jan 23, 2003 3:13 am

I create a bar chart has two columns , the columns are very wide
I want to reduse the width of column how to do it

David Gilbert

Re: how to control the width of the columns of the bar chart

Post by David Gilbert » Fri Jan 24, 2003 10:51 am

There is no direct control over the width of the bars, they use up the available space after the gaps have been distributed.

In 0.9.4, you can use the setCategoryGapsPercent(...) and setItemGapsPercent(...) methods to increase the amount of space between the bars. And the setIntroGapPercent(...) and setTrailGapPercent(...) methods to control the space before the first bar and after the last bar. All in the CategoryPlot class.

This control has been passed to the CategoryAxis class in 0.9.5...

Regards,

Dave Gilbert

Locked