ChartTitleShow Property |
Namespace: Aspose.Words.Drawing.Charts
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Use a document builder to insert a bar chart Shape chartShape = builder.InsertChart(ChartType.Bar, 400, 300); Assert.AreEqual(ShapeType.NonPrimitive, chartShape.ShapeType); Assert.True(chartShape.HasChart); // Get the chart object from the containing shape Chart chart = chartShape.Chart; // Set the title text, which appears at the top center of the chart and modify its appearance ChartTitle title = chart.Title; title.Text = "MyChart"; title.Overlay = true; title.Show = true; doc.Save(ArtifactsDir + "Charts.ChartTitle.docx");