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

Need to position object relative to chart

6 Answers 114 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rich Geyer
Top achievements
Rank 1
Rich Geyer asked on 21 Jun 2010, 06:37 PM
Hey guys,

First off I am using Radcontrols for SL Q1 2010 SP2 and I am essentially trying to place lines that go from the point markers on my line graph to the edges of the graph's axis. My plan was to simple place a rectangle accordingly. My problem is that I can't find any way to reference any kind of position of any piece of the graph. For instance if I could get the position of the origin relative to the chart then I could place my rectangle, or the position of any of the point markers would also work. Right now all I can seem to get is the width and height of the entire chart, including axes and legend, which doesn't help. I'm not sure if there is a solution to this right now, but hopefully someone knows of something I can use.

Other solutions besides trying to place a rectangle (like using some Telerik feature I'm unaware) are also welcome.

Thanks a lot,

- Rich Geyer

6 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 24 Jun 2010, 02:39 PM
Hi Rich Geyer,

The Axis class now has a method called: ConvertDataUnitsToPhysical accepting logical (axis data units) and it converts them to physical distance. Both AxisX and AxisY classes support this functionality. Maybe this will help.

All the best,
Vladimir Milev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rich Geyer
Top achievements
Rank 1
answered on 24 Jun 2010, 02:48 PM
Hello again and thank you for the reply,

Yes, the ConvertDataUnitsToPhysical will give me the actual length of a certain range based off an axis which is great and I have been using it, but it still doesn't completely help. Let's say I have a point at (3, 200). I can use ConvertDataUnitsToPhysical to get the actual axis dimensions of that point but these are based off the origin and since I can't determine where the origin is I still can't place things appropriately. If I could get the origin's position to be some point in my grid then I can simply add the axis dimensions that I get to that point and my everything would be fixed.

Hopefully I'm making sense and thanks a lot for your help,

- Rich Geyer
0
Ves
Telerik team
answered on 30 Jun 2010, 08:05 AM
Hi Rich Geyer,

I can see your point and I have to agree with you. If the chart values you are plotting are in the same order, you can have a static AxisY, so you will be able to add an additional amount of pixels to the result of AxisX.ConvertDataUnitsToPhysical.

I have logged this as a feature request in our public issue tracking system.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rich Geyer
Top achievements
Rank 1
answered on 01 Jul 2010, 03:08 PM
Thank you for the reply,

Unfortunately, I could not use a static access as I was binding all kinds of different data to the chart which was constantly changing the size of the axes. Thank you for the feature request and I will keep my eye out for it,

- Rich Geyer
0
Rich Geyer
Top achievements
Rank 1
answered on 21 Jul 2010, 06:01 PM
Hey guys,

I was wondering if the new Q2 2010 release might have added some functionality for this problem,

Thanks,

- Rich Geyer
0
Velin
Telerik team
answered on 27 Jul 2010, 11:11 AM
Hello Rich Geyer,

Unfortunately, the development team reported that there is no new development concerning this issue.

Please, accept my apologies for this inconvenience.

Kind regards,
Velin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Rich Geyer
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Rich Geyer
Top achievements
Rank 1
Ves
Telerik team
Velin
Telerik team
Share this question
or