Reputation: 31
I am using JfreeCharts to make a XYBarChart and I would like to specify a particular width for the chart. From what I understand from the forums this is not possible. Is this truely the case?
I have tried:
changing the lowerMargin and upperMargin of the horizontal axis.
using renderer.setMargin()
(renderer
was accessed using chart.getPlot().getRenderer
)
However, this has not worked.
Upvotes: 0
Views: 283
Reputation: 205785
As an alternative to setSize()
, you can specify the desired parameters in your ChartPanel
constructor, as shown here.
Upvotes: 1
Reputation: 24340
You can set the size of the container of the chart (the ChartPanel
if you're using Swing, the ChartComposite
if you're using SWT, ...)
Upvotes: 1