Hello,
Actually, my ChartPanel is in a ScrollPane and I want to activate the vertical Scroll.
So I'd like to impose the size, especially the height, of the plots of my DomainCombinedXYPlot, which is in the ChartPanel. I want all the same size.
I tried setPreferredSize on the ChartPanel but it doesn't work well, maybe because the RangeAxis aren't recalculate, ut I am not sure.
Thanks for any help.
[Resolved] Size of a plot in a combinedPlot
[Resolved] Size of a plot in a combinedPlot
Last edited by zinZ on Mon Jul 23, 2007 3:30 pm, edited 1 time in total.
Call this method on each of the subplots with the same value to make them all the same size:
or call this method when you add the subplots:
Code: Select all
xyPlot.setWeight(int weight)
Code: Select all
combo.add(XYPlot subplot, int weight)
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The subplot height is determined dynamically, depending on the available space for the chart (which is determined externally, either by a Swing layout manager setting the size of the ChartPanel that contains the chart, or your code setting the size of a BufferedImage into which the chart is drawn, or...). JFreeChart always tries to draw the best chart it can at the size *given* to it from some other code.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

