I'm using blazor server-side and trying to display a chart with Blazor.Chartjs. The problem I have is that I have the form that the user enters date and the application will get data from database with the chosen date. For the first time the chart will be displayed but when user change date and I want to chart be changed with new data but I have this error:
Unhandled exception rendering component: Could not find a chart with the given id. c4e7005b-e203-46f1-9719-68c6d14d848f
Microsoft.JSInterop.JSException: Could not find a chart with the given id. c4e7005b-e203-46f1-9719-68c6d14d848f
at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit '268yoqwqVBLFanukxnq3R4LjrnKrEAgIdVkQSPnIgfY'.
Microsoft.JSInterop.JSException: Could not find a chart with the given id. c4e7005b-e203-46f1-9719-68c6d14d848f
at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)