mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 14:30:10 +00:00
fix pie chart fade out animation #168
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
|
||||
## master
|
||||
|
||||
* (2021.09.07) Fixed bug where `label` does not disappear at the end of `PieChart` fade animation #168
|
||||
* (2021.09.06) Fixed bug where `GaugeChart` changing `splitNumber` with code does not refresh `label` #167
|
||||
|
||||
## v2.4.0
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
## master
|
||||
|
||||
* (2021.09.07) 修复`PieChart`渐出动画结束时`label`没有消失的问题 #168
|
||||
* (2021.09.06) 修复`GaugeChart`用代码改变`splitNumber`不会刷新`label`的问题 #167
|
||||
|
||||
## v2.4.0
|
||||
|
||||
@@ -546,6 +546,7 @@ namespace XCharts
|
||||
var iconStyle = SerieHelper.GetIconStyle(serie, serieData);
|
||||
if (serie.IsPerformanceMode()) return;
|
||||
if (!serieLabel.show && !iconStyle.show) return;
|
||||
if(serie.animation.enable && serie.animation.HasFadeOut()) return;
|
||||
var textName = ChartCached.GetSerieLabelName(s_SerieLabelObjectName, serie.index, serieData.index);
|
||||
var color = Color.grey;
|
||||
if (serie.type == SerieType.Pie)
|
||||
|
||||
@@ -413,6 +413,7 @@ namespace XCharts
|
||||
|
||||
private void DrawPieLabelLine(VertexHelper vh, Serie serie, SerieData serieData, Color color)
|
||||
{
|
||||
if (serie.animation.enable && serie.animation.HasFadeOut()) return;
|
||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData);
|
||||
if (serieLabel.show
|
||||
&& serieLabel.position == SerieLabel.Position.Outside
|
||||
@@ -496,6 +497,7 @@ namespace XCharts
|
||||
private void DrawPieLabel(Serie serie, int dataIndex, SerieData serieData, Color serieColor)
|
||||
{
|
||||
if (serieData.labelObject == null) return;
|
||||
if (serie.animation.enable && serie.animation.HasFadeOut()) return;
|
||||
var currAngle = serieData.runtimePieHalfAngle;
|
||||
var isHighlight = (serieData.highlighted && serie.emphasis.label.show);
|
||||
var serieLabel = SerieHelper.GetSerieLabel(serie, serieData);
|
||||
|
||||
Reference in New Issue
Block a user