Class TimeSeriesChart

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.jfree.chart.ui.ApplicationFrame
es.upm.fi.cig.multictbnc.gui.TimeSeriesChart
All Implemented Interfaces:
WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class TimeSeriesChart extends org.jfree.chart.ui.ApplicationFrame
A class for creating and managing a time series chart using the JFreeChart library. This class is designed to display time series data in a dynamic and interactive chart.
See Also:
  • Constructor Details

    • TimeSeriesChart

      public TimeSeriesChart(String titleWindow, String labelX, String labelY, int[] rangeY, String... seriesNames)
      Constructs a TimeSeriesChart instance.
      Parameters:
      titleWindow - the title of the application window
      labelX - the label for the X-axis
      labelY - the label for the Y-axis
      rangeY - the range for the Y-axis
      seriesNames - the names of the series to be displayed in the chart
  • Method Details

    • update

      public void update(double[] newData)
      Updates the chart providing the Y axis value of several time series.
      Parameters:
      newData - new data points to be added to the chart, one for each series
    • update

      public void update(double newData)
      Updates the chart with a new value for the Y axis.
      Parameters:
      newData - new data point to be added to the chart