This question is locked. New answers and comments are not allowed.
I am attempting to place a text annotation against a CustomLine using the method outlined in the forum article below:
http://www.telerik.com/community/forums/silverlight/chart/annotation-text-on-customline.aspx
This works fine if the line intersects with the X-Axis within the display area of the chart or if the slope is 0, however if the line has a slope that intersects with the Y-Axis the text is not shown.
The reason is that the XElement property of CustomLine is a large negative value that pushes the text off screen
Could you please advise how to place text annotation on this type of line.
I modified the sample in the above forum post to illustrate the problem.
MainPage.xaml.cs
for (int i = 2; i < 50; i++)
{
DummyDataItem item = new DummyDataItem();
item.YValue = rand.Next(2000, 4000)/1000;
item.XValue = i + 1;
dataCollection.Add(item);
}
MainPage.xaml
<
telerik:CustomLine
Style
=
"{StaticResource gridLineStyle}"
DataContext
=
"Test"
Stroke
=
"Red"
Slope
=
"0.01"
YIntercept
=
"2.55"
/>