mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 05:10:12 +00:00
[feature] 增加Serie的markColor可设置标识颜色用于Legend和Tooltip的展示 (#229)
This commit is contained in:
@@ -568,6 +568,25 @@ namespace XCharts.Runtime
|
||||
return theme.GetBackgroundColor(background);
|
||||
}
|
||||
|
||||
[Since("v3.4.0")]
|
||||
/// <summary>
|
||||
/// 获得Serie的标识颜色。
|
||||
/// </summary>
|
||||
/// <param name="serie"></param>
|
||||
/// <param name="serieData"></param>
|
||||
/// <returns></returns>
|
||||
public Color32 GetMarkColor(Serie serie, SerieData serieData)
|
||||
{
|
||||
if (ChartHelper.IsClearColor(serie.markColor))
|
||||
{
|
||||
return GetItemColor(serie, serieData);
|
||||
}
|
||||
else
|
||||
{
|
||||
return serie.markColor;
|
||||
}
|
||||
}
|
||||
|
||||
public Color32 GetItemColor(Serie serie, SerieData serieData)
|
||||
{
|
||||
Color32 color, toColor;
|
||||
|
||||
Reference in New Issue
Block a user