ChartLegendOverlay Property |
Namespace: Aspose.Words.Drawing.Charts
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Insert a line graph Shape chartShape = builder.InsertChart(ChartType.Line, 450, 300); Chart chart = chartShape.Chart; // Get its legend ChartLegend legend = chart.Legend; // By default, other elements of a chart will not overlap with its legend Assert.False(legend.Overlay); // We can move its position by setting this attribute legend.Position = LegendPosition.TopRight; doc.Save(ArtifactsDir + "Charts.ChartLegend.docx");