SfAccumulationChart - OnPointClick NullReferenceException

Hello,

I am trying to upgrade from 18.3 to 18.4.0.35 and have a SfAccumulationChart with an OnPointClick which used to work, but throws a NullReferenceException now if it is enabled.

Inside the SfAccumulationChart I have ChartEvents defined like this:

<ChartEvents OnPointClick="pointClickClient"></ChartEvents>


the signature of pointClickClient is:

public async void pointClickClient(PointEventArgs args)

and this causes the following exception when the page is loaded:

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[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.ChartEvents.OnInitializedAsync()

         at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()


I have also tried to set the OnPointClick to a lambda function which only calls StateHasChanged() but I still get the same exception:

<ChartEvents OnPointClick="@((a) => {StateHasChanged();})"></ChartEvents>

5 Replies 1 reply marked as answer

HH Heidar Holmberg Jonsson January 22, 2021 11:59 AM UTC

If I comment out the ChartEvents component the page loads and everything works btw.

<!--  <ChartEvents OnPointClick="pointClickClient"></ChartEvents> -->


SM Srihari Muthukaruppan Syncfusion Team January 22, 2021 01:10 PM UTC

Hi Heidar, 
 
We have analyzed your query. Unfortunately, we are unable to reproduce the reported scenario and accumulation chart is working fine in the latest version 18.4.35. We have also attached the sample used for testing. Please find the sample below. 
 
 
Screenshot: 
 
 
If you still face this issue. kindly revert us with the following information which will be more helpful for further analysis and provide you the solution sooner.  
  1. Try to reproduce the reported scenario in the provided sample.  
  2. Share the details if you have done any other customization.
 
Regards, 
Srihari M 



HH Heidar Holmberg Jonsson January 22, 2021 01:53 PM UTC

Hi, thanks for the prompt response!

I can see you are using AccumulationChartEvents and AccumulationPointEventArgs instead of ChartEvents and PointEventArgs

In 18.3 I was able to get the ChartPoint which was clicked on see if it was "exploding" and filter a table based on that:



Is there any way to do this in 18.4?


SM Srihari Muthukaruppan Syncfusion Team January 25, 2021 11:35 AM UTC

Hi Heidar, 
 
We have analyzed your query. From that, we would like to let you know that we have considered this scenario as a bug and logged a bug request on this and you can keep track of it from the below feedback portal link.    
       
 
This fix will be available in our weekly patch release which is scheduled to be rolled out on or before 2 February 2021. We appreciate your patience until then.    
     
Regards,    
Srihari  



SM Srihari Muthukaruppan Syncfusion Team February 2, 2021 08:24 AM UTC

Hi Heider, 
  
 
We are glad to announce that our v18.4.41 patch release is rolled out, we have added the fix for the reported scenario. And you can use the latest (18.4.41) Syncfusion.EJ2.Blazor NuGet package version and updated interop CDN file to get rid of the reported issue. 
  
 
 
Screenshot: 

 

 
We appreciate your patience in waiting for this release. Kindly let us know if you need further assistance. 
  
Regards, 
Srihari 


Marked as answer
Loader.
Up arrow icon