We have an old method that used to search for a DataPoint and then display that position on the chart. DataPoint is no longer found. Has something changed about how data points are added.
Here's the code:
private void OnValueChanged(object sender, EventArgs e)
{
var xAxisValue = DateTime.FromOADate(_chartHorizontalAxisCursor.Value);
double yAxisValue = _chartVerticalAxisCursor.Value;
NHitTestResult hitTest = _chartControl.HitTest(_mouseXPoint, _mouseYPoint);
if (hitTest.ChartElement == ChartElement.DataPoint)
{
if (GetChartCategory(_resultsViewInfo.ChartType) == ChartCategory.Column)
{
toolTip1.SetToolTip(_chartControl, "Y:" + yAxisValue.ToString("N"));
}
else
{
toolTip1.SetToolTip(_chartControl, "X:" + xAxisValue.ToString("MMM dd hh:mm:ss tt") + ", Y:" + yAxisValue.ToString("N"));
}
}
else
{
//toolTip1.SetToolTip(_chartControl, "JR");
toolTip1.SetToolTip(_chartControl, "Y:" + yAxisValue.ToString("N"));
}
}