Package org.zkoss.chart
Class Annotation.Point
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.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
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description Point()
Default constructor.Point(Number x, Number y)
Constructs with x and y position.Point(Number x, Number y, Number xAxis, Number yAxis)
Constructs with x and y position and indexes of xAxis and yAxis.Point(String pointId)
Constructs with a point id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getX()
Returns the x position of the point.Object
getXAxis()
Returns which xAxis the point is connected to.Number
getY()
Returns the y position of the point.Object
getYAxis()
Returns which yAxis the point is connected to.void
setX(Number x)
Sets the x position of the point.void
setXAxis(Number xAxis)
Sets the index of which axis in the xAxis array the point is connected to.void
setXAxis(String xAxis)
Sets the id of which xAxis the point is connected to.void
setY(Number y)
Sets the y position of the point.void
setYAxis(Number yAxis)
Sets the index of which axis in the yAxis array the point is connected to.void
setYAxis(String yAxis)
Sets the id of which yAxis the point is connected to.String
toJSONString()
Encodes this object to a JSON string.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toString
-
-
-
-
Constructor Detail
-
Point
public Point()
Default constructor.
-
Point
public Point(String pointId)
Constructs with a point id.
-
-
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.
-
toJSONString
public String toJSONString()
Description copied from class:Optionable
Encodes this object to a JSON string. It is the same asOptionable.toString()
.- Specified by:
toJSONString
in interfaceorg.zkoss.json.JSONAware
- Overrides:
toJSONString
in classOptionable
-
-