Mouse location to graph scale |
Post Reply |
Author | |
BLW
Groupie Joined: 20 June 2013 Location: Florida, USA Status: Offline Points: 13 |
Post Options
Thanks(0)
Posted: 20 June 2013 at 10:10am |
Hi, I'm trying to develop a drag-drop concept with a bar chart. We have a threshold parameter that we plot on the graph along with results. The idea is to allow the user to "grab" the threshold and drag it to a new setting directly on the graph.
I have figured out most of the steps involved. But I have not been able to locate a conversion between a mouse location on the screen and an X-Y graph scale value. I'm using "HitTest()" to figure out which series and element is being pointed at. But that isn't quite what I need. I believe that I found some internal logic that might work (see specifics below), but I do not see how to get access to that information. In XTPChartStackedBarSeriesStyle.cpp, function GetScreenRect() they call a function GetScreenPoint() which converts a scaled XY value to image coordinates. From that I could compute the scale and get the drag-drop logic to work. But this is a Style operation and that appears to be dynamically created in OnPaint() and is not available to access. What I really need is a function similar to HitTest() to get the conversion back and forth between a screen location and scales series value. Thank you, Brad
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |