Hi Brian,
The first error means that bar.Values is a list of numbers and you cannot assign it to one variable of type double. You can use indexing to access a particular value in the list.
As for the second error, the comparison should be:
if (BarValue == 0.0)
{
}
These are only syntax errors, but in fact the correct approach is to leave the data label format to <value> and change the formatting of the value itself.
The following code demonstrates how to accomplish your requirement:
NChart chart = nChartControl1.Charts[0];
NBarSeries bar = new NBarSeries();
chart.Series.Add(bar);
bar.Values.AddRange(new double[] { 10, 20, 15, 33, 18, 0, 27, 2 });
bar.DataLabelStyle.Format = "<value>";
bar.Values.ValueFormatter = new Nevron.Dom.NNumericValueFormatter("#.###");
This is a full chart setup, in fact you only need the last two lines.
Best Regards,
Nevron Support Team