Added Legend's textAutoColor to set the text color match with Serie color (#163)

This commit is contained in:
monitor1394
2021-08-14 15:05:37 +08:00
parent 828154c073
commit a92e01d806
7 changed files with 24 additions and 6 deletions

View File

@@ -450,7 +450,7 @@ namespace XCharts
var active = IsActiveByLegend(datas[i]);
var bgColor = LegendHelper.GetIconColor(this, readIndex, datas[i], active);
var item = LegendHelper.AddLegendItem(legend, i, datas[i], legendObject.transform, m_Theme,
legendName, bgColor, active);
legendName, bgColor, active,readIndex);
legend.SetButton(legendName, item, totalLegend);
ChartHelper.ClearEventListener(item.button.gameObject);
ChartHelper.AddEventListener(item.button.gameObject, EventTriggerType.PointerDown, (data) =>