Hello,
I would like my chart to consists of a LineSeries that does not have labels shown on every node. For this, I have bound the ItemsSource of the LineSeries to an ObservableCollection<MyCrazyLineNode>. MyCrazyLineNode has Properties for the Value, the Category and an additional Property "IsValueVisible".
I tried to accomblish this by setting "ShowLabels" to "False" and define my own labels in the PointTemplate.
My code looks similar to this:
However, this does not work, because I cannot bind to the Property IsValueVisible.
How can I do what I want? I hope my problem is understandable. ;-)
Best Regards
Michael
I would like my chart to consists of a LineSeries that does not have labels shown on every node. For this, I have bound the ItemsSource of the LineSeries to an ObservableCollection<MyCrazyLineNode>. MyCrazyLineNode has Properties for the Value, the Category and an additional Property "IsValueVisible".
I tried to accomblish this by setting "ShowLabels" to "False" and define my own labels in the PointTemplate.
My code looks similar to this:
<telerik:LineSeries ItemsSource="{Binding MyCrazyLineNodes}" ValueBinding="Value" CategoryBinding="Category" ShowLabels="False"> <telerik:LineSeries.PointTemplate> <DataTemplate> <Grid> <Canvas Margin="0,10,0,0" Visibility="{Binding IsValueVisible, [Converter stuff...}"> <TextBlock Text="{Binding Value}" /> </Canvas> <Path Data="M4,0 L8,4 L4,8 L0,4 Z" Fill="Red" Width="8" Height="8" Stretch="Fill" /> </Grid> </DataTemplate> </telerik:LineSeries.PointTemplate> <AxisStuffAndSoOn /></telerik:LineSeries>However, this does not work, because I cannot bind to the Property IsValueVisible.
How can I do what I want? I hope my problem is understandable. ;-)
Best Regards
Michael