SfDataManager for SFChart ReadAsync Triggers Twice

Hi Syncfusion Team 👋🏼, 

For some reason that I'm not aware of when I place a `SfChart` Component inside the `SfDashboardLayout` it causes the `SfDataManagers` ReadAsync method to trigger twice. 

If I remove the SfDashboardLayout as a parent it executes once as expected.

I've attached a sample project to the thread, to replicate the issue I'm referring to, simply place a break inside the `ReadAsync` method in the `SalesAdaptor`, run the project, and then go to localhost:[port_number]/dblayoutbug and behold



Also are we allowed to browse the source code for Syncfusion's libraries with a decompiler (I know this is like a side question, I'd appreciate an answer though 🙂)


Attachment: ServerApp_94ca0a61.zip

2 Replies

DG Durga Gopalakrishnan Syncfusion Team August 22, 2022 12:33 PM UTC

Hi Etienne,


Greetings from Syncfusion.


We are validating your reported scenario with attached sample. We will update the status within one business day(23rd August 2022). We appreciate your patience until then.


Regards,

Durga Gopalakrishnan.



DG Durga Gopalakrishnan Syncfusion Team August 22, 2022 02:17 PM UTC

Hi Etienne,


We suggest you to upgrade the Syncfusion.Blazor nuget package to latest version 20.2.0.44 to overcome the reported problem. In old version, initially chart will be rendered in default height and width and then re-rendered based on layout height and width, so it triggers twice, but now in latest version, we have calculated the parent element dimension at page load itself.  


Kindly ensure to include the below script reference in _Host.cshtml page as per below snippet.


_Host.cshtml

<head>

    <script src=https://cdn.syncfusion.com/blazor/syncfusion-blazor-base.min.js></script>

</head>


Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/ServerApp201540451.zip


UG : https://blazor.syncfusion.com/documentation/chart/chart-dimensions


Please revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon