Hi Daniel,
Yes - you simply need to find to index at which to place the value - for example:
private void Form1_Load(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
chart.BoundsMode = BoundsMode.Stretch;
NLineSeries line = new NLineSeries();
line.UseXValues = true;
chart.Series.Add(line);
AddDataPoint(line, 1, 1);
AddDataPoint(line, 3, 3);
AddDataPoint(line, 2, 2);
}
private void AddDataPoint(NLineSeries line, double x, double y)
{
int i;
for (i = line.XValues.Count - 1; i > 0; i--)
{
if ((double)line.XValues[i] < x)
{
break;
}
}
if (i < 0)
{
i = 0;
}
line.XValues.Insert(i, x);
line.Values.Insert(i, y);
}
Hope this helps...
Best Regards,
Nevron Support Team