Class DatasetElement

  • All Implemented Interfaces:
    IsPoint

    public class DatasetElement
    extends AbstractReadOnlyPoint
    Calling some methods on your chart instance passing an argument of an event, will return the elements at the event position.
    The elements are mapped by this object.
    This is the CHART.JS item with all needed info about a selected data set.
    This object has been created and passed to event handler or callbacks to apply own logic.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • DatasetElement

        protected DatasetElement​(CallbacksEnvelop<NativeObject> envelop)
        Creates the item using an envelop of the native java script object which contains all properties.
        Parameters:
        envelop - envelop of the nativeObject native java script object which contains all properties.
    • Method Detail

      • getOptions

        public final DatasetElementOptions getOptions()
        Returns the data set item options.
        Returns:
        the data set item options.
      • getParsed

        public final Parsed getParsed()
        Returns the parsed values.
        Returns:
        the parsed values.
      • isHorizontal

        public final boolean isHorizontal()
        Returns if is an horizontal view.
        Returns:
        true if is an horizontal view.
      • isActive

        public final boolean isActive()
        Returns if element is active.
        Returns:
        true if the element is active.
      • getBase

        public final double getBase()
        Returns the base value of data set.
        Returns:
        the base value of data set.
      • getWidth

        public final double getWidth()
        Returns the width of data set item in pixel.
        Returns:
        the width of data set item in pixel.
      • getHeight

        public final double getHeight()
        Returns the height of data set item in pixel.
        Returns:
        the height of data set item in pixel.
      • isSkipped

        public final boolean isSkipped()
        Returns true if skipped.
        Returns:
        true if skipped.
      • isStop

        public final boolean isStop()
        Returns true if stopped.
        Returns:
        true if stopped.
      • getControlPointPreviousX

        public final double getControlPointPreviousX()
        Returns the previous X control point of data set item in pixel.
        Returns:
        the previous X control point of data set item in pixel.
      • getControlPointPreviousY

        public final double getControlPointPreviousY()
        Returns the previous Y control point of data set item in pixel.
        Returns:
        the previous Y control point of data set item in pixel.
      • getControlPointNextX

        public final double getControlPointNextX()
        Returns the next X control point of data set item in pixel.
        Returns:
        the next X control point of data set item in pixel.
      • getControlPointNextY

        public final double getControlPointNextY()
        Returns the next Y control point of data set item in pixel.
        Returns:
        the next Y control point of data set item in pixel.
      • getAngle

        public final double getAngle()
        Returns the angle of data set item.
        Returns:
        the angle of data set item.
      • getStartAngle

        public final double getStartAngle()
        Returns the start angle of data set item.
        Returns:
        the start angle of data set item.
      • getEndAngle

        public double getEndAngle()
        Returns the end angle of data set item.
        Returns:
        the end angle of data set item.
      • getCircumference

        public double getCircumference()
        Returns the circumference of data set item.
        Returns:
        the circumference of data set item.
      • getOuterRadius

        public double getOuterRadius()
        Returns the outer radius of data set item in pixel.
        Returns:
        the outer radius of data set item in pixel.
      • getInnerRadius

        public double getInnerRadius()
        Returns the inner radius of data set item in pixel.
        Returns:
        the inner radius of data set item in pixel.