This is because the parameter's first letter is uppercase (Values), and the name's one is lowercase (values), a mistake I made in the code snippet I provided earlier.
To declare the bar series, you need to do it the following way, using a type cast
Here is the code that works :
Dim chart As Chart = ChartControl1.Charts(0)
Dim barSeries As BarSeries = CType(chart.Series.Add(SeriesType.Bar), BarSeries)
barSeries.Values.Name = "Values"
barSeries.Add(2)
barSeries.Add(3)
barSeries.Add(2)
barSeries.Add(3)
Dim calculateur As FunctionCalculator = New FunctionCalculator()
calculateur.Arguments.Clear()
calculateur.Arguments.Add(barSeries.Values)
calculateur.Expression =
"STDDEV( Values )"
Dim x = calculateur.Calculate()
André
Software Developer and Tech Support
Xceed Software Inc.