Class AbstractSeries

java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.AbstractSeries
All Implemented Interfaces:
Series, Serializable
Direct Known Subclasses:
DataProviderSeries, DataSeries, HeatSeries, ListSeries, NodeSeries, TreeSeries

public abstract class AbstractSeries extends AbstractConfigurationObject implements Series
Abstract base class for series
See Also:
  • Constructor Details

    • AbstractSeries

      public AbstractSeries()
    • AbstractSeries

      public AbstractSeries(String name)
      Constructs a named series
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Series
      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 "".
      Specified by:
      setName in interface Series
    • getId

      public String getId()
      Specified by:
      getId in interface Series
      Returns:
      the series ID
    • setId

      public void setId(String id)
      Sets an id for the series
      Specified by:
      setId in interface Series
      Parameters:
      id - new ID to set
    • 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 interface Series
    • 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 interface Series
      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 interface Series
    • 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 not
      See 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 not
      updateChartImmediately - 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.
    • getColorAxis

      public Integer getColorAxis()
      Returns:
      The index of the color-axis that this data series is bound to. Returns null if undefined.
      See Also:
      • #setColorAxis(Number)
    • setColorAxis

      public void setColorAxis(Integer colorAxis)
      When using dual or multiple color-axes, this number defines which color-axis the particular series is connected to. It refers to the index of the axis in the color-axis array, with 0 being the first. Defaults to 0.
      Parameters:
      colorAxis - The index of the color-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()