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

AxisY.ConvertPhysicalUnitsToData returns negative value when AxisY is collapsed

1 Answer 25 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ramya
Top achievements
Rank 1
Ramya asked on 10 Nov 2011, 05:01 PM

((ChartArea)(sender)).AxisY.ConvertPhysicalUnitsToData(e.MouseData.GetPosition(SetElementType(e.OriginalSource)).Y) is returning unbelievable negative values when the AxisY visibility is collapsed. Is this a bug????

1 Answer, 1 is accepted

Sort by
0
Accepted
Yavor
Telerik team
answered on 15 Nov 2011, 08:58 AM
Hi Ramya,

When the Axis is collapsed it doesn't participate in the layout cycle of WPF. This means that it doesn't measure itself and thus the axis doesn't know how long or wide it is. When you call this method it uses some default values ant this explains the strange results you are getting. If you need this method consider making the axis visible at least at startup (so that it can measure).

All the best,
Yavor
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Ramya
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or