[optimize][serie] optimize index of serieData

This commit is contained in:
monitor1394
2022-08-08 07:43:19 +08:00
parent e7f19e72a5
commit 19914586ae
7 changed files with 64 additions and 7 deletions

View File

@@ -61,6 +61,18 @@ namespace XCharts.Runtime
return true;
}
/// <summary>
/// 重置serie的数据项索引。避免数据项索引异常。
/// </summary>
/// <param name="serieIndex"></param>
public bool ResetDataIndex(int serieIndex)
{
var serie = GetSerie(serieIndex);
if (serie != null)
return serie.ResetDataIndex();
return false;
}
public bool CanAddSerie<T>() where T : Serie
{
return CanAddSerie(typeof(T));