Class LegendNode

  • All Implemented Interfaces:
    IsArea

    public final class LegendNode
    extends BaseBoxNodeItem<Position>
    Wrapper of legend node of CHART.JS.
    This is a wrapper of legend node of Chart (of CHART.JS).
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • LegendNode

        public LegendNode​(ChartEnvelop<NativeObject> envelop)
        Creates the item using an envelop with the native java script object which contains all properties.
        Parameters:
        envelop - envelop with the native java script object which contains all properties.
    • Method Detail

      • isDoughnutMode

        public boolean isDoughnutMode()
        Returns if it is in doughnut mode.
        Returns:
        true it is in doughnut mode.
      • getLineWidths

        public List<Double> getLineWidths()
        Returns the list of line widths.
        Returns:
        the list of line widths.
      • getColumnWidths

        public List<Double> getColumnWidths()
        Returns the list of columns widths.
        Returns:
        the list of columns widths.
      • getColumnHeights

        public List<Double> getColumnHeights()
        Returns the list of columns heights.
        Returns:
        the list of columns heights.
      • getHitBoxes

        public List<LegendHitBoxItem> getHitBoxes()
        Returns the list of hit boxes of the legend.
        Returns:
        the list of hit boxes of the legend.
      • getItems

        public List<LegendLabelItem> getItems()
        Returns the list of items of the legend.
        Returns:
        the list of items of the legend.
      • isInside

        public boolean isInside​(NativeAbstractMouseEvent event)
        Description copied from class: BaseBoxItem
        Returns true if the chart event is inside of this box, otherwise false.
        Overrides:
        isInside in class BaseBoxItem
        Parameters:
        event - event to check if inside the box
        Returns:
        true if the chart event is inside of this box, otherwise false
      • isInside

        public default boolean isInside​(NativeBaseEvent event)
        Returns true if the chart event is inside of a chart element, otherwise false.
        Parameters:
        event - event to check if inside of a chart element.
        Returns:
        true if the chart event is inside a chart element, otherwise false
      • isInside

        public default boolean isInside​(HasNativeEvent container)
        Returns true if the chart event is inside of this box, otherwise false.
        Parameters:
        container - event container to check if inside the box
        Returns:
        true if the chart event is inside of this box, otherwise false