mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 21:40:41 +00:00
优化桑吉图折叠显示
This commit is contained in:
@@ -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>>();
|
||||
|
||||
Reference in New Issue
Block a user