My team is currently working on upgrading our Syncfusion.Blazor package in our project from version 18.3.0.53 to 19.2.0.48. However, we have noticed a persistent issue across the chart component that is making this upgrade extremely tedious. In particular, various parameters in chart-related components (potentially others, but charts are currently being focused on right now) can no longer seem to be null. Setting a null value for a parameter such as Height in the SfChart component results in this exception being thrown:
blazor.server.js:21 [2021-07-28T18:10:13.800Z] Error: System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Blazor.Charts.SfChart.ProcessChart() at Syncfusion.Blazor.Charts.SfChart.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
The reason why this makes things so tedious for my team is that we have connected charts and other Syncfusion components to a visual editor in which users can declare the properties of chart components using widgets. If no input is present or a given property, that value is treated as null, which is what the chart component receives. Previously, the chart components seemed to treat most instances of null parameters as if that parameter had never been received in the first place.
<SfChart Height="@Widget.Height"
Width="@Widget.Width"
...
This made it intuitive and straightforward to connect Syncfusion component parameters to those found in our widgets. But now that null parameters are no longer accepted, this process becomes much more difficult for us. So my question is this: is throwing exceptions on null parameters a bug that we can expect to see fixed sometime soon? Or is this a permanent, by-design change for Syncfusion components?
Also, it might be worth noting that after some investigation, it seems that this issue first arose in version 19.1.0.57 of Syncfusion.Blazor.
Your fix did not solve this issue whatsoever. Your sample has a string with the words "null" as the width and height parameters in the SfChart component. That's not a null value. When I pass in an actual null value into these parameters, I get the same error that I was getting before. Furthermore, my issue goes far beyond just the with and height parameters. My team's fundamental issue is that it is now very difficult to templatize Syncfusion components after version 19.1.0.57. In older versions, passing in a null value into a Syncfusion component parameter of a nullable type was effectively the same as not passing in the parameter at all. But now, doing so causes almost any given component (at least the chart ones) to throw exceptions. This make it very difficult for my team to update our project to most recent Syncfusion versions even though we want to, considering the bugs present in older versions that are creating problems for us. Will this fundamental issue of your components throwing errors on null parameters be fixed in a later version? Because until this issue is fixed across the board, we won't upgrade. We might move revoke our Syncfusion license and consider other libraries if this issue is not resolved.