/** * Receives notification of a change to the plot's dataset. * <P> * The axis ranges are updated if necessary. * * @param event information about the event (not used here). */ @Override public void datasetChanged(DatasetChangeEvent event) { super.datasetChanged(event); if (this.subplots == null) { return; // this can happen during plot construction } XYDataset dataset = null; if (event.getDataset() instanceof XYDataset) { dataset = (XYDataset) event.getDataset(); } for (XYPlot subplot : this.subplots) { if (subplot.indexOf(dataset) >= 0) { subplot.configureRangeAxes(); } } }
CategoryDataset dataset = (CategoryDataset) event.getDataset();