Class CategoryDataSeriesKernel
java.lang.Object
com.illumon.iris.db.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. Note that when the cat plot has multiple series, things are more complicated and overall
ordering is managed by the
CategoryIndex
-
Constructor Summary
ConstructorsConstructorDescriptionCategoryDataSeriesKernel
(String categoryCol, String valueColumn, 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.void
close()
Detach any attached listeners, clear out any computed data and place the object into a state into which it can bereinitialized
.long
getCategoryKey
(Comparable<?> category) Get the index key of the category within the original dataset.getValue
(Comparable<?> category) Get the value of the specified category, or null if there was none.org.jfree.data.Range
Get the range of the dataset.void
initListeners
(Table baseTable, String listenerDescription, PlotInfo plotInfo) Initialize the update listener and attach it to the specified base table.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 String categoryCol, @NotNull String valueColumn, @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 -
initListeners
public void initListeners(@NotNull Table baseTable, @NotNull String listenerDescription, @NotNull PlotInfo plotInfo) Initialize the update listener and attach it to the specified base table.- Parameters:
baseTable
- The table to listen tolistenerDescription
- A description to include with the listener for the PELplotInfo
- thePlotInfo
for logging and error reporting
-
close
public void close()Detach any attached listeners, clear out any computed data and place the object into a state into which it can bereinitialized
. -
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.
-
getYRange
@NotNull public org.jfree.data.Range getYRange()Get the range of the dataset.
-