-
- public void addMarker(String label, int fetch, Color color) {
- AltosUIMarker marker = new AltosUIMarker(fetch, color, plot);
+
+ void addAxis(AltosUIAxis axis) {
+ if (!axes_added.containsKey(axis.index)) {
+ axes_added.put(axis.index, true);
+ plot.setRangeAxis(axis.index, axis);
+ }
+ }
+
+ public void addSeries(AltosUITimeSeries series) {
+ XYSeriesCollection dataset = new XYSeriesCollection(series.xy_series());
+
+ addAxis(series.axis);
+
+ series.renderer.setPlot(plot);
+ plot.setDataset(series_index, dataset);
+ plot.setRenderer(series_index, series.renderer);
+ plot.mapDatasetToRangeAxis(series_index, series.axis.index);