File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Create and Edit Charts/Legend/.NET/Legend/Legend Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,17 @@ public static void Main(string[] args)
3535 //Set the color
3636 chart . Legend . TextArea . Color = ExcelKnownColors . Pink ;
3737
38+ //Set the background color
39+ chart . Legend . FrameFormat . Fill . ForeColorIndex = ExcelKnownColors . Yellow ;
40+
3841 //Set the font
3942 chart . Legend . TextArea . Bold = true ;
4043 chart . Legend . TextArea . FontName = "Times New Roman" ;
4144 chart . Legend . TextArea . Size = 10 ;
4245 chart . Legend . TextArea . Strikethrough = false ;
4346
4447 //Remove the legend
45- chart . Legend . LegendEntries [ 0 ] . IsDeleted = true ;
48+ chart . Legend . LegendEntries [ 0 ] . Delete ( ) ;
4649
4750 //Set Legend without overlapping the chart
4851 chart . Legend . IncludeInLayout = true ;
You can’t perform that action at this time.
0 commit comments