running sample of SfAccumulationChart- throwing "Object reference not set to an instance of an object."

As like the sample provided here in the link: https://blazor.syncfusion.com/demos/chart/pie?_ga=2.260368461.1942556528.1642919925-312463608.1637213985


I literally copy/pase the sample and When I run the app, Im getting the following error in browser Console.


blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]

Unhandled exception rendering component: Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object.

at Syncfusion.Blazor.Charts.SfAccumulationChart.CalculateSecondaryElementPosition()

at Syncfusion.Blazor.Charts.SfAccumulationChart.OnAfterScriptRendered()

at Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)

at Syncfusion.Blazor.SfDataBoundComponent.OnAfterRenderAsync(Boolean firstRender)

at Syncfusion.Blazor.Charts.SfAccumulationChart.OnAfterRenderAsync(Boolean firstRender)


11 Replies 1 reply marked as answer

GO gopichandar January 23, 2022 08:28 AM UTC

Here is my code. Im using "Syncfusion.Blazor.Charts" v19.4.0.43

      <SfAccumulationChart Title="Percentage of Completion (as per last month end)">

                    <AccumulationChartSeriesCollection>

                        <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Source" YName="Value"

                                                 Name="Source">

                        </AccumulationChartSeries>

                    </AccumulationChartSeriesCollection>


                    <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>

                </SfAccumulationChart>


@code{

public List StatisticsDetails = new List

{

new Statistics { Browser = "Chrome", Users = 37 },

new Statistics { Browser = "UC Browser", Users = 17 },

new Statistics { Browser = "iPhone", Users = 19 },

new Statistics { Browser = "Others", Users = 4 },

new Statistics { Browser = "Opera", Users = 11 },

new Statistics { Browser = "Android", Users = 12 },

};



public class Statistics

{

public string Browser { get; set; }

public double Users { get; set; }

}

}



SB Swetha Babu Syncfusion Team January 24, 2022 06:01 AM UTC

Hi Gopichandar,Greetings from Syncfusion.When we analyzed the provided code snippet, we came to know that the value of the XValue and YValue property in AccumulationChartSeries did not match the name in the dataSource. So please provide the name for the above properties that match the dataSource values. However, we have created the simple blazor application to demonstrate the same and it can be downloaded from the below link.Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PieChart1412302458Code Snippet: 
<SfAccumulationChart Title="Percentage of Completion (as per last month end)"> 
    <AccumulationChartSeriesCollection> 
        <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" 
                                 Name="Source"> 
        </AccumulationChartSeries> 
    </AccumulationChartSeriesCollection> 
    <AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings> 
</SfAccumulationChart> 
Screenshot:Kindly let us know if you have any concerns.Thanks,Swetha 



GO gopichandar January 25, 2022 12:23 PM UTC

Hi Swetha, thanks for the reply and samples.  but I still have issue as same but was working fine on the sample you shared.  Let me try to create a sample here. 



GO gopichandar January 25, 2022 12:59 PM UTC

Hi, Can you Try with Wasm.  HEre is the sample to reproduce the issue. 


https://drive.google.com/file/d/1W6ne9GahHwmPQGC6YAu1vU_ItUS63bY6/view?usp=sharing





GO gopichandar January 26, 2022 08:44 AM UTC

Hi Swetha, did you get a chance to review this? Are we able to reproduce the issue?




DG Durga Gopalakrishnan Syncfusion Team January 27, 2022 03:03 PM UTC

Hi Gopichandar, 

We are facing problem while running an attached sample. We are checking on that and we will update the status within one business day. We have also created Blazor WebAssembly sample as like attached sample, but unfortunately we are unable to replicate an issue from our end. We have attached the tested sample for your reference.  


Please let us know if you have any concerns. 

Regards, 
Durga G 



GO gopichandar January 27, 2022 05:00 PM UTC

Okay.  Thanks for the update



DG Durga Gopalakrishnan Syncfusion Team January 28, 2022 03:20 PM UTC

Hi Gopichandar, 

We are facing the reported problem in latest .Net SDK version 6.0.1. So, we have considered this as a bug and logged a defect report for this issue. This fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 8th February 2022. We appreciate your patience until then. You can keep track of the bug from the below feedback link. 


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal. 

Regards, 
Durga G 



GO gopichandar January 28, 2022 03:38 PM UTC

Thanks.  Also, the FeedbackURL your shared throws "404". 



DG Durga Gopalakrishnan Syncfusion Team January 31, 2022 12:25 PM UTC

Hi Gopichandar,


Sorry for the inconvenience caused. We have now validated the provided feedback. Please ensure from your end.


Regards,

Durga G



DG Durga Gopalakrishnan Syncfusion Team February 8, 2022 03:47 PM UTC

Hi Gopichandar, 

We are glad to announce that our v19.4.50 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor NuGet package version.  


We request you to add the script reference in your application, since you have enabled IgnoreScriptIsolation as true in your shared project. Please check with the below documentation link for more information. 


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

Regards, 
Durga G

Marked as answer
Loader.
Up arrow icon