Results 1 to 3 of 3

Thread: [2005] NPlot - If you know how to use it ...please help!

  1. #1

    Thread Starter
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    [2005] NPlot - If you know how to use it ...please help!

    Hello there,

    I am using Nplot at the moment, all is fine and well but I am trying to capture the co ordinates of where the user clicks on the graph.

    I can see the co ordinates when i float over the graph, but i cant seem to find the class which shows the co ordinate in a little tooltip by the mouse cursor.

    ANyone help ???

    CHeers
    If you find my thread helpful, please remember to rate me

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] NPlot - If you know how to use it ...please help!

    If that functionality has been declared Friend ('internal' in C#, which was probably the development language) then you won't be able to see it. I've never used NPlot but if it involves placing a control on your form then you should be able to use the members of the Control class. All the mouse-related events of the Control class give you cursor coordinates. As a last resort you can use the Cursor.Position property to get the cursor location in screen coordinates and then use the PointToClient method of the appropriate control to get that point in relation to that control.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Lively Member
    Join Date
    Aug 2011
    Posts
    105

    Re: [2005] NPlot - If you know how to use it ...please help!

    This may come a bit late (and is in C#):

    Code:
                MouseEventArgs eA = (MouseEventArgs)e;
    
                // Calculate data value
                Point here = new Point(eA.X, eA.Y);
                double x = this.plotFull.PhysicalXAxis1Cache.PhysicalToWorld(here, true);
                double y = this.plotFull.PhysicalYAxis1Cache.PhysicalToWorld(here, true);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width