com.vaadin.flow.component.charts.model.
Class DataSeriesItem
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.AbstractSeriesItem
-
- com.vaadin.flow.component.charts.model.DataSeriesItem
-
All Implemented Interfaces:
Direct Known Subclasses:
BoxPlotItem, DataSeriesItem3d, FlagItem, OhlcItem, WaterFallSum
public class DataSeriesItem extends AbstractSeriesItem
The DataSeriesItem class represents a single entry in a
DataSeries
.See Also:
-
-
Constructor Summary
Constructors Constructor and Description DataSeriesItem()
Creates an empty item, without values, colors, etc.
DataSeriesItem(Date date, Number y)
Deprecated.
as of 4.0. UseDataSeriesItem(Instant, Number)
DataSeriesItem(Date date, Number low, Number high)
Deprecated.
as of 4.0. UseDataSeriesItem(Instant, Number,Number)
DataSeriesItem(Instant instant, Number y)
Constructs a DataSeriesItem with the given instant as X value and Y value.
DataSeriesItem(Instant instant, Number low, Number high)
Constructs a DataSeriesItem with the given instant as X value with min and max values for use in range visualizations.
DataSeriesItem(Number x, Number y)
Constructs an item with X and Y values
DataSeriesItem(Number x, Number low, Number high)
Constructs a DataSeriesItem with the given X, min and max values for use in range visualizations.
DataSeriesItem(String name, Number y)
Constructs an item with a name and a Y value
DataSeriesItem(String name, Number y, Number colorIndex)
Constructs an item with a name and a value on the Y-axis and assigns the specified color to the item.
-
Method Summary
All Methods Modifier and Type Method and Description String
getCursor()
DataLabels
getDataLabels()
Dial
getDial()
Returns the current dial.
Number
getHigh()
Returns the upper range for visualizations.
Number
getLow()
Returns the lower range for visualizations.
boolean
isCustomized()
Checks if the data can be rendered in an optimized manner.
boolean
isSelected()
Checks whether or not the item is selected.
protected void
makeCustomized()
Marks the item as customized, so that it can be rendered in a more optimal way.
void
setColorIndex(Number colorIndex)
A specific color index to use for the point, so its graphic representations are given the class name highcharts-color-{n}.
void
setCursor(String cursor)
Sets the
cursor
CSS attribute to be shown on mouse overvoid
setDataLabels(DataLabels dataLabels)
Set the label configuration for this item
void
setDial(Dial dial)
Sets the dial or arrow pointer of the gauge.
void
setHigh(Number high)
Sets the upper range for visualizations.
void
setId(String id)
Sets the ID for the point.
void
setLegendIndex(Number legendIndex)
Sets the sequential index of the pie slice in the legend.
void
setLow(Number low)
Sets the lower range for visualizations.
void
setMarker(Marker marker)
Sets the marker of this data series item
void
setName(String name)
Sets the name of the data item as shown in the legend, tooltip, dataLabel etc.
void
setSelected(Boolean selected)
Sets whether the data item is selected or not.
void
setSliced(boolean sliced)
Sets whether to display a slice offset from the center.
-
Methods inherited from class com.vaadin.flow.component.charts.model.AbstractSeriesItem
getClassName, getColorIndex, getId, getLegendIndex, getMarker, getName, getSliced, getX, getY, setClassName, setX, setX, setX, setY
-
-
-
-
Constructor Detail
-
DataSeriesItem
public DataSeriesItem()
Creates an empty item, without values, colors, etc.
-
DataSeriesItem
public DataSeriesItem(String name, Number y)
Constructs an item with a name and a Y value
Parameters:
name
- Name of the item.y
- Y-value of the item.
-
DataSeriesItem
public DataSeriesItem(String name, Number y, Number colorIndex)
Constructs an item with a name and a value on the Y-axis and assigns the specified color to the item.
Parameters:
name
- Name of the item.y
- Y-value of the item.colorIndex
- Color index of the item.
-
DataSeriesItem
public DataSeriesItem(Number x, Number y)
Constructs an item with X and Y values
Parameters:
x
- X-value of the item.y
- Y-value of the item.
-
DataSeriesItem
public DataSeriesItem(Instant instant, Number y)
Constructs a DataSeriesItem with the given instant as X value and Y value.
Parameters:
instant
- Instant of the item, as its X-value.y
- Y-value of the item.
-
DataSeriesItem
@Deprecated public DataSeriesItem(Date date, Number y)
Deprecated. as of 4.0. Use
DataSeriesItem(Instant, Number)
-
DataSeriesItem
public DataSeriesItem(Instant instant, Number low, Number high)
Constructs a DataSeriesItem with the given instant as X value with min and max values for use in range visualizations.
Parameters:
instant
- Instant of the item, as its X-value.low
- Lower value for range visualization.high
- Upper value for range visualization.
-
DataSeriesItem
@Deprecated public DataSeriesItem(Date date, Number low, Number high)
Deprecated. as of 4.0. Use
DataSeriesItem(Instant, Number,Number)
-
-
Method Detail
-
setName
public void setName(String name)
Sets the name of the data item as shown in the legend, tooltip, dataLabel etc. Defaults to "".
Overrides:
setName
in classAbstractSeriesItem
Parameters:
name
- Name of the item.
-
setSliced
public void setSliced(boolean sliced)
Sets whether to display a slice offset from the center. Defaults to false. Note: This applies to pie charts only.
Overrides:
setSliced
in classAbstractSeriesItem
Parameters:
sliced
- When true, this item should be displayed with a small offset from the centre of the pie chart; when false, this item will be rendered normally.
-
isSelected
public boolean isSelected()
Checks whether or not the item is selected.
Returns:
true if the item is selected, false otherwise.
See Also:
-
setSelected
public void setSelected(Boolean selected)
Sets whether the data item is selected or not.
Parameters:
selected
- Whether or not the item should be selected.
-
setId
public void setId(String id)
Sets the ID for the point. This can be used after rendering to get a reference to the point object. Defaults to null.
Overrides:
setId
in classAbstractSeriesItem
Parameters:
id
- New id.
-
setLegendIndex
public void setLegendIndex(Number legendIndex)
Sets the sequential index of the pie slice in the legend. Defaults to undefined. Note This applies to pie charts only.
Overrides:
setLegendIndex
in classAbstractSeriesItem
Parameters:
legendIndex
- Index in the legend.
-
setMarker
public void setMarker(Marker marker)
Sets the marker of this data series item
Overrides:
setMarker
in classAbstractSeriesItem
Parameters:
marker
- Marker of the item.
-
setColorIndex
public void setColorIndex(Number colorIndex)
A specific color index to use for the point, so its graphic representations are given the class name highcharts-color-{n}.
Overrides:
setColorIndex
in classAbstractSeriesItem
Parameters:
colorIndex
- Color of the item.
-
setDial
public void setDial(Dial dial)
Sets the dial or arrow pointer of the gauge.
Note This is only applicable for gauge charts.
Parameters:
dial
- Dial to use.
-
getDial
public Dial getDial()
Returns the current dial. This is only applicable for gauge charts.
Returns:
The dial or arrow pointer of a gauge chart. Only applicable for gauge charts.
See Also:
-
isCustomized
public boolean isCustomized()
Checks if the data can be rendered in an optimized manner.
Returns:
true if the data series item can be rendered in optimized manner, false otherwise.
-
makeCustomized
protected void makeCustomized()
Marks the item as customized, so that it can be rendered in a more optimal way.
-
getLow
public Number getLow()
Returns the lower range for visualizations.
Returns:
The lower range.
-
setLow
public void setLow(Number low)
Sets the lower range for visualizations.
Parameters:
low
- New lower range.
-
getHigh
public Number getHigh()
Returns the upper range for visualizations.
Returns:
The upper range.
-
setHigh
public void setHigh(Number high)
Sets the upper range for visualizations.
Parameters:
high
- New upper range.
-
getDataLabels
public DataLabels getDataLabels()
Returns:
dataLabels
See Also:
-
setDataLabels
public void setDataLabels(DataLabels dataLabels)
Set the label configuration for this item
Parameters:
dataLabels
-
-
getCursor
public String getCursor()
Returns:
cursor
See Also:
-
setCursor
public void setCursor(String cursor)
Sets the
cursor
CSS attribute to be shown on mouse overAccepts CSS
cursor
values like: alias, all-scroll, auto, cell, context-menu, col-resize, copy, crosshair, default, e-resize, ew-resize, grab, grabbing, help, move, n-resize, ne-resize, nesw-resize, ns-resize, nw-resize, nwse-resize, no-drop, none, not-allowed, pointer, progress, row-resize, s-resize, se-resize, sw-resize, text, vertical-text, w-resize, wait, zoom-in, zoom-outNote that not all browsers have support for all values.
Parameters:
cursor
-
-
-