I am generating a vertical bar chart and am trying to set the bar width using the following code:
CategoryPlot catPlot = barChart.getCategoryPlot();
CategoryAxis domainAxis= catPlot.getDomainAxis();
domainAxis.setCategoryMargin(0.05);
domainAxis.setUpperMargin(0.01);
domainAxis.setLowerMargin(0.01);
I'm trying to prevent my bars from becoming too wide. However, since I have no direct control over the width of the bars, I'm running into obstacles. For example, one of my charts has only one category, but three series. The above code generates three VERY large bars. I'd like the bars to never get above 30 pixels or so.
What is the best way to accomplish this? Any ideas?
Thanks,
Michael