If you want to display tooltips and you have Measurement Studio 7.1, you can do this by setting the ScatterGraph.ToolTipsEnabled to true. This will display a tooltip with the x and y data coordinate of the point when you hover the mouse over the point. You can customize the formatting of the x and y values via the ToolTipXFormat and ToolTipYFormat properties.
If you want to display a popup, you can handle the graph's PlotAreaMouseDown event, pass the X/Y property values of the event arguments to the graph's GetPlotAt method, and if the method returns a non-null reference, the mouse is over a data point. You can pass out parameters to the GetPlotAt method to receive the corresponding x and y data values. You could then format these values to display the coordinates in a popup. For example:
private void OnGraphPlotAreaMouseDown(object sender, MouseEventArgs e)
{
double xData, yData;
XYPlot plot = scatterGraph1.GetPlotAt(e.X, e.Y, out xData, out yData);
if (plot != null)
{
string message = String.Format("X: {0}, Y: {1}", xData, yData);
MessageBox.Show(message);
}
}
- Elton