Hi Gil,
You need to pass the position relative to the chart control - for example:
/// <summary>
/// Converts a dip to pixel
/// </summary>
/// <param name="dip"></param>
/// <returns></returns>
internal int Dip2Px(double dip)
{
double factor = (NResolution.ScreenResolution.DpiX / 96.0);
return (int)Math.Round(dip * factor);
}
private void NChartControl1_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
System.Windows.Point pos = e.GetPosition(nChartControl1);
NHitTestResult result = nChartControl1.HitTest(Dip2Px(pos.X), Dip2Px(pos.Y));
}
We'll also add a few helper methods to facilitate that...