Hi,
I've followed the example here to colour each point of my BarSeries, but I can't make it work. Instead, all the points have turned invisible. The only difference I've noticied between my code and the example is that I use a ChartDataSource object as my points' source, instead of directly binding my collection to the property ItemsSource.
This is my relevant code:
<
telerik:ChartDataSource
Grid.Column
=
"1"
x:Name
=
"VolumeChartDataSource"
ItemsSource
=
"{Binding VolumeSerie}"
/>
Then, on the series definition:
<
telerik:RadCartesianChart.Series
>
<
telerik:BarSeries
x:Name
=
"VolumeS"
ItemsSource
=
"{Binding ElementName=VolumeChartDataSource}"
ValueBinding
=
"Y"
CategoryBinding
=
"X"
>
<
telerik:BarSeries.RenderOptions
>
<
telerik:Direct2DRenderOptions
/>
</
telerik:BarSeries.RenderOptions
>
<
telerik:BarSeries.PointTemplate
>
<
DataTemplate
>
<
Rectangle
Fill
=
"{Binding Path=DataItem.Color}"
/>
</
DataTemplate
>
</
telerik:BarSeries.PointTemplate
>
</
telerik:BarSeries
>
</
telerik:RadCartesianChart.Series
>
The datapoint class inside VolumeSerie has the properties X, Y and Color, all already set.
Am I missing something?
Thanks,
Jonathan.