-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix errorbars for Plotly.react and for uneven data arrays #2360
Conversation
|
||
if(symmetric || arrayminus === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this (removing || arrayminus === undefined
) isn't actually a change in behavior, since we were filling in []
at the supplyDefaults
step anyway
"type": "data", | ||
"symmetric": false, | ||
"visible": true | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added x errorbars with no data so that the image wouldn't change, but it would have failed before this fix in plot_api_test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the comment 📚
@@ -105,7 +104,9 @@ module.exports = function plot(traces, plotinfo, transitionOpts) { | |||
|
|||
yerror.attr('d', path); | |||
} | |||
else yerror.remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another bug fixed here (and tested below) - if you deleted some data from your errorbar data arrays, the corresponding errorbar was not removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 🎣
Nicely done 💃 |
Noticed this morning during a discussion with @VeraZab - error bars still filled in
[]
duringsupplyDefaults
. When fixing that I also noticed that we weren't allowing unevenarray
/arrayminus
, not a big deal but if you're doing manual data entry it would be nice to see the two halves of the errorbar show up independently. Ideally this would also remove the cap from the missing end of the bar, as I have it here it just sets the missing end to zero length so that the cap shows up on top of the data point; if anyone can think of a use case for this as a final state of the plot (as opposed to an intermediate state while you're typing the rest of the data) I'd be happy to extend it to omit that cap but if not it seemed like unnecessary extra complexity.