Package org.zkoss.chart
Class AnnotationShapeOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.AnnotationShapeOptions
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
- Direct Known Subclasses:
AnnotationShape
public class AnnotationShapeOptions extends Optionable
Options for annotation's shapes. Each shape inherits options from the shapeOptions object. An option from the shapeOptions can be overwritten by config for a specific shape.All the options in this class support
DynamicalAttribute.- 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 AnnotationShapeOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetFill()Returns the color of the shape's fill.NumbergetHeight()Returns the height of the shape.StringgetMarkerEnd()Returns id of the marker which will be drawn at the final vertex of the path.StringgetMarkerStart()Returns id of the marker which will be drawn at the first vertex of the path.ObjectgetPoint()Returns the point which the shape will be connected.List<Annotation.Point>getPoints()Returns an array of points for the shape.NumbergetR()Returns the radius of the shape.NumbergetSnap()Returns the additional snapping area around an annotation making this annotation to focus.ColorgetStroke()Returns the color of the shape's stroke.NumbergetStrokeWidth()Returns the pixel stroke width of the shape.StringgetType()Returns the type of the shape, e.g.NumbergetWidth()Returns the width of the shape.NumbergetX()Returns x position offset of the shape relative to the point.NumbergetY()Returns the y position offset of the shape relative to the point.voidsetFill(String fill)Sets the color of the shape's fill.voidsetFill(Color fill)Sets the color of the shape's fill.voidsetFill(LinearGradient fill)Sets the color of the shape's fill.voidsetFill(RadialGradient fill)Sets the color of the shape's fill.voidsetHeight(Number height)Sets the height of the shape.voidsetMarkerEnd(String markerEnd)Sets id of the marker which will be drawn at the final vertex of the path.voidsetMarkerStart(String markerStart)Sets id of the marker which will be drawn at the first vertex of the path.voidsetPoint(String pointId)Sets the id of the point which the shape will be connected.voidsetPoint(Annotation.Point point)Sets the point which the shape will be connected.voidsetPoints(List<Annotation.Point> points)Sets an array of points for the shape.voidsetPoints(Annotation.Point... points)Sets an array of points for the shape.voidsetR(Number r)Sets the radius of the shape.voidsetSnap(Number snap)Sets the additional snapping area around an annotation making this annotation to focus.voidsetStroke(String stroke)Sets the color of the shape's stroke.voidsetStroke(Color stroke)Sets the color of the shape's stroke.voidsetStrokeWidth(Number strokeWidth)Sets the pixel stroke width of the shape.voidsetType(String type)Sets the type of the shape, e.g.voidsetWidth(Number width)Sets the width of the shape.voidsetX(Number x)Sets the x position offset of the shape relative to the point.voidsetY(Number y)Sets the y position offset of the shape relative to the point.-
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, toJSONString, toString
-
-
-
-
Method Detail
-
getFill
public Color getFill()
Returns the color of the shape's fill.Default: rgba(0, 0, 0, 0.75)
-
setFill
public void setFill(Color fill)
Sets the color of the shape's fill.
-
setFill
public void setFill(String fill)
Sets the color of the shape's fill.
-
setFill
public void setFill(LinearGradient fill)
Sets the color of the shape's fill.
-
setFill
public void setFill(RadialGradient fill)
Sets the color of the shape's fill.
-
getHeight
public Number getHeight()
Returns the height of the shape.Default: null
-
setHeight
public void setHeight(Number height)
Sets the height of the shape.
-
getMarkerEnd
public String getMarkerEnd()
Returns id of the marker which will be drawn at the final vertex of the path. Custom markers can be defined in defs property.Default: null
-
setMarkerEnd
public void setMarkerEnd(String markerEnd)
Sets id of the marker which will be drawn at the final vertex of the path. Custom markers can be defined in defs property.
-
getMarkerStart
public String getMarkerStart()
Returns id of the marker which will be drawn at the first vertex of the path. Custom markers can be defined in defs property.Default: null
-
setMarkerStart
public void setMarkerStart(String markerStart)
Sets id of the marker which will be drawn at the first vertex of the path. Custom markers can be defined in defs property.
-
getPoint
public Object getPoint()
Returns the point which the 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.
-
setPoint
public void setPoint(Annotation.Point point)
Sets the point which the shape will be connected.
-
setPoint
public void setPoint(String pointId)
Sets the id of the point which the shape will be connected.
-
getPoints
public List<Annotation.Point> getPoints()
Returns an array of points for the shape. This option is available for shapes which can use multiple points such as path. A point can be either a point object or a point's id.
-
setPoints
public void setPoints(List<Annotation.Point> points)
Sets an array of points for the shape. This option is available for shapes which can use multiple points such as path. A point can be either a point object or a point's id.
-
setPoints
public void setPoints(Annotation.Point... points)
Sets an array of points for the shape. This option is available for shapes which can use multiple points such as path. A point can be either a point object or a point's id.
-
getR
public Number getR()
Returns the radius of the shape.Default: 0
-
setR
public void setR(Number r)
Sets the radius of the shape.
-
getSnap
public Number getSnap()
Returns the additional snapping area around an annotation making this annotation to focus. Defined in pixels.Default: 2
-
setSnap
public void setSnap(Number snap)
Sets the additional snapping area around an annotation making this annotation to focus. Defined in pixels.
-
getStroke
public Color getStroke()
Returns the color of the shape's stroke.Default: rgba(0, 0, 0, 0.75)
-
setStroke
public void setStroke(Color stroke)
Sets the color of the shape's stroke.
-
setStroke
public void setStroke(String stroke)
Sets the color of the shape's stroke.
-
getStrokeWidth
public Number getStrokeWidth()
Returns the pixel stroke width of the shape.Default: 1
-
setStrokeWidth
public void setStrokeWidth(Number strokeWidth)
Sets the pixel stroke width of the shape.
-
getType
public String getType()
Returns the type of the shape, e.g. circle or rectangle.Default: "rect"
-
setType
public void setType(String type)
Sets the type of the shape, e.g. circle or rectangle.
-
getWidth
public Number getWidth()
Returns the width of the shape.Default: null
-
setWidth
public void setWidth(Number width)
Sets the width of the shape.
-
getX
public Number getX()
Returns x position offset of the shape relative to the point.Default: 0
-
setX
public void setX(Number x)
Sets the x position offset of the shape relative to the point.
-
getY
public Number getY()
Returns the y position offset of the shape relative to the point.Default: 0
-
setY
public void setY(Number y)
Sets the y position offset of the shape relative to the point.
-
-