![]() I'm still at a loss as to how to make this work. ShpTracker stays closer than anything else I've tried once I move the mouse over the entire Plot Area. ![]() Me.Shapes("shpTracker").Visible = msoFalse Me.Shapes("shpTracker").Left = Me.PlotArea.InsideLeft + Int(((x - lngPlotAreaLeftX) / (lngPlotAreaRightX - lngPlotAreaLeftX)) * Me.PlotArea.InsideWidth) If lngPlotAreaLeftX = 0 Or x lngPlotAreaRightX Then Me.Shapes("shpTracker").Visible = msoTrue The GetMouseMovePointsEx function searches for the point in the mouse coordinates history. Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)ĪctiveChart.GetChartElement x, y, lngElementID, a, b Type: LPMOUSEMOVEPOINT A pointer to a MOUSEMOVEPOINT structure containing valid mouse coordinates (in screen coordinates). Private lngPlotAreaLeftX As Long, lngPlotAreaRightX As Long (GMT-07:00) Mountain Time (US & Canada) RE: Translating Mouse coordinates to Excel Chart position SkipVought (Programmer) 3 Aug 06 12:05 ![]() Thanks in advance for any input you can provide,įor the best results do what I'm thinking, not what I'm saying. I have tried using the x value directly, converting it with PointsToScreenPixelsX(), adjusting for Left property of the both the Plot Area and Chart, taken into account the Width properties and everytime I have something close I change the Zoom on the chart and I'm back at square one. So here's the question: Does anyone have a method for converting the x value from the MouseMove() event to a corresponding position in the Plot Area or Chart that I can use to set the Left property of Shape at run time? Working with the MouseMove() event I can get shpTracker to respond to the mouse movement and track across the chart, but I'm struggling to get shpTracker to line up with the mouse pointer on the screen. Double press the left Ctrl key or shake the mouse to activate a spotlight that focuses on the cursors position. ![]() Eventually the line position will update a 'dashboard' with statistics that correspond to the position of the vertical line within the Plot Area (phase 2). I'm working with a single chart sheet and want to create a vertical line ( shpTracker) that tracks the mouse pointer in the Plot Area of the chart. So I building a custom graphing engine in Excel (2000 SR-1/2003). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |