I am getting exception “Index was out of range. Must be non-negative and less than the size of the collection.” while trying to add DataSeries for charts.
int nSeriesIndex = toDrawchart.NSeries.Add(charts.RangeArea, true);
The range areas is “__object0x3acounter!B2:B9”,
What can be the possible reasons of getting this error?