增加数据图的折叠和展开支持

This commit is contained in:
monitor1394
2024-03-20 08:31:05 +08:00
parent 113c3887ae
commit 99b1624b54
5 changed files with 87 additions and 27 deletions

View File

@@ -80,7 +80,7 @@ slug: /api
- [EmphasisStyle](#emphasisstyle)
- [EndLabelStyle](#endlabelstyle)
- [FormatterHelper](#formatterhelper)
- [Graph](#graph)
- [GraphData](#graphdata)
- [GraphEdge](#graphedge)
- [GraphNode](#graphnode)
- [GridCoord](#gridcoord)
@@ -1410,7 +1410,7 @@ Configurations of emphasis state.
|TrimAndReplaceLine()||public static string TrimAndReplaceLine(string content)|
|TrimAndReplaceLine()||public static string TrimAndReplaceLine(StringBuilder sb)|
## Graph
## GraphData
> class in XCharts.Runtime
@@ -1424,6 +1424,8 @@ the data struct of graph.
|Clear()||public void Clear()|
|DeepFirstTraverse()||public void DeepFirstTraverse(GraphNode startNode, System.Action<GraphNode> onTraverse)|
|EachNode()||public void EachNode(System.Action<GraphNode> onEach)|
|ExpandAllNodes()||public void ExpandAllNodes(bool flag, int level = -1)|
|ExpandNode()||public void ExpandNode(string nodeId, bool flag)|
|GetDepthNodes()||public List<List<GraphNode>> GetDepthNodes()|
|GetEdge()||public GraphEdge GetEdge(string nodeId1, string nodeId2)|
|GetMaxDepth()||public int GetMaxDepth()|
@@ -1433,7 +1435,7 @@ the data struct of graph.
|GetNodeDepth()||public int GetNodeDepth(GraphNode node, int recursiveCount = 0)|
|GetNodesTotalValue()||public static double GetNodesTotalValue(List<GraphNode> nodes)|
|GetRootNodes()||public List<GraphNode> GetRootNodes()|
|Graph()||public Graph(bool directed)|
|GraphData()||public GraphData(bool directed)|
|Refresh()||public void Refresh()|
## GraphEdge
@@ -1454,7 +1456,10 @@ The node of graph.
|public method|since|description|
|--|--|--|
|Expand()||public void Expand(bool flag)|
|GraphNode()||public GraphNode(string id, string name, int dataIndex)|
|IsAllInEdgesCollapsed()||public bool IsAllInEdgesCollapsed()|
|IsAnyInEdgesExpanded()||public bool IsAnyInEdgesExpanded()|
|ToString()||public override string ToString()|
## GridCoord