优化桑吉图折叠显示

This commit is contained in:
monitor1394
2024-03-20 22:23:58 +08:00
parent 4b8374b1ae
commit 42079848dc

View File

@@ -42,11 +42,27 @@ namespace XCharts.Runtime
double totalValue = 0;
foreach (var node in nodes)
{
totalValue += node.totalValues;
if (node.IsAnyInEdgesExpanded())
{
totalValue += node.totalValues;
}
}
return totalValue;
}
public static int GetExpandedNodesCount(List<GraphNode> nodes)
{
int count = 0;
foreach (var node in nodes)
{
if (node.IsAnyInEdgesExpanded())
{
count++;
}
}
return count;
}
public List<List<GraphNode>> GetDepthNodes()
{
List<List<GraphNode>> depthNodes = new List<List<GraphNode>>();