Jump to content
We've recently updated our Privacy Statement, available here ×

How to change the width of the series in a chart so that they don't come out so thin


david212005

Recommended Posts

Hi David, If its of type high charts, you can add advance property  plotOptions.series.pointWidth to30. If its a Jfree chart, you need to 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

The below are the basic and professional charting libraries available. Seems you are using basic charts, for this you need to write chart customizers  to implement that. You can find samples of chart customizers in the below: https://github.com/TIBCOSoftware/jasperreports/tree/6.21.0/jasperreports/demo/samples/chartcustomizers

image.png.e828602892fc5d53e57b0b141960ef2d.png

Edited by rpachipu
  • Like 1
Link to comment
Share on other sites

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...