(resolved) Responsive plotly.js code not working when config options added

Been playing around with responsive svg elements from plotly.js. Borrowing from this example: https://plot.ly/javascript/responsive-fluid-layout/

It functions as expected until I add ‘config’ arguments to the plot function: (https://plot.ly/javascript/configuration-options/) //‘new community users can only add two links to a post’

Codepen Example: http://codepen.io/brady747/pen/bZOgRy

  • Top chart has some config adjustments to modebar and isn’t responsive when resizing window
  • Bottom chart is responsive with no config options added (code borrowed from the linked example in my first paragraph above).

Thanks for any advice on how to maintain responsive charts while still adjusting the config options/arguments.

Hmm. I don’t think this has to do with adding config options.

I’d recommend taking a look at Responsive plotly.js was working, now it is not first.

Thanks! I’ll take a look. I tried to have everything identical in the two charts except the config options, but perhaps I missed something.
Edit: Ahhh…I see what you are getting at. How embarrassing, I’ve even looked at that community link a few times before and it still didn’t stick with me logically. That seems like that will do it. I’ll give it a shot. I had removed the config options on the first chart and thought that resolved my issue which led me to assume that must be at play, but I must have not refreshed the window or something to that effect as your link is the issue. Thanks again.

1 Like