From f9062226f8e0bf923c345c98c0e5b5870c233fe3 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 21 Apr 2023 13:55:29 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIChartOption:=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BA=E5=8F=AA=E8=AF=BB=E6=88=96=E8=80=85=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Charts/UIBarChartOption.cs | 8 ++++---- SunnyUI/Charts/UILineChartOption.cs | 8 ++++---- SunnyUI/Charts/UIPieChartOption.cs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/SunnyUI/Charts/UIBarChartOption.cs b/SunnyUI/Charts/UIBarChartOption.cs index 3f47f41c..b8b70a1d 100644 --- a/SunnyUI/Charts/UIBarChartOption.cs +++ b/SunnyUI/Charts/UIBarChartOption.cs @@ -34,7 +34,7 @@ namespace Sunny.UI /// /// X轴 /// - public UIAxis XAxis { get; set; } = new UIAxis(UIAxisType.Category); + public UIAxis XAxis { get; private set; } = new UIAxis(UIAxisType.Category); /// /// 工具提示 @@ -44,17 +44,17 @@ namespace Sunny.UI /// /// Y轴 /// - public UIAxis YAxis { get; set; } = new UIAxis(UIAxisType.Value); + public UIAxis YAxis { get; private set; } = new UIAxis(UIAxisType.Value); /// /// 序列 /// - public List Series = new List(); + public readonly List Series = new List(); /// /// 绘图表格 /// - public UIChartGrid Grid = new UIChartGrid(); + public readonly UIChartGrid Grid = new UIChartGrid(); /// /// X轴自定义刻度线 diff --git a/SunnyUI/Charts/UILineChartOption.cs b/SunnyUI/Charts/UILineChartOption.cs index 4f838c16..d77ba514 100644 --- a/SunnyUI/Charts/UILineChartOption.cs +++ b/SunnyUI/Charts/UILineChartOption.cs @@ -36,13 +36,13 @@ namespace Sunny.UI public bool ShowZeroValue { get; set; } = false; - public UIAxis XAxis { get; set; } = new UIAxis(UIAxisType.Value); + public UIAxis XAxis { get; private set; } = new UIAxis(UIAxisType.Value); - public UIAxis YAxis { get; set; } = new UIAxis(UIAxisType.Value); + public UIAxis YAxis { get; private set; } = new UIAxis(UIAxisType.Value); - public UIAxis Y2Axis { get; set; } = new UIAxis(UIAxisType.Value); + public UIAxis Y2Axis { get; private set; } = new UIAxis(UIAxisType.Value); - public UILineToolTip ToolTip { get; set; } = new UILineToolTip(); + public UILineToolTip ToolTip { get; private set; } = new UILineToolTip(); /// /// 析构函数 diff --git a/SunnyUI/Charts/UIPieChartOption.cs b/SunnyUI/Charts/UIPieChartOption.cs index fb09ab40..97877003 100644 --- a/SunnyUI/Charts/UIPieChartOption.cs +++ b/SunnyUI/Charts/UIPieChartOption.cs @@ -28,7 +28,7 @@ namespace Sunny.UI { public sealed class UIPieOption : UIOption, IDisposable { - public List Series = new List(); + public readonly List Series = new List(); public UIPieToolTip ToolTip { get; set; } = new UIPieToolTip(); @@ -86,7 +86,7 @@ namespace Sunny.UI public class UIDoughnutOption : UIOption, IDisposable { - public List Series = new List(); + public readonly List Series = new List(); public UIPieToolTip ToolTip { get; set; } = new UIPieToolTip(); @@ -163,7 +163,7 @@ namespace Sunny.UI internal readonly List Data = new List(); - public UIPieSeriesLabel Label = new UIPieSeriesLabel(); + public readonly UIPieSeriesLabel Label = new UIPieSeriesLabel(); public delegate Color OnDataColorChangeEventHandler(double data);