Repository navigation
fix errorbars for Plotly.react and for uneven data arrays - #2360
Merged
Merged
Conversation
alexcjohnson
commented
Feb 12, 2018
| arrayminus = opts.arrayminus; | ||
| var array = opts.array || []; | ||
|
|
||
| if(symmetric || arrayminus === undefined) { |
Collaborator
Author
There was a problem hiding this comment.
Note that this (removing || arrayminus === undefined) isn't actually a change in behavior, since we were filling in [] at the supplyDefaults step anyway
alexcjohnson
commented
Feb 12, 2018
| "type": "data", | ||
| "symmetric": false, | ||
| "visible": true | ||
| }, |
Collaborator
Author
There was a problem hiding this comment.
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
alexcjohnson
commented
Feb 12, 2018
|
|
||
| yerror.attr('d', path); | ||
| } | ||
| else yerror.remove(); |
Collaborator
Author
There was a problem hiding this comment.
another bug fixed here (and tested below) - if you deleted some data from your errorbar data arrays, the corresponding errorbar was not removed.
Contributor
|
Nicely done 💃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.