Créer un graphique à barres empilées

Je suis en train de créer un graphique à barres empilées ,
Mais j'obtiens une erreur dans les lignes qui a ".Série " (Comment définir la Série ? )

    SeriesChartType chart1 = new SeriesChartType();

    //Populate series data
    Random random = new Random();

    for (int pointIndex = 0; pointIndex < 10; pointIndex++)
    {
        chart1.Series["LightBlue"].Points.AddY(random.Next(45, 95));
    }

    //Set chart type
    chart1.Series["LightBlue"].ChartType = SeriesChartType.StackedArea100;

    //Show point labels
    chart1.Series["LightBlue"].IsValueShownAsLabel = true;

    //Disable X axis margin
    chart1.ChartAreas["Default"].AxisX.IsMarginVisible = false;

    //Set the first two series to be grouped into Group1
    chart1.Series["LightBlue"]["StackedGroupName"] = "Group1";
    chart1.Series["Gold"]["StackedGroupName"] = "Group1";

    //Set the last two series to be grouped into Group2
    chart1.Series["Red"]["StackedGroupName"] = "Group2";
    chart1.Series["DarkBlue"]["StackedGroupName"] = "Group2";

OriginalL'auteur m4n07 | 2011-07-10