mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
修复PieChart设置space时只有一个数据时绘制异常的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.05.29) 修复`PieChart`设置`space`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.27) 修复调用`UpdateDataName()`接口时不会自动刷新的问题
|
||||
* (2020.05.27) 优化`柱状图`的渐变色效果
|
||||
* (2020.05.24) 修复`Axis`同时设置`boundaryGap`和`alignWithLabel`时`Tick`绘制异常的问题
|
||||
|
||||
@@ -811,6 +811,7 @@ namespace XCharts
|
||||
float smoothness, int gradientType = 0, bool isYAxis = false)
|
||||
{
|
||||
if (radius == 0) return;
|
||||
if (space > 0 && Mathf.Abs(toDegree - startDegree) >= 360) space = 0;
|
||||
radius -= borderWidth;
|
||||
smoothness = (smoothness < 0 ? 2f : smoothness);
|
||||
int segments = (int)((2 * Mathf.PI * radius) * (Mathf.Abs(toDegree - startDegree) / 360) / smoothness);
|
||||
@@ -998,6 +999,7 @@ namespace XCharts
|
||||
Color32 borderColor, float space, float smoothness, bool roundCap = false, bool clockwise = true)
|
||||
{
|
||||
if (toDegree - startDegree == 0) return;
|
||||
if (space > 0 && Mathf.Abs(toDegree - startDegree) >= 360) space = 0;
|
||||
if (insideRadius <= 0)
|
||||
{
|
||||
DrawSector(vh, p, outsideRadius, color, toColor, startDegree, toDegree, borderWidth, borderColor,
|
||||
|
||||
Reference in New Issue
Block a user