I have stacked bar chart in which the number of columns is dynamic, can change from 1 to n columns. I want the spacing between the charts and width of the bar to be consistent. How do I fix it. Please suggest solutions / ideas.
+1
A:
StackedBarRenderer
devotes some effort to making the "spacing between the [bars] and width of the bar to be consistent." It's not clear what you want it to do differently as the number of columns changes. The relevant geometry is determined by the parent BarRenderer
in such methods as calculateBarWidth()
, which can be overridden as desired. Also, verify that there is a value for each category in each series.
trashgod
2010-05-11 17:21:04
I used setMaximumBarWidth method of renderer to set the width dynamically.
SKR
2010-05-20 03:10:35
Excellent. I wasn't aware of `setMaximumBarWidth()`, and it looks much easier. I'd up-vote it as a separate answer.
trashgod
2010-05-20 05:13:22