Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Place the modeBar at top center using plotly.js

I am using plotly.js to plot graph in my web app. The modeBar is placed at top right corner by default. Is there any way I can place it at the top center?

enter image description here

like image 317
Coding Enthusiast Avatar asked Jul 18 '17 17:07

Coding Enthusiast


2 Answers

This should work:

.js-plotly-plot .plotly .modebar {
    left: 50%;
    transform: translateX(-50%);
}
like image 197
Miro Avatar answered Nov 14 '22 21:11

Miro


.js-plotly-plot .plotly .modebar{left: 40%}
like image 38
Neeraj Kumar Avatar answered Nov 14 '22 23:11

Neeraj Kumar