com.vaadin.flow.component.charts.model.

Class DataSeriesItem

    • 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

        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

        public DataSeriesItem(Number x,
                              Number low,
                              Number high)

        Constructs a DataSeriesItem with the given X, min and max values for use in range visualizations.

        Parameters:

        x - X-value of the item.

        low - Lower value for range visualization.

        high - Upper value for range visualization.

    • 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 class AbstractSeriesItem

        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 class AbstractSeriesItem

        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(Boolean)

      • 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 class AbstractSeriesItem

        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 class AbstractSeriesItem

        Parameters:

        legendIndex - Index in the legend.

      • setMarker

        public void setMarker(Marker marker)

        Sets the marker of this data series item

        Overrides:

        setMarker in class AbstractSeriesItem

        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 class AbstractSeriesItem

        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:

        setDial(Dial)

      • 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.

      • setDataLabels

        public void setDataLabels(DataLabels dataLabels)

        Set the label configuration for this item

        Parameters:

        dataLabels -

      • setCursor

        public void setCursor(String cursor)

        Sets the cursor CSS attribute to be shown on mouse over

        Accepts 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-out

        Note that not all browsers have support for all values.

        Parameters:

        cursor -