Class Annotation.Point

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware
    Enclosing class:
    Annotation

    public static class Annotation.Point
    extends Optionable
    This object defines the point to which the label or shape will be connected. It can be either the point which exists in the series - it is referenced by the point's id - or a new point with defined x, y properties and optionally axes.
    Since:
    7.2.1.0
    Author:
    rudyhuang
    See Also:
    Serialized Form
    • Constructor Detail

      • Point

        public Point()
        Default constructor.
      • Point

        public Point​(String pointId)
        Constructs with a point id.
      • Point

        public Point​(Number x,
                     Number y)
        Constructs with x and y position.
      • Point

        public Point​(Number x,
                     Number y,
                     Number xAxis,
                     Number yAxis)
        Constructs with x and y position and indexes of xAxis and yAxis.
    • Method Detail

      • getX

        public Number getX()
        Returns the x position of the point. Units can be either in axis or chart pixel coordinates.
      • setX

        public void setX​(Number x)
        Sets the x position of the point. Units can be either in axis or chart pixel coordinates.
      • getXAxis

        public Object getXAxis()
        Returns which xAxis the point is connected to. It refers to either the axis id or the index of the axis in the xAxis array. If the option is not configured or the axis is not found the point's x coordinate refers to the chart pixels.

        Default: null

      • setXAxis

        public void setXAxis​(Number xAxis)
        Sets the index of which axis in the xAxis array the point is connected to. If the option is not configured or the axis is not found the point's x coordinate refers to the chart pixels.
      • setXAxis

        public void setXAxis​(String xAxis)
        Sets the id of which xAxis the point is connected to. If the option is not configured or the axis is not found the point's x coordinate refers to the chart pixels.
      • getY

        public Number getY()
        Returns the y position of the point. Units can be either in axis or chart pixel coordinates.
      • setY

        public void setY​(Number y)
        Sets the y position of the point. Units can be either in axis or chart pixel coordinates.
      • getYAxis

        public Object getYAxis()
        Returns which yAxis the point is connected to. It refers to either the axis id or the index of the axis in the yAxis array. If the option is not configured or the axis is not found the point's y coordinate refers to the chart pixels.

        Default: null

      • setYAxis

        public void setYAxis​(Number yAxis)
        Sets the index of which axis in the yAxis array the point is connected to. If the option is not configured or the axis is not found the point's y coordinate refers to the chart pixels.
      • setYAxis

        public void setYAxis​(String yAxis)
        Sets the id of which yAxis the point is connected to. If the option is not configured or the axis is not found the point's y coordinate refers to the chart pixels.