From a335d5f689c151b1776065388a1041db1e78806a Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Wed, 16 Oct 2024 18:46:47 +0530 Subject: [PATCH 1/2] Create and Edit Charts --- Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs b/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs index 3bc011a1..8073c04d 100644 --- a/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs +++ b/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs @@ -35,6 +35,9 @@ 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"; From c94dff4580e6ca36135119b2d18c00de16bb482c Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Mon, 21 Oct 2024 12:49:46 +0530 Subject: [PATCH 2/2] Create and Edit Charts --- Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs b/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs index 8073c04d..75d27e17 100644 --- a/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs +++ b/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs @@ -45,7 +45,7 @@ public static void Main(string[] args) 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;