// possibly hide lines on the chart, at user request.
boolean hidePlan = settings.getBool(CUSTOMIZE_HIDE_PLAN_LINE);
boolean hideForecast = settings.getBool(CUSTOMIZE_HIDE_FORECAST_LINE);
if (hidePlan || hideForecast)
xydata = new XYDatasetFilter(xydata)
.setSeriesHidden("Plan", hidePlan)
.setSeriesHidden("Forecast", hideForecast)
.setSeriesHidden("Optimized_Forecast", hideForecast);
// Alter the appearance of the chart.