AxisY.ConvertPhysicalUnitsToData returns negative value when AxisY is collapsed

2 posts, 1 answers
  1. Ramya
    Ramya avatar
    27 posts
    Member since:
    Jan 2011

    Posted 10 Nov 2011 Link to this post

    ((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????

  2. Answer
    Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 15 Nov 2011 Link to this post

    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 >>

Back to Top