Menu

get all points on x-value

Help
Dominik F.
2009-01-15
2012-09-19
  • Dominik F.

    Dominik F. - 2009-01-15

    hi,

    i'd like to get the y-value for each curve in the graphpane to a given x-value (e.g. the mouse-position).
    is there an easy way to realize this?

    thanks!

     
    • Dominik F.

      Dominik F. - 2009-02-02

      Thank you for your answer!

      "You do not say if this is something you want continuously displayed, or just for a selected point. Continuously retrieving this information using the above method my result in a big performance hit though"

      That's exactly my problem. I'd like to display this data continously, when the user is moving moving a cursor (not the mouse-cursor, a special vertical line that i inserted) over the chart.
      but this line will only be moved in situations, when the user wants to determine the curves values with this line. I will try and do this with these methods and test the performance.

      regards

       
    • Dominik F.

      Dominik F. - 2009-01-22

      (sorry)
      does really nobody have an idea?

       
    • mark120

      mark120 - 2009-01-31

      Hi

      I assume you have looked at the IsShowPointValues property of the ZedGraphControl?

      If you have, and this doesn't meet your needs, have you had a look at this?

      http://zedgraph.org/wiki/index.php?title=Show_the_(X%2CY)_Cursor_Location_in_a_Status_bar

      This allows the X and Y coordinates of the mouse to display in a status bar. It should be possible to modify this to provide you with the LineItem Y value. There are a number of methods that you could use to do this from the method described on the above link, to capturing the X value and iterating the PointPairList/DataSourcePointPairList to find the index of the captured X value. From here you can retrieve the Y value from the underlying datasource.

      You do not say if this is something you want continuously displayed, or just for a selected point. Continuously retrieving this information using the above method my result in a big performance hit though

      Regards

      Mark

       

Log in to post a comment.

MongoDB Logo MongoDB