From 378fccf8b42ffdeefb1f92fcbc8fe1f8db3c7405 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Mon, 22 Jul 2024 22:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96`Pie`=E7=9A=84`Label`?= =?UTF-8?q?=E5=9C=A8`Tooltip`=E8=A7=A6=E5=8F=91=E6=97=B6=E7=9A=84=E8=A1=A8?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 1 + Runtime/Serie/Pie/PieHandler.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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