Visual Studio 2017 C++, capture chart point values with a mouse click

  • Thread starter Thread starter Joseer
  • Start date Start date
J

Joseer

Guest
Hello,

I've got a GUI with a chart which displays some values/points and I'm trying to capture a point when I'm clicking or passing over one of those points with the mouse.

I'm able to capture the position and mouse pointer coordinates on the chart using MouseMove method but I cannot find the one to get the displayed points:

private: System::Void chart1_MouseMove(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e)
{
MouseEventArgs ^ms = (MouseEventArgs^)e;
xcurrcal = (ms->X);
ycurrcal = (ms->Y);
int X = xcurrcal;
int Y = ycurrcal;

label16->Text = "Cursor: (" + X.ToString() + "," + Y.ToString() + ")";
}

Any idea how to capture the current displayed chart points ?

Thanks in advance.




Continue reading...
 
Back
Top