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
|