Class CategoryDataSeriesMap
java.lang.Object
com.illumon.iris.db.plot.AbstractSeriesInternal
com.illumon.iris.db.plot.datasets.AbstractDataSeries
com.illumon.iris.db.plot.datasets.category.AbstractCategoryDataSeries
com.illumon.iris.db.plot.datasets.category.AbstractMapBasedCategoryDataSeries
com.illumon.iris.db.plot.datasets.category.CategoryDataSeriesMap
- All Implemented Interfaces:
CategoryDataSeries
,CategoryDataSeriesInternal
,DataSeries
,DataSeriesInternal
,PlotExceptionCause
,Series
,SeriesInternal
,Serializable
public class CategoryDataSeriesMap extends AbstractMapBasedCategoryDataSeries
A dataset for categorical data which maps a category to it's numerical value.
The number of categories and the number of values must be the same. Does not support repeat categories.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CategoryDataSeriesMap(AxesImpl axes, int id, Comparable<?> name, IndexableData<T> categories, IndexableNumericData values)
Creates an instance of CategoryDataSeriesMap, which maps a category to it's numerical value.CategoryDataSeriesMap(AxesImpl axes, int id, Comparable<?> name, IndexableData<T> categories, IndexableNumericData values, AbstractCategoryDataSeries series)
-
Method Summary
Modifier and Type Method Description Collection<Comparable>
categories()
Gets the categories of the dataset.CategoryDataSeriesMap
copy(AxesImpl axes)
Create a copy of the series on a different set of axes.CategoryDataSeriesMap
createSnapshot()
Returns a snapshot of this dataset which will not update.long
getCategoryLocation(Comparable category)
Get the row key of the specified series.Number
getValue(Comparable category)
Gets the numeric value corresponding to the givencategory
.org.jfree.data.Range
getYRange()
Gets the y range of this dataset.void
init()
Do any required initialization before data may be read from the series.int
size()
Gets the size of this data set.Methods inherited from class com.illumon.iris.db.plot.datasets.category.AbstractMapBasedCategoryDataSeries
pointColor, pointColorByY, pointColorInteger, pointLabel, pointShape, pointSize
Methods inherited from class com.illumon.iris.db.plot.datasets.category.AbstractCategoryDataSeries
colorsSetSpecific, errorBarColor, errorBarColor, errorBarColor, getColor, getGroup, getLabel, getPiePercentLabelFormat, getPointShape, getPointSize, getSeriesColor, gradientVisible, group, labelsSetSpecific, lineColor, lineColor, lineColor, lineStyle, linesVisible, onClose, piePercentLabelFormat, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorByY, pointColorByY, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointLabelFormat, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, setPiePercentLabelFormat, shapesSetSpecific, sizesSetSpecific, snapshotModifiers, toolTipPattern, xToolTipPattern, yToolTipPattern
Methods inherited from class com.illumon.iris.db.plot.datasets.AbstractDataSeries
chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, setErrorBarColor, setErrorBarColor, setErrorBarColor, setGradientVisible, setLineColor, setLineColor, setLineColor, setLineStyle, setLinesVisible, setPointLabelFormat, setPointsVisible, setXToolTipPattern, setYToolTipPattern
Methods inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, axes, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, id, name, removeTableHandle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.plot.datasets.category.CategoryDataSeries
pointColor, pointColorInteger, pointLabel, pointShape, pointSize
Methods inherited from interface com.illumon.iris.db.plot.datasets.category.CategoryDataSeriesInternal
drawYError, getEndY, getStartY
Methods inherited from interface com.illumon.iris.db.plot.datasets.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, id, name
Methods inherited from interface com.illumon.iris.db.plot.SeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, onInflate, removeTableHandle
-
Constructor Details
-
CategoryDataSeriesMap
public CategoryDataSeriesMap(AxesImpl axes, int id, Comparable<?> name, IndexableData<T> categories, IndexableNumericData values)Creates an instance of CategoryDataSeriesMap, which maps a category to it's numerical value.The number of categories and the number of values must be the same. Does not support null or repeat categories.
- Type Parameters:
T
- type of the categorical data- Parameters:
axes
-AxesImpl
on which this dataset is being plottedid
- data series idname
- series namecategories
- categorical datavalues
- numerical data- Throws:
IllegalArgumentException
-categories
andvalues
must not be nullcategories
andvalues
must have equal sizesUnsupportedOperationException
-categories
must not contain null valuescategories
must not contain repeat values
-
CategoryDataSeriesMap
public CategoryDataSeriesMap(AxesImpl axes, int id, Comparable<?> name, IndexableData<T> categories, IndexableNumericData values, AbstractCategoryDataSeries series)
-
-
Method Details
-
init
public void init()Description copied from interface:CategoryDataSeriesInternal
Do any required initialization before data may be read from the series. -
copy
Description copied from interface:SeriesInternal
Create a copy of the series on a different set of axes.- Parameters:
axes
- new axes.- Returns:
- copy of the series on a different set of axes.
-
size
public int size()Description copied from interface:DataSeriesInternal
Gets the size of this data set.- Returns:
- size of this data set
-
categories
Description copied from interface:CategoryDataSeriesInternal
Gets the categories of the dataset.- Returns:
- all categories in the dataset
-
getValue
Description copied from interface:CategoryDataSeriesInternal
Gets the numeric value corresponding to the givencategory
.- Parameters:
category
- category- Returns:
- numeric value corresponding to the given
category
-
getCategoryLocation
Description copied from interface:CategoryDataSeriesInternal
Get the row key of the specified series.- Returns:
-
getYRange
public org.jfree.data.Range getYRange()Description copied from interface:CategoryDataSeriesInternal
Gets the y range of this dataset.- Returns:
- y range of this dataset
-
createSnapshot
Description copied from interface:DataSeriesInternal
Returns a snapshot of this dataset which will not update.
-