When trying to work with the domain axis (horizintal axis) on an XYChart, I get the following exception:
java.lang.ClassCastException: com.jrefinery.chart.HorizontalNumberAxis
Can anyone help me figure out what I am doing wrong?
Here is what I have -
1) Data is in a BasicTimeSeries, using the Millisecond class.
2) I get a reference to a plot,
XYPlot plot = chart.getXYPlot();
3) I get a reference to the HorizontalDateAxis,
HorizontalDateAxis axis = (HorizontalDateAxis)plot.getDomainAxis();
At this point, I get the exception.
DomainAxis - ClassCastException
Re: DomainAxis - ClassCastException
The horizontal axis could be a HorizontalNumberAxis or a HorizontalDateAxis, depending on how you generated your chart. It looks like you have a HorizontalNumberAxis.
Regards,
DG
Regards,
DG