Profile Picture

Control visibility of Data Labels on Bar Chart

Posted By Brian Dalwood 12 Years Ago
Author
Message
Brian Dalwood
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 6, Visits: 15
Hi,
I am trying to show/hide the Data Labels on a Column Bar chart through the code window but cannot get the C# syntax right. Can you help??
I want to hide the data label when the value of the bar = 0 and show it otherwise.

Can you please show some example code to do this.

I am getting the following errors when compiling

(66,23) : error CS0030: Cannot convert type 'Nevron.Chart.NDataSeriesDouble' to 'double'
(68,9) : error CS0029: Cannot implicitly convert type 'double' to 'bool'

from the below code snippet.

NDataSeriesDouble values = bar.Values;
double BarValue = (double)bar.Values;

if (BarValue = 0.0)
{
bar.DataLabelStyle.Format = "";
}
else
{
bar.DataLabelStyle.Format = "<value>";
}

Thanks
Brian




Similar Topics


Reading This Topic