From 367844a86c931b54764f3e470520ebebf83cd601 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sun, 3 Sep 2023 21:43:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AF=E9=83=A8=E5=88=86Serie?= =?UTF-8?q?=E7=9A=84MaxCache=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/Series/PieEditor.cs | 1 + Editor/Series/RadarEditor.cs | 1 + Editor/Series/RingEditor.cs | 1 + Editor/Series/ScatterEditor.cs | 1 + Runtime/Internal/BaseChart.Component.cs | 6 +++++- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Editor/Series/PieEditor.cs b/Editor/Series/PieEditor.cs index a36befa0..34e8633f 100644 --- a/Editor/Series/PieEditor.cs +++ b/Editor/Series/PieEditor.cs @@ -15,6 +15,7 @@ namespace XCharts.Editor PropertyField("m_AvoidLabelOverlap"); PropertyFiledMore(() => { + PropertyField("m_MaxCache"); PropertyField("m_MinAngle"); PropertyField("m_MinRadius"); PropertyField("m_RoundCap"); diff --git a/Editor/Series/RadarEditor.cs b/Editor/Series/RadarEditor.cs index 60e5fb43..aee5f2ee 100644 --- a/Editor/Series/RadarEditor.cs +++ b/Editor/Series/RadarEditor.cs @@ -10,6 +10,7 @@ namespace XCharts.Editor PropertyField("m_ColorBy"); PropertyField("m_RadarType"); PropertyField("m_RadarIndex"); + PropertyField("m_MaxCache"); PropertyField("m_Smooth"); PropertyField("m_Symbol"); diff --git a/Editor/Series/RingEditor.cs b/Editor/Series/RingEditor.cs index 3d2cb7ca..26a35856 100644 --- a/Editor/Series/RingEditor.cs +++ b/Editor/Series/RingEditor.cs @@ -12,6 +12,7 @@ namespace XCharts.Editor PropertyTwoFiled("m_Radius"); PropertyField("m_StartAngle"); PropertyField("m_Gap"); + PropertyField("m_MaxCache"); PropertyField("m_RoundCap"); PropertyField("m_Clockwise"); PropertyField("m_AvoidLabelOverlap"); diff --git a/Editor/Series/ScatterEditor.cs b/Editor/Series/ScatterEditor.cs index 77cd8bba..5519bcb7 100644 --- a/Editor/Series/ScatterEditor.cs +++ b/Editor/Series/ScatterEditor.cs @@ -16,6 +16,7 @@ namespace XCharts.Editor PropertyField("m_XAxisIndex"); PropertyField("m_YAxisIndex"); } + PropertyField("m_MaxCache"); PropertyField("m_Clip"); PropertyField("m_Symbol"); diff --git a/Runtime/Internal/BaseChart.Component.cs b/Runtime/Internal/BaseChart.Component.cs index 61205f50..4a895b8f 100644 --- a/Runtime/Internal/BaseChart.Component.cs +++ b/Runtime/Internal/BaseChart.Component.cs @@ -248,7 +248,11 @@ namespace XCharts.Runtime public List GetChartComponents() where T : MainComponent { - return m_ComponentMaps[typeof(T)]; + var type = typeof(T); + if (m_ComponentMaps.ContainsKey(type)) + return m_ComponentMaps[type]; + else + return null; } [Obsolete("'GetOrAddChartComponent' is obsolete, Use 'EnsureChartComponent' instead.")]