LegendEntry
ChartSeries.LegendEntry property
Gets a legend entry for this chart series.
public ChartLegendEntry LegendEntry { get; }
Examples
Shows how to work with a legend font.
Document doc = new Document(MyDir + "Reporting engine template - Chart series.docx");
Chart chart = ((Shape)doc.GetChild(NodeType.Shape, 0, true)).Chart;
ChartLegend chartLegend = chart.Legend;
// Set default font size all legend entries.
chartLegend.Font.Size = 14;
// Change font for specific legend entry.
chartLegend.LegendEntries[1].Font.Italic = true;
chartLegend.LegendEntries[1].Font.Size = 12;
// Get legend entry for chart series.
ChartLegendEntry legendEntry = chart.Series[0].LegendEntry;
doc.Save(ArtifactsDir + "Charts.LegendFont.docx");
See Also
- class ChartLegendEntry
- class ChartSeries
- namespace Aspose.Words.Drawing.Charts
- assembly Aspose.Words