kelias Posted April 27, 2009 Report Share Posted April 27, 2009 I'm trying to implement behaviour similiar to google finance where a user moves the mouse over a chart and it tracks on each series and displays the values for each series on the top of the chart. I can use the HitTest method of the chart in the MouseMove event to determine when the user is in the Plot Area, but I can't find a nice way to determine what the value of each series should be. Is there a simple way to take a Point object and determine what value for each series would match with it? Quote Link to comment Share on other sites More sharing options...
JuanC Posted April 28, 2009 Report Share Posted April 28, 2009 The approach to get the value of each series depends on how are you passing the data to the chart - Is the X axis showing dates? - Are you using a gallery that supports X values? e.g in a line chart with points on the following dates: Jan 1, Jan 2 and Jan 18, the distance between the first 2 points will be smaller than the distance between the second and third point. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
kelias Posted May 4, 2009 Author Report Share Posted May 4, 2009 I'm using a line chart and the data is time series so the X is set to dates. Quote Link to comment Share on other sites More sharing options...
SameerKhan Posted July 16, 2009 Report Share Posted July 16, 2009 So, did you find a solution to your problem? Quote Link to comment Share on other sites More sharing options...
JuanC Posted July 16, 2009 Report Share Posted July 16, 2009 We build a small sample but forgot to add it to this thread. Hope it helps Note that this is important that the 2 private members (m_hasXData and m_differentCountPerSeries) are set according to your data, for example in the OnXValues handler we plot XY data (similar to what you are probably doing using dates) and each series have a different number of points so wet set both variables to true. JuanC Code and XAML attached. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.