修复Tooltip的圆点标记不会自适应颜色的问题

This commit is contained in:
monitor1394
2024-02-19 08:51:06 +08:00
parent 4f8390b515
commit 74e75e93af
2 changed files with 4 additions and 1 deletions

View File

@@ -76,6 +76,7 @@ namespace XCharts.Runtime
title.SetText(data.title);
m_ColumnMaxWidth.Clear();
var contentLabelStyle0 = tooltip.GetContentLabelStyle(0);
for (int i = 0; i < data.param.Count; i++)
{
var item = GetItem(i);
@@ -92,7 +93,7 @@ namespace XCharts.Runtime
column.SetActive(true);
column.SetText(param.columns[j]);
if (j == 0 && ChartHelper.IsClearColor(column.text.GetColor()))
if (j == 0 && contentLabelStyle0 && ChartHelper.IsClearColor(contentLabelStyle0.textStyle.color))
column.text.SetColor(param.color);
if (j >= m_ColumnMaxWidth.Count)