fastline.Add(x, y) // x is uint[] and y is double[] Exceptio

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Digital
Newbie
Newbie
Posts: 11
Joined: Tue Apr 08, 2003 4:00 am

fastline.Add(x, y) // x is uint[] and y is double[] Exceptio

Post by Digital » Fri Feb 25, 2005 8:03 pm

I am using a FastLine Series to plot arrays of data. When I try to do fastline.Add(x, y) (where x is uint[] and y is double[]) I get the following:
System.NullReferenceException: Object reference not set to an instance of an object.
at Steema.TeeChart.Styles.ValueList.CalcStats()
at Steema.TeeChart.Styles.ValueList.get_Maximum()
at Steema.TeeChart.Styles.Series.MaxXValue()
at Steema.TeeChart.Chart.InternalMinMax(Axis aAxis, Boolean isMin, Boolean isX)
at Steema.TeeChart.Axis.CalcMinMax(Double& min, Double& max)
at Steema.TeeChart.Axis.AdjustMaxMin()
at Steema.TeeChart.Axes.AdjustMaxMin()
at Steema.TeeChart.Chart.CalcAxisRect()
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

If I now create a double[] x_d and copy x (uint[]) into x_d then do fastline.Add(x_d, y) everything works fine.

I also tried converting x to a long[] which gave me the same exception.

Do the arrays have to be double[] or float[] and do the types for x, and y have to match?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 28, 2005 12:53 pm

Hi Digital,
If I now create a double[] x_d and copy x (uint[]) into x_d then do fastline.Add(x_d, y) everything works fine.

I also tried converting x to a long[] which gave me the same exception.

Do the arrays have to be double[] or float[] and do the types for x, and y have to match?
The errors happens because there's no Add(...) overload which supports uint[]. The types have to match to one of the multiple Add(...) overloads.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Digital
Newbie
Newbie
Posts: 11
Joined: Tue Apr 08, 2003 4:00 am

Future Plans

Post by Digital » Mon Feb 28, 2005 2:27 pm

Do have any plans to support long[] in the future? Do you have any plans for a Generic Version of this method when the .Net 2.0 Framework is released.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 28, 2005 2:51 pm

Hi Digital,

no, I have added this to our wish list to be considered for future releases. Meanwhile you can use the Convert.To... method which is a .NET method.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Digital
Newbie
Newbie
Posts: 11
Joined: Tue Apr 08, 2003 4:00 am

Thanks

Post by Digital » Mon Feb 28, 2005 3:13 pm

Ok thank you for you help.

Post Reply