修复Pie设置玫瑰图时引导线异常的问题

This commit is contained in:
monitor1394
2023-10-19 22:51:22 +08:00
parent 4bbedc8ef6
commit 6b931497ab
2 changed files with 4 additions and 2 deletions

View File

@@ -69,6 +69,7 @@ slug: /changelog
## master
* (2023.10.19) 修复`Pie`设置玫瑰图时引导线异常的问题
* (2023.10.15) 修复`Line`设置`Animation``AlongPath`时动画异常的问题 (#281)
* (2023.10.12) 修复`MarkLine`指定`yValue`时对数值轴无效的问题
* (2023.10.11) 修复`Serie``showDataDimension`设置无效的问题

View File

@@ -464,10 +464,11 @@ namespace XCharts.Runtime
var rad = Mathf.Deg2Rad * serieData.context.halfAngle;
var lineLength1 = ChartHelper.GetActualValue(labelLine.lineLength1, serie.context.outsideRadius);
var lineLength2 = ChartHelper.GetActualValue(labelLine.lineLength2, serie.context.outsideRadius);
var radius = lineLength1 + serie.context.outsideRadius - serieData.context.outsideRadius;
var pos1 = startPosition;
var pos2 = pos1 + new Vector3(Mathf.Sin(rad) * lineLength1, Mathf.Cos(rad) * lineLength1);
var pos2 = pos1 + new Vector3(Mathf.Sin(rad) * radius, Mathf.Cos(rad) * radius);
var pos5 = labelLine.lineType == LabelLine.LineType.HorizontalLine
? pos1 + dire * (lineLength1 + lineLength2) + labelLine.GetEndSymbolOffset()
? pos1 + dire * (radius + lineLength2) + labelLine.GetEndSymbolOffset()
: pos2 + dire * lineLength2 + labelLine.GetEndSymbolOffset();
if (labelLine.lineEndX != 0)
{