Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

356
Views
Plotly.js: Any way to resize plots when sidebar is toggled?

I'm using a Bootstrap sidebar for my website with several Plotly graphs. The Plotly is responsive with window size change, but when I toggle the sidebar button on and off the graphs do not adjust properly. Is there a fix to this? Partial code for Plotly listed.

Plotly chart not responsive -- extra space in the border when sidebar toggled off

var layout = {
              xaxis: {
                rangeselector: selectorOptions,
                rangeslider: {}
              },
              yaxis: {
                fixedrange: true,
                side: 'right'
              },
              margin: {
                l: 50,
                r: -50,
                b: 50,
                t: 30,
                pad: 4
              },
                yaxis: {
                  fixedrange: true,
                  side: 'left'
                },
                showlegend: false,
                

              };
              var config = {responsive: true};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Assuming you know when the sidebar has been toggled, you can call Plotly.Plots.resize(yourPlotlyDiv) afterwards.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!