优化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

@@ -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);