Black Lives Matter. Please consider donating to Black Girls Code today.

Serious bug in embedded charts: negative width

Hey there,
a few days ago, a bug appeared on all my bar plots (I have also pie charts with no problem): the width is way too small, making the charts unreadable. What is striking is that it was perfectly working a few weeks ago.
See the results when the chart is embedded: example embedded, and how it appears when it is not embedded (and how it used to be when the embedding was working): original example.
When I open the devtools in the embedded example, several errors appear, of the type:

Error: attribute width: A negative value is not valid. ("-11")

This seems to be the cause of the bug, but I have no idea where it comes from. Probably a recent update of the code created this (?)
Does anyone has a solution?

Yikes, thanks for reporting your issue!
Looking at the JSON of your chart- it looks like the width is set to 20 (20px):
Can you let us know if you explicitly set the height/width of your plot, and if now, how you created your plot originally?
Please let us know if you have any other shareable examples of a broken chart that may help us figure out what aspect is causing this?

Hey, thank you for taking care of my issue and solving it, Chelsea.
You were totally right, there was a parameter “width” set to 20 in my functions, probably from a too-quick copy/paste.
It is indeed surprising that it used to work earlier: probably you the Plotly team corrected a bug, instead of creating one!
You make an amazing job with Plotly by the way, congrats!
Besides, there is no “solved” option in this forum. Should I remove by topic, as it proved to be an inexistent bug?

Thanks!! (and we actually did improve some of the embed code recently :slight_smile: )
I’ll close the topic but leave it in the forum in case someone else happens to come across a width issue.