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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Object cannot be cast from DBNull to other types.

Thread ID:

Created:

Updated:

Platform:

Replies:

150483 Jan 8,2020 03:12 PM UTC Jan 9,2020 01:29 PM UTC WPF 1
loading
Tags: SfChart
Ondrej Svoboda
Asked On January 8, 2020 03:12 PM UTC

Hi,
I've recently upgraded from version 17.3.0.34 to 17.4.0.41 and started to get this exception when setting DataTable (containing DBNull values) as chart items source. In previous version it worked fine.

Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToDouble(IFormatProvider provider)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GenerateDataTablePoints(String[] yPaths, IList`1[] yLists)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GeneratePoints(String[] yPaths, IList`1[] yValueLists)
   at Syncfusion.UI.Xaml.Charts.XyDataSeries.OnDataSourceChanged(IEnumerable oldValue, IEnumerable newValue)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.OnDataSourceChanged(DependencyPropertyChangedEventArgs args)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.OnDataSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)

Thank you for your help

Hemalatha Marikumar [Syncfusion]
Replied On January 9, 2020 01:29 PM UTC

Hi Ondrej, 
 
Greetings from Syncfusion. 
 
We would like to let you know that we were able to reproduce the reported issue and fixed the same. Please find the patch from below link  
 
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
http://syncfusion.com/Installs/support/patch/17.4.0.39/967282/F150483/SyncfusionPatch_17.4.0.39_967282_1092020072104517_F150483.exe 

(OR) 
 
Please find the patch assemblies alone from below location:  
  
(OR) 

 
 
Assembly Version: 17.4.0.39 
   
Disclaimer:  
  
Please note that we have created this patch for version 17.4.0.39 specifically to resolve the following issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received 
   
To Clear the cache: 
  
Windows   
   
Follow the below link to clear cache,   
   
For Mac   
   
• ~/.local/share/NuGet/Cache   
   
• ~/.nuget/package   
  
  
  

The fix will be included in our weekly Nuget release which is expected to be rolled out on 14th January 2020.
 
  
 
Notes: We were unable to reproduce the issue which is reported in the forum F150484, but we included some of the possible fix in this custom patch. Please check with that patch and If you faced same issue after updating with this patch please provide us more information. 
 
Regards,
Hemalatha M. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon