Title: Horizontal legend layouts with long series names become vertical · Issue #960 · plotly/plotly.js · GitHub
Open Graph Title: Horizontal legend layouts with long series names become vertical · Issue #960 · plotly/plotly.js
X Title: Horizontal legend layouts with long series names become vertical · Issue #960 · plotly/plotly.js
Description: Repro cases: http://codepen.io/anon/pen/RGozGE I've encountered an odd behavior on horizontal legends with long series names. If the series names are relatively short, setting layout.legend.orientation to 'h' does indeed produce a reason...
Open Graph Description: Repro cases: http://codepen.io/anon/pen/RGozGE I've encountered an odd behavior on horizontal legends with long series names. If the series names are relatively short, setting layout.legend.orienta...
X Description: Repro cases: http://codepen.io/anon/pen/RGozGE I've encountered an odd behavior on horizontal legends with long series names. If the series names are relatively short, setting layout.legend.ori...
Opengraph URL: https://github.com/plotly/plotly.js/issues/960
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Horizontal legend layouts with long series names become vertical","articleBody":"Repro cases: http://codepen.io/anon/pen/RGozGE\n\nI've encountered an odd behavior on horizontal legends with long series names. If the series names are relatively short, setting `layout.legend.orientation` to `'h'` does indeed produce a reasonably laid out horizontal legend where each line of the legend is filled with as many series as possible (first example in the codepen). If, however, a series has a very long name, each series is placed on its own row in the legend (effectively becoming a vertical legend), even though there's clearly room for series with shorter names to be placed on the same rows (second example in the codepen). I think the more logical behavior should be something like [this](http://imgur.com/kDzSsnz), where the series are packed into rows as closely as their names allow.\n\nI'm happy to make a PR to improve this (it should just involve fiddling with the logic near [legend/draw.js:603](https://github.com/plotly/plotly.js/blob/9b249c2f7facb1c323dd226f0b0dbdee91075b7e/src/components/legend/draw.js#L603)). Should the current behavior be preserved via a new legend attribute whose default is the current behavior and has an option for the new behavior, or is the current behavior never reasonable and should be replaced?\n\nCC to @markwatabe who originally discussed this issue with me and helped with the proposed solution.\n","author":{"url":"https://github.com/mboorstin","@type":"Person","name":"mboorstin"},"datePublished":"2016-09-21T17:50:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/960/plotly.js/issues/960"}
| 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:de6ef68e-4ee4-a674-2767-1d032bd67e39 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A4C:1418:236E274:3364C98:6A565E4D |
| html-safe-nonce | 01104a3f32e81842281128b34f5f3952a21cb6ee3799c8c5a34c935f89a77f7b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTRDOjE0MTg6MjM2RTI3NDozMzY0Qzk4OjZBNTY1RTREIiwidmlzaXRvcl9pZCI6IjUyNDM0NjkwOTQwNzk5MzQyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b8b51ba61cd216fb7893214fd30980603343f14a824c03ea50a3042e964cb8bf |
| hovercard-subject-tag | issue:178417245 |
| 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/960/issue_layout |
| twitter:image | https://opengraph.githubassets.com/191b8b91991a2d5e3984092d2bf183a56d79557cf692262bb98fc5e273e1fcec/plotly/plotly.js/issues/960 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/191b8b91991a2d5e3984092d2bf183a56d79557cf692262bb98fc5e273e1fcec/plotly/plotly.js/issues/960 |
| og:image:alt | Repro cases: http://codepen.io/anon/pen/RGozGE I've encountered an odd behavior on horizontal legends with long series names. If the series names are relatively short, setting layout.legend.orienta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mboorstin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6a3afe34dff341ad10912db44becf282289d7f2af20576241738530fbb28de01 |
| 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 | b71002134df95575e9f6c2945a64d454b0be181e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width