Package com.oorian.echarts.options
Class EChartsTreemapSeries
java.lang.Object
com.oorian.echarts.options.EChartsSeries
com.oorian.echarts.options.EChartsTreemapSeries
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents a treemap series configuration for ECharts treemap charts.
Extends EChartsSeries to provide treemap-specific options for hierarchical data visualization.
Treemap charts are useful for displaying:
- Hierarchical data as nested rectangles
- File system structures
- Portfolio allocations
- Category breakdowns
- Author:
- Oorian
-
Field Summary
Fields inherited from class com.oorian.echarts.options.EChartsSeries
data, name, type -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new EChartsTreemapSeries with type set to "treemap". -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds simple leaf data for the treemap chart.voidaddData(String name, Number value, List<EChartsTreemapData> children) Adds hierarchical data for the treemap chart.protected voidaddSpecificToJson(com.oorian.json.JsonObject obj) Adds series-specific properties to a JSON object.Gets the bottom position.com.oorian.json.JsonArrayGets the breadcrumb configuration.Gets the children visible minimum.Gets the drill down icon.Gets the emphasis configuration.Gets the height.Gets the item style configuration.getLabel()Gets the label configuration.Gets the leaf depth.getLeft()Gets the left position.Gets the levels configuration.Gets the node click behavior.getRight()Gets the right position.getRoam()Gets the roam setting.Gets the square ratio.getTop()Gets the top position.Gets the upper label configuration.Gets the visible minimum.getWidth()Gets the width.Gets the zoom to node ratio.protected voidinitSpecificFromJson(com.oorian.json.JsonObject obj) Initializes series-specific properties from a JSON object.voidSets the bottom position of the treemap.voidsetBreadcrumb(com.oorian.json.JsonArray breadcrumb) Sets the breadcrumb configuration.voidsetChildrenVisibleMin(Number childrenVisibleMin) Sets the minimum visible area for children.voidsetDrillDownIcon(String drillDownIcon) Sets the drill down icon.voidsetEmphasis(EChartsEmphasis emphasis) Sets the emphasis configuration for highlighted elements.voidSets the height of the treemap.voidsetItemStyle(EChartsItemStyle itemStyle) Sets the item style configuration.voidsetLabel(EChartsLabel label) Sets the label configuration.voidsetLeafDepth(Number leafDepth) Sets the depth of leaves to show.voidSets the left position of the treemap.voidsetLevels(EChartsLevels levels) Sets the levels configuration for different depth levels.voidsetNodeClick(String nodeClick) Sets the node click behavior.voidSets the right position of the treemap.voidSets whether roaming (panning/zooming) is enabled.voidsetSquareRatio(Number squareRatio) Sets the square ratio for treemap layout.voidSets the top position of the treemap.voidsetUpperLabel(EChartsLabel upperLabel) Sets the upper label configuration (for parent nodes).voidsetVisibleMin(Number visibleMin) Sets the minimum visible area.voidSets the width of the treemap.voidsetZoomToNodeRatio(Number zoomToNodeRatio) Sets the zoom to node ratio.Methods inherited from class com.oorian.echarts.options.EChartsSeries
addData, getData, getName, getType, initFromJson, parseDataArray, setData, setName, setType, toJsonString, toJsonValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson
-
Constructor Details
-
EChartsTreemapSeries
public EChartsTreemapSeries()Constructs a new EChartsTreemapSeries with type set to "treemap".
-
-
Method Details
-
addData
Adds hierarchical data for the treemap chart.- Parameters:
name- the name of this data nodevalue- the value of this nodechildren- list of child nodes (can be null for leaf nodes)
-
addData
Adds simple leaf data for the treemap chart.- Parameters:
name- the name of this data nodevalue- the value of this node
-
setLeft
Sets the left position of the treemap.- Parameters:
left- the left position
-
setRight
Sets the right position of the treemap.- Parameters:
right- the right position
-
setTop
Sets the top position of the treemap.- Parameters:
top- the top position
-
setBottom
Sets the bottom position of the treemap.- Parameters:
bottom- the bottom position
-
setWidth
Sets the width of the treemap.- Parameters:
width- the width
-
setHeight
Sets the height of the treemap.- Parameters:
height- the height
-
setSquareRatio
Sets the square ratio for treemap layout.- Parameters:
squareRatio- the square ratio (golden ratio by default)
-
setLeafDepth
Sets the depth of leaves to show.- Parameters:
leafDepth- the leaf depth
-
setDrillDownIcon
Sets the drill down icon.- Parameters:
drillDownIcon- the drill down icon
-
setRoam
Sets whether roaming (panning/zooming) is enabled.- Parameters:
roam- true to enable roaming
-
setNodeClick
Sets the node click behavior.- Parameters:
nodeClick- the node click action ('zoomToNode', 'link', or false)
-
setZoomToNodeRatio
Sets the zoom to node ratio.- Parameters:
zoomToNodeRatio- the zoom ratio
-
setVisibleMin
Sets the minimum visible area.- Parameters:
visibleMin- the minimum visible value
-
setChildrenVisibleMin
Sets the minimum visible area for children.- Parameters:
childrenVisibleMin- the minimum visible value for children
-
setItemStyle
Sets the item style configuration.- Parameters:
itemStyle- the item style configuration
-
setEmphasis
Sets the emphasis configuration for highlighted elements.- Parameters:
emphasis- the emphasis configuration
-
setLabel
Sets the label configuration.- Parameters:
label- the label configuration
-
setUpperLabel
Sets the upper label configuration (for parent nodes).- Parameters:
upperLabel- the upper label configuration
-
setLevels
Sets the levels configuration for different depth levels.- Parameters:
levels- the levels configuration
-
setBreadcrumb
public void setBreadcrumb(com.oorian.json.JsonArray breadcrumb) Sets the breadcrumb configuration.- Parameters:
breadcrumb- the breadcrumb configuration array
-
getLeft
Gets the left position.- Returns:
- the left position
-
getRight
Gets the right position.- Returns:
- the right position
-
getTop
Gets the top position.- Returns:
- the top position
-
getBottom
Gets the bottom position.- Returns:
- the bottom position
-
getWidth
Gets the width.- Returns:
- the width
-
getHeight
Gets the height.- Returns:
- the height
-
getSquareRatio
Gets the square ratio.- Returns:
- the square ratio
-
getLeafDepth
Gets the leaf depth.- Returns:
- the leaf depth
-
getDrillDownIcon
Gets the drill down icon.- Returns:
- the drill down icon
-
getRoam
Gets the roam setting.- Returns:
- true if roaming is enabled
-
getNodeClick
Gets the node click behavior.- Returns:
- the node click action
-
getZoomToNodeRatio
Gets the zoom to node ratio.- Returns:
- the zoom ratio
-
getVisibleMin
Gets the visible minimum.- Returns:
- the visible minimum
-
getChildrenVisibleMin
Gets the children visible minimum.- Returns:
- the children visible minimum
-
getItemStyle
Gets the item style configuration.- Returns:
- the item style configuration
-
getEmphasis
Gets the emphasis configuration.- Returns:
- the emphasis configuration
-
getLabel
Gets the label configuration.- Returns:
- the label configuration
-
getUpperLabel
Gets the upper label configuration.- Returns:
- the upper label configuration
-
getLevels
Gets the levels configuration.- Returns:
- the levels configuration
-
getBreadcrumb
public com.oorian.json.JsonArray getBreadcrumb()Gets the breadcrumb configuration.- Returns:
- the breadcrumb configuration
-
initSpecificFromJson
protected void initSpecificFromJson(com.oorian.json.JsonObject obj) Description copied from class:EChartsSeriesInitializes series-specific properties from a JSON object.Subclasses must implement this method to handle their specific properties.
- Specified by:
initSpecificFromJsonin classEChartsSeries- Parameters:
obj- the JSON object containing series properties
-
addSpecificToJson
protected void addSpecificToJson(com.oorian.json.JsonObject obj) Description copied from class:EChartsSeriesAdds series-specific properties to a JSON object.Subclasses must implement this method to serialize their specific properties.
- Specified by:
addSpecificToJsonin classEChartsSeries- Parameters:
obj- the JSON object to add properties to
-