I am using LiveCharts in WPF to create a Cartesian Chart with columns. The values come from a list which in turns is populated with values from a database.
Everything works fine except I would like each column to have a different fill. It does not matter what color, just a random color for each seperate column. Also, I do not want to create a new series for each value because there are too many values.
The Mappers method from the similar question does not work for me since the example changes color according to how high the value is. I want different colors for each different axis label.
This is the part of my code where I create the series:
cartesianChart.Series.Add(new ColumnSeries
{
Title = "Column Chart: ",
Fill = Brushes.CadetBlue,
Values = valuesList.AsChartValues(),
DataLabels = true,
LabelPoint = point => (point.Y).ToString(),
});
This is what the chart looks like:
Any ideas would be appreciated.