@Override
  public void showFilteredResult(
      List<WorkflowStateSummary> filteredlist, EngineLoadFilterModel usedFilter) {

    WorkflowStateSummary copperLoadInfo = filteredlist.get(0);
    Date date = new Date();
    // new SimpleDateFormat("HH:mm:ss").format(new Date());

    for (Entry<WorkflowInstanceState, Integer> entry :
        copperLoadInfo.getNumberOfWorkflowInstancesWithState().entrySet()) {
      Series<Number, Number> axis = stateToAxis.get(entry.getKey());
      ObservableList<Data<Number, Number>> data = axis.getData();
      data.add(new XYChart.Data<Number, Number>(date.getTime(), entry.getValue()));
      if (data.size() > MAX_DATA_POINTS) {
        data.remove(0);
      }

      if (usedFilter.stateFilters.get(entry.getKey()).getValue()) {
        if (!areaChart.getData().contains(axis)) {
          areaChart.getData().add(axis);
        }
      } else {
        areaChart.getData().remove(axis);
      }
    }

    ComponentUtil.setupXAxis((NumberAxis) areaChart.getXAxis(), areaChart.getData());
  }
  public void init() {

    chart = new ScatterChart<Number, Number>(xAxis, yAxis);
    chart.setPrefWidth(1400);
    chart.setPrefHeight(800);

    Series<Number, Number> seriesThumb = new Series<Number, Number>();
    seriesThumb.setName("Thumb");
    Series<Number, Number> seriesIndex = new Series<Number, Number>();
    seriesIndex.setName("Index");
    Series<Number, Number> seriesMiddle = new Series<Number, Number>();
    seriesMiddle.setName("Middle");

    int index = 0;
    for (ExFrame f : frames) {
      ExHand h = hand == 1 ? f.getRight() : f.getLeft();
      seriesThumb
          .getData()
          .add(new Data<Number, Number>(index + 1, h.getThumbVelocity().magnitude()));
      seriesIndex
          .getData()
          .add(new Data<Number, Number>(index + 1, h.getIndexVelocity().magnitude()));
      seriesMiddle
          .getData()
          .add(new Data<Number, Number>(index + 1, h.getMiddleVelocity().magnitude()));

      index++;
    }

    chart.getData().addAll(seriesThumb, seriesIndex, seriesMiddle);

    this.getChildren().add(chart);
  }
 protected LineChart<Number, Number> createChart() {
   final NumberAxis xAxis = new NumberAxis();
   final NumberAxis yAxis = new NumberAxis();
   final LineChart<Number, Number> lc = new LineChart<Number, Number>(xAxis, yAxis);
   // setup chart
   lc.setTitle("Basic LineChart");
   xAxis.setLabel("X Axis");
   yAxis.setLabel("Y Axis");
   // add starting data
   Series<Number, Number> series = new Series<Number, Number>();
   series.setName("Data Series 1");
   series.getData().add(new XYChart.Data<Number, Number>(20d, 50d));
   series.getData().add(new XYChart.Data<Number, Number>(40d, 80d));
   series.getData().add(new XYChart.Data<Number, Number>(50d, 90d));
   series.getData().add(new XYChart.Data<Number, Number>(70d, 30d));
   series.getData().add(new XYChart.Data<Number, Number>(170d, 122d));
   lc.getData().add(series);
   return lc;
 }