Font

ChartLegendEntry.Font property

Provides access to the font formatting of this legend entry.

public Font Font { 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;

doc.Save(ArtifactsDir + "Charts.LegendFont.docx");

See Also