Click here to Skip to main content
15,887,819 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my XAML code display the Bar Chart with One Default color. and displays only one series1

:(

i am referred this site : Windows 8 Chart Control in WPF sample in C#, VB.NET, XAML for Visual Studio 2012[^] c9727c28">Windows 8 Chart Control in WPF sample in C#, VB.NET, XAML for Visual Studio 2012[^])

i want to change the Bar chart color.like first Bar Chart yellow and second Bar Chart color Green.
and also want to change the series1 to IMPORT And SCAN



thanks in advance.

What I have tried:

<chartingToolkit:Chart Height="316" HorizontalAlignment="Right" Margin="0,38,405,0" Name="columnChart" Title="Column Chart" VerticalAlignment="Top" Width="330" Grid.Column="1">
                   <chartingToolkit:ColumnSeries DependentValuePath="Value"  IndependentValuePath="Key" ItemsSource="{Binding}" />
                   
                </chartingToolkit:Chart>
Posted
Updated 23-Aug-17 21:02pm
v2

1 solution

Answered the same question here a couple of days ago... Have a read of my comments: How to change WPF column chart color (how to give different color for column)[^]
 
Share this answer
 
Comments
ketan Ram Patil 24-Aug-17 3:33am    
<chartingToolkit:Chart Height="316" HorizontalAlignment="Right" Margin="0,38,405,0" Name="columnChart" Title="Column Chart" VerticalAlignment="Top" Width="330" Grid.Column="1">


<chartingToolkit:ColumnSeries Name="Scan"
Title="Scan"
DependentValuePath="Value"
IndependentValuePath="Key"
ItemsSource="{Binding}"

>
<chartingtoolkit:columnseries.datapointstyle>

&lt;Setter Property="Background" Value="#00777F"/>







i tried this code. it changes the color. But also it gives color to second column the same color. and add only one series :(

i want to add two series. and two column with different color.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900