Hi Noah,
We just tested a similar case with the following code, but we were not able to reproduce the problem. The DataPointIndex seems to be reported properly regardless of whether the data labels are visible or not. Are there any particular settings that we are missing?
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
NBoxAndWhiskersSeries bw = new NBoxAndWhiskersSeries();
bw.DataLabelStyle.Visible = false;
bw.UseXValues = true;
nChartControl1.Charts[0].Series.Add(bw);
nChartControl1.MouseMove += new MouseEventHandler(nChartControl1_MouseMove);
AddBox(bw, 0, 100, 203, 60, 230);
AddBox(bw, 1, 130, 230, 50, 250);
AddBox(bw, 2, 110, 200, 60, 220);
AddBox(bw, 3, 90, 220, 40, 230);
AddBox(bw, 4, 110, 210, 30, 220);
AddBox(bw, 5, 100, 205, 70, 230);
}
void AddBox(NBoxAndWhiskersSeries bw, double x, double lb, double ub, double lw, double uw)
{
bw.LowerBoxValues.Add(lb);
bw.UpperBoxValues.Add(ub);
bw.LowerWhiskerValues.Add(lw);
bw.UpperWhiskerValues.Add(uw);
bw.XValues.Add(x);
}
void nChartControl1_MouseMove(object sender, MouseEventArgs e)
{
NHitTestResult hitTest = nChartControl1.HitTest(e.X, e.Y);
if ((hitTest.ChartElement == ChartElement.DataPoint) && (hitTest.Series.GetSeriesType() == SeriesType.BoxAndWhiskers))
this.Text = hitTest.DataPointIndex.ToString();
else
this.Text = string.Empty;
}
}
Best Regards,
Nevron Support Team