Aspose.Slides.Examples.CSharp.Charts.SetAutomaticSeriesFillColor.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Charts();

            using (Presentation presentation = new Presentation())
            {
                // Creating a clustered column chart
                IChart chart = presentation.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 100, 50, 600, 400);

                // Setting series fill format to automatic
                for (int i = 0; i < chart.ChartData.Series.Count; i++)
                {
                    chart.ChartData.Series[i].GetAutomaticSeriesColor();
                }

                // Write the presentation file to disk
                presentation.Save(dataDir + "AutoFillSeries_out.pptx", SaveFormat.Pptx);
            }
        }
    }
SetAutomaticSeriesFillColor