private void chart1_MouseDown(object sender, MouseEventArgs e)
{
//hittestresult hit = chart1.hittest(e.x, e.y);
//text = "element : " + hit.chartelementtype;
//datapoint dp = null;
//if (hit.chartelementtype == chartelementtype.datapoint)
//{
// //--hittest result...
// dp = hit.series.points[hit.pointindex];
// if (dp != null)
// {
// text += " point #" + hit.pointindex + " x-value:" + dp.xvalue + " y-value: " + dp.yvalues[0];
// messagebox.show("text = " + text);
// }
//}
if (e.Button == MouseButtons.Right)//on right mouse button is clicked.
{
//we need to show context menu strip
//MessageBox.Show("Right pressed");
//--this is calculated based on this location the graphics will be plotted..
xCoord = e.Location.X;
yCoord = e.Location.Y;
//contextMenuStrip1.Show(MousePosition);//--This is dissabled
CMSinsertNode.Show(MousePosition);//-- this mouse position is used to show the menustrip in mouse pointer
}
}