diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 325d2418..b9021da8 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -75,6 +75,7 @@ slug: /changelog ## master +* (2024.07.22) 优化`Pie`的`Label`在`Tooltip`触发时的表现 * (2024.07.21) 修复`Tooltip`在开启`DataZoom`时指示内容不准确的问题 * (2024.07.17) 修复`MarkLine`的`Label`在初始化时可能会闪烁的问题 * (2024.07.16) 优化`Axis`为`Time`时间轴时的`Tooltip`默认效果 diff --git a/Runtime/Serie/Pie/PieHandler.cs b/Runtime/Serie/Pie/PieHandler.cs index 8efb5333..66b3f6ed 100644 --- a/Runtime/Serie/Pie/PieHandler.cs +++ b/Runtime/Serie/Pie/PieHandler.cs @@ -470,7 +470,7 @@ 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 radius = lineLength1; var pos1 = startPosition; var pos2 = pos1 + new Vector3(Mathf.Sin(rad) * radius, Mathf.Cos(rad) * radius); var pos5 = labelLine.lineType == LabelLine.LineType.HorizontalLine