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?
fastline.Add(x, y) // x is uint[] and y is double[] Exceptio
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Digital,
The errors happens because there's no Add(...) overload which supports uint[]. The types have to match to one of the multiple Add(...) overloads.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?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Future Plans
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |