优化RadarCood设置startAngle时文本也跟随调整位置

This commit is contained in:
monitor1394
2023-04-12 22:57:12 +08:00
parent a038317c6e
commit 674d937104
2 changed files with 3 additions and 1 deletions

View File

@@ -66,7 +66,8 @@ slug: /changelog
## master
* (2023.04.12) 增加`RadarChart`对通配符`{b}`的支持
* (2023.04.12) 优化`RadarCood`设置`startAngle`时文本也跟随调整位置
* (2023.04.12) 增加`Radar`对通配符`{b}`的支持
* (2023.04.11) 修复动态添加组件时`Inspector`可能异常的问题
## v3.6.0

View File

@@ -383,6 +383,7 @@ namespace XCharts.Runtime
angle = 2 * Mathf.PI / indicatorNum * (index + 0.5f);
break;
}
angle += startAngle * Mathf.PI / 180;
var x = context.center.x + (context.radius + indicatorGap) * Mathf.Sin(angle);
var y = context.center.y + (context.radius + indicatorGap) * Mathf.Cos(angle);
return new Vector3(x, y);