From 09c42fe3f1e25564ee1880e9b0c45f95145b8e39 Mon Sep 17 00:00:00 2001 From: DharanitharanA <97955635+DharanitharanA@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:44:30 +0530 Subject: [PATCH] 895952-Added AutoScale code snippet for PowerPoint Chart --- File-Formats/Presentation/Working-with-Charts.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/File-Formats/Presentation/Working-with-Charts.md b/File-Formats/Presentation/Working-with-Charts.md index 713792ec5..d6684120a 100644 --- a/File-Formats/Presentation/Working-with-Charts.md +++ b/File-Formats/Presentation/Working-with-Charts.md @@ -647,6 +647,10 @@ chart.Rotation = 80; chart.SideWall.Shadow.Angle = 60; //Sets the back wall border weight chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow; +//Set the right angle axes property of the chart +chart.RightAngleAxes = true; +//Set the auto scaling of chart +chart.AutoScaling = true; //Save the PowerPoint Presentation as stream FileStream outputStream = new FileStream("Output.pptx", FileMode.Create); pptxDoc.Save(outputStream); @@ -669,6 +673,10 @@ chart.Rotation = 80; chart.SideWall.Shadow.Angle = 60; //Sets the back wall border weight chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow; +//Set the right angle axes property of the chart +chart.RightAngleAxes = true; +//Set the auto scaling of chart +chart.AutoScaling = true; //Saves the Presentation pptxDoc.Save("output.pptx"); //Closes the Presentation @@ -690,6 +698,10 @@ chart.Rotation = 80 chart.SideWall.Shadow.Angle = 60 'Sets the back wall border weight chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow +'Set the right angle axes property of the chart +chart.RightAngleAxes = True +'Set the auto scaling of chart +chart.AutoScaling = True 'Saves the Presentation pptxDoc.Save("output.pptx") 'Closes the Presentation