I am using TChart controls that come with Delphi 7 and Want to get the series and values # of the row / bar under the mouse pointer
I'm getting an idea from the onclick shower event that provides great information, but I really need this information when I <
edit: I have found the best method at TChart which works with many series in any type of series and a chart, so I have posted it and made it my accepted answer. Special thanks to Gym for your efforts.
You can check onChartMouseMove (or OnSeriesMoveMove)
Process TForm5.Chart1MouseMove (Sender: tobjewitt; shift: tshftstate; x, y: integer); Var i: integer; I started: = Series1.CalcClickedPie (x, y); // i = Index of data-1 checked for any memo 1. Lines Add (IntotoArt (I)); End;
OK, my bad, the code for the bar is different (even easier):
process TForm5.Chart1MouseMove (Sender: Tubect; Shift: TShiftState; X, Y: integer); Var i: integer; I started: = Series1.GetCursorValueIndex; Memo1.Lines.Add (IntToStr (i)); End;
Comments
Post a Comment