Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Use Charts Extension with Server Render Mode #992

Closed
brandon-james105 opened this issue Jun 17, 2020 · 1 comment
Closed

Unable to Use Charts Extension with Server Render Mode #992

brandon-james105 opened this issue Jun 17, 2020 · 1 comment

Comments

@brandon-james105
Copy link

Describe the bug
When a project is set to server rendering mode, the Charts extension will not respond to a call to Update(). Call stack:

System.ArgumentNullException: Value cannot be null. (Parameter 'jsRuntime')
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeAsync[TValue](IJSRuntime jsRuntime, String identifier, Object[] args)
   at Blazorise.Charts.JS.Update(IJSRuntime runtime, String canvasId)
   at Blazorise.Charts.BaseChart`4.Update()
   at Project.Pages.PlayerProfile.HandleRedraw() in C:\Users\Brandon James\source\repos\Project\Project\Pages\PlayerProfile.razor.cs:line 125
   at Project.Pages.PlayerProfile.OnInitializedAsync() in C:\Users\Brandon James\source\repos\Project\Project\Pages\PlayerProfile.razor.cs:line 116
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

To Reproduce

async Task HandleRedraw()
{
        await TotalScoreHistoryChart.Clear();

        await TotalScoreHistoryChart.AddDataSet(GetLineChartDataset(HighScoreType.Total));

        await TotalScoreHistoryChart.Update(); // <-- Problem line
}

Expected behavior
When calling the chart update method, the chart should show the data I have included.

@stsrki
Copy link
Collaborator

stsrki commented Jun 17, 2020

Hi @brandon-james105 , this is already fixed in #881 and will be released soon with v0.9.1

@stsrki stsrki closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants