修复PieChart在设置clockwise后绘制异常的问题

This commit is contained in:
monitor1394
2020-06-24 09:06:39 +08:00
parent c2e4a1bfda
commit 8aabfa8763
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.06.24) 修复`PieChart`在设置`clockwise`后绘制异常的问题#65
* (2020.06.23) 优化`LineChart`在峰谷差异过大时的绘制效果#64
* (2020.06.18) 修复`SerieLabel`在重新添加数据时可能不显示的问题
* (2020.06.17) 增加`SerieData`可单独设置`SerieSymbol`#66

View File

@@ -154,9 +154,10 @@ namespace XCharts
center.y + serieData.runtimePieOffsetRadius * currCos);
var drawEndDegree = serieData.runtimePieCurrAngle;
var needRoundCap = serie.roundCap && serieData.runtimePieInsideRadius > 0;
ChartDrawer.DrawDoughnut(vh, serieData.runtiemPieOffsetCenter, serieData.runtimePieInsideRadius,
serieData.runtimePieOutsideRadius, color, toColor, Color.clear, startDegree, drawEndDegree,
borderWidth, borderColor, serie.pieSpace / 2, m_Settings.cicleSmoothness, needRoundCap, serie.clockwise);
borderWidth, borderColor, serie.pieSpace / 2, m_Settings.cicleSmoothness, needRoundCap, true);
}
else
{
@@ -164,7 +165,7 @@ namespace XCharts
var needRoundCap = serie.roundCap && serieData.runtimePieInsideRadius > 0;
ChartDrawer.DrawDoughnut(vh, center, serieData.runtimePieInsideRadius, serieData.runtimePieOutsideRadius,
color, toColor, Color.clear, startDegree, drawEndDegree, borderWidth, borderColor, serie.pieSpace / 2,
m_Settings.cicleSmoothness, needRoundCap, serie.clockwise);
m_Settings.cicleSmoothness, needRoundCap, true);
DrawCenter(vh, serie, itemStyle, serieData.runtimePieInsideRadius);
}
serieData.canShowLabel = serieData.runtimePieCurrAngle >= serieData.runtimePieHalfAngle;