BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Dustin,
Query: I'm trying to change the line color on a line chart
We have analyzed your requirement and you can achieve your requirement by setting the property Interior for LineSeries as shown in the below code snippet.
Code Snippet [XAML]:
<chart:LineSeries Interior="Violet"
XBindingPath="Text" YBindingPath="Value" ItemsSource="{Binding
Data}"></chart:LineSeries>
Query: Same thing with the background and grid lines as well. They stay the same color
You can achieve your requirement to set the background for the chart area by setting the property AreaBackground for the chart and you also can able to set the color for gridlines by setting the property MajorGridLineStyle for the axes as shown in the below code snippet.
Code Snippet [XAML]:
<chart:SfChart
x:Name="chart" AreaBackground="BlanchedAlmond">
<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis MajorGridLineStyle="{StaticResource
gridLineStyle}"></chart:CategoryAxis>
</chart:SfChart.PrimaryAxis>
</chart:SfChart>
We have prepared a sample based on this and please find the attached sample.
Please let us know if you have any queries.
Thanks,
Mohammed Azarudeen.