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); } ///