修复LiquidChart100%时渐变色会失效的问题

This commit is contained in:
monitor1394
2020-07-25 14:38:15 +08:00
parent 5df8f2d3fe
commit dc99bfa406
3 changed files with 7 additions and 3 deletions

View File

@@ -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.25) Added `RadarChart` support for `formatter` of `Tooltip`#77
* (2020.07.23) Added `RingChart` ring gradient support#75 * (2020.07.23) Added `RingChart` ring gradient support#75
* (2020.07.21) Added `formatter` of `AxisLabel` and `SerieLabel` to configure numeric formatting separately. * (2020.07.21) Added `formatter` of `AxisLabel` and `SerieLabel` to configure numeric formatting separately.

View File

@@ -1,6 +1,7 @@
# 更新日志 # 更新日志
* (2020.07.25) 修复`LiquidChart``100%`时渐变色会失效的问题#80
* (2020.07.25) 增加`RadarChart``Tooltip``formatter`支持#77 * (2020.07.25) 增加`RadarChart``Tooltip``formatter`支持#77
* (2020.07.23) 增加`RingChart`环形渐变支持#75 * (2020.07.23) 增加`RingChart`环形渐变支持#75
* (2020.07.21) 增加`AxisLabel``SerieLabel``formatter`可单独配置数值格式化#68 * (2020.07.21) 增加`AxisLabel``SerieLabel``formatter`可单独配置数值格式化#68

View File

@@ -169,8 +169,10 @@ namespace XCharts
var color = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, colorIndex, false); var color = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, colorIndex, false);
var toColor = SerieHelper.GetItemToColor(serie, serieData, m_ThemeInfo, colorIndex, false); var toColor = SerieHelper.GetItemToColor(serie, serieData, m_ThemeInfo, colorIndex, false);
var isNeedGradient = !ChartHelper.IsValueEqualsColor(color, toColor);
if (hig >= 2 * radius) var isFull = hig >= 2 * radius;
if (hig >= 2 * radius) hig = 2 * radius;
if (isFull && !isNeedGradient)
{ {
ChartDrawer.DrawCricle(vh, cenPos, radius, toColor, m_Settings.cicleSmoothness); 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(); RefreshChart();
} }