mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 07:20:08 +00:00
优化RingChart的渐变效果
This commit is contained in:
@@ -104,6 +104,14 @@ namespace XCharts
|
||||
itemStyle.backgroundColor, Color.clear, 0, 360, borderWidth, borderColor, 0,
|
||||
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,
|
||||
Color.clear, startDegree, toDegree, borderWidth, borderColor, 0, chart.settings.cicleSmoothness,
|
||||
roundCap, serie.clockwise);
|
||||
|
||||
Reference in New Issue
Block a user