How can I set static length of X and Y axis
How can I set static length of X and Y axis
Hello,
I want to set static length of X and Y axis.
at the moment the length is controlled automatically depending on data.
is that possible??
thank you in advance
I want to set static length of X and Y axis.
at the moment the length is controlled automatically depending on data.
is that possible??
thank you in advance
using JFreeChart 1.0.0 rc1, Java 1.4.2
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Yes. Try setRangeZoomable(false) in the ChartPanel class.Anonymous wrote:Is there a way to keep length of the axis (specifically the Y axis) static even when zooming?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Something like this:
public JCandlestickChartDemo1(String s)
{
super(s);
OHLCDataset ohlcdataset = createDataset();
JFreeChart jfreechart = createChart(ohlcdataset);
jfreechart.getXYPlot().setOrientation(PlotOrientation.VERTICAL);
ChartPanel chartpanel = new ChartPanel(jfreechart);
chartpanel.setRangeZoomable(false); //keyline
chartpanel.setPreferredSize(new Dimension(500, 270));
setContentPane(chartpanel);
}
public JCandlestickChartDemo1(String s)
{
super(s);
OHLCDataset ohlcdataset = createDataset();
JFreeChart jfreechart = createChart(ohlcdataset);
jfreechart.getXYPlot().setOrientation(PlotOrientation.VERTICAL);
ChartPanel chartpanel = new ChartPanel(jfreechart);
chartpanel.setRangeZoomable(false); //keyline
chartpanel.setPreferredSize(new Dimension(500, 270));
setContentPane(chartpanel);
}
Something like this:
public JCandlestickChartDemo1(String s)
{
super(s);
OHLCDataset ohlcdataset = createDataset();
JFreeChart jfreechart = createChart(ohlcdataset);
jfreechart.getXYPlot().setOrientation(PlotOrientation.VERTICAL);
ChartPanel chartpanel = new ChartPanel(jfreechart);
chartpanel.setRangeZoomable(false); //keyline
chartpanel.setPreferredSize(new Dimension(500, 270));
setContentPane(chartpanel);
}
public JCandlestickChartDemo1(String s)
{
super(s);
OHLCDataset ohlcdataset = createDataset();
JFreeChart jfreechart = createChart(ohlcdataset);
jfreechart.getXYPlot().setOrientation(PlotOrientation.VERTICAL);
ChartPanel chartpanel = new ChartPanel(jfreechart);
chartpanel.setRangeZoomable(false); //keyline
chartpanel.setPreferredSize(new Dimension(500, 270));
setContentPane(chartpanel);
}