Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: NickE <21d9971d42be1b6eaab303897ac2593cdf8b7117@users.noreply.github.com>
aburato/plotly.js,etpinard/plotly.js,plotly/plotly.js,aburato/plotly.js,plotly/plotly.js,plotly/plotly.js,etpinard/plotly.js,plotly/plotly.js,etpinard/plotly.js