Aspose.Slides.Examples.CSharp.Charts.SetCategoryAxisLabelDistance.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();

            Presentation presentation = new Presentation();

            // Get reference of the slide
            ISlide sld = presentation.Slides[0];

            // Adding a chart on slide
            IChart ch = sld.Shapes.AddChart(ChartType.ClusteredColumn, 20, 20, 500, 300);

            // Setting the position of label from axis
            ch.Axes.HorizontalAxis.LabelOffset = 500;

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