question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

smart defaults for funnel and image traces are not applied when restyling or reacting from trace with visible false

See original GitHub issue

Both pen are bare minimum for bug reproduction.

Funnel Defualt Behaviour: Pen: https://codepen.io/mafar/pen/rNNYeLX?editors=0010 initialised with default options => Observe Funnel Direction

Funnel updated with Plotly.restyle: Pen: https://codepen.io/mafar/pen/YzzEqqN?editors=0010 initialised with empty x,y options and then x,y are updated with Plotly.restyle => Observe Funnel Direction

Image: funnel

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
etpinardcommented, Nov 20, 2019

This bug is a side-effect of our input range and autorange mutations:

https://github.com/plotly/plotly.js/blob/1a3d38339dc7c9b5594f94a1b1f3625f3854d2ac/src/plots/cartesian/autorange.js#L255-L256

With this piece of logic:

https://github.com/plotly/plotly.js/blob/1a3d38339dc7c9b5594f94a1b1f3625f3854d2ac/src/plots/cartesian/axis_defaults.js#L56-L62

after the first plot call (the one with empty x and y coordinates), we have:

gd.layout.yaxis.autorange = true;
gd.layout.yaxis.range = [-1, 4];

On the second react/update call, we get

gd.layout.yaxis.autorange = true;
gd.layout.yaxis.range = [-0.5, 3.5]

That is, yaxis.autorange gets coerced to true (not 'reversed' as true got mutated in the user layout) leading a yaxis range of [3.5, 0.5].


So, adding

delete gd.layout.yaxis.autorange;
delete gd.layout.yaxis.range;

before the second react/update call is enough to work around this bug. Example: https://codepen.io/etpinard/pen/MWWxKLv?editors=0010

0reactions
mafarcommented, Nov 21, 2019
delete gd.layout.yaxis.autorange;
delete gd.layout.yaxis.range;

works . can we request an official fix please

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Frustrations with Image Trace - 10251280
I'm currently doing default tracing tests in both 2019 and CS5 with one of them. I'll zip the psd file and the default...
Read more >
cyrus-imapd bug fix and enhancement update
Annocheck: Do not complain about missing -mbranch-protection option in AArch64 binaries if compiled in LTO mode. - gcc-plugin: Add support for CLVC_INTEGER ...
Read more >
Untitled
Los suziox fallas de origen, Islanders current lines, Enlarge image photoshop action ... Non-blood, Sillenite wiki, Ceca udace se suze moje, Working refuge, ......
Read more >
Untitled
#cadaver How to trade binary options, Caifanes no dejes que hd, French literature in ... Tv diagram tcl, Turps corner grays, Tracing number...
Read more >
CRFM Benchmarking
[substeps] Traditional semi-permanent dyes will generally not be ... [substeps] A non-alcohol toner can also be used after washing to remove traces of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found