This question is locked. New answers and comments are not allowed.
Hi All,
I have a chart which is binded to nearly 50 datapoints. I want to display annotation for some of the datapoints when the chart is zoomed. Showing annotations in normal state is fine if the datapoints are less. But how to display the annotation when the chart is zoomed?
It shows the annotation at the top left corner when the page is loaded and the annotation position does not changes when the chart is zoomed. Can someone tell me how to display the annotation at a particular datapoint after the chart is zoomed?
I have a chart which is binded to nearly 50 datapoints. I want to display annotation for some of the datapoints when the chart is zoomed. Showing annotations in normal state is fine if the datapoints are less. But how to display the annotation when the chart is zoomed?
<
telerikChart:RadCartesianChart
PaletteName
=
"DefaultDark"
x:Name
=
"LineSeries"
>
<
telerikChart:RadCartesianChart.HorizontalAxis
>
<
telerikChart:CategoricalAxis
/>
</
telerikChart:RadCartesianChart.HorizontalAxis
>
<
telerikChart:RadCartesianChart.VerticalAxis
>
<
telerikChart:LinearAxis
/>
</
telerikChart:RadCartesianChart.VerticalAxis
>
<
telerikChart:LineSeries
ItemsSource
=
"{Binding Items}"
>
<
telerikChart:LineSeries.CategoryBinding
>
<
telerikChart:PropertyNameDataPointBinding
PropertyName
=
"Category"
/>
</
telerikChart:LineSeries.CategoryBinding
>
<
telerikChart:LineSeries.ValueBinding
>
<
telerikChart:PropertyNameDataPointBinding
PropertyName
=
"Value"
/>
</
telerikChart:LineSeries.ValueBinding
>
</
telerikChart:LineSeries
>
<
telerikChart:RadCartesianChart.Annotations
>
<
telerikChart:CartesianCustomAnnotation
HorizontalValue
=
"100"
VerticalValue
=
"30"
Content
=
"Custom content"
ContentTemplate
=
"{StaticResource annotationTemplate}"
ClipToPlotArea
=
"False"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
/>
</
telerikChart:RadCartesianChart.Annotations
>
<
telerikChart:RadCartesianChart.Behaviors
>
<
telerikChart:ChartPanAndZoomBehavior
/>
</
telerikChart:RadCartesianChart.Behaviors
>
</
telerikChart:RadCartesianChart
>
for (var i = 0; i < 150; i++)
{
this.Items.Add(new Data { Value = rand.Next(5, 40), Category = i });
}
Items[100].Value = 30;
It shows the annotation at the top left corner when the page is loaded and the annotation position does not changes when the chart is zoomed. Can someone tell me how to display the annotation at a particular datapoint after the chart is zoomed?