Hi i’m plotting columnseries graph using chart controls by downloading Microsoft wpftoolkit.
I can able to draw the graph using my data but the background color of the bar was not changing.How to change the bar color to red instead of default LightSteelBlue color.
Here is my code
<Window x:Class="net.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:DVC="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:DV="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
Title="Window1" Height="800" Width="800" xmlns:my="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit">
<Grid>
<DVC:Chart Canvas.Top="80" Canvas.Left="10" Name="mcChart"
Width="800" Height="450" FontSize="12"
Background="DarkGray" Foreground="DarkRed">
<DVC:Chart.Series>
<DVC:ColumnSeries x:Name="Barchart" Title="Students"
ItemsSource="{Binding list}"
IndependentValueBinding="{Binding Path=Name}"
DependentValueBinding="{Binding Path=students}" >
</DVC:ColumnSeries>
</DVC:Chart.Series>
</DVC:Chart>
</Grid>
can any one tel me how to do this?.
Thanks in advance.
Please answer this.
In order to solve this problem, you can override the style.
usage
hope this helps you…