Class DataPoint


  • public final class DataPoint
    extends AbstractXYDataPoint
    Used for sparse datasets, such as those in scatter charts. Each data point is specified using an object containing x and y properties.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • DataPoint

        public DataPoint()
        Creates the object with an empty native object.
      • DataPoint

        public DataPoint​(double x,
                         double y)
        Creates the object with the passed point values.
        Parameters:
        x - x value of data point
        y - y value of data point
      • DataPoint

        public DataPoint​(Date x,
                         double y)
        Creates the object with the passed point values.
        Parameters:
        x - x value of data point
        y - y value of data point
      • DataPoint

        public DataPoint​(String x,
                         double y)
        Creates the object with the passed point values.
        Parameters:
        x - x value of data point
        y - y value of data point
      • DataPoint

        public DataPoint​(double x,
                         FloatingData y)
        Creates the object with the passed point values.
        Parameters:
        x - x value of data point
        y - y value of data point
      • DataPoint

        public DataPoint​(Date x,
                         FloatingData y)
        Creates the object with the passed point values.
        Parameters:
        x - x value of data point
        y - y value of data point
      • DataPoint

        public DataPoint​(String x,
                         FloatingData y)
        Creates the object with the passed point values.
        Parameters:
        x - x value of data point
        y - y value of data point
      • DataPoint

        public DataPoint​(double x,
                         double y,
                         double r)
        Creates the object with the passed point values (for bubble).
        Parameters:
        x - x value of data point
        y - y value of data point
        r - the bubble radius in pixels (not scaled).
      • DataPoint

        public DataPoint​(ItemsEnvelop<NativeObject> envelop)
        Creates the object with a native object passed as argument by and BaseEnvelop.
        This is called by the DataItem.
        Parameters:
        envelop - envelop which contains a native object with a data point
    • Method Detail

      • setY

        public void setY​(FloatingData y)
        Sets Y value.
        Parameters:
        y - Y value.
      • getYAsFloatingData

        public FloatingData getYAsFloatingData()
        Returns Y value.
        Returns:
        Y value.
      • setR

        public void setR​(double r)
        Sets the bubble radius in pixels (not scaled).
        It is not scaled by the chart, it is the raw radius in pixels of the bubble that is drawn on the canvas.
        Parameters:
        r - the bubble radius in pixels (not scaled).
      • getR

        public double getR()
        Returns the bubble radius in pixels (not scaled).
        Returns:
        the bubble radius in pixels (not scaled).