Package org.zkoss.chart
Class Pane
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.Pane
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class Pane extends Optionable
Applies only to polar charts and angular gauges. This configuration object holds general options for the combined X and Y axes set. Each xAxis or yAxis can reference the pane by index.All the options in this class support
DynamicalAttribute.- Author:
- RaymondChao, jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description Pane()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PaneBackground>getBackground()Returns a list of objects, for backgrounds.ObjectgetBorderRadius()Returns the border radius of the elements of the pane.NumbergetBorderWidth()Returns the border width of the pane.List<Object>getCenter()Returns the center of a polar chart or angular gauge, given as an array of [x, y] positions.NumbergetEndAngle()Returns the end angle of the polar X axis or gauge value axis, given in degrees where 0 is north.ObjectgetInnerSize()Returns the innerSize of the pane.ObjectgetMargin()Returns the margin between the pane and the plot area when auto-fitting the pane.ObjectgetSize()Returns the size of the pane.NumbergetStartAngle()Returns the start angle of the polar X axis or gauge axis, given in degrees where 0 is north.NumbergetThickness()Returns the thickness of the pane in pixels.voidsetBackground(List<PaneBackground> background)Sets a list of objects, for backgrounds.voidsetBackground(PaneBackground background)Sets one background for the pane.voidsetBorderRadius(Number borderRadius)Sets the border radius of the elements of the pane in pixels.voidsetBorderRadius(String borderRadius)Sets the border radius of the elements of the pane as a percentage, such as "50%".voidsetBorderWidth(Number borderWidth)Sets the border width of the pane.voidsetCenter(Object... center)voidsetCenter(List<Object> center)Sets the center of a polar chart or angular gauge, given as an array of [x, y] positions.voidsetEndAngle(Number endAngle)Sets the end angle of the polar X axis or gauge value axis, given in degrees where 0 is north.voidsetInnerSize(Number innerSize)Sets the innerSize of the pane.voidsetInnerSize(String innerSize)Sets the innerSize of the pane.voidsetMargin(Number margin)Sets the margin between the pane and the plot area when auto-fitting the pane.voidsetMargin(Number[] margin)Sets the margins between the pane and the plot area when auto-fitting the pane, in the order top, right, bottom and left.voidsetSize(Number size)Sets the size of the pane.voidsetSize(String size)Sets the size of the pane.voidsetStartAngle(Number startAngle)Sets the start angle of the polar X axis or gauge axis, given in degrees where 0 is north.voidsetThickness(Number thickness)Sets the thickness of the pane in pixels.-
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
-
getBackground
public List<PaneBackground> getBackground()
Returns a list of objects, for backgrounds. Sub options includebackgroundColor(which can be solid or gradient),innerWidth,outerWidth,borderWidth,borderColor.
-
setBackground
public void setBackground(List<PaneBackground> background)
Sets a list of objects, for backgrounds. Sub options includebackgroundColor(which can be solid or gradient),innerWidth,outerWidth,borderWidth,borderColor. 'background an object, or array of objects, for backgrounds. Sub options includebackgroundColor(which can be solid or gradient),innerWidth,outerWidth,borderWidth,borderColor.
-
setBackground
public void setBackground(PaneBackground background)
Sets one background for the pane.- Since:
- 13.1.1.0
-
getBorderRadius
public Object getBorderRadius()
Returns the border radius of the elements of the pane. This affects the pane background, plot bands and solid gauges, unless they have their own border radius.Default: 3.
- Since:
- 13.1.1.0
-
setBorderRadius
public void setBorderRadius(Number borderRadius)
Sets the border radius of the elements of the pane in pixels. This affects the pane background, plot bands and solid gauges, unless they have their own border radius.- Since:
- 13.1.1.0
-
setBorderRadius
public void setBorderRadius(String borderRadius)
Sets the border radius of the elements of the pane as a percentage, such as "50%". This affects the pane background, plot bands and solid gauges, unless they have their own border radius.- Since:
- 13.1.1.0
-
getBorderWidth
public Number getBorderWidth()
Returns the border width of the pane.Default: null.
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the border width of the pane.Default: null
-
getCenter
public List<Object> getCenter()
Returns the center of a polar chart or angular gauge, given as an array of [x, y] positions. Positions can be given as integers that transform to pixels, or as percentages of the plot area size.- Returns:
- center the center of a polar chart or angular gauge, given as an array of [x, y] positions. Positions can be given as integers that transform to pixels, or as percentages of the plot area size.
-
setCenter
public void setCenter(List<Object> center)
Sets the center of a polar chart or angular gauge, given as an array of [x, y] positions. Positions can be given as integers that transform to pixels, or as percentages of the plot area size. 'center the center of a polar chart or angular gauge, given as an array of [x, y] positions. Positions can be given as integers that transform to pixels, or as percentages of the plot area size.Sample values:
- 10 (as in 10 pixels)
- 75% (as in 75% position of the plot area size)
-
setCenter
public void setCenter(Object... center)
- Parameters:
center-- See Also:
setCenter(List)
-
getEndAngle
public Number getEndAngle()
Returns the end angle of the polar X axis or gauge value axis, given in degrees where 0 is north.Defaults to null.
-
setEndAngle
public void setEndAngle(Number endAngle)
Sets the end angle of the polar X axis or gauge value axis, given in degrees where 0 is north.Defaults to
getStartAngle()+ 360 for polar charts and + 270 for gauges.
-
getStartAngle
public Number getStartAngle()
Returns the start angle of the polar X axis or gauge axis, given in degrees where 0 is north.Defaults to null.
-
setStartAngle
public void setStartAngle(Number startAngle)
Sets the start angle of the polar X axis or gauge axis, given in degrees where 0 is north.Defaults to 0 for polar charts and -135 for gauges.
-
getSize
public Object getSize()
Returns the size of the pane.Default: null
-
setSize
public void setSize(Number size)
Sets the size of the pane.- Parameters:
size-
-
setSize
public void setSize(String size)
Sets the size of the pane.- Parameters:
size-
-
getInnerSize
public Object getInnerSize()
Returns the innerSize of the pane.Default: null
-
setInnerSize
public void setInnerSize(Number innerSize)
Sets the innerSize of the pane.- Parameters:
innerSize-
-
setInnerSize
public void setInnerSize(String innerSize)
Sets the innerSize of the pane.- Parameters:
innerSize-
-
getMargin
public Object getMargin()
Returns the margin between the pane and the plot area when auto-fitting the pane. It does not apply when a size is set. By default it leaves room for the radial axis labels of a gauge.Default: null
- Since:
- 13.1.1.0
-
setMargin
public void setMargin(Number margin)
Sets the margin between the pane and the plot area when auto-fitting the pane. It does not apply when a size is set.- Since:
- 13.1.1.0
-
setMargin
public void setMargin(Number[] margin)
Sets the margins between the pane and the plot area when auto-fitting the pane, in the order top, right, bottom and left. It does not apply when a size is set.- Since:
- 13.1.1.0
-
getThickness
public Number getThickness()
Returns the thickness of the pane in pixels. This applies to the pane background, plot bands and solid gauges. Use it for a fixed width pane across different sizes, where size and innerSize are not practical.Default: null
- Since:
- 13.1.1.0
-
setThickness
public void setThickness(Number thickness)
Sets the thickness of the pane in pixels. This applies to the pane background, plot bands and solid gauges. Use it for a fixed width pane across different sizes, where size and innerSize are not practical.- Since:
- 13.1.1.0
-
-