This is a migrated thread and some comments may be shown as answers.

Gridline Annotaion on Click

2 Answers 50 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Klemens
Top achievements
Rank 1
Klemens asked on 29 Oct 2013, 06:23 AM
Hi,
is it possible to add a vertical gridline annotation when the user clicks in the plot area?

Regards Markus

2 Answers, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 01 Nov 2013, 04:06 PM
Hi Markus,

I have attached a sample project, where you can find an implementation of dynamic adding of Annotation to the ChartView by user click.

There are some things which you can take into consideration. The ChartView has an event MouseLeftButtonDown which you can use for adding the Annotation to the ChartView. If you want to add it to the current position of the mouse, you should use ConvertPointToData method, which takes a System.Windows.Point as an argument (position on the screen) and returns an object of type DataTuple. 
The two properties of the DataTuple class (FirstValue and SecondValue) represent the coordinates on the Horizontal and the Vertical axes of the RadCartesianChart. 

I hope this helps.

Regards,

Milena
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>

take into consideration
take into consideration
0
Klemens
Top achievements
Rank 1
answered on 04 Nov 2013, 09:51 AM
Perfect thank you!

Regards Markus
Tags
ChartView
Asked by
Klemens
Top achievements
Rank 1
Answers by
Milena
Telerik team
Klemens
Top achievements
Rank 1
Share this question
or