Page 1 of 1

Decimal series exception

Posted: Mon Sep 01, 2008 12:40 am
by 13048389
TeeChart version 3.5.3146.24806

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);
System.ArrayTypeMismatchException was unhandled by user code
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.

Posted: Mon Sep 01, 2008 8:20 am
by narcis
Hi NojaPower,

Thanks for reporting. I could reproduce the issue here and added it (TF02013365) to the bug list to be fixed for next releases.