@@ -0,0 +1,3323 @@
+package com.cisco.trex.stl.gui.controllers.dashboard.charts;%0A%0Aimport com.cisco.trex.stl.gui.models.CpuUtilStatPoint;%0Aimport com.exalttech.trex.util.ArrayHistory;%0Aimport com.exalttech.trex.util.Initialization;%0Aimport javafx.beans.property.SimpleIntegerProperty;%0Aimport javafx.beans.value.ObservableValue;%0Aimport javafx.fxml.FXML;%0Aimport javafx.scene.Node;%0Aimport javafx.scene.chart.NumberAxis;%0Aimport javafx.scene.chart.XYChart;%0Aimport javafx.scene.layout.AnchorPane;%0A%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.concurrent.atomic.AtomicInteger;%0A%0Apublic class CPUUtilizationChartController extends AnchorPane %7B%0A%0A    @FXML%0A    private AnchorPane root;%0A    %0A    @FXML%0A    private javafx.scene.chart.LineChart%3CDouble, Number%3E chart;%0A    %0A    @FXML%0A    private NumberAxis xAxis;%0A    %0A    @FXML%0A    private NumberAxis yAxis;%0A    %0A    private static String%5B%5D colors = new String%5B%5D %7B%22#f3622d%22, %22#fba71b%22, %22#57b757%22, %22#41a9c9%22, %22#4258c9%22, %22#9a42c8%22, %22#c84164%22, %22#888888%22%7D;%0A    %0A    public CPUUtilizationChartController() %7B%0A        Initialization.initializeFXML(this, %22/fxml/dashboard/charts/LineChart.fxml%22);%0A        xAxis.lowerBoundProperty().bind(new SimpleIntegerProperty(300).negate());%0A        yAxis.setLabel(%22CPU Load (%25)%22);%0A        chart.setLegendVisible(true);%0A    %7D%0A    %0A    public void render(Map%3CString, ArrayHistory%3CCpuUtilStatPoint%3E%3E cpuUtilizationHistoryMap) %7B%0A        chart.getData().clear();%0A%0A        final List%3CXYChart.Series%3CDouble, Number%3E%3E seriesList = new LinkedList%3C%3E();%0A        final AtomicInteger index = new AtomicInteger(0);%0A        cpuUtilizationHistoryMap.entrySet()%0A                                .stream()%0A                                .limit(colors.length)%0A                                .forEach(entry -%3E %7B%0A                                    String core = entry.getKey();%0A                                    ArrayHistory%3CCpuUtilStatPoint%3E history = entry.getValue();%0A                                    XYChart.Series%3CDouble, Number%3E series = new XYChart.Series%3C%3E();%0A                                    series.setName(core);%0A                        %0A                                    double lastTime = history.last().getTime();%0A                                    %0A                                    int size = history.size();%0A                                    for (int i = 0; i %3C size; ++i) %7B%0A                                        final CpuUtilStatPoint point = history.get(i);%0A                                        final double time = point.getTime();%0A                                        series.getData().add(new XYChart.Data%3C%3E(time - lastTime, point.getValue()));%0A                                    %7D%0A                                    setSeriesColor(series, colors%5Bindex.getAndIncrement()%5D);%0A                                    seriesList.add(series);%0A        %7D);%0A        chart.getData().addAll(seriesList);%0A    %7D%0A%0A    private void setSeriesColor(final XYChart.Series%3C?, ?%3E series, final String color) %7B%0A        series.nodeProperty().addListener((ObservableValue%3C? extends Node%3E observable, Node oldValue, Node newValue) -%3E %7B%0A            if (oldValue == null && newValue != null) %7B%0A                series.getNode().setStyle(String.format(%22-fx-stroke: %25s; -fx-stroke-line-join: round;%22, color));%0A            %7D%0A        %7D);%0A    %7D%0A%7D%0A

Add Add UtilizationController.