LegendPosition Enumeration |
Specifies the possible positions for a chart legend.
Namespace:
Aspose.Words.Drawing.Charts
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic enum LegendPosition
Public Enumeration LegendPosition
public enum class LegendPosition
Members
| Member name | Value | Description |
---|
| None | 0 |
No legend will be shown for the chart.
|
| Bottom | 1 |
Specifies that the legend shall be drawn at the bottom of the chart.
|
| Left | 2 |
Specifies that the legend shall be drawn at the left of the chart.
|
| Right | 3 |
Specifies that the legend shall be drawn at the right of the chart.
|
| Top | 4 |
Specifies that the legend shall be drawn at the top of the chart.
|
| TopRight | 5 |
Specifies that the legend shall be drawn at the top right of the chart.
|
ExamplesShows how to edit the appearance of a chart's legend.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape chartShape = builder.InsertChart(ChartType.Line, 450, 300);
Chart chart = chartShape.Chart;
ChartLegend legend = chart.Legend;
Assert.False(legend.Overlay);
legend.Position = LegendPosition.TopRight;
doc.Save(ArtifactsDir + "Charts.ChartLegend.docx");
See Also