Fix Plotly layout mutation blanking reliability tiles #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/analytics-plotly-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Failure stage funnel, Blamed mints, and Error breakdown tiles rendered axes but no bars or labels on the live dashboard.
Root cause:
public/dashboard.htmlshared a singlelayoutBase.xaxis/yaxisobject across everyPlotly.reactcall. Plotly writes inferred axis state back into the layout object it is handed, so the first chart's inferredyaxis.type = linearleaked into every later chart. Horizontal-bar tiles then coerced their string categories away. A second bug compounded it:emptyState()overwrote a live Plotly DOM without purging it, leaving Plotly's registry pointing at destroyed nodes, so a laterreact()silently drew nothing.Fix
baseLayout(), which builds fresh nestedxaxis/yaxisobjects for every render.Plotly.purge(el)inemptyState()before replacinginnerHTML.type: category.Verification
yaxis.type = categorywith 4/8/3 bars and their labels; every other tile is unchanged.cargo fmt --checkis clean.Pull request closed