mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 14:30:10 +00:00
增加Animation在重新初始化数据时自启动功能
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user