Class CategoryDataSeriesKernel

java.lang.Object
io.deephaven.plot.datasets.category.CategoryDataSeriesKernel

public class CategoryDataSeriesKernel extends Object
The core of the Category data series update and indexing. This is used by the regular category data series to both update the values of existing categories as well as to ensure that new categories are maintained in order of the original table.
  • Constructor Details

    • CategoryDataSeriesKernel

      public CategoryDataSeriesKernel(@NotNull @NotNull String categoryCol, @NotNull @NotNull String valueColumn, @NotNull @NotNull PlotInfo plotInfo)
      Create a standard update kernel for a Category series.
      Parameters:
      categoryCol - The name of the column containing the categories.
      valueColumn - The name of the column containing the values
      plotInfo - The PlotInfo object for logging
  • Method Details

    • initMinMax

      public void initMinMax()
      Reinitialize the min and max values to Nan in preparation for reinitialization
    • size

      public int size()
      Get the size of the dataset (the number of categories)
      Returns:
      the number of categories in the dataset.
    • categories

      public Collection<Comparable> categories()
      Get an ordered list of the categories in the data.
      Returns:
      the ordered categories of the data
    • getValue

      @Nullable public @Nullable Number getValue(Comparable<?> category)
      Get the value of the specified category, or null if there was none.
      Parameters:
      category - The category to get the value of
      Returns:
      the value of the specified category
    • getCategoryKey

      public long getCategoryKey(Comparable<?> category)
      Get the index key of the category within the original dataset. This can be used to enforce a global ordering of a MultiSeries cat plot.
      Parameters:
      category - The category to locate.
      Returns:
      the key of the specified category within the original data set. or -1 if not present.