Skip to content

895952-Added AutoScale code snippet for PowerPoint presentation chart #2166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: hotfix/hotfix-v26.2.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions File-Formats/Presentation/Working-with-Charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -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
Expand Down