The following code generates a System.ArrayTypeMismatchException in the series.Add() call.
Code: Select all
decimal[] yValues = new decimal[] {23.45m, 120.0m };
int[] xValues = new int[] { 0, 10 };
Series series = curveChart.Series.Add(new Steema.TeeChart.Styles.Line());
series.Add(xValues, yValues);
Message="Source array type cannot be assigned to destination array type."
Source="mscorlib"
StackTrace:
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Array.CopyTo(Array array, Int32 index)
at Steema.TeeChart.Styles.Series.ConvertArray(Array a, Int32 numPoints)
at Steema.TeeChart.Styles.Series.Add(Array xValues, Array yValues)
It only seems to occur for decimal data types.