mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
优化RingChart的渐变效果
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2021.08.31) Optimized the gradient effect of `RingChart`
|
||||||
* (2021.08.31) Fixed bug where `SerieLabel` does not refresh when `DataZoom` is dragged (#165)
|
* (2021.08.31) Fixed bug where `SerieLabel` does not refresh when `DataZoom` is dragged (#165)
|
||||||
* (2021.08.25) Fixed an issue where the theme switch could not be save to the scene (#166)
|
* (2021.08.25) Fixed an issue where the theme switch could not be save to the scene (#166)
|
||||||
* (2021.08.24) Added `Animation`'s `alongWithLinePath`
|
* (2021.08.24) Added `Animation`'s `alongWithLinePath`
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2021.08.31) 优化`RingChart`的渐变效果
|
||||||
* (2021.08.31) 修复`DataZoom`拖动时`SerieLabel`不刷新的问题 (#165)
|
* (2021.08.31) 修复`DataZoom`拖动时`SerieLabel`不刷新的问题 (#165)
|
||||||
* (2021.08.25) 修复`Theme`主题切换无法保持到场景上的问题 (#166)
|
* (2021.08.25) 修复`Theme`主题切换无法保持到场景上的问题 (#166)
|
||||||
* (2021.08.24) 增加`Animation`的`alongWithLinePath`参数设置折线轨迹匀速动画
|
* (2021.08.24) 增加`Animation`的`alongWithLinePath`参数设置折线轨迹匀速动画
|
||||||
|
|||||||
@@ -104,6 +104,14 @@ namespace XCharts
|
|||||||
itemStyle.backgroundColor, Color.clear, 0, 360, borderWidth, borderColor, 0,
|
itemStyle.backgroundColor, Color.clear, 0, 360, borderWidth, borderColor, 0,
|
||||||
chart.settings.cicleSmoothness, false, serie.clockwise);
|
chart.settings.cicleSmoothness, false, serie.clockwise);
|
||||||
}
|
}
|
||||||
|
var isGradient = !UGLHelper.IsValueEqualsColor(itemColor, itemToColor);
|
||||||
|
if (isGradient)
|
||||||
|
{
|
||||||
|
if (serie.clockwise)
|
||||||
|
itemToColor = Color.Lerp(itemColor, itemToColor, toDegree / (startDegree + 360));
|
||||||
|
else
|
||||||
|
itemToColor = Color.Lerp(itemToColor, itemColor, toDegree / (startDegree + 360));
|
||||||
|
}
|
||||||
UGL.DrawDoughnut(vh, serie.runtimeCenterPos, insideRadius, outsideRadius, itemColor, itemToColor,
|
UGL.DrawDoughnut(vh, serie.runtimeCenterPos, insideRadius, outsideRadius, itemColor, itemToColor,
|
||||||
Color.clear, startDegree, toDegree, borderWidth, borderColor, 0, chart.settings.cicleSmoothness,
|
Color.clear, startDegree, toDegree, borderWidth, borderColor, 0, chart.settings.cicleSmoothness,
|
||||||
roundCap, serie.clockwise);
|
roundCap, serie.clockwise);
|
||||||
|
|||||||
Reference in New Issue
Block a user