完善Pie饼图的交互动画效果

This commit is contained in:
monitor1394
2023-07-18 13:23:41 +08:00
parent 816e26f517
commit f5e8ba4082
8 changed files with 83 additions and 56 deletions

View File

@@ -203,7 +203,6 @@ namespace XCharts.Runtime
public void Reset()
{
Debug.LogError("Reset:"+this);
m_UpdateFlag = false;
m_ValueEnable = false;
m_PreviousValue = float.NaN;

View File

@@ -284,9 +284,9 @@ namespace XCharts.Runtime
return needShow;
}
public static bool CheckDataHighlighted(Serie serie, string legendName, bool heighlight)
public static int CheckDataHighlighted(Serie serie, string legendName, bool heighlight)
{
bool show = false;
var highlightedDataIndex = 0;
if (legendName.Equals(serie.serieName))
{
serie.highlight = heighlight;
@@ -298,11 +298,14 @@ namespace XCharts.Runtime
if (legendName.Equals(data.name))
{
data.context.highlight = heighlight;
if (data.context.highlight) show = true;
if (data.context.highlight)
{
highlightedDataIndex = data.index;
}
}
}
}
return show;
return highlightedDataIndex;
}
}
}