This question is locked. New answers and comments are not allowed.
Hi,
I'm new to the Telerik-UI components.
I tried to make a charts which shows Incomes and Expenses as Bars next to each other for each month in a year.
The chart itself works perfectly, but unfortunately I can't change the color of the expense bar-series.
My Income should be LightGreen and my expenses IndianRed.
This is my xaml:
<telerikChart:RadCartesianChart x:Name="MoneyflowChart" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,20,0,0" Height="600"> <telerikChart:RadCartesianChart.HorizontalAxis> <telerikChart:CategoricalAxis> <telerikChart:CategoricalAxis.LabelFormatter> <formatter:MonthStringLabelFormatter/> </telerikChart:CategoricalAxis.LabelFormatter> </telerikChart:CategoricalAxis> </telerikChart:RadCartesianChart.HorizontalAxis> <telerikChart:RadCartesianChart.VerticalAxis> <telerikChart:LinearAxis/> </telerikChart:RadCartesianChart.VerticalAxis> <!--bar series for income--> <telerikChart:BarSeries ShowLabels="True"> <telerikChart:BarSeries.DefaultVisualStyle> <Style TargetType="Border"> <Setter Property="Background" Value="LightGreen"/> </Style> </telerikChart:BarSeries.DefaultVisualStyle> <telerikChart:BarSeries.CategoryBinding> <telerikChart:PropertyNameDataPointBinding PropertyName="Category"/> </telerikChart:BarSeries.CategoryBinding> <telerikChart:BarSeries.ValueBinding> <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/> </telerikChart:BarSeries.ValueBinding> </telerikChart:BarSeries> <!--bar series for expenses--> <telerikChart:BarSeries ShowLabels="True"> <telerikChart:BarSeries.DefaultVisualStyle> <Style TargetType="Border"> <Setter Property="Background" Value="IndianRed"/> </Style> </telerikChart:BarSeries.DefaultVisualStyle> <telerikChart:BarSeries.CategoryBinding> <telerikChart:PropertyNameDataPointBinding PropertyName="Category"/> </telerikChart:BarSeries.CategoryBinding> <telerikChart:BarSeries.ValueBinding> <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/> </telerikChart:BarSeries.ValueBinding> </telerikChart:BarSeries> </telerikChart:RadCartesianChart>
Outcome is currently, that both Bars are showing in LightGreen. I attached a picture.
What am I doing wrong? Or is there another way to change the color specifically for each series?
