From ffe096a61201a722eb9c6abd960163232fb09b68 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sun, 29 Sep 2019 09:19:26 +0800 Subject: [PATCH] fixed bug --- Assets/XCharts/Scripts/UI/Component/Series.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/XCharts/Scripts/UI/Component/Series.cs b/Assets/XCharts/Scripts/UI/Component/Series.cs index 93f96903..f034d6a3 100644 --- a/Assets/XCharts/Scripts/UI/Component/Series.cs +++ b/Assets/XCharts/Scripts/UI/Component/Series.cs @@ -78,6 +78,7 @@ namespace XCharts /// public Serie GetSerie(string name) { + if (string.IsNullOrEmpty(name)) return null; for (int i = 0; i < m_Series.Count; i++) { if (name.Equals(m_Series[i].name)) @@ -426,7 +427,7 @@ namespace XCharts /// /// /// - public void UpdateXYData(string serieName,int dataIndex, float xValue, float yValue) + public void UpdateXYData(string serieName, int dataIndex, float xValue, float yValue) { var serie = GetSerie(serieName); if (serie != null) @@ -442,7 +443,7 @@ namespace XCharts /// /// /// - public void UpdateXYData(int serieIndex, int dataIndex,float xValue, float yValue) + public void UpdateXYData(int serieIndex, int dataIndex, float xValue, float yValue) { var serie = GetSerie(serieIndex); if (serie != null)