Controlling size of chart
Controlling size of chart
What is the best way to control the size of the chart? I have tried to use setSize but that doesn't seem to work.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The size of the chart is controlled by the width and height arguments you pass to the JFreeChart.draw() method.
If you are displaying the chart in a ChartPanel, then the width and height will be a function of the size of the panel, which is controlled by the layout manager in your user interface.
If you are displaying the chart in a ChartPanel, then the width and height will be a function of the size of the panel, which is controlled by the layout manager in your user interface.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

