make this simple. I have the need to present a secondary domain (y) axis on the chart.
code snibbet below:
Code: Select all
XYPlot plot = new XYPlot();
int nextPlot = 0;
...
Date Axis yAxis2 = new DateAxis("Time (HH:mm:ss.SSS)");
yAxis2.setInverted(true);
yAxis2.setDateFormatOverride(new SimpleDateFormat("HH:mm:ss.SSS"));
Date startDateandTime = firstDateandTime.toDate();
Date endDateandTime = endDateandTime.toDate();
yaxis2.setMinimumDate(startDateandTime);
yaxis2.setMaximumDate(endDateandTime);
plot.setRangeAxis(nextPlot, yAxis2, true);
The problem occurs not when zooming in but when selecting the
right-mouse option "auto range" and when it resets/scales the
secondary range axis is lost.
Ideas?
Fred