Title: Legendrank attribute in traces · Issue #5501 · plotly/plotly.js · GitHub
Open Graph Title: Legendrank attribute in traces · Issue #5501 · plotly/plotly.js
X Title: Legendrank attribute in traces · Issue #5501 · plotly/plotly.js
Description: A new attribute in all traces called legendrank which defaults to the index of the trace in the data array. The legend items will then be sorted by legendrank (ties broken by index in the data array) before being laid out. As an example ...
Open Graph Description: A new attribute in all traces called legendrank which defaults to the index of the trace in the data array. The legend items will then be sorted by legendrank (ties broken by index in the data arra...
X Description: A new attribute in all traces called legendrank which defaults to the index of the trace in the data array. The legend items will then be sorted by legendrank (ties broken by index in the data arra...
Opengraph URL: https://github.com/plotly/plotly.js/issues/5501
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Legendrank attribute in traces","articleBody":"A new attribute in all traces called `legendrank` which defaults to the index of the trace in the `data` array. The legend items will then be sorted by `legendrank` (ties broken by index in the `data` array) before being laid out.\r\n\r\nAs an example for:\r\n\r\n```\r\ndata = [\r\n{name: \"A\", legendrank: 2}\r\n{name: \"D\", legendrank: 4, legendgroup: \"G2\"}\r\n{name: \"E\", legendrank: 4, legendgroup: \"G2\"}\r\n{name: \"B\", legendrank: 1, legendgroup: \"G1\"}\r\n{name: \"C\", legendrank: 3, legendgroup: \"G1\"}\r\n]\r\n```\r\n\r\nthen I would expect the legend order to be: `G1(B,C), A, G2(D,E)`.\r\n\r\nNote that the group order matters in the example above, when this will be coupled with #5260 and/or `legendgroupgap`.","author":{"url":"https://github.com/nicolaskruchten","@type":"Person","name":"nicolaskruchten"},"datePublished":"2021-02-13T15:41:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/5501/plotly.js/issues/5501"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9ef51735-45a8-a4e2-6b5b-da55bdd2ce87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 988E:A7B7C:44E982:5F79B8:6A59CB53 |
| html-safe-nonce | 7a2641a26564232e0736e6ba82a92f14e2b9cf45caae80ba8aec36ec346c1205 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODhFOkE3QjdDOjQ0RTk4Mjo1Rjc5Qjg6NkE1OUNCNTMiLCJ2aXNpdG9yX2lkIjoiNTcyODMzOTU1Mzk1NTcyODIxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2119f86a241b1b9e2e17004679a4e622d16335606b8939cc47f299168094db29 |
| hovercard-subject-tag | issue:807771451 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/5501/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dcea3a0427696510f7ee0ae12ce471a56fc726df01a9d869834101e57ec1959a/plotly/plotly.js/issues/5501 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dcea3a0427696510f7ee0ae12ce471a56fc726df01a9d869834101e57ec1959a/plotly/plotly.js/issues/5501 |
| og:image:alt | A new attribute in all traces called legendrank which defaults to the index of the trace in the data array. The legend items will then be sorted by legendrank (ties broken by index in the data arra... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nicolaskruchten |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab680789ae4a316cdaf0d5a292a1760140931cc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width