Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chart Control. How to remove legend labels

Tags:

c#

asp.net

charts

I got a simple code from this site:

http://www.davidhayden.com/blog/dave/archive/2008/12/02/PieChartASPNETWebsitesUsingNewMicrosoftChartControls.aspx

Now, I want to remove all the labels in the pie chart i.e. "a", "b","c","d".

I tried to do this:

Chart1.Series[0].IsValueShownAsLabel = false;

But it doesnt work..please help. I am Stuck

like image 666
Dmitry Makovetskiyd Avatar asked Jul 13 '11 09:07

Dmitry Makovetskiyd


1 Answers

In VB.Net that works fine:

Chart1.Series(0).IsVisibleInLegend = False

I know you don't search for VB.Net. But maybe that helps VB.net users.

like image 128
kwoxer Avatar answered Sep 23 '22 02:09

kwoxer