Hello,
I am trying to figure out how to change from 'normal' range axis to logarithmic axis dynamically. I have a small test program with a button as follows:
JButton rangeButton = new JButton("Change Range");
rangeButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.out.println("rangeButton.actionPerformed");
VerticalLogarithmicAxis logAxis = new VerticalLogarithmicAxis("Log Axis");
plot.setRangeAxis(logAxis);
}
});
When I click the button nothing happens. I would have expected the chart to redraw with the new axis, but it doesn't.
I'm using version 0.9.2
Can anyone tell me how to do this?
Thank you,
Ted Hill
XYPlot.setRangeAxis()
Re: XYPlot.setRangeAxis()
Hi Ted,
I would have expected that to work too, but it doesn't because the setRangeAxis(...) method is not firing an AxisChangeEvent. I think it should be easy to add the event, but I'll have to do some tests to make sure it doesn't mess anything else up.
Regards,
DG.
I would have expected that to work too, but it doesn't because the setRangeAxis(...) method is not firing an AxisChangeEvent. I think it should be easy to add the event, but I'll have to do some tests to make sure it doesn't mess anything else up.
Regards,
DG.