Error when loading dashboard example

Hi there,

I've pasted the example dashboard component taken from the examples page in the documentation into the index.razor file of my test project.

I'm using the following syncfusion components:

Include="Syncfusion.Blazor.Charts" Version="19.3.0.56" />
Include="Syncfusion.Blazor.Grid" Version="19.3.0.56" />
Include="Syncfusion.Blazor.Layouts" Version="19.3.0.56" />
Include="Syncfusion.Blazor.Navigations" Version="19.3.0.56" />
Include="Syncfusion.Blazor.RangeNavigator" Version="19.3.0.56" />
Include="Syncfusion.Blazor.Schedule" Version="19.3.0.56" />


When running the dashboard I get the following errors:

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.Internal.ChartSeriesRenderer.GetSetXValue(Point point, Int32 index)
at Syncfusion.Blazor.Charts.Internal.ChartSeriesRenderer.ProcessObjectData(Type firstDataType, String x_Name, String y_Name, IEnumerable`1 currentViewData)
at Syncfusion.Blazor.Charts.Internal.ChartSeriesRenderer.ProcessData()
at Syncfusion.Blazor.Charts.Internal.ChartSeriesRendererContainer.ProcessData()
at Syncfusion.Blazor.Charts.SfChart.ProcessData()
at Syncfusion.Blazor.Charts.SfChart.PerformLayout()
at Syncfusion.Blazor.Charts.SfChart.OnAfterRenderAsync(Boolean firstRender)

1 Reply

DG Durga Gopalakrishnan Syncfusion Team December 1, 2021 10:58 AM UTC

Hi Terry, 

Greetings from Syncfusion. 

We have ensured your reported scenario with attached exception. We suggest you to declare the properties with get, set accessor to resolve the reported problem. We have attached the modified sample for your reference.  

public class ChartData 
    { 
        public DateTime XValue {get; set;} 
        public double YValue {get; set;} 
       //… 
  } 
 

 




Kindly revert us if you have any concerns. 

Regards,  
Durga G 


Loader.
Up arrow icon