Package org.zkoss.chart
Class ScrollablePlotArea
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.ScrollablePlotArea
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class ScrollablePlotArea extends Optionable
Options for a scrollable plot area. This feature provides a minimum size for the plot area of the chart. If the size gets smaller than this, typically on mobile devices, a native browser scrollbar is presented. This scrollbar provides smooth scrolling for the contents of the plot area, whereas the title, legend and unaffected axes are fixed. Since v7.1.2, a scrollable plot area can be defined for either horizontal or vertical scrolling, depending on whether the minWidth or minHeight option is set.- Since:
- 7.2.2.0
- Author:
- apicard
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description ScrollablePlotArea()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getMinHeight()
Returns the minimum height for the plot area.Number
getMinWidth()
Returns the minimum width for the plot area.Number
getOpacity()
Returns the opacity of mask applied on one of the sides of the plot area.Number
getScrollPositionX()
Returns the initial scrolling position of the scrollable plot area.Number
getScrollPositionY()
Returns the initial scrolling position of the scrollable plot area.void
setMinHeight(Number minHeight)
Sets the minimum height for the plot area.void
setMinWidth(Number minWidth)
Sets the minimum width for the plot area.void
setOpacity(Number opacity)
Sets the opacity of mask applied on one of the sides of the plot area.void
setScrollPositionX(Number scrollPositionX)
Sets the initial scrolling position of the scrollable plot area.void
setScrollPositionY(Number scrollPositionY)
Sets the initial scrolling position of the scrollable plot area.-
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
-
getMinHeight
public Number getMinHeight()
Returns the minimum height for the plot area. If it gets smaller than this, the plot area will become scrollable.Default: undefined
-
setMinHeight
public void setMinHeight(Number minHeight)
Sets the minimum height for the plot area. If it gets smaller than this, the plot area will become scrollable.
-
getMinWidth
public Number getMinWidth()
Returns the minimum width for the plot area. If it gets smaller than this, the plot area will become scrollable.Default: undefined
-
setMinWidth
public void setMinWidth(Number minWidth)
Sets the minimum width for the plot area. If it gets smaller than this, the plot area will become scrollable.
-
getOpacity
public Number getOpacity()
Returns the opacity of mask applied on one of the sides of the plot area.Default: 0.85.
-
setOpacity
public void setOpacity(Number opacity)
Sets the opacity of mask applied on one of the sides of the plot area.
-
getScrollPositionX
public Number getScrollPositionX()
Returns the initial scrolling position of the scrollable plot area. Ranges from 0 to 1, where 0 aligns the plot area to the left and 1 aligns it to the right. Typically we would use 1 if the chart has right aligned Y axes.Default: undefined
-
setScrollPositionX
public void setScrollPositionX(Number scrollPositionX)
Sets the initial scrolling position of the scrollable plot area. Ranges from 0 to 1, where 0 aligns the plot area to the left and 1 aligns it to the right. Typically we would use 1 if the chart has right aligned Y axes.
-
getScrollPositionY
public Number getScrollPositionY()
Returns the initial scrolling position of the scrollable plot area. Ranges from 0 to 1, where 0 aligns the plot area to the top and 1 aligns it to the bottom.Default: undefined
-
setScrollPositionY
public void setScrollPositionY(Number scrollPositionY)
Sets the initial scrolling position of the scrollable plot area. Ranges from 0 to 1, where 0 aligns the plot area to the top and 1 aligns it to the bottom.
-
-