Class TreemapPlotOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.SeriesPlotOptions
-
- org.zkoss.chart.plotOptions.TreemapPlotOptions
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class TreemapPlotOptions extends SeriesPlotOptions
Options for treemap.- Author:
- Christopher
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description TreemapPlotOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleangetAllowDrillToNode()Deprecated.Deprecated and replaced by allowTraversingTree since 7.2.1.0.booleangetAlternateStartingDirection()Enabling this option will make the treemap alternate the drawing direction between vertical and horizontal.ColorgetBorderColor()The color of the border surrounding each tree map item.ObjectgetBorderRadius()Returns the border radius of the series.NumbergetBorderWidth()Returns the width of the border surrounding each column or bar.BreadcrumbsgetBreadcrumbs()Returns the options for the breadcrumbs, the navigation at the top leading the way up through the traversed levels.List<Color>getColors()Returns a series specific or series type specific color set to apply instead of the globalCharts.getColors()whenSeriesPlotOptions.setColorByPoint(boolean)is true.NumbergetGroupPadding()Returns Group padding for parent elements in terms of pixels.booleangetInteractByLeaf()This option decides if the user can interact with the parent nodes or just the leaf nodes.StringgetLayoutAlgorithm()Get the option that decides which algorithm is used for setting position and dimensions of the points.StringgetLayoutStartingDirection()Defines which direction the layout algorithm will start drawing.booleangetLevelIsConstant()Deprecated.since 10.2.1.0, usingisLevelIsConstant()instead.List<Level>getLevels()Returns options on specific levels.StringgetNodeSizeBy()Returns the node size by.NumbergetSortIndex()Returns the sort index of the point inside the treemap level.TraverseUpButtongetTraverseUpButton()Returns options for the button appearing when traversing down in a treemap, if any.booleanisAllowTraversingTree()When enabled the user can click on a point which is a parent and zoom in on its children.booleanisIgnoreHiddenPoint()Returns whether ignore the hidden point.booleanisLevelIsConstant()Used together with the levels and allowDrillToNode options.booleanisTraverseToLeaf()Returns this option enables automatic traversing to the last child level upon node interaction.voidsetAllowDrillToNode(boolean allowDrillToNode)Deprecated.since 7.2.1.0.voidsetAllowTraversingTree(boolean allowTraversingTree)voidsetAlternateStartingDirection(boolean alternateStartingDirection)voidsetBorderColor(String color)Sets the color of the border surrounding each column or bar.voidsetBorderColor(Color color)Sets the color of the border surrounding each column or bar.voidsetBorderColor(LinearGradient color)Sets the color of the border surrounding each column or bar.voidsetBorderColor(RadialGradient color)Sets the color of the border surrounding each column or bar.voidsetBorderWidth(Number borderWidth)Sets the width of the border surrounding each column or bar.voidsetBreadcrumbs(Breadcrumbs breadcrumbs)Sets the options for the breadcrumbs, the navigation at the top leading the way up through the traversed levels.voidsetColors(String... source)Sets a series specific or series type specific color set to apply instead of the globalCharts.getColors()whenSeriesPlotOptions.setColorByPoint(boolean)is true.voidsetColors(List<Color> colors)Sets a series specific or series type specific color set to apply instead of the globalCharts.getColors()whenSeriesPlotOptions.setColorByPoint(boolean)is true.voidsetGroupPadding(Number groupPadding)Sets Group padding for parent elements in terms of pixels.voidsetIgnoreHiddenPoint(boolean ignoreHiddenPoint)Sets whether ignore the hidden point.voidsetInteractByLeaf(boolean interactByLeaf)voidsetLayoutAlgorithm(String layoutAlgorithm)Set the option decides which algorithm is used for setting position and dimensions of the points.voidsetLayoutStartingDirection(String layoutStartingDirection)Set which direction the layout algorithm will start drawing.voidsetLevelIsConstant(boolean levelIsConstant)voidsetLevels(List<Level> levels)Set options on specific levels.voidsetLevels(Level... levels)Set options on specific levels.voidsetNodeSizeBy(String nodeSizeBy)Sets the node size by.voidsetSortIndex(Number sortIndex)Sets the sort index of the point inside the treemap level.voidsetTraverseToLeaf(boolean traverseToLeaf)Sets this option enables automatic traversing to the last child level upon node interaction.voidsetTraverseUpButton(TraverseUpButton traverseUpButton)Sets options for the button appearing when traversing down in a treemap.-
Methods inherited from class org.zkoss.chart.plotOptions.SeriesPlotOptions
addDataLabels, getAccessibility, getAnimation, getAnimationLimit, getBoostBlending, getBoostThreshold, getClassName, getColor, getColorAxis, getColorIndex, getColorKey, getConnectorWidth, getCropThreshold, getCursor, getCustom, getDashStyle, getDataLabels, getDataLabelsList, getDataSorting, getDepth, getDescription, getDragDrop, getFindNearestPointBy, getId, getIndex, getKeys, getLabel, getLegendSymbol, getLinecap, getLineWidth, getLinkedTo, getMarker, getName, getNeckHeight, getNeckWidth, getNegativeColor, getOnPoint, getOpacity, getPointDescriptionFormatter, getPointInterval, getPointIntervalUnit, getPointPlacement, getPointStart, getStacking, getStates, getStep, getThreshold, getTooltip, getTurboThreshold, getZoneAxis, getZones, isAllowPointSelect, isAnimation, isCenterInCategory, isClip, isColorByPoint, isConnectEnds, isConnectNulls, isCrisp, isDataAsColumns, isEnableMouseTracking, isGetExtremesFromAll, isIncludeInDataExport, isRelativeXValue, isSelected, isShadow, isShowCheckbox, isShowInLegend, isSkipKeyboardNavigation, isSoftThreshold, isStacking, isStickyTracking, isVisible, isZoomEnabled, newDataLabels, setAccessibility, setAllowPointSelect, setAnimation, setAnimation, setAnimationLimit, setBoostBlending, setBoostThreshold, setBorderRadius, setBorderRadius, setCenter, setCenter, setCenterInCategory, setClassName, setClip, setColor, setColor, setColor, setColor, setColorAxis, setColorAxis, setColorAxis, setColorByPoint, setColorIndex, setColorKey, setConnectEnds, setConnectNulls, setConnectorWidth, setCrisp, setCropThreshold, setCursor, setCustom, setDashStyle, setDataAsColumns, setDataLabels, setDataLabels, setDataSorting, setDepth, setDescription, setDragDrop, setEnableMouseTracking, setFindNearestPointBy, setGetExtremesFromAll, setId, setIncludeInDataExport, setIndex, setKeys, setLabel, setLegendSymbol, setLinecap, setLineWidth, setLinkedTo, setMarker, setName, setNeckHeight, setNeckWidth, setNegativeColor, setNegativeColor, setNegativeColor, setNegativeColor, setOnPoint, setOpacity, setPointDescriptionFormatter, setPointInterval, setPointIntervalUnit, setPointPlacement, setPointPlacement, setPointStart, setPointStart, setRelativeXValue, setSelected, setShadow, setShowCheckbox, setShowInLegend, setSkipKeyboardNavigation, setSoftThreshold, setStacking, setStacking, setStates, setStep, setStickyTracking, setThreshold, setTooltip, setTurboThreshold, setVisible, setWidth, setZoneAxis, setZones, setZones, setZoomEnabled
-
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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.chart.OptionDataListener
onChange
-
-
-
-
Method Detail
-
getBorderRadius
public Object getBorderRadius()
Returns the border radius of the series.Default:
0- Overrides:
getBorderRadiusin classSeriesPlotOptions- Since:
- 10.2.1.0
-
getBreadcrumbs
public Breadcrumbs getBreadcrumbs()
Returns the options for the breadcrumbs, the navigation at the top leading the way up through the traversed levels.Default: an instance of Breadcrumbs
- Since:
- 10.2.1.0
-
setBreadcrumbs
public void setBreadcrumbs(Breadcrumbs breadcrumbs)
Sets the options for the breadcrumbs, the navigation at the top leading the way up through the traversed levels.Default: an instance of Breadcrumbs
- Since:
- 10.2.1.0
-
isAllowTraversingTree
public boolean isAllowTraversingTree()
When enabled the user can click on a point which is a parent and zoom in on its children.Defaults to false.
- Since:
- 7.2.1.0
-
setAllowTraversingTree
public void setAllowTraversingTree(boolean allowTraversingTree)
- Parameters:
allowTraversingTree-- Since:
- 7.2.1.0
- See Also:
isAllowTraversingTree()
-
getAllowDrillToNode
@Deprecated public boolean getAllowDrillToNode()
Deprecated.Deprecated and replaced by allowTraversingTree since 7.2.1.0.When enabled the user can click on a point which is a parent and zoom in on its children.Defaults to false.
- Since:
- 2.1.0
-
setAllowDrillToNode
@Deprecated public void setAllowDrillToNode(boolean allowDrillToNode)
Deprecated.since 7.2.1.0.- Parameters:
allowDrillToNode-- Since:
- 2.1.0
- See Also:
getAllowDrillToNode()
-
getAlternateStartingDirection
public boolean getAlternateStartingDirection()
Enabling this option will make the treemap alternate the drawing direction between vertical and horizontal. The next levels starting direction will always be the opposite of the previous.Defaults to false.
- Since:
- 2.1.0
-
setAlternateStartingDirection
public void setAlternateStartingDirection(boolean alternateStartingDirection)
- Parameters:
alternateStartingDirection-- Since:
- 2.1.0
- See Also:
getAlternateStartingDirection()
-
getBorderColor
public Color getBorderColor()
The color of the border surrounding each tree map item.Defaults to #E0E0E0.
- Since:
- 2.1.0
-
setBorderColor
public void setBorderColor(Color color)
Sets the color of the border surrounding each column or bar.- Since:
- 2.1.0
- See Also:
getBorderColor(),Color
-
setBorderColor
public void setBorderColor(String color)
Sets the color of the border surrounding each column or bar.- Since:
- 2.1.0
- See Also:
getBorderColor()
-
setBorderColor
public void setBorderColor(LinearGradient color)
Sets the color of the border surrounding each column or bar.- Since:
- 2.1.0
- See Also:
getBorderColor(),LinearGradient
-
setBorderColor
public void setBorderColor(RadialGradient color)
Sets the color of the border surrounding each column or bar.- Since:
- 2.1.0
- See Also:
getBorderColor(),RadialGradient
-
getBorderWidth
public Number getBorderWidth()
Returns the width of the border surrounding each column or bar.Default: 1.
- Overrides:
getBorderWidthin classSeriesPlotOptions- Returns:
- width of the border surrounding each column or bar.
- Since:
- 2.1.0
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the width of the border surrounding each column or bar.- Overrides:
setBorderWidthin classSeriesPlotOptions- Since:
- 2.1.0
-
getColors
public List<Color> getColors()
Returns a series specific or series type specific color set to apply instead of the globalCharts.getColors()whenSeriesPlotOptions.setColorByPoint(boolean)is true.- Since:
- 2.1.0
-
setColors
public void setColors(List<Color> colors)
Sets a series specific or series type specific color set to apply instead of the globalCharts.getColors()whenSeriesPlotOptions.setColorByPoint(boolean)is true.- Since:
- 2.1.0
-
setColors
public void setColors(String... source)
Sets a series specific or series type specific color set to apply instead of the globalCharts.getColors()whenSeriesPlotOptions.setColorByPoint(boolean)is true.- Since:
- 2.1.0
-
isIgnoreHiddenPoint
public boolean isIgnoreHiddenPoint()
Returns whether ignore the hidden point.Equivalent to
Chart.isIgnoreHiddenSeries(), this option tells whether the series shall be redrawn as if the hidden point werenull.The default value true.
- Since:
- 10.2.1.0
-
setIgnoreHiddenPoint
public void setIgnoreHiddenPoint(boolean ignoreHiddenPoint)
Sets whether ignore the hidden point.Equivalent to
Chart.isIgnoreHiddenSeries(), this option tells whether the series shall be redrawn as if the hidden point werenull.The default value true.
- Since:
- 10.2.1.0
-
getInteractByLeaf
public boolean getInteractByLeaf()
This option decides if the user can interact with the parent nodes or just the leaf nodes. When this option is undefined, it will be true by default. However when allowTraversingTree is true, then it will be false by default.- Since:
- 2.1.0
-
setInteractByLeaf
public void setInteractByLeaf(boolean interactByLeaf)
- Parameters:
interactByLeaf-- Since:
- 2.1.0
- See Also:
getInteractByLeaf()
-
getLayoutAlgorithm
public String getLayoutAlgorithm()
Get the option that decides which algorithm is used for setting position and dimensions of the points.Default: "sliceAndDice"
- Returns:
- either "sliceAndDice", "stripes", "squarified", or "strip"
- Since:
- 2.1.0
-
setLayoutAlgorithm
public void setLayoutAlgorithm(String layoutAlgorithm)
Set the option decides which algorithm is used for setting position and dimensions of the points.- Parameters:
layoutAlgorithm-- Since:
- 2.1.0
-
getLayoutStartingDirection
public String getLayoutStartingDirection()
Defines which direction the layout algorithm will start drawing.Default: "vertical"
- Returns:
- either "vertical" or "horizontal
- Since:
- 2.1.0
-
setLayoutStartingDirection
public void setLayoutStartingDirection(String layoutStartingDirection)
Set which direction the layout algorithm will start drawing.Possible values are "vertical" and "horizontal".
- Parameters:
layoutStartingDirection-- Since:
- 2.1.0
- See Also:
getLayoutStartingDirection()
-
getLevelIsConstant
public boolean getLevelIsConstant()
Deprecated.since 10.2.1.0, usingisLevelIsConstant()instead.Used together with the levels and allowDrillToNode options. When set to false the first level visible when drilling is considered to be level one. Otherwise the level will be the same as the tree structure.Defaults to true.
- Since:
- 2.1.0
-
isLevelIsConstant
public boolean isLevelIsConstant()
Used together with the levels and allowDrillToNode options. When set to false the first level visible when drilling is considered to be level one. Otherwise the level will be the same as the tree structure.Defaults to true.
- Since:
- 10.2.1.0
-
setLevelIsConstant
public void setLevelIsConstant(boolean levelIsConstant)
- Parameters:
levelIsConstant-- Since:
- 2.1.0
- See Also:
isLevelIsConstant()
-
getLevels
public List<Level> getLevels()
Returns options on specific levels. Takes precedence over series options, but not point options.Default: null
- Since:
- 2.1.0
-
setLevels
public void setLevels(List<Level> levels)
Set options on specific levels. Takes precedence over series options, but not point options.- Parameters:
levels-- Since:
- 2.1.0
- See Also:
getLevels()
-
setLevels
public void setLevels(Level... levels)
Set options on specific levels. Takes precedence over series options, but not node and link options.- Since:
- 10.2.1.0
-
getTraverseUpButton
public TraverseUpButton getTraverseUpButton()
Returns options for the button appearing when traversing down in a treemap, if any. Otherwise, create a new one.- Since:
- 7.2.1.0
-
setTraverseUpButton
public void setTraverseUpButton(TraverseUpButton traverseUpButton)
Sets options for the button appearing when traversing down in a treemap.- Since:
- 7.2.1.0
-
getSortIndex
public Number getSortIndex()
Returns the sort index of the point inside the treemap level.Default:
null- Since:
- 10.2.1.0
-
setSortIndex
public void setSortIndex(Number sortIndex)
Sets the sort index of the point inside the treemap level.Default:
null- Since:
- 10.2.1.0
-
isTraverseToLeaf
public boolean isTraverseToLeaf()
Returns this option enables automatic traversing to the last child level upon node interaction. This feature simplifies navigation by immediately focusing on the deepest layer of the data structure without intermediate steps.Defaults to false.
- Since:
- 11.4.7.0
-
setTraverseToLeaf
public void setTraverseToLeaf(boolean traverseToLeaf)
Sets this option enables automatic traversing to the last child level upon node interaction. This feature simplifies navigation by immediately focusing on the deepest layer of the data structure without intermediate steps.Defaults to false.
- Since:
- 11.4.7.0
-
getGroupPadding
public Number getGroupPadding()
Returns Group padding for parent elements in terms of pixels. See also the nodeSizeBy option that controls how the leaf nodes' size is affected by the padding.Default:
null- Overrides:
getGroupPaddingin classSeriesPlotOptions- Since:
- 12.2.0.0
-
setGroupPadding
public void setGroupPadding(Number groupPadding)
Sets Group padding for parent elements in terms of pixels. See also the nodeSizeBy option that controls how the leaf nodes' size is affected by the padding.Default:
null- Overrides:
setGroupPaddingin classSeriesPlotOptions- Since:
- 12.2.0.0
-
getNodeSizeBy
public String getNodeSizeBy()
Returns the node size by. Experimental. How to set the size of child nodes when a header or padding is present. When "leaf", the group is expanded to make room for headers and padding in order to preserve the relative sizes between leaves. When "group", the leaves are naïvely fit into the remaining area after the header and padding are subtracted.Default:
"group"- Since:
- 12.2.0.0
-
setNodeSizeBy
public void setNodeSizeBy(String nodeSizeBy)
Sets the node size by. Experimental. How to set the size of child nodes when a header or padding is present. When "leaf", the group is expanded to make room for headers and padding in order to preserve the relative sizes between leaves. When "group", the leaves are naïvely fit into the remaining area after the header and padding are subtracted.Default:
"group"- Since:
- 12.2.0.0
-
-