From 546ff1f61a51c8340f663b272382e7b29b664a70 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 27 Mar 2025 08:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0`Axis`=E7=9A=84`onLabelClick`?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Component/Axis/Axis.cs | 8 ++++---- Runtime/Component/Axis/AxisHandler.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Runtime/Component/Axis/Axis.cs b/Runtime/Component/Axis/Axis.cs index c3e24d24..18928a63 100644 --- a/Runtime/Component/Axis/Axis.cs +++ b/Runtime/Component/Axis/Axis.cs @@ -115,13 +115,13 @@ namespace XCharts.Runtime public AxisContext context = new AxisContext(); - private Action m_OnLabelClick; + private Action m_OnLabelClick; /// - /// Callback function when click on the label. Parameters: clickPos, labelIndex, labelName. - /// ||点击文本标签回调函数。参数:clickPos, labelIndex, labelName。 + /// Callback function when click on the label. Parameters: labelIndex, labelName. + /// ||点击文本标签回调函数。参数:labelIndex, labelName。 /// [Since("v3.15.0")] - public Action onLabelClick { internal get { return m_OnLabelClick; } set { m_OnLabelClick = value; } } + public Action onLabelClick { internal get { return m_OnLabelClick; } set { m_OnLabelClick = value; } } /// /// Whether to show axis. /// ||是否显示坐标轴。 diff --git a/Runtime/Component/Axis/AxisHandler.cs b/Runtime/Component/Axis/AxisHandler.cs index 117afdda..bb328ff9 100644 --- a/Runtime/Component/Axis/AxisHandler.cs +++ b/Runtime/Component/Axis/AxisHandler.cs @@ -43,7 +43,7 @@ namespace XCharts if (label == null) continue; if (label.InRect(chart.pointerPos)) { - component.onLabelClick.Invoke(chart.pointerPos, i, label.text.text.text); + component.onLabelClick.Invoke(i, label.text.text.text); break; } }