Class TimeSeriesChartDescriptor

All Implemented Interfaces:
Descriptor

public class TimeSeriesChartDescriptor extends ChartDescriptor
ChartDescriptor for TimeSeries type charts where tick is the time value. This descriptor can provide metadata for aggregate type time series where each column of data is a series (e.g. "Agent Count") or non-aggregate time series where each unique value of some data column becomes a series (e.g. "Agent Id", and the data is the value of the dataValueId passed in the constructor.
Author:
Nick Collier
  • Constructor Details

    • TimeSeriesChartDescriptor

      public TimeSeriesChartDescriptor(String name)
    • TimeSeriesChartDescriptor

      public TimeSeriesChartDescriptor(String name, String dataValueId)
  • Method Details

    • getPlotRangeLength

      public int getPlotRangeLength()
      Returns:
      the plotRangeLength
    • setPlotRangeLength

      public void setPlotRangeLength(int plotRangeLength)
      Parameters:
      plotRangeLength - the plotRangeLength to set
    • getDataValueId

      public String getDataValueId()
      Gets the id of the data source used to provide the data for the time series. This is only applicable for time series of non-aggregate data.
      Returns:
      the id of the data source used to provide the data for the time series.
    • setDataValueId

      public void setDataValueId(String dataValueId)
      Sets the id of the data source used to provide the data for the time series. This is only applicable for time series of non-aggregate data. param dataValueId the id of the data source used to provide the data for the time series
    • addSeriesId

      public void addSeriesId(String id, String label, Color color)
      Adds the id of a data source to record as a series.
      Parameters:
      id -
      label - the chart series label for this id
    • addDataValueId

      public void addDataValueId(String dataValueId)
      Adds the id of a data source to record as a series.
    • dataValueIds

      public Iterable<String> dataValueIds()
      Gets an iterable over the data value ids.
      Returns:
    • clearSeriesIds

      public void clearSeriesIds()
      Clears the series data in this descriptor.
    • getSeriesIds

      public List<String> getSeriesIds()
      Gets a list of the data source ids to use as series in the chart.
      Returns:
      a list of the data source ids to use as series in the chart.
    • getSeriesLabel

      public String getSeriesLabel(String seriesId)
      Gets the label for the specified series.
      Parameters:
      seriesId -
      Returns:
      the label for the specified series.
    • getSeriesColor

      public Color getSeriesColor(String seriesId)
      Gets the color of the specified series.
      Parameters:
      seriesId -
      Returns:
      the color of the specified series, or null if there is no color.