mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
增加BaseChart.AnimationFadeOut()渐入动画,重构动画系统
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.02.23) 增加`BaseChart.AnimationFadeOut()`渐入动画,重构动画系统
|
||||
* (2020.02.13) 增加`BaseChart.RefreshTooltip()`接口立即重新初始化`Tooltip`组件
|
||||
* (2020.02.13) 增加`Tooltip`的`textStyle`参数配置内容文本样式,去掉`fontSize`和`fontStyle`参数
|
||||
* (2020.02.13) 增加`TextStyle`的`lineSpacing`参数配置行间距
|
||||
@@ -32,7 +33,7 @@
|
||||
* (2019.12.06) 修复数据过小时`AxisLabel`直接科学计数法显示的问题
|
||||
* (2019.12.04) 优化和完善数据更新`UpdateData`接口
|
||||
* (2019.12.03) 增加圆环饼图的圆角支持,参数:`serie.arcShaped`
|
||||
* (2019.12.03) 增加数据更新动画,参数:`serie.animation.updateAnimation`
|
||||
* (2019.12.03) 增加数据更新动画,参数:`serie.animation.dataChangeEnable`
|
||||
* (2019.11.30) 增加`GaugeChart`仪表盘
|
||||
* (2019.11.22) 修复`BarChart`清空数据重新赋值后`SerieLabel`显示异常的问题
|
||||
* (2019.11.16) 修复`SerieLabel`设置`color`等参数不生效的问题
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace XCharts
|
||||
{
|
||||
updateTime = 0;
|
||||
var serie = chart.series.GetSerie(0);
|
||||
//serie.animation.updateAnimation = true;
|
||||
//serie.animation.dataChangeEnable = true;
|
||||
var dataCount = serie.dataCount;
|
||||
if (chart is RadarChart)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace XCharts
|
||||
serie.center[1] = 0.5f;
|
||||
serie.radius[0] = 80;
|
||||
serie.splitNumber = 5;
|
||||
serie.animation.updateAnimation = true;
|
||||
serie.animation.dataChangeEnable = true;
|
||||
serie.arcShaped = true;
|
||||
|
||||
serie.titleStyle.show = true;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace XCharts
|
||||
{
|
||||
updateTime = 0;
|
||||
var serie = chart.series.GetSerie(0);
|
||||
serie.animation.updateAnimation = true;
|
||||
serie.animation.dataChangeEnable = true;
|
||||
var dataCount = serie.dataCount;
|
||||
if (chart is HeatmapChart)
|
||||
{
|
||||
|
||||
@@ -42,10 +42,12 @@
|
||||
* `BaseChart.RefreshLabel()`:在下一帧刷新文本标签。
|
||||
* `BaseChart.RefreshTooltip()`:立即刷新`Tooltip`组件。
|
||||
* `BaseChart.UpdateTheme(Theme theme)`:切换图表主题。
|
||||
* `BaseChart.AnimationEnable(bool flag)`:启用或关闭起始动画。
|
||||
* `BaseChart.AnimationStart()`:开始初始动画。
|
||||
* `BaseChart.AnimationStop()`:停止初始化动画。
|
||||
* `BaseChart.AnimationReset()`:重置初始动画,重新播放。
|
||||
* `BaseChart.AnimationEnable(bool flag)`:启用或关闭动画。
|
||||
* `BaseChart.AnimationFadeIn()`:渐入动画。
|
||||
* `BaseChart.AnimationFadeOut()`:渐出动画。
|
||||
* `BaseChart.AnimationPause()`:暂停动画。
|
||||
* `BaseChart.AnimationResume()`:继续动画。
|
||||
* `BaseChart.AnimationReset()`:重置动画。
|
||||
* `BaseChart.ClickLegendButton(int legendIndex, string legendName, bool show)`:点击图例按钮。
|
||||
|
||||
## `CoordinateChart`
|
||||
|
||||
@@ -608,14 +608,13 @@
|
||||
|
||||
## `SerieAnimation`
|
||||
|
||||
* `enable`:是否开起始画效果。
|
||||
* `easing`:动画的缓动效果。支持以下动画效果:
|
||||
* `Linear`:线性效果。
|
||||
* `duration`:设定的动画时长,单位毫秒。
|
||||
* `updateAnimation`:是否开启数据变更动画。
|
||||
* `updateDuration`:数据变更动画时长,单位毫秒。
|
||||
* `threshold`:是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。
|
||||
* `delay`:动画延时,单位毫秒。
|
||||
* `enable`:是否开启动画系统。
|
||||
* ~~`threshold`:是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。~~
|
||||
* `fadeInDelay`:设定的渐入动画延时,单位毫秒。
|
||||
* `fadeInDuration`:设定的渐入动画时长,单位毫秒。
|
||||
* `fadeOutDuration`:设定的渐出动画时长,单位毫秒。
|
||||
* `dataChangeEnable`:是否开启数据变更动画。
|
||||
* `dataChangeDuration`:数据变更动画时长,单位毫秒。
|
||||
|
||||
## `AreaStyle`
|
||||
|
||||
|
||||
@@ -22,11 +22,12 @@ namespace XCharts
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
SerializedProperty m_Enable = prop.FindPropertyRelative("m_Enable");
|
||||
SerializedProperty m_Easting = prop.FindPropertyRelative("m_Easting");
|
||||
SerializedProperty m_Duration = prop.FindPropertyRelative("m_Duration");
|
||||
SerializedProperty m_UpdateAnimation = prop.FindPropertyRelative("m_UpdateAnimation");
|
||||
SerializedProperty m_UpdateDuration = prop.FindPropertyRelative("m_UpdateDuration");
|
||||
SerializedProperty m_Delay = prop.FindPropertyRelative("m_Delay");
|
||||
//SerializedProperty m_Easting = prop.FindPropertyRelative("m_Easting");
|
||||
SerializedProperty m_FadeInDuration = prop.FindPropertyRelative("m_FadeInDuration");
|
||||
SerializedProperty m_FadeOutDuration = prop.FindPropertyRelative("m_FadeOutDuration");
|
||||
SerializedProperty m_DataChangeEnable = prop.FindPropertyRelative("m_DataChangeEnable");
|
||||
SerializedProperty m_DataChangeDuration = prop.FindPropertyRelative("m_DataChangeDuration");
|
||||
SerializedProperty m_FadeInDelay = prop.FindPropertyRelative("m_FadeInDelay");
|
||||
SerializedProperty m_Threshold = prop.FindPropertyRelative("m_Threshold");
|
||||
SerializedProperty m_ActualDuration = prop.FindPropertyRelative("m_ActualDuration");
|
||||
// SerializedProperty m_CurrDetailProgress = prop.FindPropertyRelative("m_CurrDetailProgress");
|
||||
@@ -37,23 +38,26 @@ namespace XCharts
|
||||
if (ChartEditorHelper.IsToggle(m_AnimationModuleToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Easting);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
//EditorGUI.PropertyField(drawRect, m_Easting);
|
||||
//drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Threshold);
|
||||
if (m_Threshold.intValue < 0) m_Threshold.intValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Delay);
|
||||
if (m_Delay.floatValue < 0) m_Delay.floatValue = 0;
|
||||
EditorGUI.PropertyField(drawRect, m_FadeInDelay);
|
||||
if (m_FadeInDelay.floatValue < 0) m_FadeInDelay.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Duration);
|
||||
if (m_Duration.floatValue < 0) m_Duration.floatValue = 0;
|
||||
EditorGUI.PropertyField(drawRect, m_FadeInDuration);
|
||||
if (m_FadeInDuration.floatValue < 0) m_FadeInDuration.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_UpdateAnimation);
|
||||
EditorGUI.PropertyField(drawRect, m_FadeOutDuration);
|
||||
if (m_FadeOutDuration.floatValue < 0) m_FadeOutDuration.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_UpdateDuration);
|
||||
if (m_UpdateDuration.floatValue < 0) m_UpdateDuration.floatValue = 0;
|
||||
EditorGUI.PropertyField(drawRect, m_DataChangeEnable);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_DataChangeDuration);
|
||||
if (m_DataChangeDuration.floatValue < 0) m_DataChangeDuration.floatValue = 0;
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
// EditorGUI.LabelField(drawRect, "CurrDetailProgress:" + m_CurrDetailProgress.floatValue);
|
||||
// drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
// EditorGUI.LabelField(drawRect, "DestDetailProgress:" + m_DestDetailProgress.floatValue);
|
||||
|
||||
@@ -523,32 +523,62 @@ namespace XCharts
|
||||
m_Series.AnimationEnable(flag);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start play animation.
|
||||
/// 开始初始动画。
|
||||
/// </summary>
|
||||
[Obsolete("Use BaseChart.AnimationFadeIn() instead.", true)]
|
||||
public void AnimationStart()
|
||||
{
|
||||
m_Series.AnimationStart();
|
||||
}
|
||||
|
||||
[Obsolete("Use BaseChart.AnimationFadeOut() instead.", true)]
|
||||
public void MissAnimationStart()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// fadeIn animation.
|
||||
/// 开始渐入动画。
|
||||
/// </summary>
|
||||
public void AnimationFadeIn()
|
||||
{
|
||||
m_Series.AnimationFadeIn();
|
||||
RefreshChart();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// fadeIn animation.
|
||||
/// 开始渐出动画。
|
||||
/// </summary>
|
||||
public void AnimationFadeOut()
|
||||
{
|
||||
m_Series.AnimationFadeOut();
|
||||
RefreshChart();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pause animation.
|
||||
/// 暂停动画。
|
||||
/// </summary>
|
||||
public void AnimationPause()
|
||||
{
|
||||
m_Series.AnimationPause();
|
||||
RefreshChart();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop play animation.
|
||||
/// 停止初始化动画。
|
||||
/// 继续动画。
|
||||
/// </summary>
|
||||
public void AnimationStop()
|
||||
public void AnimationResume()
|
||||
{
|
||||
m_CheckAnimation = false;
|
||||
m_Series.AnimationStop();
|
||||
m_Series.AnimationResume();
|
||||
RefreshChart();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset animation to play.
|
||||
/// 重置初始动画,重新播放。
|
||||
/// Reset animation.
|
||||
/// 重置动画。
|
||||
/// </summary>
|
||||
public void AnimationReset()
|
||||
{
|
||||
m_CheckAnimation = false;
|
||||
m_Series.AnimationReset();
|
||||
RefreshChart();
|
||||
}
|
||||
|
||||
@@ -191,20 +191,10 @@ namespace XCharts
|
||||
get { return m_RuntimeMinValue; }
|
||||
internal set
|
||||
{
|
||||
if (value != m_RuntimeMinValue)
|
||||
{
|
||||
if (m_RuntimeMinValueFirstChanged)
|
||||
{
|
||||
m_RuntimeMinValueFirstChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RuntimeLastMinValue = m_RuntimeMinValue;
|
||||
m_RuntimeMinValueChanged = true;
|
||||
m_RuntimeMinValueUpdateTime = Time.time;
|
||||
}
|
||||
m_RuntimeMinValue = value;
|
||||
}
|
||||
m_RuntimeMinValue = value;
|
||||
m_RuntimeLastMinValue = value;
|
||||
m_RuntimeMinValueUpdateTime = Time.time;
|
||||
m_RuntimeMinValueChanged = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -216,20 +206,10 @@ namespace XCharts
|
||||
get { return m_RuntimeMaxValue; }
|
||||
internal set
|
||||
{
|
||||
if (value != m_RuntimeMaxValue)
|
||||
{
|
||||
if (m_RuntimeMaxValueFirstChanged)
|
||||
{
|
||||
m_RuntimeMaxValueFirstChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RuntimeLastMaxValue = m_RuntimeMaxValue;
|
||||
m_RuntimeMaxValueChanged = true;
|
||||
m_RuntimeMaxValueUpdateTime = Time.time;
|
||||
}
|
||||
m_RuntimeMaxValue = value;
|
||||
}
|
||||
m_RuntimeMaxValue = value;
|
||||
m_RuntimeLastMaxValue = value;
|
||||
m_RuntimeMaxValueUpdateTime = Time.time;
|
||||
m_RuntimeMaxValueChanged = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -708,6 +688,62 @@ namespace XCharts
|
||||
m_ValueRange = maxValue - minValue;
|
||||
}
|
||||
|
||||
internal void UpdateMinValue(float value, bool check)
|
||||
{
|
||||
if (value != m_RuntimeMaxValue)
|
||||
{
|
||||
if (check)
|
||||
{
|
||||
if (m_RuntimeMinValueFirstChanged)
|
||||
{
|
||||
m_RuntimeMinValueFirstChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RuntimeLastMinValue = m_RuntimeMinValue;
|
||||
m_RuntimeMinValueChanged = true;
|
||||
m_RuntimeMinValueUpdateTime = Time.time;
|
||||
}
|
||||
m_RuntimeMinValue = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RuntimeMinValue = value;
|
||||
m_RuntimeLastMinValue = value;
|
||||
m_RuntimeMinValueUpdateTime = Time.time;
|
||||
m_RuntimeMinValueChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void UpdateMaxValue(float value, bool check)
|
||||
{
|
||||
if (value != m_RuntimeMaxValue)
|
||||
{
|
||||
if (check)
|
||||
{
|
||||
if (m_RuntimeMaxValueFirstChanged)
|
||||
{
|
||||
m_RuntimeMaxValueFirstChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RuntimeLastMaxValue = m_RuntimeMaxValue;
|
||||
m_RuntimeMaxValueChanged = true;
|
||||
m_RuntimeMaxValueUpdateTime = Time.time;
|
||||
}
|
||||
m_RuntimeMaxValue = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RuntimeMaxValue = value;
|
||||
m_RuntimeLastMaxValue = value;
|
||||
m_RuntimeMaxValueUpdateTime = Time.time;
|
||||
m_RuntimeMaxValueChanged = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal float GetCurrMinValue(float duration)
|
||||
{
|
||||
if (m_RuntimeMinValue == 0 && m_RuntimeMaxValue == 0) return 0;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public void ClearData()
|
||||
{
|
||||
AnimationStop();
|
||||
AnimationPause();
|
||||
foreach (var serie in m_Series)
|
||||
{
|
||||
serie.ClearData();
|
||||
@@ -196,7 +196,7 @@ namespace XCharts
|
||||
{
|
||||
foreach (var serie in m_Series)
|
||||
{
|
||||
if (serie.animation.enable && serie.animation.updateAnimation)
|
||||
if (serie.animation.enable && serie.animation.dataChangeEnable)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public void RemoveAll()
|
||||
{
|
||||
AnimationStop();
|
||||
AnimationPause();
|
||||
m_Series.Clear();
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ namespace XCharts
|
||||
{
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
}
|
||||
serie.animation.Reset();
|
||||
serie.animation.Restart();
|
||||
m_Series.Add(serie);
|
||||
return serie;
|
||||
}
|
||||
@@ -1006,32 +1006,54 @@ namespace XCharts
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开始初始动画
|
||||
/// 渐入动画
|
||||
/// </summary>
|
||||
public void AnimationStart()
|
||||
public void AnimationFadeIn()
|
||||
{
|
||||
foreach (var serie in m_Series)
|
||||
{
|
||||
if (serie.animation.enable)
|
||||
{
|
||||
serie.animation.Start();
|
||||
serie.animation.FadeIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 停止初始动画
|
||||
/// 渐出动画
|
||||
/// </summary>
|
||||
public void AnimationStop()
|
||||
public void AnimationFadeOut()
|
||||
{
|
||||
foreach (var serie in m_Series)
|
||||
{
|
||||
if (serie.animation.enable) serie.animation.Stop();
|
||||
if (serie.animation.enable) serie.animation.FadeOut();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置初始动画
|
||||
/// 暂停动画
|
||||
/// </summary>
|
||||
public void AnimationPause()
|
||||
{
|
||||
foreach (var serie in m_Series)
|
||||
{
|
||||
if (serie.animation.enable) serie.animation.Pause();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 继续动画
|
||||
/// </summary>
|
||||
public void AnimationResume()
|
||||
{
|
||||
foreach (var serie in m_Series)
|
||||
{
|
||||
if (serie.animation.enable) serie.animation.Resume();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置动画
|
||||
/// </summary>
|
||||
public void AnimationReset()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/******************************************/
|
||||
using System.Threading;
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
@@ -23,11 +24,12 @@ namespace XCharts
|
||||
}
|
||||
[SerializeField] private bool m_Enable = true;
|
||||
[SerializeField] private Easing m_Easting;
|
||||
[SerializeField] private float m_Duration = 1000;
|
||||
[SerializeField] private int m_Threshold = 2000;
|
||||
[SerializeField] private float m_Delay = 0;
|
||||
[SerializeField] private bool m_UpdateAnimation = true;
|
||||
[SerializeField] private float m_UpdateDuration = 500;
|
||||
[SerializeField] private float m_FadeInDuration = 1000;
|
||||
[SerializeField] private float m_FadeInDelay = 0;
|
||||
[SerializeField] private float m_FadeOutDuration = 1000f;
|
||||
[SerializeField] private bool m_DataChangeEnable = true;
|
||||
[SerializeField] private float m_DataChangeDuration = 500;
|
||||
[SerializeField] private float m_ActualDuration;
|
||||
|
||||
/// <summary>
|
||||
@@ -39,12 +41,17 @@ namespace XCharts
|
||||
/// Easing method used for the first animation.
|
||||
/// 动画的缓动效果。
|
||||
/// </summary>
|
||||
public Easing easing { get { return m_Easting; } set { m_Easting = value; } }
|
||||
//public Easing easing { get { return m_Easting; } set { m_Easting = value; } }
|
||||
/// <summary>
|
||||
/// The milliseconds duration of the first animation.
|
||||
/// 设定的动画时长(毫秒)。
|
||||
/// The milliseconds duration of the fadeIn animation.
|
||||
/// 设定的渐入动画时长(毫秒)。
|
||||
/// </summary>
|
||||
public float duration { get { return m_Duration; } set { m_Duration = value < 0 ? 0 : value; } }
|
||||
public float fadeInDuration { get { return m_FadeInDuration; } set { m_FadeInDuration = value < 0 ? 0 : value; } }
|
||||
/// <summary>
|
||||
/// The milliseconds duration of the fadeOut animation.
|
||||
/// 设定的渐出动画时长(毫秒)。
|
||||
/// </summary>
|
||||
public float fadeOutDuration { get { return m_FadeOutDuration; } set { m_FadeOutDuration = value < 0 ? 0 : value; } }
|
||||
/// <summary>
|
||||
/// The milliseconds actual duration of the first animation.
|
||||
/// 实际的动画时长(毫秒)。
|
||||
@@ -59,21 +66,24 @@ namespace XCharts
|
||||
/// The milliseconds delay before updating the first animation.
|
||||
/// 动画延时(毫秒)。
|
||||
/// </summary>
|
||||
public float delay { get { return m_Delay; } set { m_Delay = value < 0 ? 0 : value; } }
|
||||
public float delay { get { return m_FadeInDelay; } set { m_FadeInDelay = value < 0 ? 0 : value; } }
|
||||
/// <summary>
|
||||
/// 是否开启数据变更动画。
|
||||
/// </summary>
|
||||
public bool updateAnimation { get { return m_UpdateAnimation; } set { m_UpdateAnimation = value; } }
|
||||
public bool dataChangeEnable { get { return m_DataChangeEnable; } set { m_DataChangeEnable = value; } }
|
||||
/// <summary>
|
||||
/// The milliseconds duration of the first animation.
|
||||
/// The milliseconds duration of the data change animation.
|
||||
/// 数据变更的动画时长(毫秒)。
|
||||
/// </summary>
|
||||
public float updateDuration { get { return m_UpdateDuration; } set { m_UpdateDuration = value < 0 ? 0 : value; } }
|
||||
public float dataChangeDuration { get { return m_DataChangeDuration; } set { m_DataChangeDuration = value < 0 ? 0 : value; } }
|
||||
|
||||
private Dictionary<int, float> m_DataAnimationState = new Dictionary<int, float>();
|
||||
private bool m_IsStart = false;
|
||||
private bool m_FadeIn = false;
|
||||
private bool m_IsEnd = true;
|
||||
private bool m_Inited = false;
|
||||
private bool m_IsPause = false;
|
||||
private bool m_FadeOut = false;
|
||||
private bool m_FadeOuted = false;
|
||||
private bool m_IsInit = false;
|
||||
|
||||
private float startTime { get; set; }
|
||||
private int m_CurrDataProgress { get; set; }
|
||||
@@ -82,13 +92,21 @@ namespace XCharts
|
||||
[SerializeField] private float m_DestDetailProgress;
|
||||
private float m_CurrSymbolProgress;
|
||||
|
||||
public void Start()
|
||||
public void FadeIn()
|
||||
{
|
||||
if (m_IsStart) return;
|
||||
if (m_FadeOut) return;
|
||||
if (m_IsPause)
|
||||
{
|
||||
m_IsPause = false;
|
||||
return;
|
||||
}
|
||||
if (m_FadeIn) return;
|
||||
startTime = Time.time;
|
||||
m_IsStart = true;
|
||||
m_FadeIn = true;
|
||||
m_IsEnd = false;
|
||||
m_Inited = false;
|
||||
m_IsInit = false;
|
||||
m_IsPause = false;
|
||||
m_FadeOuted = false;
|
||||
m_CurrDataProgress = 1;
|
||||
m_DestDataProgress = 1;
|
||||
m_CurrDetailProgress = 0;
|
||||
@@ -97,34 +115,89 @@ namespace XCharts
|
||||
m_DataAnimationState.Clear();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
public void Restart()
|
||||
{
|
||||
m_IsStart = false;
|
||||
m_IsEnd = true;
|
||||
m_Inited = false;
|
||||
Reset();
|
||||
FadeIn();
|
||||
}
|
||||
|
||||
public void FadeOut()
|
||||
{
|
||||
if (m_IsPause)
|
||||
{
|
||||
m_IsPause = false;
|
||||
return;
|
||||
}
|
||||
m_FadeOut = true;
|
||||
startTime = Time.time;
|
||||
m_FadeIn = true;
|
||||
m_IsEnd = false;
|
||||
m_IsInit = false;
|
||||
m_IsPause = false;
|
||||
m_CurrDataProgress = 0;
|
||||
m_DestDataProgress = 0;
|
||||
m_CurrDetailProgress = 0;
|
||||
m_DestDetailProgress = 1;
|
||||
m_CurrSymbolProgress = 0;
|
||||
m_DataAnimationState.Clear();
|
||||
}
|
||||
|
||||
public void End()
|
||||
public void Pause()
|
||||
{
|
||||
if (!m_IsPause)
|
||||
{
|
||||
m_IsPause = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (m_IsPause)
|
||||
{
|
||||
m_IsPause = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void End()
|
||||
{
|
||||
if (m_IsEnd) return;
|
||||
m_ActualDuration = (int)((Time.time - startTime) * 1000) - delay;
|
||||
m_CurrDataProgress = m_DestDataProgress + 1;
|
||||
m_CurrDataProgress = m_DestDataProgress + (m_FadeOut ? -1 : 1);
|
||||
m_FadeIn = false;
|
||||
m_IsEnd = true;
|
||||
m_IsInit = false;
|
||||
if (m_FadeOut)
|
||||
{
|
||||
m_FadeOut = false;
|
||||
m_FadeOuted = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
m_FadeIn = false;
|
||||
m_IsEnd = true;
|
||||
m_IsInit = false;
|
||||
m_IsPause = false;
|
||||
m_FadeOut = false;
|
||||
m_FadeOuted = false;
|
||||
m_DataAnimationState.Clear();
|
||||
}
|
||||
|
||||
public void InitProgress(int data, float curr, float dest)
|
||||
{
|
||||
if (!m_Inited && !m_IsEnd)
|
||||
if (m_IsInit || m_IsEnd) return;
|
||||
if (curr > dest) return;
|
||||
m_IsInit = true;
|
||||
m_DestDataProgress = data;
|
||||
|
||||
if (m_FadeOut)
|
||||
{
|
||||
m_CurrDetailProgress = dest;
|
||||
m_DestDetailProgress = curr;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Inited = true;
|
||||
m_DestDataProgress = data;
|
||||
m_CurrDetailProgress = curr;
|
||||
m_DestDetailProgress = dest;
|
||||
}
|
||||
@@ -132,23 +205,21 @@ namespace XCharts
|
||||
|
||||
public void SetDataFinish(int dataIndex)
|
||||
{
|
||||
if (!m_IsEnd)
|
||||
{
|
||||
m_CurrDataProgress = dataIndex + 1;
|
||||
}
|
||||
if (m_IsEnd) return;
|
||||
m_CurrDataProgress = dataIndex + (m_FadeOut ? -1 : 1);
|
||||
}
|
||||
|
||||
public void SetDataState(int index, float state)
|
||||
private void SetDataState(int index, float state)
|
||||
{
|
||||
m_DataAnimationState[index] = state;
|
||||
}
|
||||
|
||||
public float GetDataState(int index)
|
||||
private float GetDataState(int index, float dest)
|
||||
{
|
||||
if (IsInDelay()) return 0;
|
||||
if (IsInDelay()) return dest;
|
||||
if (!m_DataAnimationState.ContainsKey(index))
|
||||
{
|
||||
m_DataAnimationState.Add(index, 0);
|
||||
m_DataAnimationState.Add(index, dest);
|
||||
}
|
||||
return m_DataAnimationState[index];
|
||||
}
|
||||
@@ -182,29 +253,95 @@ namespace XCharts
|
||||
{
|
||||
if (!m_Enable || m_IsEnd) return true;
|
||||
if (IsInDelay()) return false;
|
||||
return dataIndex <= m_CurrDataProgress;
|
||||
if (m_FadeOut) return dataIndex > 0;
|
||||
else return dataIndex <= m_CurrDataProgress;
|
||||
}
|
||||
|
||||
internal void CheckProgress(float delta)
|
||||
internal void CheckProgress(float total)
|
||||
{
|
||||
if (!enable) return;
|
||||
if (IsFinish()) return;
|
||||
if (!m_IsInit || m_IsPause || m_IsEnd) return;
|
||||
if (IsInDelay()) return;
|
||||
if (m_IsEnd) return;
|
||||
if (m_CurrDetailProgress > m_DestDetailProgress)
|
||||
m_ActualDuration = (int)((Time.time - startTime) * 1000) - delay;
|
||||
var duration = GetCurrAnimationDuration();
|
||||
var delta = total / duration * Time.deltaTime;
|
||||
if (m_FadeOut)
|
||||
{
|
||||
End();
|
||||
m_CurrDetailProgress -= delta;
|
||||
if (m_CurrDetailProgress <= m_DestDetailProgress)
|
||||
{
|
||||
m_CurrDetailProgress = m_DestDetailProgress;
|
||||
End();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ActualDuration = (int)((Time.time - startTime) * 1000) - delay;
|
||||
m_CurrDetailProgress += delta;
|
||||
if (m_CurrDetailProgress >= m_DestDetailProgress)
|
||||
{
|
||||
m_CurrDetailProgress = m_DestDetailProgress;
|
||||
End();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void CheckSymbol(float delta, float dest)
|
||||
internal float GetCurrAnimationDuration()
|
||||
{
|
||||
m_CurrSymbolProgress += delta;
|
||||
if (m_CurrSymbolProgress > dest) m_CurrSymbolProgress = dest;
|
||||
if (m_FadeOut) return m_FadeOutDuration > 0 ? m_FadeOutDuration / 1000 : 1;
|
||||
else return m_FadeInDuration > 0 ? m_FadeInDuration / 1000 : 1;
|
||||
}
|
||||
|
||||
internal float CheckBarProgress(int dataIndex, float barHig)
|
||||
{
|
||||
//if (!m_IsInit) return barHig;
|
||||
var destHig = m_FadeOut ? barHig : 0;
|
||||
if (IsInDelay() || IsFinish() || m_IsEnd)
|
||||
{
|
||||
return m_FadeOuted ? 0 : barHig;
|
||||
}
|
||||
else if (m_IsPause)
|
||||
{
|
||||
return GetDataState(dataIndex, destHig);
|
||||
}
|
||||
else
|
||||
{
|
||||
var duration = GetCurrAnimationDuration();
|
||||
var delta = barHig / duration * Time.deltaTime;
|
||||
var currHig = GetDataState(dataIndex, destHig) + (m_FadeOut ? -delta : delta);
|
||||
SetDataState(dataIndex, currHig);
|
||||
if (m_FadeOut)
|
||||
{
|
||||
if (currHig <= 0)
|
||||
{
|
||||
End();
|
||||
currHig = 0;
|
||||
}
|
||||
}
|
||||
else if (Mathf.Abs(currHig) >= Mathf.Abs(barHig))
|
||||
{
|
||||
End();
|
||||
currHig = barHig;
|
||||
}
|
||||
return currHig;
|
||||
}
|
||||
}
|
||||
|
||||
internal void CheckSymbol(float dest)
|
||||
{
|
||||
if (!enable || m_IsEnd || m_IsPause || !m_IsInit) return;
|
||||
if (IsInDelay()) return;
|
||||
var duration = GetCurrAnimationDuration();
|
||||
var delta = dest / duration * Time.deltaTime;
|
||||
if (m_FadeOut)
|
||||
{
|
||||
m_CurrSymbolProgress -= delta;
|
||||
if (m_CurrSymbolProgress < 0) m_CurrSymbolProgress = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_CurrSymbolProgress += delta;
|
||||
if (m_CurrSymbolProgress > dest) m_CurrSymbolProgress = dest;
|
||||
}
|
||||
}
|
||||
|
||||
public float GetSysmbolSize(float dest)
|
||||
@@ -212,7 +349,8 @@ namespace XCharts
|
||||
#if UNITY_EDITOR
|
||||
if (!Application.isPlaying) return dest;
|
||||
#endif
|
||||
if (!enable || m_IsEnd) return dest;
|
||||
if (!enable) return dest;
|
||||
if (m_IsEnd) return m_FadeOut ? 0 : dest;
|
||||
return m_CurrSymbolProgress;
|
||||
}
|
||||
|
||||
@@ -246,8 +384,13 @@ namespace XCharts
|
||||
|
||||
public float GetUpdateAnimationDuration()
|
||||
{
|
||||
if (m_Enable && m_UpdateAnimation && IsFinish()) return m_UpdateDuration;
|
||||
if (m_Enable && m_DataChangeEnable && IsFinish()) return m_DataChangeDuration;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
public bool HasFadeOut()
|
||||
{
|
||||
return enable && m_FadeOuted && m_IsEnd;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace XCharts
|
||||
serie.center[1] = 0.5f;
|
||||
serie.radius[0] = 80;
|
||||
serie.splitNumber = 5;
|
||||
serie.animation.updateAnimation = true;
|
||||
serie.animation.dataChangeEnable = true;
|
||||
serie.titleStyle.show = true;
|
||||
serie.titleStyle.textStyle.offset = new Vector2(0, 20);
|
||||
serie.label.show = true;
|
||||
@@ -85,7 +85,7 @@ namespace XCharts
|
||||
for (int i = 0; i < m_Series.Count; i++)
|
||||
{
|
||||
var serie = m_Series.list[i];
|
||||
|
||||
|
||||
var serieLabel = serie.gaugeAxis.axisLabel;
|
||||
serie.gaugeAxis.ClearLabelObject();
|
||||
var count = serie.splitNumber > 36 ? 36 : (serie.splitNumber + 1);
|
||||
@@ -103,7 +103,7 @@ namespace XCharts
|
||||
item.SetIconActive(false);
|
||||
serie.gaugeAxis.AddLabelObject(item);
|
||||
}
|
||||
UpdateAxisLabel(serie);
|
||||
UpdateAxisLabel(serie);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,11 +130,12 @@ namespace XCharts
|
||||
|
||||
private void DrawGauge(VertexHelper vh, Serie serie)
|
||||
{
|
||||
|
||||
serie.UpdateCenter(chartWidth, chartHeight);
|
||||
var destAngle = GetCurrAngle(serie, true);
|
||||
serie.animation.InitProgress(0, serie.startAngle, destAngle);
|
||||
//var currAngle = serie.animation.GetCurrDetail();
|
||||
var currAngle = serie.animation.IsFinish() ? GetCurrAngle(serie, false) : serie.animation.GetCurrDetail();
|
||||
|
||||
DrawProgressBar(vh, serie, currAngle);
|
||||
DrawStageColor(vh, serie);
|
||||
DrawLineStyle(vh, serie);
|
||||
@@ -147,9 +148,7 @@ namespace XCharts
|
||||
CheckAnimation(serie);
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = (destAngle - serie.startAngle) / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
serie.animation.CheckProgress(destAngle - serie.startAngle);
|
||||
RefreshChart();
|
||||
}
|
||||
else if (NeedRefresh(serie))
|
||||
@@ -405,6 +404,10 @@ namespace XCharts
|
||||
|
||||
private float GetCurrAngle(Serie serie, bool dest)
|
||||
{
|
||||
if (serie.animation.HasFadeOut())
|
||||
{
|
||||
return serie.animation.GetCurrDetail();
|
||||
}
|
||||
float rangeValue = serie.max - serie.min;
|
||||
float rangeAngle = serie.endAngle - serie.startAngle;
|
||||
float value = 0;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace XCharts
|
||||
[NonSerialized] protected bool m_ReinitLabel = false;
|
||||
[NonSerialized] protected bool m_ReinitTitle = false;
|
||||
[NonSerialized] protected bool m_CheckAnimation = false;
|
||||
[NonSerialized] protected bool m_IsPlayingStartAnimation = false;
|
||||
[NonSerialized] protected bool m_IsPlayingAnimation = false;
|
||||
[NonSerialized] protected List<string> m_LegendRealShowName = new List<string>();
|
||||
|
||||
protected Vector2 chartAnchorMax { get { return rectTransform.anchorMax; } }
|
||||
@@ -92,8 +92,8 @@ namespace XCharts
|
||||
InitSerieLabel();
|
||||
InitSerieTitle();
|
||||
InitTooltip();
|
||||
m_Series.AnimationStop();
|
||||
m_Series.AnimationStart();
|
||||
m_Series.AnimationReset();
|
||||
m_Series.AnimationFadeIn();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
@@ -569,7 +569,7 @@ namespace XCharts
|
||||
if (!m_CheckAnimation)
|
||||
{
|
||||
m_CheckAnimation = true;
|
||||
m_Series.AnimationStart();
|
||||
m_Series.AnimationFadeIn();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace XCharts
|
||||
{
|
||||
base.DrawChart(vh);
|
||||
if (!m_CheckMinMaxValue) return;
|
||||
m_IsPlayingStartAnimation = false;
|
||||
m_IsPlayingAnimation = false;
|
||||
bool yCategory = m_YAxises[0].IsCategory() || m_YAxises[1].IsCategory();
|
||||
m_Series.GetStackSeries(ref m_StackSeries);
|
||||
int seriesCount = m_StackSeries.Count;
|
||||
@@ -846,8 +846,8 @@ namespace XCharts
|
||||
if (tempMinValue != axis.runtimeMinValue || tempMaxValue != axis.runtimeMaxValue)
|
||||
{
|
||||
m_CheckMinMaxValue = true;
|
||||
axis.runtimeMinValue = tempMinValue;
|
||||
axis.runtimeMaxValue = tempMaxValue;
|
||||
axis.UpdateMinValue(tempMinValue, !m_IsPlayingAnimation);
|
||||
axis.UpdateMaxValue(tempMaxValue, !m_IsPlayingAnimation);
|
||||
axis.runtimeZeroXOffset = 0;
|
||||
axis.runtimeZeroYOffset = 0;
|
||||
if (tempMinValue != 0 || tempMaxValue != 0)
|
||||
@@ -873,7 +873,7 @@ namespace XCharts
|
||||
RefreshChart();
|
||||
}
|
||||
}
|
||||
if (axis.IsValueChanging(500) && !m_IsPlayingStartAnimation)
|
||||
if (axis.IsValueChanging(500) && !m_IsPlayingAnimation)
|
||||
{
|
||||
float coordinateWidth = axis is XAxis ? this.coordinateWidth : coordinateHeight;
|
||||
var isPercentStack = m_Series.IsPercentStack(SerieType.Bar);
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace XCharts
|
||||
protected void DrawYBarSerie(VertexHelper vh, Serie serie, int colorIndex, ref List<float> seriesHig)
|
||||
{
|
||||
if (!IsActive(serie.name)) return;
|
||||
if (serie.animation.HasFadeOut()) return;
|
||||
var xAxis = m_XAxises[serie.axisIndex];
|
||||
var yAxis = m_YAxises[serie.axisIndex];
|
||||
if (!yAxis.show) yAxis = m_YAxises[(serie.axisIndex + 1) % m_YAxises.Count];
|
||||
@@ -44,9 +45,9 @@ namespace XCharts
|
||||
}
|
||||
var isPercentStack = m_Series.IsPercentStack(serie.stack, SerieType.Bar);
|
||||
bool dataChanging = false;
|
||||
float updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float xMinValue = xAxis.GetCurrMinValue(updateDuration);
|
||||
float xMaxValue = xAxis.GetCurrMaxValue(updateDuration);
|
||||
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float xMinValue = xAxis.GetCurrMinValue(dataChangeDuration);
|
||||
float xMaxValue = xAxis.GetCurrMaxValue(dataChangeDuration);
|
||||
for (int i = serie.minShow; i < maxCount; i++)
|
||||
{
|
||||
if (i >= seriesHig.Count)
|
||||
@@ -55,7 +56,7 @@ namespace XCharts
|
||||
}
|
||||
var serieData = showData[i];
|
||||
serieData.canShowLabel = true;
|
||||
float value = showData[i].GetCurrData(1, updateDuration);
|
||||
float value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
if (showData[i].IsDataChanged()) dataChanging = true;
|
||||
float pX = seriesHig[i] + coordinateX + xAxis.runtimeZeroXOffset + yAxis.axisLine.width;
|
||||
float pY = coordinateY + +i * categoryWidth;
|
||||
@@ -117,23 +118,11 @@ namespace XCharts
|
||||
|
||||
private float CheckAnimation(Serie serie, int dataIndex, float barHig)
|
||||
{
|
||||
float currHig = barHig;
|
||||
float currHig = serie.animation.CheckBarProgress(dataIndex,barHig);
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
if (serie.animation.IsInDelay()) currHig = 0;
|
||||
else
|
||||
{
|
||||
var speed = serie.animation.duration > 0 ? barHig / serie.animation.duration * 1000 : barHig;
|
||||
currHig = serie.animation.GetDataState(dataIndex) + speed * Time.deltaTime;
|
||||
serie.animation.SetDataState(dataIndex, currHig);
|
||||
if (Mathf.Abs(currHig) >= Mathf.Abs(barHig))
|
||||
{
|
||||
serie.animation.End();
|
||||
currHig = barHig;
|
||||
}
|
||||
}
|
||||
RefreshChart();
|
||||
m_IsPlayingStartAnimation = true;
|
||||
m_IsPlayingAnimation = true;
|
||||
}
|
||||
return currHig;
|
||||
}
|
||||
@@ -141,6 +130,7 @@ namespace XCharts
|
||||
protected void DrawXBarSerie(VertexHelper vh, Serie serie, int colorIndex, ref List<float> seriesHig)
|
||||
{
|
||||
if (!IsActive(serie.name)) return;
|
||||
if (serie.animation.HasFadeOut()) return;
|
||||
var showData = serie.GetDataList(m_DataZoom);
|
||||
var yAxis = m_YAxises[serie.axisIndex];
|
||||
var xAxis = m_XAxises[serie.axisIndex];
|
||||
@@ -167,16 +157,16 @@ namespace XCharts
|
||||
|
||||
var isPercentStack = m_Series.IsPercentStack(serie.stack, SerieType.Bar);
|
||||
bool dataChanging = false;
|
||||
float updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float yMinValue = yAxis.GetCurrMinValue(updateDuration);
|
||||
float yMaxValue = yAxis.GetCurrMaxValue(updateDuration);
|
||||
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float yMinValue = yAxis.GetCurrMinValue(dataChangeDuration);
|
||||
float yMaxValue = yAxis.GetCurrMaxValue(dataChangeDuration);
|
||||
for (int i = serie.minShow; i < maxCount; i++)
|
||||
{
|
||||
if (i >= seriesHig.Count)
|
||||
{
|
||||
seriesHig.Add(0);
|
||||
}
|
||||
float value = showData[i].GetCurrData(1, updateDuration);
|
||||
float value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
if (showData[i].IsDataChanged()) dataChanging = true;
|
||||
float pX = coordinateX + i * categoryWidth;
|
||||
float zeroY = coordinateY + yAxis.runtimeZeroYOffset;
|
||||
|
||||
@@ -116,6 +116,7 @@ namespace XCharts
|
||||
|
||||
protected void DrawHeatmapSerie(VertexHelper vh, int colorIndex, Serie serie)
|
||||
{
|
||||
if (serie.animation.HasFadeOut()) return;
|
||||
var yAxis = m_YAxises[serie.axisIndex];
|
||||
var xAxis = m_XAxises[serie.axisIndex];
|
||||
var xCount = xAxis.data.Count;
|
||||
@@ -135,7 +136,7 @@ namespace XCharts
|
||||
serie.dataPoints.Clear();
|
||||
serie.animation.InitProgress(1, 0, xCount);
|
||||
var animationIndex = serie.animation.GetCurrIndex();
|
||||
var updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
var dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
var dataChanging = false;
|
||||
for (int i = 0; i < xCount; i++)
|
||||
{
|
||||
@@ -146,7 +147,7 @@ namespace XCharts
|
||||
var serieData = dataList[dataIndex];
|
||||
var dimension = m_VisualMap.enable && m_VisualMap.dimension > 0 ? m_VisualMap.dimension - 1 :
|
||||
serieData.data.Count - 1;
|
||||
var value = serieData.GetCurrData(dimension, updateDuration);
|
||||
var value = serieData.GetCurrData(dimension, dataChangeDuration);
|
||||
if (serieData.IsDataChanged()) dataChanging = true;
|
||||
var pos = new Vector3(zeroX + (i + 0.5f) * xWidth, zeroY + (j + 0.5f) * yWidth);
|
||||
serie.dataPoints.Add(pos);
|
||||
@@ -183,10 +184,8 @@ namespace XCharts
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = xCount / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
m_IsPlayingStartAnimation = true;
|
||||
serie.animation.CheckProgress(xCount);
|
||||
m_IsPlayingAnimation = true;
|
||||
RefreshChart();
|
||||
}
|
||||
if (dataChanging)
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace XCharts
|
||||
protected void DrawXLineSerie(VertexHelper vh, Serie serie, int colorIndex, ref List<float> seriesHig)
|
||||
{
|
||||
if (!IsActive(serie.index)) return;
|
||||
if (serie.animation.HasFadeOut()) return;
|
||||
var showData = serie.GetDataList(m_DataZoom);
|
||||
if (showData.Count <= 0) return;
|
||||
Color lineColor = serie.GetLineColor(m_ThemeInfo, colorIndex, false);
|
||||
@@ -114,7 +115,7 @@ namespace XCharts
|
||||
var totalAverage = serie.sampleAverage > 0 ? serie.sampleAverage :
|
||||
DataAverage(ref showData, serie.sampleType, serie.minShow, maxCount, rate);
|
||||
var dataChanging = false;
|
||||
var updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
var dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
for (i = serie.minShow; i < maxCount; i += rate)
|
||||
{
|
||||
if (i == maxCount - 1) includeLastData = true;
|
||||
@@ -123,9 +124,9 @@ namespace XCharts
|
||||
for (int j = 0; j < rate; j++) seriesHig.Add(0);
|
||||
}
|
||||
float yValue = SampleValue(ref showData, serie.sampleType, rate, serie.minShow, maxCount, totalAverage,
|
||||
i, updateDuration, ref dataChanging);
|
||||
i, dataChangeDuration, ref dataChanging);
|
||||
seriesHig[i] += GetDataPoint(xAxis, yAxis, showData, yValue, startX, i, scaleWid, seriesHig[i], ref np,
|
||||
updateDuration);
|
||||
dataChangeDuration);
|
||||
serie.dataPoints.Add(np);
|
||||
}
|
||||
if (dataChanging)
|
||||
@@ -136,9 +137,9 @@ namespace XCharts
|
||||
{
|
||||
i = maxCount - 1;
|
||||
seriesHig.Add(0);
|
||||
float yValue = showData[i].GetCurrData(1, updateDuration);
|
||||
float yValue = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
seriesHig[i] += GetDataPoint(xAxis, yAxis, showData, yValue, startX, i, scaleWid, seriesHig[i], ref np,
|
||||
updateDuration);
|
||||
dataChangeDuration);
|
||||
serie.dataPoints.Add(np);
|
||||
}
|
||||
if (serie.dataPoints.Count <= 0)
|
||||
@@ -155,8 +156,8 @@ namespace XCharts
|
||||
if (serie.minShow > 0 && serie.minShow < showData.Count)
|
||||
{
|
||||
i = serie.minShow - 1;
|
||||
float yValue = showData[i].GetCurrData(1, updateDuration);
|
||||
GetDataPoint(xAxis, yAxis, showData, yValue, startX, i, scaleWid, 0, ref firstLastPos, updateDuration);
|
||||
float yValue = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
GetDataPoint(xAxis, yAxis, showData, yValue, startX, i, scaleWid, 0, ref firstLastPos, dataChangeDuration);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -165,8 +166,8 @@ namespace XCharts
|
||||
if (serie.maxShow > 0 && serie.maxShow < showData.Count)
|
||||
{
|
||||
i = serie.maxShow;
|
||||
float yValue = showData[i].GetCurrData(1, updateDuration);
|
||||
GetDataPoint(xAxis, yAxis, showData, yValue, startX, i, scaleWid, 0, ref lastNextPos, updateDuration);
|
||||
float yValue = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
GetDataPoint(xAxis, yAxis, showData, yValue, startX, i, scaleWid, 0, ref lastNextPos, dataChangeDuration);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -221,12 +222,9 @@ namespace XCharts
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = totalDetailProgress / duration;
|
||||
float symbolSpeed = serie.symbol.size / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
serie.animation.CheckSymbol(Time.deltaTime * symbolSpeed, serie.symbol.size);
|
||||
m_IsPlayingStartAnimation = true;
|
||||
serie.animation.CheckProgress(totalDetailProgress);
|
||||
serie.animation.CheckSymbol(serie.symbol.size);
|
||||
m_IsPlayingAnimation = true;
|
||||
RefreshChart();
|
||||
}
|
||||
}
|
||||
@@ -247,12 +245,12 @@ namespace XCharts
|
||||
}
|
||||
|
||||
private float SampleValue(ref List<SerieData> showData, SampleType sampleType, int rate,
|
||||
int minCount, int maxCount, float totalAverage, int index, float updateDuration, ref bool dataChanging)
|
||||
int minCount, int maxCount, float totalAverage, int index, float dataChangeDuration, ref bool dataChanging)
|
||||
{
|
||||
if (rate <= 1 || index == minCount)
|
||||
{
|
||||
if (showData[index].IsDataChanged()) dataChanging = true;
|
||||
return showData[index].GetCurrData(1, updateDuration);
|
||||
return showData[index].GetCurrData(1, dataChangeDuration);
|
||||
}
|
||||
switch (sampleType)
|
||||
{
|
||||
@@ -261,7 +259,7 @@ namespace XCharts
|
||||
float total = 0;
|
||||
for (int i = index; i > index - rate; i--)
|
||||
{
|
||||
total += showData[i].GetCurrData(1, updateDuration);
|
||||
total += showData[i].GetCurrData(1, dataChangeDuration);
|
||||
if (showData[i].IsDataChanged()) dataChanging = true;
|
||||
}
|
||||
if (sampleType == SampleType.Average) return total / rate;
|
||||
@@ -270,7 +268,7 @@ namespace XCharts
|
||||
float max = float.MinValue;
|
||||
for (int i = index; i > index - rate; i--)
|
||||
{
|
||||
var value = showData[i].GetCurrData(1, updateDuration);
|
||||
var value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
if (value > max) max = value;
|
||||
if (showData[i].IsDataChanged()) dataChanging = true;
|
||||
}
|
||||
@@ -279,7 +277,7 @@ namespace XCharts
|
||||
float min = float.MaxValue;
|
||||
for (int i = index; i > index - rate; i--)
|
||||
{
|
||||
var value = showData[i].GetCurrData(1, updateDuration);
|
||||
var value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
if (value < min) min = value;
|
||||
if (showData[i].IsDataChanged()) dataChanging = true;
|
||||
}
|
||||
@@ -290,7 +288,7 @@ namespace XCharts
|
||||
total = 0;
|
||||
for (int i = index; i > index - rate; i--)
|
||||
{
|
||||
var value = showData[i].GetCurrData(1, updateDuration);
|
||||
var value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
total += value;
|
||||
if (value < min) min = value;
|
||||
if (value > max) max = value;
|
||||
@@ -301,7 +299,7 @@ namespace XCharts
|
||||
else return min;
|
||||
}
|
||||
if (showData[index].IsDataChanged()) dataChanging = true;
|
||||
return showData[index].GetCurrData(1, updateDuration);
|
||||
return showData[index].GetCurrData(1, dataChangeDuration);
|
||||
}
|
||||
|
||||
private float GetDataPoint(Axis xAxis, Axis yAxis, List<SerieData> showData, float yValue, float startX, int i,
|
||||
@@ -365,6 +363,7 @@ namespace XCharts
|
||||
protected void DrawYLineSerie(VertexHelper vh, Serie serie, int colorIndex, ref List<float> seriesHig)
|
||||
{
|
||||
if (!IsActive(serie.index)) return;
|
||||
if (serie.animation.HasFadeOut()) return;
|
||||
var showData = serie.GetDataList(m_DataZoom);
|
||||
Vector3 lp = Vector3.zero;
|
||||
Vector3 np = Vector3.zero;
|
||||
@@ -399,16 +398,16 @@ namespace XCharts
|
||||
if (sampleDist > 0) rate = (int)((maxCount - serie.minShow) / (coordinateWidth / sampleDist));
|
||||
if (rate < 1) rate = 1;
|
||||
var dataChanging = false;
|
||||
float updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float xMinValue = xAxis.GetCurrMinValue(updateDuration);
|
||||
float xMaxValue = xAxis.GetCurrMaxValue(updateDuration);
|
||||
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float xMinValue = xAxis.GetCurrMinValue(dataChangeDuration);
|
||||
float xMaxValue = xAxis.GetCurrMaxValue(dataChangeDuration);
|
||||
for (i = serie.minShow; i < maxCount; i += rate)
|
||||
{
|
||||
if (i >= seriesHig.Count)
|
||||
{
|
||||
for (int j = 0; j < rate; j++) seriesHig.Add(0);
|
||||
}
|
||||
float value = showData[i].GetCurrData(1, updateDuration);
|
||||
float value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
float pY = startY + i * scaleWid;
|
||||
float pX = seriesHig[i] + coordinateX + yAxis.axisLine.width;
|
||||
float dataHig = 0;
|
||||
@@ -435,7 +434,7 @@ namespace XCharts
|
||||
{
|
||||
i = maxCount - 1;
|
||||
seriesHig.Add(0);
|
||||
float value = showData[i].GetCurrData(1, updateDuration);
|
||||
float value = showData[i].GetCurrData(1, dataChangeDuration);
|
||||
float pY = startY + i * scaleWid;
|
||||
float pX = seriesHig[i] + coordinateX + yAxis.axisLine.width;
|
||||
float dataHig = 0;
|
||||
@@ -517,12 +516,10 @@ namespace XCharts
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = (totalDetailProgress - dataCount * serie.lineStyle.width * 0.5f) / duration;
|
||||
float symbolSpeed = serie.symbol.size / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
serie.animation.CheckSymbol(Time.deltaTime * symbolSpeed, serie.symbol.size);
|
||||
m_IsPlayingStartAnimation = true;
|
||||
float total = totalDetailProgress - dataCount * serie.lineStyle.width * 0.5f;
|
||||
serie.animation.CheckProgress(total);
|
||||
serie.animation.CheckSymbol(serie.symbol.size);
|
||||
m_IsPlayingAnimation = true;
|
||||
RefreshChart();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace XCharts
|
||||
{
|
||||
protected void DrawScatterSerie(VertexHelper vh, int colorIndex, Serie serie)
|
||||
{
|
||||
if (serie.animation.HasFadeOut()) return;
|
||||
var yAxis = m_YAxises[serie.axisIndex];
|
||||
var xAxis = m_XAxises[serie.axisIndex];
|
||||
var color = serie.symbol.color != Color.clear ? serie.symbol.color : (Color)m_ThemeInfo.GetColor(colorIndex);
|
||||
@@ -23,13 +24,13 @@ namespace XCharts
|
||||
: serie.dataCount;
|
||||
serie.animation.InitProgress(1, 0, 1);
|
||||
var rate = serie.animation.GetCurrRate();
|
||||
var updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
var dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
var dataChanging = false;
|
||||
for (int n = serie.minShow; n < maxCount; n++)
|
||||
{
|
||||
var serieData = serie.GetDataList(m_DataZoom)[n];
|
||||
float xValue = serieData.GetCurrData(0, updateDuration);
|
||||
float yValue = serieData.GetCurrData(1, updateDuration);
|
||||
float xValue = serieData.GetCurrData(0, dataChangeDuration);
|
||||
float yValue = serieData.GetCurrData(1, dataChangeDuration);
|
||||
if (serieData.IsDataChanged()) dataChanging = true;
|
||||
float pX = coordinateX + xAxis.axisLine.width;
|
||||
float pY = coordinateY + yAxis.axisLine.width;
|
||||
@@ -66,10 +67,8 @@ namespace XCharts
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = 1 / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
m_IsPlayingStartAnimation = true;
|
||||
serie.animation.CheckProgress(1);
|
||||
m_IsPlayingAnimation = true;
|
||||
RefreshChart();
|
||||
}
|
||||
if (dataChanging)
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace XCharts
|
||||
serie.index = i;
|
||||
var data = serie.data;
|
||||
serie.animation.InitProgress(data.Count, 0, 360);
|
||||
if (!serie.show)
|
||||
if (!serie.show || serie.animation.HasFadeOut())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -77,13 +77,12 @@ namespace XCharts
|
||||
sd.canShowLabel = false;
|
||||
}
|
||||
bool dataChanging = false;
|
||||
float updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
for (int n = 0; n < data.Count; n++)
|
||||
{
|
||||
if (!serie.animation.NeedAnimation(n)) break;
|
||||
var serieData = data[n];
|
||||
serieData.index = n;
|
||||
float value = serieData.GetCurrData(1, updateDuration);
|
||||
float value = serieData.GetCurrData(1, dataChangeDuration);
|
||||
if (serieData.IsDataChanged()) dataChanging = true;
|
||||
serieNameCount = m_LegendRealShowName.IndexOf(serieData.legendName);
|
||||
Color color = m_ThemeInfo.GetColor(serieNameCount);
|
||||
@@ -164,11 +163,8 @@ namespace XCharts
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = 360 / duration;
|
||||
float symbolSpeed = serie.symbol.size / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
serie.animation.CheckSymbol(Time.deltaTime * symbolSpeed, serie.symbol.size);
|
||||
serie.animation.CheckProgress(360);
|
||||
serie.animation.CheckSymbol(serie.symbol.size);
|
||||
RefreshChart();
|
||||
}
|
||||
if (dataChanging)
|
||||
|
||||
@@ -198,13 +198,13 @@ namespace XCharts
|
||||
var angle = 2 * Mathf.PI / indicatorNum;
|
||||
Vector3 p = radar.runtimeCenterPos;
|
||||
serie.animation.InitProgress(1, 0, 1);
|
||||
if (!IsActive(i))
|
||||
if (!IsActive(i) || serie.animation.HasFadeOut())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var rate = serie.animation.GetCurrRate();
|
||||
var dataChanging = false;
|
||||
var updateDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
var dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
|
||||
for (int j = 0; j < serie.data.Count; j++)
|
||||
{
|
||||
var serieData = serie.data[j];
|
||||
@@ -249,7 +249,7 @@ namespace XCharts
|
||||
if (n >= serieData.data.Count) break;
|
||||
float min = radar.GetIndicatorMin(n);
|
||||
float max = radar.GetIndicatorMax(n);
|
||||
float value = serieData.GetCurrData(n, updateDuration);
|
||||
float value = serieData.GetCurrData(n, dataChangeDuration);
|
||||
if (serieData.IsDataChanged()) dataChanging = true;
|
||||
if (max == 0)
|
||||
{
|
||||
@@ -304,9 +304,7 @@ namespace XCharts
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
{
|
||||
float duration = serie.animation.duration > 0 ? (float)serie.animation.duration / 1000 : 1;
|
||||
float speed = 1 / duration;
|
||||
serie.animation.CheckProgress(Time.deltaTime * speed);
|
||||
serie.animation.CheckProgress(1);
|
||||
RefreshChart();
|
||||
}
|
||||
if (dataChanging)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace XCharts
|
||||
public class XChartsMgr : MonoBehaviour
|
||||
{
|
||||
public const string version = "1.2.0";
|
||||
public const int date = 20200213;
|
||||
public const int date = 20200223;
|
||||
|
||||
[SerializeField] private string m_NowVersion;
|
||||
[SerializeField] private string m_NewVersion;
|
||||
|
||||
177
Assets/XChartsDemo/Runtime/Demo_Animation.cs
Normal file
177
Assets/XChartsDemo/Runtime/Demo_Animation.cs
Normal file
@@ -0,0 +1,177 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
using XCharts;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo_Animation : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private int m_FadeInDuration = 1000;
|
||||
[SerializeField] private int m_FadeOutDuration = 1000;
|
||||
[SerializeField] private int m_DataChangeDuration = 500;
|
||||
void Awake()
|
||||
{
|
||||
InitCharts();
|
||||
TryInitButton("buttons/btnFadeIn", AnimationFadeIn);
|
||||
TryInitButton("buttons/btnFadeOut", AnimationFadeOut);
|
||||
TryInitButton("buttons/btnDataAdd", AnimationDataAdd);
|
||||
TryInitButton("buttons/btnDataChange", AnimationDataChange);
|
||||
TryInitButton("buttons/btnPause", AnimationPause);
|
||||
TryInitButton("buttons/btnResume", AnimationResume);
|
||||
TryInitButton("buttons/btnReset", AnimationReset);
|
||||
}
|
||||
|
||||
void InitCharts()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.fadeInDuration = m_FadeInDuration;
|
||||
serie.animation.fadeOutDuration = m_FadeOutDuration;
|
||||
serie.animation.dataChangeDuration = m_DataChangeDuration;
|
||||
}
|
||||
}
|
||||
SetInputField("settings/fadeIn/InputField", m_FadeInDuration, OnFadeInDurationChanged);
|
||||
SetInputField("settings/fadeOut/InputField", m_FadeOutDuration, OnFadeOutDurationChanged);
|
||||
SetInputField("settings/dataChange/InputField", m_DataChangeDuration, OnDataChangeDurationChanged);
|
||||
}
|
||||
|
||||
void SetInputField(string path, int value, UnityAction<string> act)
|
||||
{
|
||||
var input = transform.Find(path).gameObject.GetComponent<InputField>();
|
||||
input.onEndEdit.AddListener(act);
|
||||
input.text = value.ToString();
|
||||
}
|
||||
|
||||
Button TryInitButton(string name, UnityAction act)
|
||||
{
|
||||
var trans = transform.Find(name);
|
||||
if (trans)
|
||||
{
|
||||
var btn = trans.gameObject.GetComponent<Button>();
|
||||
btn.onClick.AddListener(act);
|
||||
return btn;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationFadeIn()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationFadeIn();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationFadeOut()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationFadeOut();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationDataAdd()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationFadeOut();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationDataChange()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
var dataCount = chart.series.list[0].dataCount;
|
||||
var index = UnityEngine.Random.Range(0, dataCount);
|
||||
chart.UpdateData(0, index, UnityEngine.Random.Range(1, 100));
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationPause()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationPause();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationResume()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationResume();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationReset()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationReset();
|
||||
}
|
||||
}
|
||||
|
||||
void OnFadeInDurationChanged(string content)
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
m_FadeInDuration = int.Parse(content);
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.fadeInDuration = m_FadeInDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnFadeOutDurationChanged(string content)
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
m_FadeOutDuration = int.Parse(content);
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.fadeOutDuration = m_FadeOutDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDataChangeDurationChanged(string content)
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
m_DataChangeDuration = int.Parse(content);
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.dataChangeDuration = m_DataChangeDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XChartsDemo/Runtime/Demo_Animation.cs.meta
Normal file
11
Assets/XChartsDemo/Runtime/Demo_Animation.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13a697cc1196d43fdb8f329026a721e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
84451
Assets/XChartsDemo/xcharts_animation.unity
Normal file
84451
Assets/XChartsDemo/xcharts_animation.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/XChartsDemo/xcharts_animation.unity.meta
Normal file
7
Assets/XChartsDemo/xcharts_animation.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8890fea0a5384d328f22e9738289cc9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user