public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Text();
// ExStart:CustomRotationAngleTextframe
// Create an instance of Presentation class
Presentation presentation = new Presentation();
IChart chart = presentation.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 500, 300);
IChartSeries series = chart.ChartData.Series[0];
series.Labels.DefaultDataLabelFormat.ShowValue = true;
series.Labels.DefaultDataLabelFormat.TextFormat.TextBlockFormat.RotationAngle = 65;
chart.HasTitle = true;
chart.ChartTitle.AddTextFrameForOverriding("Custom title").TextFrameFormat.RotationAngle = -30;
// ExEnd:CustomRotationAngleTextframe
// Save Presentation
presentation.Save(dataDir + "textframe-rotation_out.pptx", SaveFormat.Pptx);
}
}