Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show legend in chart

I am using Microsoft Chart, and I have top Legend displayed at the top in a pie chart. Which property is used to show or hide the legend of a pie chart?

like image 884
jams Avatar asked Dec 16 '22 13:12

jams


1 Answers

Just do the following.

Legend leg = new Legend();
Chart1.Legends.Add(leg);// This will show all legends.

Actually you have to create a legend object, set its different or desired properties like font, etc., and then add it to the chart.

like image 76
jams Avatar answered Jan 01 '23 19:01

jams