完善Legendformatter对多Serie的支持 (#332)

This commit is contained in:
monitor1394
2024-09-24 18:28:21 +08:00
parent c61ad794a7
commit f9b1eadd40
3 changed files with 22 additions and 3 deletions

View File

@@ -132,6 +132,21 @@ namespace XCharts.Runtime
return false;
}
/// <summary>
/// check if series has any serie which is color by data.
/// || 是否有任何一个系列是按数据颜色的。
/// </summary>
/// <param name="series"></param>
/// <returns></returns>
public static bool IsAnyColorByDataSerie(List<Serie> series)
{
foreach (var serie in series)
{
if (serie.defaultColorBy == SerieColorBy.Data) return true;
}
return false;
}
/// <summary>
/// 获得上一个同堆叠且显示的serie。
/// </summary>