I using MSChart controls in an ASP.Net MVc 3 application to render a range of Pie Charts. Is there a way to add the total of all items to the legend? I found the #TOTAL keyword, but I can't figure out how to add another item to the legend to show the information?
0
votes
1 Answers
0
votes
You need to use cellColumns. Remember, If one or more cell columns are added to the legend, the default legend will be replaced by the number of items in the CellColumn collection
chart1.Legends[0].CellColumns
.Add(new LegendCellColumn("Total", LegendCellColumnType.Text, "#TOTAL{N2}"));
Reference Custom Legend Items