about bar chart

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

about bar chart

Post by zhengyu xia » Tue Feb 11, 2003 2:31 am

hi:
anyone know the version 0.95 of jfreechart how to control the columns the width
(
In version 0.94 ,I could use the method
"CategoryPlot plot = chart.getCategoryPlot();
plot.setIntroGapPercent(0.5);"
)
I dont know how to do it in the version 0.95.please help me

David Gilbert

Re: about bar chart

Post by David Gilbert » Tue Feb 11, 2003 9:45 am

The category spacing is now controlled by the axis. You can use:

setLowerMargin(...) - to control the gap before the first category;
setCategoryMargin(...) - to control the gaps between categories;
setUpperMargin(...) - to control the gap after the last category;

These methods are defined in the CategoryAxis class.

Regards,

Dave Gilbert

Locked