I have a Cartesian chart as follows:
I'm setting the colour of each individual Bar in the BarSeries via an IValueConverter (blue for positive, red for negative) using a BrushCollection defined in the UserControl's resources passed into the Value Converted.
It works very nicely!
The Chart is bount to an ObservableCollection<t> of items implemention INotofyPropertyChanged. When the values change, the graph does indeed update - but it never calls the Color Converter and it the value goes from - to + or the other way around it ends up with the wrong colour.
I can't see how to force this update. Is there a way?
Thanks -
<
telerik:RadCartesianChart
x:Name
=
"chart"
Grid.Column
=
"0"
>
<
telerik:RadCartesianChart.Series
>
<
telerik:BarSeries
ItemsSource
=
"{Binding DataItems}"
ValueBinding
=
"Value"
CategoryBinding
=
"DayPeriod"
>
<
telerik:BarSeries.PointTemplate
>
<
DataTemplate
>
<
Rectangle
Fill
=
"{Binding Converter={StaticResource BrushConverter}, ConverterParameter={StaticResource brushes}}"
/>
</
DataTemplate
>
</
telerik:BarSeries.PointTemplate
>
</
telerik:BarSeries
>
</
telerik:RadCartesianChart.Series
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
Minimum
=
"{Binding MinValue}"
Maximum
=
"{Binding MaxValue}"
MajorStep
=
"{Binding StepSize}"
LabelStyle
=
"{StaticResource axisLabelStyle}"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
LabelFitMode
=
"Rotate"
LabelInterval
=
"2"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
</
telerik:RadCartesianChart
>
I'm setting the colour of each individual Bar in the BarSeries via an IValueConverter (blue for positive, red for negative) using a BrushCollection defined in the UserControl's resources passed into the Value Converted.
It works very nicely!
The Chart is bount to an ObservableCollection<t> of items implemention INotofyPropertyChanged. When the values change, the graph does indeed update - but it never calls the Color Converter and it the value goes from - to + or the other way around it ends up with the wrong colour.
I can't see how to force this update. Is there a way?
Thanks -