Jump to content

How to increase or decrease width of bar chart


Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

You should create a barchart customizer class to control width of bar chart and use the setMaximumBarWidth attribute

CategoryPlot categoryPlot=chart.getCategoryPlot();
BarRenderer renderer=(BarRenderer)categoryPlot.getRenderer();
renderer.setMaximumBarWidth(.30);  //Set maximum width of barchart to 30 percent

Link to comment
Share on other sites

  • 3 years later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...