com.vaadin.flow.component.charts.events.

Class PointRemoveEvent

    • Constructor Detail

    • Method Detail

      • getSeriesItemIndex

        public int getSeriesItemIndex()

        Description copied from interface: HasSeries

        Returns the index of the series

        Specified by:

        getSeriesItemIndex in interface HasSeries

        Returns:

      • getItemIndex

        public int getItemIndex()

        Description copied from interface: HasItem

        Returns the index of the series item, that is associated with this event, in HasSeries.getSeries(). Can be used to identify the item within the series.

        Example for ListSeries:

         int itemIndex = event.getItemIndex();
         ListSeries series = (ListSeries) event.getSeries();
         Number datum = series.getData()[itemIndex];
         

        Specified by:

        getItemIndex in interface HasItem

        Returns:

        the index of the item in the series

        See Also:

        HasItem.getItem(), HasItem.getItemId()

      • getxValue

        public double getxValue()
      • getyValue

        public double getyValue()
      • getItemId

        public String getItemId()

        Description copied from interface: HasItem

        The ID of the series item that is associated with the event. Can be used to identify the item within the series.

        Example for TreeSeries:

         String id = this.getItemId();
         TreeSeries series = (TreeSeries) this.getSeries();
         Optional<TreeSeriesItem> treeItem = series.getData().stream()
                 .filter(item -> item.getId().equals(id)).findFirst();
         

        Only AbstractSeriesItem supports setting an ID. For other types of series items this property will always return null. For AbstractSeriesItem the ID is optional. Unless the developer has explicitly set an ID for the item associated with the event, this property will be null. See HasItem.getItem() or HasItem.getItemIndex() for alternatives.

        Specified by:

        getItemId in interface HasItem

        Returns:

        the ID of the series item associated with the event, or null if the series item has no ID

        See Also:

        HasItem.getItem(), HasItem.getItemIndex()