diff --git a/Assets/XCharts/CHANGELOG-EN.md b/Assets/XCharts/CHANGELOG-EN.md index 524997e1..092db02d 100644 --- a/Assets/XCharts/CHANGELOG-EN.md +++ b/Assets/XCharts/CHANGELOG-EN.md @@ -1,6 +1,7 @@ # 更新日志 +* (2020.07.25) Fixed problem with gradual discoloration on `LiquidChart` at `100%`#80 * (2020.07.25) Added `RadarChart` support for `formatter` of `Tooltip`#77 * (2020.07.23) Added `RingChart` ring gradient support#75 * (2020.07.21) Added `formatter` of `AxisLabel` and `SerieLabel` to configure numeric formatting separately. diff --git a/Assets/XCharts/CHANGELOG.md b/Assets/XCharts/CHANGELOG.md index 31a31437..76e2e138 100644 --- a/Assets/XCharts/CHANGELOG.md +++ b/Assets/XCharts/CHANGELOG.md @@ -1,6 +1,7 @@ # 更新日志 +* (2020.07.25) 修复`LiquidChart`在`100%`时渐变色会失效的问题#80 * (2020.07.25) 增加`RadarChart`对`Tooltip`的`formatter`支持#77 * (2020.07.23) 增加`RingChart`环形渐变支持#75 * (2020.07.21) 增加`AxisLabel`和`SerieLabel`的`formatter`可单独配置数值格式化#68 diff --git a/Assets/XCharts/Runtime/LiquidChart.cs b/Assets/XCharts/Runtime/LiquidChart.cs index 2bec8f9a..66b0d2fa 100644 --- a/Assets/XCharts/Runtime/LiquidChart.cs +++ b/Assets/XCharts/Runtime/LiquidChart.cs @@ -169,8 +169,10 @@ namespace XCharts var color = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, colorIndex, false); var toColor = SerieHelper.GetItemToColor(serie, serieData, m_ThemeInfo, colorIndex, false); - - if (hig >= 2 * radius) + var isNeedGradient = !ChartHelper.IsValueEqualsColor(color, toColor); + var isFull = hig >= 2 * radius; + if (hig >= 2 * radius) hig = 2 * radius; + if (isFull && !isNeedGradient) { ChartDrawer.DrawCricle(vh, cenPos, radius, toColor, m_Settings.cicleSmoothness); } @@ -238,7 +240,7 @@ namespace XCharts } } - if (serie.waveSpeed != 0 && Application.isPlaying) + if (serie.waveSpeed != 0 && Application.isPlaying && !isFull) { RefreshChart(); }