From 6c42fe63998b8bbf66e727b52486d55594e1df4e Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Wed, 27 Nov 2024 23:24:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Internal/BaseChart.API.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Runtime/Internal/BaseChart.API.cs b/Runtime/Internal/BaseChart.API.cs index 7383202d..7c744a2c 100644 --- a/Runtime/Internal/BaseChart.API.cs +++ b/Runtime/Internal/BaseChart.API.cs @@ -656,10 +656,12 @@ namespace XCharts.Runtime } } + private Background m_Background; public Color32 GetChartBackgroundColor() { - var background = GetChartComponent(); - return theme.GetBackgroundColor(background); + if (m_Background == null) m_Background = GetChartComponent(); + //var background = GetChartComponent(); + return theme.GetBackgroundColor(m_Background); } ///