You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/option/series/tree.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ This is the position where the polyline branches in the subtree when the shape o
109
109
110
110
Subtree collapses and expands interaction, `default true`. As the drawing area is limited, and usually the nodes of a tree may be more, so there will be hidden between the nodes. In order to avoid this problem, you can put a temporary unrelated subtree folded away, until you need to start when necessary. Such as the above radial layout tree example, the center of the node is filled with blue is the folded away subtree, you can click to expand it.
111
111
112
-
**Note: If you configure a custom image as the tag for a node, it is not possible to distinguish whether the current node has a collapsed subtree by the fill color. And currently do not support, upload two pictures, respectively represent the collapsing and expansion state of the node. So, if you want to explicitly show the two states of the node, it is recommended to use `ECharts` regular tag types, such as `emptyCircle`.**
112
+
**Note: The default node symbol is `'emptyCircle'`. With this symbol, the inner fill is used to indicate whether a node has a collapsed subtree, while the outer ring follows [itemStyle.color](~series-tree.itemStyle.color). If you configure a custom image as the node symbol, ECharts can not switch the visual state by changing that inner fill, and currently does not support providing two different images for collapsed and expanded states automatically. So, if you want to explicitly show the two states of the node, it is recommended to use a built-in symbol type such as `'emptyCircle'`.**
113
113
114
114
## initialTreeDepth(number) = 2
115
115
@@ -119,7 +119,15 @@ The initial level (depth) of the tree. The root node is the 0th layer, then the
119
119
120
120
## itemStyle(Object)
121
121
122
-
The style of each node in the tree, where [itemStyle.color](~series-tree.itemStyle.color) represents the fill color of the node, to distinguish the state of the subtree corresponding to `collapsing` or `expansion`.
122
+
The style of each node in the tree.
123
+
124
+
By default, `series.tree` uses the hollow symbol `'emptyCircle'`. With that symbol:
125
+
126
+
+[itemStyle.color](~series-tree.itemStyle.color) controls the outline color of the node.
127
+
+ The inner fill is used to indicate whether the node has a collapsed subtree.
128
+
+[itemStyle.borderColor](~series-tree.itemStyle.borderColor) and [itemStyle.borderWidth](~series-tree.itemStyle.borderWidth) do not affect the outer ring in the same way as they do for solid symbols.
129
+
130
+
If you want [itemStyle.color](~series-tree.itemStyle.color) to behave as the normal fill color, and use [itemStyle.borderColor](~series-tree.itemStyle.borderColor) / [itemStyle.borderWidth](~series-tree.itemStyle.borderWidth) as the border style, set [symbol](~series-tree.symbol) to a solid symbol such as `'circle'`.
0 commit comments