public class SlidingWindowExample implements GFlotExample {
public Widget createExample() {
PlotWithOverviewModel model = new PlotWithOverviewModel(PlotModelStrategy.slidingWindowStrategy(20));
PlotOptions plotOptions = new PlotOptions();
plotOptions.setDefaultLineSeriesOptions(new LineSeriesOptions().setLineWidth(1).setShow(true));
plotOptions.setDefaultPointsOptions(new PointsSeriesOptions().setRadius(2).setShow(true));
plotOptions.setDefaultShadowSize(0);
plotOptions.setXAxisOptions(new TimeSeriesAxisOptions());
PlotOptions overviewPlotOptions = new PlotOptions().setDefaultShadowSize(0).setLegendOptions(
new LegendOptions().setShow(false)).setDefaultLineSeriesOptions(
new LineSeriesOptions().setLineWidth(1).setFill(true)).setSelectionOptions(
new SelectionOptions().setMode(SelectionOptions.X_SELECTION_MODE).setDragging(true)).setXAxisOptions(
new TimeSeriesAxisOptions());
final SeriesHandler series = model.addSeries("Random Series", "#FF9900");