Class Dataset<T extends Dataset<T,O>,O>

java.lang.Object
software.xdev.chartjs.model.dataset.Dataset<T,O>
Direct Known Subclasses:
BackgroundBorderHoverDataset, PointDataset

public abstract class Dataset<T extends Dataset<T,O>,O> extends Object
  • Field Details

  • Constructor Details

    • Dataset

      public Dataset()
  • Method Details

    • defaultType

      protected abstract String defaultType()
    • withDefaultType

      public T withDefaultType()
      Set's the default type
    • getType

      public String getType()
    • setType

      public T setType(String type)
      Sets the type of the dataset.

      Usually only required for mixed charts

    • getData

      public List<Object> getData()
      Returns:
      an unmodifiable view of the data held in this Dataset, never null
    • getData

      public <X> List<X> getData(Class<X> filterClazz)
      Returns:
      an unmodifiable view of the data held in this Dataset, never null
    • setDataUnchecked

      public T setDataUnchecked(Collection<?> data)
      See Also:
    • setData

      public T setData(Collection<O> data)
      Sets the backing data list to the argument, replacing any data already added or set
      Parameters:
      data - The data to plot in a line
    • setDataUnchecked

      public T setDataUnchecked(Object... data)
      See Also:
    • setData

      public T setData(O... data)
      Sets the backing data list to the argument, replacing any data already added or set
      Parameters:
      data - The data to plot in a line
    • clearData

      public T clearData()
      Remove all data held by this Dataset
    • addDataUnchecked

      public T addDataUnchecked(Object data)
      See Also:
    • addData

      public T addData(O data)
      Add the data point to this Dataset
      Parameters:
      data - a O, can be null to signify absence of data for a given point
      See Also:
    • self

      public T self()