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

AxisLine

2 Answers 56 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Mickael
Top achievements
Rank 1
Mickael asked on 04 May 2011, 08:38 AM
Hello,

I need to know the X and Y coordinates of the X axis and Y axis and I think it would benice if I could get "AxisX.AxisLine" and "AxisY.AxisLine"in order to know the limits of myPlotArea.

How can I do to have these coordinates X and Y.


Thank

2 Answers, 1 is accepted

Sort by
0
Mickael
Top achievements
Rank 1
answered on 05 May 2011, 01:20 PM
Sorry i'm use WPF.

Or i want directly get the rectangle PlotArea
0
Missing User
answered on 09 May 2011, 05:17 PM
Hello Mickael,

You can get the PlotArea by the extension method ChildrenOfType<ClipPanel>(). In order to use this extension, you need to include namespace reference to Telerik.Windows.Controls. For example:
var plotArea = RadChart.DefaultView.ChartArea.ChildrenOfType<ClipPanel>().FirstOrDefault();

After that you can get the coordinates of the PlotArea by TransformToAncestor method:
Point relativePoint = plotArea.TransformToAncestor(rootVisual).Transform(new Point(0, 0));
The rootVisual can be Application.Current.MainWindow or another Visual ancestor of the PlotArea.

I hope that this helps.


Kind regards,
Polina
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
Mickael
Top achievements
Rank 1
Answers by
Mickael
Top achievements
Rank 1
Missing User
Share this question
or