LiveCharts 更改图例名称的颜色 C# WinForms

LiveCharts change color for legend names C# WinForms

Graph

这是我的图表,显示了除“图例”区域以外的所有内容。我已经使用此代码来设置图例所在的位置。 cartesianChart1.LegendLocation = LegendLocation.Bottom;

此外,每次我添加新值时,我都会为每个值添加标题,它会按预期工作,如您所见: Values work but not on legend

如何更改图例中每个值的颜色? (黑色的图片放大后可以看得更清楚)

感谢 this 主题,我设法做到了

DefaultLegend customLegend = new DefaultLegend();
customLegend.Foreground = System.Windows.Media.Brushes.White;
cartesianChart1.DefaultLegend = customLegend;
cartesianChart1.LegendLocation = LegendLocation.Bottom;