I'm dynamically generating bar charts using ChartFactory.createVerticalBarChart and some of the queries return a single data point. This renders a single honking wide bar. I've tried using .setIntroGapPercent and .setTrailGapPercent whenever there's only one in an attempt to slim this bar down but it looks like it maxes out at 20% anything higher gets me
java.lang.IllegalArgumentException: BarPlot.setIntroGapPercent(double): argument outside valid range.
Has anyone come up with a work around for this?
Thanks
Todd
single data point - bar width
Re: single data point - bar width
Hi Todd,
There are a few MAX_??? constants at the top of the CategoryPlot.java source file that set the maximum allowed values for the intro gap, trail gap, series gap and category gap. Increase them to whatever values you want.
I put those checks in a long time ago thinking they would be helpful but now I'm not so sure...what do others think about removing the checks?
Regards,
DG.
There are a few MAX_??? constants at the top of the CategoryPlot.java source file that set the maximum allowed values for the intro gap, trail gap, series gap and category gap. Increase them to whatever values you want.
I put those checks in a long time ago thinking they would be helpful but now I'm not so sure...what do others think about removing the checks?
Regards,
DG.