Heatmap breaks bar and scatter plot and vice versa

This is definitely weird and I have no idea what could be causing this.
I have a couple of modules that plot heatmaps and bar, scatter combined plots respectively.

If I load the heatmap module first, the bar-scatter one breaks. If I load the bar-scatter first, the heatmap breaks.

Specifically, the heatmap when loaded first looks like

But the bar-scatter plot then breaks


There is no error.

If I load the bar-scatter first, it looks like it should

But the heatmap breaks

with error 'Error: attribute height: Expected length, “NaN”.

In both cases, there is absolutely no change in the code. Just the order in which they are loaded differs.

I suspect the problem could be in Plotlycore.register.
In the heatmap I do

In the bar one
PlotlyCore.register([PlotlyBar, PlotlyScatter])

And they reside in separate modules (react components) which are not displayed at the same time either.
I must change the view to make the specific component visible.
Even though I am registering the Plotlycore components separately in each module, I suspect its state is preserved somehow.

It is very difficult to replicate this on codepen.
Is this a known issue? I am using plotly version 1.31.0

Hoping to find some quick answers as everything else is working beautifully. Even the mentioned ones in isolation.

Thanks for the report.

Can you a reproducible example of your import statements to help us debug. Thanks.

ok. I tried,
This is the heatmap and bar chart in that order. But I can’t replicate the problem.

And this in reverse

Now, they both have real data and real code. And it works. But I am also using https://cdn.plot.ly/plotly-latest.min.js in script tag here
The data is taken fro the console logs as the pages appeared. So back ti square one.
I guess the real issue is y axis on charts gets messed up as you can see in the images above.

I understand it’s too much to expect you to debug non-replicable problems.
Can you think of a scenario when y axis would jumble up like this please.


I got same problem. do you happen to have a solution yet? Thanks. @kausti