From 6c1b402d2d0caa69e77c7f9516d7cfc441330bd5 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Tue, 5 Sep 2023 23:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96`LabelLine`=E7=9A=84`lineEndX?= =?UTF-8?q?`=E5=9C=A8`Pie`=E4=B8=AD=E7=9A=84=E8=A1=A8=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 3 ++- Runtime/Serie/Pie/PieHandler.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 5fc99394..39716713 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -68,7 +68,8 @@ slug: /changelog ## master -* (2023.09.05) 修复`Ring`的`TriggerTooltip()`接口无效的问题 +* (2023.09.05) 优化`LabelLine`的`lineEndX`在`Pie`中的表现 +* (2023.09.05) 修复`TriggerTooltip()`接口对`Ring`无效的问题 * (2023.09.05) 修复`Radar`数据全为0时绘制报错的问题 ## v3.8.0 diff --git a/Runtime/Serie/Pie/PieHandler.cs b/Runtime/Serie/Pie/PieHandler.cs index 2284d958..f8d9b9c1 100644 --- a/Runtime/Serie/Pie/PieHandler.cs +++ b/Runtime/Serie/Pie/PieHandler.cs @@ -461,7 +461,7 @@ namespace XCharts.Runtime : pos2 + dire * lineLength2 + labelLine.GetEndSymbolOffset(); if (labelLine.lineEndX != 0) { - pos5.x = isLeft ? -Mathf.Abs(labelLine.lineEndX) : Mathf.Abs(labelLine.lineEndX); + pos5.x = serie.context.center.x + (isLeft ? -Mathf.Abs(labelLine.lineEndX) : Mathf.Abs(labelLine.lineEndX)); } serieData.context.labelLinePosition2 = pos2; serieData.context.labelPosition = pos5;