We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ChartCustomPoint related error?

Hi,

I am upgrading from version 4.4.0.51 to 5.1.0.51 and new error has emerged in my existing application.

1)Application creates linechart with 2 series, then user can modify the chart by dragging with mouse and 2)load new series (existing series are cleared).

This cycle works fine until I programmatically add custom chart point(s) to the chart.

If user now tries to add new series to this existing chart (and previously clearing existing series), following error occurs:

System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Chart.ChartSeriesRenderer.CalculateVisibleRange()
at Syncfusion.Windows.Forms.Chart.Renderers.LineRenderer.Render(Graphics g)
at Syncfusion.Windows.Forms.Chart.ChartSeriesCollection.DrawSeries(Graphics g, IChartAreaHost chart)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw2D(PaintEventArgs e, ChartPaintFlags flags)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e, ChartPaintFlags flags)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e)
at Syncfusion.Windows.Forms.Chart.ChartControl._Paint(Graphics g, Rectangle r)
at Syncfusion.Windows.Forms.Chart.ChartControl.OnPaint(PaintEventArgs e)
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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This error will emerge even if custom points are cleared before loading new series.

Any help would be appreciated. As I mentioned earlier this code works fine with previous version of Syncfusion libraries.

regards,
Kalle

1 Reply

RF Rashidha F Syncfusion Team June 27, 2007 06:19 AM UTC

Hi Kalle,

We regret for the inconvenience caused.

We are unable to reproduce this issue. I have attached one simple sample. Could you please modify this sample which can reproduce the issue you had mentioned, which would help us to analyse it better?

http://websamples.syncfusion.com/samples/Chart.Windows/F62956/main.htm

Thanks for your patience.

Regards,
Rashidha.

Loader.
Live Chat Icon For mobile
Up arrow icon