Problem with Series.Add method?
Posted: Mon Nov 06, 2006 5:32 pm
I think I have found a problem with the .Add method of Steema.TeeChart.Styles.Series.
The following code throws a runtime error from TeeChart.dll:
The error I get is:
"An unhandled exception of type 'System.NullReferenceException' occurred in TeeChart.dll
Additional information: Object reference not set to an instance of an object."
Please note that the code above works just fine when I use int[] instead of object[].
I'm using C# .NET 2005 and TeeChart Pro Version 2.0.2306.26232.
Thanks in advance.
The following code throws a runtime error from TeeChart.dll:
Code: Select all
public Form1()
{
InitializeComponent();
InitChart();
}
private void InitChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
int[] XVals = { 0, 2, 4, 6, 8 };
int[] YVals = { 0, 1, 4, 9, 16};
object[] YVals2 = { 0, 1, 4, 9, 16};
Line line1 = new Line();
line1.Add(XVals, YVals2);
tChart1.Series.Add(line1);
}
"An unhandled exception of type 'System.NullReferenceException' occurred in TeeChart.dll
Additional information: Object reference not set to an instance of an object."
Please note that the code above works just fine when I use int[] instead of object[].
I'm using C# .NET 2005 and TeeChart Pro Version 2.0.2306.26232.
Thanks in advance.