From 3333fe2abae1b1022cd7233cb1dda117afe96432 Mon Sep 17 00:00:00 2001 From: Sunny Date: Mon, 1 Jul 2024 22:57:32 +0800 Subject: [PATCH] =?UTF-8?q?*=20UILineChart:=20=E5=A2=9E=E5=8A=A0=E4=BA=86Y?= =?UTF-8?q?=E8=BD=B4=E8=87=AA=E5=AE=9A=E4=B9=89=E5=9D=90=E6=A0=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Charts/UILineChart.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SunnyUI/Charts/UILineChart.cs b/SunnyUI/Charts/UILineChart.cs index 31a3782b..fd37b39d 100644 --- a/SunnyUI/Charts/UILineChart.cs +++ b/SunnyUI/Charts/UILineChart.cs @@ -52,6 +52,7 @@ * 2023-10-05: V3.5.0 增加了X轴和Y轴鼠标选择区域并返回选中范围 * 2023-10-20: V3.5.1 增加了绘制线的DashStyle样式 * 2023-11-22: V3.6.0 增加了区域选择范围相等时不执行事件 + * 2024-07-01: V3.6.7 增加了Y轴自定义坐标显示 ******************************************************************************/ using System; @@ -445,6 +446,11 @@ namespace Sunny.UI else label = YLabels[i].ToString("F" + Option.YAxis.AxisLabel.DecimalPlaces); + if (Option.YAxis.HaveCustomLabels && Option.YAxis.CustomLabels.GetLabel(i).IsValid()) + { + label = Option.YAxis.CustomLabels.GetLabel(i); + } + Size sf = TextRenderer.MeasureText(label, TempFont); widthMax = Math.Max(widthMax, sf.Width);