[optimize][legend]support textstyle autoColor

This commit is contained in:
monitor1394
2022-06-10 21:00:58 +08:00
parent 1d1ad6fa57
commit 0880b2f3f9
3 changed files with 9 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ namespace XCharts.Runtime
var active = chart.IsActiveByLegend(datas[i]);
var bgColor = LegendHelper.GetIconColor(chart, legend, readIndex, datas[i], active);
bgColor.a = legend.itemOpacity;
var item = LegendHelper.AddLegendItem(legend, i, datas[i], legendObject.transform, chart.theme,
var item = LegendHelper.AddLegendItem(chart, legend, i, datas[i], legendObject.transform, chart.theme,
legendName, bgColor, active, readIndex);
legend.SetButton(legendName, item, totalLegend);
ChartHelper.ClearEventListener(item.button.gameObject);