Class CategoryDataSeriesKernel
java.lang.Object
io.deephaven.plot.datasets.category.CategoryDataSeriesKernel
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 Summary
ConstructorDescriptionCategoryDataSeriesKernel
(@NotNull String categoryCol, @NotNull String valueColumn, @NotNull PlotInfo plotInfo) Create a standard update kernel for a Category series. -
Method Summary
Modifier and TypeMethodDescriptionGet an ordered list of the categories in the data.long
getCategoryKey
(Comparable<?> category) Get the index key of the category within the original dataset.@Nullable Number
getValue
(Comparable<?> category) Get the value of the specified category, or null if there was none.void
Reinitialize the min and max values to Nan in preparation for reinitializationint
size()
Get the size of the dataset (the number of categories)
-
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 valuesplotInfo
- ThePlotInfo
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
Get an ordered list of the categories in the data.- Returns:
- the ordered categories of the data
-
getValue
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
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.
-