diff --git a/CHANGELOG-EN.md b/CHANGELOG-EN.md index 30e27a35..823c9891 100644 --- a/CHANGELOG-EN.md +++ b/CHANGELOG-EN.md @@ -34,6 +34,7 @@ ## Latest +* (2021.05.09) Fixed an issue where `RingChart` could not set the background color of the ring #141 * (2021.05.08) Added `Liquidchart` support for `Rect` shape * (2021.05.07) Improved the `Axis` scale performance #135 * (2021.05.01) Added `Settings` parameters for painter's material #140 diff --git a/CHANGELOG.md b/CHANGELOG.md index 95beadce..fe51b4b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ ## Latest +* (2021.05.09) 修复`RingChart`无法设置环形的背景色的问题 #141 * (2021.05.08) 增加`LiquidChart`的方形水位图支持 * (2021.05.07) 优化`Axis`的刻度表现 #135 * (2021.05.01) 增加`Settings`中关于关于材质球设置的参数 #140 diff --git a/Runtime/Internal/DrawSerieRing.cs b/Runtime/Internal/DrawSerieRing.cs index ec5bbc4f..e990a927 100644 --- a/Runtime/Internal/DrawSerieRing.cs +++ b/Runtime/Internal/DrawSerieRing.cs @@ -31,7 +31,7 @@ namespace XCharts public void CheckComponent() { } - + public void Update() { if (m_UpdateTitleText) @@ -98,6 +98,12 @@ namespace XCharts serieData.runtimePieToAngle = serie.clockwise ? toDegree : startDegree; serieData.runtimePieInsideRadius = insideRadius; serieData.runtimePieOutsideRadius = outsideRadius; + if (itemStyle.backgroundColor.a != 0) + { + UGL.DrawDoughnut(vh, serie.runtimeCenterPos, insideRadius, outsideRadius, itemStyle.backgroundColor, + itemStyle.backgroundColor, Color.clear, 0, 360, borderWidth, borderColor, 0, + chart.settings.cicleSmoothness, false, serie.clockwise); + } UGL.DrawDoughnut(vh, serie.runtimeCenterPos, insideRadius, outsideRadius, itemColor, itemToColor, Color.clear, startDegree, toDegree, borderWidth, borderColor, 0, chart.settings.cicleSmoothness, roundCap, serie.clockwise);