com.vaadin.flow.component.charts.model.
Class AbstractSeries
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.AbstractSeries
-
All Implemented Interfaces:
Direct Known Subclasses:
DataProviderSeries, DataSeries, HeatSeries, ListSeries, TreeSeries
public abstract class AbstractSeries extends AbstractConfigurationObject implements Series
Abstract base class for series
See Also:
-
-
Constructor Summary
Constructors Constructor and Description AbstractSeries()
AbstractSeries(String name)
Constructs a named series
-
Method Summary
All Methods Modifier and Type Method and Description Configuration
getConfiguration()
String
getId()
String
getName()
AbstractPlotOptions
getPlotOptions()
Gets the plot options related to this specific series.
String
getStack()
Integer
getxAxis()
Integer
getyAxis()
Boolean
isVisible()
void
setConfiguration(Configuration configuration)
Sets the configuration to which this series is linked.
void
setId(String id)
Sets an id for the series
void
setName(String name)
Sets the name of the series as shown in the legend, tooltip etc.
void
setPlotOptions(AbstractPlotOptions plotOptions)
Sets the plot options for this specific series.
void
setStack(String stack)
This option allows grouping series in a stacked chart.
void
setVisible(Boolean visible)
Control the visibility of the series.
void
setVisible(Boolean visible, boolean updateChartImmediately)
Control the visibility of the series.
void
setxAxis(Integer xAxis)
When using dual or multiple X-axes, this number defines which X-axis the particular series is connected to.
void
setyAxis(Integer yAxis)
When using dual or multiple Y-axes, this number defines which Y-axis the particular series is connected to.
void
setyAxis(YAxis secondaryAxis)
* When using dual or multiple Y-axes, this number defines which Y-axis the particular series is connected to.
void
updateSeries()
-
-
-
Constructor Detail
-
AbstractSeries
public AbstractSeries()
-
AbstractSeries
public AbstractSeries(String name)
Constructs a named series
-
-
Method Detail
-
getName
public String getName()
Specified by:
Returns:
The name of the series.
See Also:
-
setName
public void setName(String name)
Description copied from interface:
Series
Sets the name of the series as shown in the legend, tooltip etc. Defaults to "".
-
setId
public void setId(String id)
Sets an id for the series
-
getStack
public String getStack()
See Also:
-
setStack
public void setStack(String stack)
This option allows grouping series in a stacked chart. The stack option can be a string or a number or anything else, as long as the grouped series' stack options match each other. Defaults to null.
Parameters:
stack
-
-
setConfiguration
public void setConfiguration(Configuration configuration)
Description copied from interface:
Series
Sets the configuration to which this series is linked.
Specified by:
setConfiguration
in interfaceSeries
-
getConfiguration
public Configuration getConfiguration()
Returns:
the
Configuration
that this series is linked to.
-
getPlotOptions
public AbstractPlotOptions getPlotOptions()
Gets the plot options related to this specific series. This is needed e.g. in combined charts.
Specified by:
getPlotOptions
in interfaceSeries
Returns:
-
setPlotOptions
public void setPlotOptions(AbstractPlotOptions plotOptions)
Sets the plot options for this specific series. The type of the plot options also explicitly sets the chart type used when rendering this particular series. If plot options is null, the component wide chart type is used.
Options that are not defined at this level will be inherited from the chart and theme levels.
Specified by:
setPlotOptions
in interfaceSeries
-
setVisible
public void setVisible(Boolean visible)
Control the visibility of the series. Although the series is invisible in the client it is still "cached" there and thus setting it visible happens quickly.
Parameters:
visible
- true if the series should be displayed, false if notSee Also:
#setVisible(boolean, boolean)
-
setVisible
public void setVisible(Boolean visible, boolean updateChartImmediately)
Control the visibility of the series.
With this version of the method developer can disable immediate chart update for already rendered chart, if e.g. multiple changes to the chart configuration are wished to be applied at once.
Parameters:
visible
- true if the series should be displayed, false if notupdateChartImmediately
- Updates the chart immediately if true.See Also:
-
isVisible
public Boolean isVisible()
Returns:
true if the series is displayed on the client
-
getxAxis
public Integer getxAxis()
Returns:
The index of the X-axis that this data series is bound to. Returns null if undefined.
See Also:
#setxAxis(Number)
-
setxAxis
public void setxAxis(Integer xAxis)
When using dual or multiple X-axes, this number defines which X-axis the particular series is connected to. It refers to the index of the axis in the X-axis array, with 0 being the first. Defaults to 0.
Parameters:
xAxis
- The index of the X-axis to bind this data series to.
-
getyAxis
public Integer getyAxis()
Returns:
The index of the Y-axis that this data series is bound to. Returns null if undefined.
See Also:
#setyAxis(Number)
-
setyAxis
public void setyAxis(Integer yAxis)
When using dual or multiple Y-axes, this number defines which Y-axis the particular series is connected to. It refers to the index of the axis in the Y-axis array, with 0 being the first. Defaults to 0.
Parameters:
yAxis
- The index of the Y-axis to bind this data series to.
-
setyAxis
public void setyAxis(YAxis secondaryAxis)
* When using dual or multiple Y-axes, this number defines which Y-axis the particular series is connected to.
Note, that this method cannot be used until series and axis are both attached to same configuration object.
Parameters:
secondaryAxis
-See Also:
#setyAxis(Number)
-
updateSeries
public void updateSeries()
-
-