fastline.Add(x, y) // x is uint[] and y is double[] Exceptio
Posted: 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?
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?