我想使用WPF为柱形图的每个系列或列提供不同的颜色。
ColumnSeries CL = new ColumnSeries();
CL.IndependentValueBinding = new Binding("Name");
CL.DependentValueBinding = new Binding("ActionValue");
//set Foreground color to series
Style styleSeries = new Style { TargetType = typeof(Control) };
styleSeries.Setters.Add(new Setter(Control.BackgroundProperty, System.Windows.Media.Brushes.LightSteelBlue));
CL.DataPointStyle = styleSeries;
SimulationChart.Series.Clear();
SimulationChart.Series.Add(CL);