Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ public static void Main(string[] args)
//Set the color
chart.Legend.TextArea.Color = ExcelKnownColors.Pink;

//Set the background color
chart.Legend.FrameFormat.Fill.ForeColorIndex = ExcelKnownColors.Yellow;

//Set the font
chart.Legend.TextArea.Bold = true;
chart.Legend.TextArea.FontName = "Times New Roman";
chart.Legend.TextArea.Size = 10;
chart.Legend.TextArea.Strikethrough = false;

//Remove the legend
chart.Legend.LegendEntries[0].IsDeleted = true;
chart.Legend.LegendEntries[0].Delete();

//Set Legend without overlapping the chart
chart.Legend.IncludeInLayout = true;
Expand Down
Loading