* UILineChart: 修复双Y轴数据点提示文字显示

This commit is contained in:
Sunny 2022-07-26 13:44:52 +08:00
parent c0ccb4cfd0
commit c2ee18fa6d
2 changed files with 9 additions and 2 deletions

View File

@ -33,6 +33,7 @@
* 2022-02-09: V3.1.0 线 * 2022-02-09: V3.1.0 线
* 2022-04-19: V3.1.5 Smooth绘制 * 2022-04-19: V3.1.5 Smooth绘制
* 2022-07-11: V3.2.1 线 * 2022-07-11: V3.2.1 线
* 2022-07-26: V3.2.2 Y轴数据点提示文字显示
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -809,6 +810,7 @@ namespace Sunny.UI
point.X = x; point.X = x;
point.Y = y; point.Y = y;
point.Location = new Point((int)series.Points[index].X, (int)series.Points[index].Y); point.Location = new Point((int)series.Points[index].X, (int)series.Points[index].Y);
point.IsY2 = series.IsY2;
selectPointsTemp.Add(point); selectPointsTemp.Add(point);
} }
} }
@ -858,8 +860,11 @@ namespace Sunny.UI
else else
sb.Append(point.X.ToString("F" + Option.XAxis.AxisLabel.DecimalCount)); sb.Append(point.X.ToString("F" + Option.XAxis.AxisLabel.DecimalCount));
sb.Append('\n'); sb.Append('\n');
sb.Append(
Option.YAxis.Name + ": " + point.Y.ToString("F" + Option.YAxis.AxisLabel.DecimalCount)); if (point.IsY2)
sb.Append(Option.Y2Axis.Name + ": " + point.Y.ToString("F" + Option.Y2Axis.AxisLabel.DecimalCount));
else
sb.Append(Option.YAxis.Name + ": " + point.Y.ToString("F" + Option.YAxis.AxisLabel.DecimalCount));
idx++; idx++;
} }

View File

@ -493,6 +493,8 @@ namespace Sunny.UI
public double Y { get; set; } public double Y { get; set; }
public Point Location { get; set; } public Point Location { get; set; }
public bool IsY2 { get; set; }
} }
public class UILineWarningArea public class UILineWarningArea