mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 18:00:26 +00:00
优化桑吉图折叠显示
This commit is contained in:
@@ -42,11 +42,27 @@ namespace XCharts.Runtime
|
|||||||
double totalValue = 0;
|
double totalValue = 0;
|
||||||
foreach (var node in nodes)
|
foreach (var node in nodes)
|
||||||
{
|
{
|
||||||
totalValue += node.totalValues;
|
if (node.IsAnyInEdgesExpanded())
|
||||||
|
{
|
||||||
|
totalValue += node.totalValues;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return totalValue;
|
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()
|
public List<List<GraphNode>> GetDepthNodes()
|
||||||
{
|
{
|
||||||
List<List<GraphNode>> depthNodes = new List<List<GraphNode>>();
|
List<List<GraphNode>> depthNodes = new List<List<GraphNode>>();
|
||||||
|
|||||||
Reference in New Issue
Block a user