Package com.oorian.echarts.options
Class EChartsTreeSeries
java.lang.Object
com.oorian.echarts.options.EChartsSeries
com.oorian.echarts.options.EChartsTreeSeries
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents a Tree series configuration for ECharts tree diagrams.
Extends EChartsSeries to provide tree-specific options for hierarchical visualization.
Tree charts are useful for displaying:
- Organizational charts
- Decision trees
- File system structures
- Genealogy/family trees
- Author:
- Oorian
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class representing a tree node. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.oorian.echarts.options.EChartsSeries
data, name, type -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new EChartsTreeSeries with type set to "tree". -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSpecificToJson(com.oorian.json.JsonObject obj) Adds series-specific properties to a JSON object.createRootNode(String name) Creates and sets a root node with the given name.getLabel()getLeft()getRight()getRoam()getTop()getWidth()protected voidinitSpecificFromJson(com.oorian.json.JsonObject obj) Initializes series-specific properties from a JSON object.voidSets the bottom position.voidsetEmphasis(EChartsEmphasis emphasis) Sets the emphasis configuration.voidsetExpandAndCollapse(Boolean expandAndCollapse) Sets whether nodes can be expanded and collapsed.voidSets the height.voidsetInitialTreeDepth(Number initialTreeDepth) Sets the initial depth of tree expansion.voidsetItemStyle(EChartsItemStyle itemStyle) Sets the item style configuration.voidsetLabel(EChartsLabel label) Sets the label configuration.voidSets the layout algorithm ('orthogonal' or 'radial').voidSets the left position.voidsetLineStyle(EChartsLineStyle lineStyle) Sets the line style configuration.voidSets the orientation of the tree ('LR', 'RL', 'TB', 'BT').voidSets the right position.voidSets whether the tree supports roaming (pan and zoom).voidsetRootNode(EChartsTreeSeries.TreeNode rootNode) Sets the root node of the tree.voidSets the symbol type for nodes.voidsetSymbolSize(Number symbolSize) Sets the size of node symbols.voidSets the top position.voidSets the width.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
-
Field Details
-
LAYOUT_ORTHOGONAL
- See Also:
-
LAYOUT_RADIAL
- See Also:
-
ORIENT_LR
- See Also:
-
ORIENT_RL
- See Also:
-
ORIENT_TB
- See Also:
-
ORIENT_BT
- See Also:
-
-
Constructor Details
-
EChartsTreeSeries
public EChartsTreeSeries()Constructs a new EChartsTreeSeries with type set to "tree".
-
-
Method Details
-
setRootNode
Sets the root node of the tree.- Parameters:
rootNode- the root node
-
createRootNode
Creates and sets a root node with the given name.- Parameters:
name- the name of the root node- Returns:
- the created root node
-
setLayout
Sets the layout algorithm ('orthogonal' or 'radial').- Parameters:
layout- the layout algorithm
-
setOrient
Sets the orientation of the tree ('LR', 'RL', 'TB', 'BT').- Parameters:
orient- the orientation
-
setSymbolSize
Sets the size of node symbols.- Parameters:
symbolSize- the symbol size in pixels
-
setSymbol
Sets the symbol type for nodes.- Parameters:
symbol- the symbol type
-
setRoam
Sets whether the tree supports roaming (pan and zoom).- Parameters:
roam- true to enable roaming
-
setExpandAndCollapse
Sets whether nodes can be expanded and collapsed.- Parameters:
expandAndCollapse- true to enable expand/collapse
-
setInitialTreeDepth
Sets the initial depth of tree expansion.- Parameters:
initialTreeDepth- the initial depth
-
setLeft
Sets the left position.- Parameters:
left- the left position
-
setRight
Sets the right position.- Parameters:
right- the right position
-
setTop
Sets the top position.- Parameters:
top- the top position
-
setBottom
Sets the bottom position.- Parameters:
bottom- the bottom position
-
setWidth
Sets the width.- Parameters:
width- the width
-
setHeight
Sets the height.- Parameters:
height- the height
-
setItemStyle
Sets the item style configuration.- Parameters:
itemStyle- the item style
-
setLineStyle
Sets the line style configuration.- Parameters:
lineStyle- the line style
-
setLabel
Sets the label configuration.- Parameters:
label- the label configuration
-
setEmphasis
Sets the emphasis configuration.- Parameters:
emphasis- the emphasis configuration
-
getRootNode
-
getLayout
-
getOrient
-
getSymbolSize
-
getSymbol
-
getRoam
-
getExpandAndCollapse
-
getInitialTreeDepth
-
getLeft
-
getRight
-
getTop
-
getBottom
-
getWidth
-
getHeight
-
getItemStyle
-
getLineStyle
-
getLabel
-
getEmphasis
-
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
-