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

196
Views
How reset to default zoom/scale a plot type contour created with React-plotly.js?

I'm using React-Plotly to display a contour graph like this:

  <Plot
          data={surfacesData}
          layout={layout}
          // Id to be used by Plotly methods (download,relayout....)
          divId={"surfaces_container"}
          config={{ displayModeBar: false }}
 />

Layout definition

When i tried to call Plotly.relayout in this plot (type contour) using the following code:

 Plotly.relayout("surfaces_container", {
        "scene.xaxis.autorange":true,
        "scene.yaxis.autorange":true
      });

The following error appears:

"plotly.min.js:107179 Uncaught TypeError: Cannot read properties of undefined (reading '_inputDomain')"

[error][2] [2]: https://i.stack.imgur.com/ibZnq.png

How could i reset scale ? i also tried to change xaxis.range instead of scene.xaxis.range... But still not working, and i dont want to force a reset like passing new autorange value as prop.

Plotly.relayout works when i try to change camera position in plot type mesh3d like.

Plotly.relayout("surfaces_container", {
        camera :{
          up:{x:0, y:0, z:1},
          center:{x:0, y:0, z:0},
          eye:{x:1.25, y:1.25, z:1.25}
      }});

Thank you :)

about 4 years ago · Juan Pablo Isaza
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!