LayTec-AG / Plotly.Blazor

This library packages the well-known charting library plotly.js into a razor component that can be used in a Blazor project.
MIT License
340 stars 48 forks source link

update from 4.1.0 to 4.3.0 breaks Relayout #430

Closed DWIAltonaAnalytics closed 2 months ago

DWIAltonaAnalytics commented 2 months ago

code calls Plotly.Blazor.PlotlyChart.Relayout it worked before the update, but now we get this exception:

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not find 'relayout' ('relayout' was undefined).
      Error: Could not find 'relayout' ('relayout' was undefined).
          at https://localhost/_framework/blazor.webassembly.js:1:368
          at Array.forEach (<anonymous>)
          at l.findFunction (https://localhost/_framework/blazor.webassembly.js:1:336)
          at w (https://localhost/_framework/blazor.webassembly.js:1:5079)
          at https://localhost/_framework/blazor.webassembly.js:1:2872
          at new Promise (<anonymous>)
          at b.beginInvokeJSFromDotNet (https://localhost/_framework/blazor.webassembly.js:1:2835)
          at Object.vn [as invokeJSJson] (https://localhost/_framework/blazor.webassembly.js:1:58849)
          at https://localhost/_framework/dotnet.runtime.8.0.6.cfhqwq2l7j.js:3:178364
          at Tl (https://localhost/_framework/dotnet.runtime.8.0.6.cfhqwq2l7j.js:3:179198)
Microsoft.JSInterop.JSException: Could not find 'relayout' ('relayout' was undefined).
Error: Could not find 'relayout' ('relayout' was undefined).
    at https://localhost/_framework/blazor.webassembly.js:1:368
    at Array.forEach (<anonymous>)
    at l.findFunction (https://localhost/_framework/blazor.webassembly.js:1:336)
    at w (https://localhost/_framework/blazor.webassembly.js:1:5079)
    at https://localhost/_framework/blazor.webassembly.js:1:2872
    at new Promise (<anonymous>)
    at b.beginInvokeJSFromDotNet (https://localhost/_framework/blazor.webassembly.js:1:2835)
    at Object.vn [as invokeJSJson] (https://localhost/_framework/blazor.webassembly.js:1:58849)
    at https://localhost/_framework/dotnet.runtime.8.0.6.cfhqwq2l7j.js:3:178364
    at Tl (https://localhost/_framework/dotnet.runtime.8.0.6.cfhqwq2l7j.js:3:179198)
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, CancellationToken cancellationToken, Object[] args)
   at Plotly.Blazor.PlotlyJsInterop.Relayout(CancellationToken cancellationToken)
   at Plotly.Blazor.PlotlyChart.Relayout(CancellationToken cancellationToken)
…

exception shortened to remove sensitive code references

what do we have to change?

the version update indicated a non breaking change, I inherited the code, so I am happy for any help :)

sean-mcl commented 2 months ago

Will check it out next week. :)

sean-mcl commented 2 months ago

Should be fixed by #432