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

Convert data to position.

4 Answers 86 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 1
Michael asked on 17 Jul 2012, 08:31 AM
Hi,



I was wondering if there is a possibility to convert the position of the pointer(i.e. inside of the PointerMove event) to the data.

I need something similar to the GDP Chart in your example where I have Dates on the X axis and some values on Y. I would like to get the Date from the pointer position.

I know that the Silverlight Version had the method ConvertPhysicalUnitsToData.



Regards,

Michael

4 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 17 Jul 2012, 09:49 AM
Hi,

 Thank you for your interest in our Win8 controls.

As I understand you are looking to something similar as out chart first look Demo (available in our control installation). It uses ChartTrackBallBehavior and its TrackInfoUpdated event (it provides info for all points under the pointer as well as the correct physical position). In addition it is triggered by mouse move or pointer hold + drag, thus supporting touch manipulations as well.

Let us know if this fits in your scenario. If you have any further questions do not hesitate to contact us.

Regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Michael
Top achievements
Rank 1
answered on 17 Jul 2012, 11:39 AM
Hi,



thank you for the answer.

the problem with this solution is that, for some reason, the TrackInfoUpdated Event doesn't fire if you press the mouse button first (PointerPressed Event) and then move the "pressed" pointer. It doesn't fire when i'm holding the pressed mouse button...



Regards,

Michael
0
Tsvyatko
Telerik team
answered on 17 Jul 2012, 02:07 PM
Hi Michael,

Indeed, trackball hides when mouse is pressed and thus it does not raise TrackInfoUpdated Event. In order to remove this suppression I can suggest to inherit ChartTrackball behavior and override its OnPointerPressed method leaving it empty (do not call base implementation).

In addition, we have discussed on this scenario and since this solution is not intuitive at all we will add method for direct extraction of the data from given physical point in the ChartBehavior class:

protected virtual ChartDataContext GetDataContext(Point physicalOrigin)

This extension will be available in our next official version (release date is TBD).


If you have any further questions or issues do not hesitate to contact us.

Regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Michael
Top achievements
Rank 1
answered on 17 Jul 2012, 03:14 PM
Thank you!
Tags
Chart for XAML
Asked by
Michael
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Michael
Top achievements
Rank 1
Share this question
or