Perhaps this will help?!
<pre lang="cs">private void LoadCharts(ChartKind chartKind) {
int[] yval = new int[_stats.Count];
string[] xval = new string[_stats.Count];
switch (chartKind) {
case ChartKind.Count:
for (int i = 0; i < _stats.Count; i++) {
yval[i] = int.Parse(_stats[i].Count);
xval[i] = _stats[i].Name;
}
break;
case ...
}
chart.Series["Serie"].Points.DataBindXY(xval, yval);
chart.Series["Serie"].LegendText = chartKind.ToString();
}