Hi Leo,
For this purpose you will have to determine how the logical units map to actual screen pixels. The following code snippet shows how to acheive this:
nChartControl1.Document.Calculate();
nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);
NChart chart1 = nChartControl1.Charts[0];
NAxis xAxis = chart.Axis(StandardAxis.PrimaryX);
NAxis yAxis = chart.Axis(StandardAxis.PrimaryY);
NRange1DD xRulerRange = xAxis.Scale.RulerRange;
NRange1DD yRulerRange = yAxis.Scale.RulerRange;
NRange1DF xModelRange = xAxis.Scale.Ruler.LogicalToScale(xRulerRange);
NRange1DF yModelRange = yAxis.Scale.Ruler.LogicalToScale(yRulerRange);
float xPixelsPerUnit = (float)(xModelRange.GetLength() / xRulerRange.GetLength());
float yPixelsPerUnit = (float)(yModelRange.GetLength() / yRulerRange.GetLength());
m_Point.ClusterDistanceFactor = 0.5 / Math.Max(xPixelsPerUnit, yPixelsPerUnit);
If the number of data points is too large there is a more efficient implementation and it is to resample the data using a bitmap of some sort. This will always perform with linear speed instead of n log (n) speed which is the case with the cluster at the expense of more memory in the general case.
Hope this helps - let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team