Controlling size of chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
keene
Posts: 3
Joined: Tue Jun 27, 2006 3:03 am

Controlling size of chart

Post by keene » Mon Jan 15, 2007 9:01 pm

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.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Jan 16, 2007 12:11 pm

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.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked