plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
16.71k stars 1.83k forks source link

Yaxis values remain after plotly.react call is made to modify the data of a chart with orientation="h" #5381

Open michaelbabyn opened 3 years ago

michaelbabyn commented 3 years ago

With newplot, the chart renders correctly both times but plotly.react contains old yaxis values the second time it is called. The react chart's fullData shows only the "new" y values but the old ones are still getting rendered.

Peek 2021-01-06 16-14

codepen of bar graph in horizontal orientation that reproduces the issue

codepen of bar graph in vertical orientation which works as expected

nicolaskruchten commented 3 years ago

A+ for the codepens! Generated using fig2pen. react_multi()?

michaelbabyn commented 3 years ago

yes, it's a handy function :)

archmoj commented 3 years ago

A+ for the codepens! Generated using fig2pen. react_multi()?

@michaelbabyn Could you please pin down the version of plotly.js in the codepen instead of the latest? That way it would be possible to come back and view the bug once it was fixed. Thank you!

michaelbabyn commented 3 years ago

ok @archmoj , I just changed the js bundle in those pens to plotly-1.58.4.min.js

archmoj commented 3 years ago

ok @archmoj , I just changed the js bundle in those pens to plotly-1.58.4.min.js

Thanks @michaelbabyn. Could you please also open an issue/improve fig2pen. react_multi() script to always use actual version?

gvwilson commented 1 week ago

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

gvwilson commented 1 week ago

thanks @michaelbabyn - I'll try to get it into our backlog ASAP

michaelbabyn commented 1 week ago

great, I also updated the codepens in the initial comment to use plotly 2.33.0