增加Animation在重新初始化数据时自启动功能

This commit is contained in:
monitor1394
2019-09-06 09:46:13 +08:00
parent d216079e78
commit 0f822b6848
5 changed files with 74 additions and 13 deletions

View File

@@ -46,6 +46,7 @@ namespace XCharts
/// </summary>
public void ClearData()
{
AnimationStop();
foreach (var serie in m_Series)
{
serie.ClearData();
@@ -200,6 +201,7 @@ namespace XCharts
/// </summary>
public void RemoveAll()
{
AnimationStop();
m_Series.Clear();
}
@@ -793,6 +795,9 @@ namespace XCharts
}
}
/// <summary>
/// 开始初始动画
/// </summary>
public void AnimationStart()
{
foreach (var serie in m_Series)
@@ -804,6 +809,17 @@ namespace XCharts
}
}
/// <summary>
/// 停止初始动画
/// </summary>
public void AnimationStop()
{
foreach (var serie in m_Series)
{
if (serie.animation.enable) serie.animation.Stop();
}
}
/// <summary>
/// 从json中解析数据
/// </summary>