Hello,
I'm creating a custom ScatterLineSeries to simulate annotations in his own series. For this, I am register the load event of the series and look for the first canvas (serie.FindChildByType<Canvas>()) to add elements.
How do I calculate the coordinates corresponding to a DataPoint on canvas?
Thanks
I'm creating a custom ScatterLineSeries to simulate annotations in his own series. For this, I am register the load event of the series and look for the first canvas (serie.FindChildByType<Canvas>()) to add elements.
How do I calculate the coordinates corresponding to a DataPoint on canvas?
Thanks
3 Answers, 1 is accepted
0
Hello Claudio,
I am unsure why you need to use a series to mimic annotations. Is it possible that you use the annotations that the chart ships with? We have grid line annotations, custom annotations, plot band annotations, marked zone annotations and custom line annotations (examples here and here, help topic here).
You can use the conversion api of the chart to determine the position of a tuple of values. Check the ConvertDataToPoint method of the chart. However, note that the Loaded event might be to early for the chart because at that time it might not yet know its final size. I guess you can use the SizeChanged event instead. Let us know how it goes.
Regards,
Petar Marchev
Telerik
I am unsure why you need to use a series to mimic annotations. Is it possible that you use the annotations that the chart ships with? We have grid line annotations, custom annotations, plot band annotations, marked zone annotations and custom line annotations (examples here and here, help topic here).
You can use the conversion api of the chart to determine the position of a tuple of values. Check the ConvertDataToPoint method of the chart. However, note that the Loaded event might be to early for the chart because at that time it might not yet know its final size. I guess you can use the SizeChanged event instead. Let us know how it goes.
Regards,
Petar Marchev
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 >>
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 >>
0
Claudio
Top achievements
Rank 1
answered on 17 Jul 2013, 10:50 AM
I have the version 2012.3.1404.40 that does not have the marked zone annotations and conversion API has no method ConvertDataToPoint. Only have the method ConvertPointToData.
How do I create the behavior of the method ConvertDataToPoint?
Thanks
How do I create the behavior of the method ConvertDataToPoint?
Thanks
0
Hi Claudio,
We strongly suggest that you update to the latest version of our controls as we have introduced the features that you now need and have improved the behavior of our controls by removing numerous bug fixes.
I have attached a simple project to demonstrate how you can use the ActualRange property of the LinearAxis to find the relative position of given data. Later you can use the PlotAreaClip property of the chart to find the absolute position of the data in mind.
Regards,
Petar Marchev
Telerik
We strongly suggest that you update to the latest version of our controls as we have introduced the features that you now need and have improved the behavior of our controls by removing numerous bug fixes.
I have attached a simple project to demonstrate how you can use the ActualRange property of the LinearAxis to find the relative position of given data. Later you can use the PlotAreaClip property of the chart to find the absolute position of the data in mind.
Regards,
Petar Marchev
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 >>
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 >>