I'm following this example from LiveChart's documentation. The code looks like this:
<lvc:CartesianChart Margin="20" Series="{Binding SeriesCollection}" LegendLocation="Left">
<lvc:CartesianChart.AxisX>
<lvc:Axis Title="Salesman" Labels="{Binding Labels}"></lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Title="Sold Apps" LabelFormatter="{Binding Formatter}"></lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
And it looks perfect and will work perfectly for me, but there is one problem. How to change fill
color of a ColumnSeries
in this example? As I said before, I'd rather not implement another chart, because it works perfect for me, but I don't know how to change that Fill
color.
I didn't find a similar question in SO.
EDIT
Working solution:
<lvc:CartesianChart Margin="20" Series="{Binding SeriesCollection}" LegendLocation="Left">
<lvc:CartesianChart.SeriesColors>
<lvc:ColorsCollection>
<Color>Green</Color>
</lvc:ColorsCollection>
</lvc:CartesianChart.SeriesColors>
<lvc:CartesianChart.AxisX>
<lvc:Axis Title="Salesman" Labels="{Binding Labels}"></lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Title="Sold Apps" LabelFormatter="{Binding Formatter}"></lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>