I've placed my TimeSeries plot inside a ChartPanel, which in turn occupies only about half of my screen width. Now, the ChartPanel class has methods setMinimumDrawWidth() and setMaximumDrawWidth(), but they seemed to have no observable effect.
How can I "encourage" FreeChart to use up more of the width available to it?
How to change the _width_ of a plot?
Re: How to change the _width_ of a plot?
ps
that method is not static, i just wanted to show shich class it was in.
that method is not static, i just wanted to show shich class it was in.
Re: How to change the _width_ of a plot?
It is entirely up to the layout manager to determine the size of your ChartPanel...once the size is determined, JFreeChart will draw a chart to fit the available space.
The setMinimumDrawWidth(...) and setMaximumDrawWidth(...) methods don't control the size of the visible chart, they control the 'pre-transform' size of the chart. What happens is if the available space is smaller (or larger) than these settings, JFreeChart will draw the chart at the min (or max) size, then scale down (up) to fit the available space.
To see this in practice, run the demo and resize one of the chart frames to a very small size. What you see is a scaled down version of a chart that has been drawn at a logical size of 200 x 300 (or something around that size).
A similar effect happens if you resize the frame to something really large.
Regards,
DG.
The setMinimumDrawWidth(...) and setMaximumDrawWidth(...) methods don't control the size of the visible chart, they control the 'pre-transform' size of the chart. What happens is if the available space is smaller (or larger) than these settings, JFreeChart will draw the chart at the min (or max) size, then scale down (up) to fit the available space.
To see this in practice, run the demo and resize one of the chart frames to a very small size. What you see is a scaled down version of a chart that has been drawn at a logical size of 200 x 300 (or something around that size).
A similar effect happens if you resize the frame to something really large.
Regards,
DG.