See https://codepen.io/etpinard/pen/vmzpPy?editors=1010 and https://github.com/plotly/plotly.js/pull/1694#pullrequestreview-38774918
See https://codepen.io/etpinard/pen/vmzpPy?editors=1010 and #1694 (review)