Hello,
I've created a JFreeChart embedded into a JPanel but I am not able to re-size the chart to let the plot fit exactly the dimension of the JPanel.
What type of parameters I need to re-define to let the chart being the same dimension of the JPanel?
Thanks in advance
P
Resize JFreeChart
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Re: Resize JFreeChart
Supply your org.jfree.chart.JFreeChart as a parameter to an org.jfree.chart.ChartPanel constructor. Add that panel to a Container having a layout that ignores the componet's preferred size, such as BorderLayout.CENTER. This example uses GridLayout.