Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
Custom Series ToolTip issue
posted

Following the custom series example: http://help.infragistics.com/Help/NetAdvantage/WPF/2012.2/CLR4.0/html/xamDataChart_Creating_Custom_Series.html

The GetItem tooltip example does not work when the chart is zoomed in.  You can also see this behaviour in the Samples Browser.  If you zoom in with the scroll wheel on the custom series the ToolTips are either misplaced or don't show at all.  What would I have to do with my custom series to solve this issue?

Parents
No Data
Reply
  • 355
    Verified Answer
    posted

    OK, to properly get the cursor point when the chart is zoomed in, the line in the tutorial should be...

    Point cursorPoint = new Point(
       (worldPoint.X - this.SeriesViewer.ActualWindowRect.Left) * this.Viewport.Width / this.SeriesViewer.ActualWindowRect.Width,
       (worldPoint.Y - this.SeriesViewer.ActualWindowRect.Top) * this.Viewport.Height / this.SeriesViewer.ActualWindowRect.Height
    );

    instead of...

    Point cursorPoint = new Point(
       this.SeriesViewer.ViewportRect.Width * worldPoint.X,
       this.SeriesViewer.ViewportRect.Height * worldPoint.Y
    );

Children