Q:

Top 5 (MAX) values in mschart

I have made a chart with MSchart, how do I show the top 5 (MAX) values of mi datatable in the chart. 
My chart shows 18 rows I want to show only 5 rows ordered by values (desc). 

A:

If you have a DataTable that has an "x" and a "y" column, and you want to chart the x and y values for the 5 largest values of y, you could use a DataView to sort your DataTable, then loop through the five rows and put them in the chart:
// assuming dt is your DataTable with an "x" and "y" column
var dv = new DataView(dt);
dv. Sort = "y desc";

for (int count = 0; count < 5; count++ )
{
    chart1.Series[0].Points. AddXY(dv[count][0], dv[count][1]);
}

Edit
There might be a simpler way to do this.   Just add all your data as you normally would, then use the DataManipulator:
chart1.DataManipulator. FilterTopN(5, "SeriesName");

I hadn't used that until today, but it seems to do exactly what you're after.