Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFreeChart - StackedBarChart Width

 
Astria Bothello
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to set the width of my stackedbarchart. I have used the following to set the width.

((BarRenderer)plot.getRenderer()).setMaximumBarWidth(.15);
((BarRenderer)plot.getRenderer()).setItemMargin(.5);

But this works only if I have one bar displayed. See attachment - one
If I have multiple bars (as per the series) the width seems to be auto set. See attachment - multiple

Appreciate any suggestions
one.gif
[Thumbnail for one.gif]
multiple.gif
[Thumbnail for multiple.gif]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic