Hi,
I'm trying to create a solution based off the "Dynamic Number of Series" sample in the RadChartView documentation. My xaml looks like this:
<telerik:RadCartesianChart x:Name="chart">
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:LinearAxis Minimum="{Binding XAxisMin}" Maximum="{Binding XAxisMax}">
<telerik:LinearAxis.LabelStyle>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
</Style>
</telerik:LinearAxis.LabelStyle>
</telerik:LinearAxis>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis Minimum="{Binding YAxisMin}" Maximum="{Binding YAxisMax}">
<telerik:LinearAxis.LabelStyle>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
</Style>
</telerik:LinearAxis.LabelStyle>
</telerik:LinearAxis>
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.SeriesProvider>
<telerik:ChartSeriesProvider Source="{Binding MyVMs}">
<telerik:ChartSeriesProvider.SeriesDescriptors>
<telerik:ScatterSeriesDescriptor ItemsSourcePath="PointVMs" XValuePath="XValue" YValuePath="YValue">
<telerik:ScatterSeriesDescriptor.Style>
<Style TargetType="telerik:ScatterPointSeries">
<Setter Property="PointTemplate">
<Setter.Value>
<DataTemplate>
<Ellipse Width="10"
Height="10"
Fill="{Binding Path=DataItem.HighlightColor, RelativeSource={RelativeSource AncestorType=telerik:ChartSeriesProvider}}" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</telerik:ScatterSeriesDescriptor.Style>
</telerik:ScatterSeriesDescriptor>
</telerik:ChartSeriesProvider.SeriesDescriptors>
</telerik:ChartSeriesProvider>
</telerik:RadCartesianChart.SeriesProvider>
</telerik:RadCartesianChart>
I can't seem to find the right combination to gain access to the MyVM.HighlightColor so I can set the Fill in my DataTemplate. Is there a way to do this or is it a case of having to add the color over and over again inside each PointVM?
Thanks for an guidance,
Craig