-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement legendrank attribute in traces #5591
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3cee835
implement legendrank
archmoj a60a382
keep track of initial order - to handle chrome unstable sort in old v…
archmoj 5813717
remove some empty lines
archmoj 5136cc0
add legend calc jasmine test with legendrank
archmoj 598d60c
add image test - pie ranking looks strange
archmoj 4ffb06c
describe why dflt 1000 is used - mentioning ranking works within each…
archmoj 6e61bd8
refactor - less variable and use push
archmoj 737478e
refactor - add sort step
archmoj 274db06
refactor - bring down the sort function
archmoj 915c67a
refactor - simplify logic
archmoj 69c0b29
update image test
archmoj e1e9a74
simplify and fixup legend sort
archmoj f232f42
no more need for _initID now that sort and collapse are fixed
archmoj c00d56e
more refactor
archmoj 69bf7eb
remove extra loop - update comments
archmoj d87ee12
update legendrank description
archmoj d35ff08
add fallback to have stable sort in Chrome < 70
archmoj a1f87b9
would be > are
archmoj 32a890c
rank groups based on minimum legendranks within each group
archmoj a1abb19
add legendrank2 mock
archmoj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"data": [ | ||
{"type": "bar", "name": "1", "y": [1], "yaxis": "y2", "legendgroup": "two", "legendrank": 3}, | ||
{ | ||
"legendrank": 2, | ||
"legendgroup": "pie", | ||
"type": "pie", | ||
"labels": ["a","b","c","c","c","a"], | ||
"textinfo": "none", | ||
"domain": { | ||
"x": [0, 0.45], | ||
"y": [0.35, 0.65] | ||
} | ||
}, | ||
{ | ||
"legendrank": 1, | ||
"legendgroup": "pie", | ||
"type": "pie", | ||
"labels": ["z","x","x","x","y", "y"], | ||
"sort": false, | ||
"textinfo": "none", | ||
"domain": { | ||
"x": [0.55, 1], | ||
"y": [0.35, 0.65] | ||
} | ||
}, | ||
{"type": "scatter", "name": "2", "y": [2], "yaxis": "y", "legendgroup": "one", "legendrank": 2}, | ||
{"type": "scatter", "name": "1", "y": [1], "yaxis": "y", "legendgroup": "one", "legendrank": 1}, | ||
{"type": "bar", "name": "2", "y": [2], "yaxis": "y2", "legendgroup": "two", "legendrank": 2}, | ||
{"type": "scatter", "name": "3", "y": [3], "yaxis": "y", "legendgroup": "one", "legendrank": 3}, | ||
{"type": "bar", "name": "3", "y": [3], "yaxis": "y2", "legendgroup": "two", "legendrank": 1} | ||
], | ||
"layout": { | ||
"title": { | ||
"text": "legendrank" | ||
}, | ||
"hovermode": "x unified", | ||
"margin": { | ||
"t": 50 | ||
}, | ||
"width": 300, | ||
"height": 400, | ||
"yaxis2": { | ||
"domain": [0.7, 1] | ||
}, | ||
"yaxis": { | ||
"autorange": "reversed", | ||
"domain": [0, 0.3] | ||
} | ||
} | ||
} |
Oops, something went wrong.
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.
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.
replace "would be" with "are" please, throughout :)
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.
Done in a1f87b9