增加Animation的添加动画支持

This commit is contained in:
monitor1394
2023-07-04 13:07:44 +08:00
parent bc1596f8d3
commit 0adc9e71e5
26 changed files with 543 additions and 230 deletions

View File

@@ -176,8 +176,6 @@ namespace XCharts.Runtime
if (sd.show && serie.pieRoseType == RoseType.Area) showdataCount++;
sd.context.canShowLabel = false;
}
float dataChangeDuration = serie.animation.GetUpdateAnimationDuration();
var unscaledTime = serie.animation.unscaledTime;
bool isAllZeroValue = SerieHelper.IsAllZeroValue(serie, 1);
var dataTotalFilterMinAngle = runtimePieDataTotal;
if (isAllZeroValue)
@@ -195,7 +193,7 @@ namespace XCharts.Runtime
for (int n = 0; n < data.Count; n++)
{
var serieData = data[n];
var value = isAllZeroValue ? zeroReplaceValue : serieData.GetCurrData(1, dataChangeDuration, unscaledTime);
var value = isAllZeroValue ? zeroReplaceValue : serieData.GetCurrData(1, serie.animation);
serieData.context.startAngle = startDegree;
serieData.context.toAngle = startDegree;
serieData.context.halfAngle = startDegree;