Chart rendering fails after update from 18.3.0.53 to 18.4.0.34

Dear All,
I have a Blazor server project using .NET 5, originally developed with Blazor toolset 18.3.0.53, where all worked fine. Now I started a new project, where I included Authentication too at the project creation. Then I moved all my pages into this new project. Also I included lodash :) (without it the page crashes). But now the chart is not rendering at all. It seems even the axes are nto scaled properly. In included two screenshots showing the difference.
Can  you please guide me how to solve the problem?

Attachment: Chart_not_rendering_after_update_ba71d59d.zip

3 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team January 18, 2021 11:43 AM UTC

Hi Peter,

We have validated your reported scenario. Since, we are unable to login using provided sample, we have prepared sample based on attached screenshot. We are unable to replicate an issue from our end. We have attached tested sample for your reference. Please try to replicate an issue in attached sample or provide us issue reproduced runnable sample.


Please revert us if you have any concerns.

Regards,
Durga G



PE Peter January 18, 2021 12:44 PM UTC

Dear Druga,
thank you for your kind attempt to help. I apologize for the sample I sent, I did not thought over you will not be able to use it.
As I am trying my code it seems there is a paralleism problem: if I put await Task.Delay(1000); after I fetch the graph data, the graph shows perfectly.
Clearly the 1 sec waiting is only a welding, I try to discover what went wrong here....


DG Durga Gopalakrishnan Syncfusion Team January 19, 2021 02:16 PM UTC

Hi Peter,

Thanks for an update. You can use OnInitializedAsync method to display chart only when data is fetched. We have an online demo to fetch json data. 

@if (Data == null)
{
    <div></div>
}
else
{
   <div>
        <SfChart></SfChart>
   </div>
}
@code{
    private ChartData[] Data;
    protected override async Task OnInitializedAsync()
    {
        await Task.Run(() =>
        {
            Data = JsonConvert.DeserializeObject<ChartData[]>(System.IO.File.ReadAllText("./wwwroot/data/chart/financial-data.json"));
        });
   }
}


Please revert us if you have any concerns.

Regards,
Durga G



Marked as answer
Loader.
Up arrow icon