Title: offsetgroup with horizontally stacked/relative bar traces · Issue #5007 · plotly/plotly.py · GitHub
Open Graph Title: offsetgroup with horizontally stacked/relative bar traces · Issue #5007 · plotly/plotly.py
X Title: offsetgroup with horizontally stacked/relative bar traces · Issue #5007 · plotly/plotly.py
Description: It appears the feature to allow offsetgroup to work with stacked/relative bar traces (plotly/plotly.js#7009) does not work with horizontally oriented bar traces. Taking the example from the documentation https://plotly.com/python/bar-cha...
Open Graph Description: It appears the feature to allow offsetgroup to work with stacked/relative bar traces (plotly/plotly.js#7009) does not work with horizontally oriented bar traces. Taking the example from the documen...
X Description: It appears the feature to allow offsetgroup to work with stacked/relative bar traces (plotly/plotly.js#7009) does not work with horizontally oriented bar traces. Taking the example from the documen...
Opengraph URL: https://github.com/plotly/plotly.py/issues/5007
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"offsetgroup with horizontally stacked/relative bar traces","articleBody":"\nIt appears the feature to allow offsetgroup to work with stacked/relative bar traces (https://github.com/plotly/plotly.js/pull/7009) does not work with horizontally oriented bar traces. Taking the example from the documentation\n\nhttps://plotly.com/python/bar-charts/#grouped-stacked-bar-chart\n\nif I reverse the x and y axis and set orientation to 'h', the traces are not separated by the different offset groups:\n\n```\nimport plotly.graph_objects as go\n\ndata = [\n go.Bar(\n y=['Q1', 'Q2', 'Q3', 'Q4'],\n x=[150, 200, 250, 300],\n name='New York',\n offsetgroup=\"USA\",\n orientation='h'\n ),\n go.Bar(\n y=['Q1', 'Q2', 'Q3', 'Q4'],\n x=[180, 220, 270, 320],\n name='Boston',\n offsetgroup=\"USA\",\n orientation='h'\n ),\n go.Bar(\n y=['Q1', 'Q2', 'Q3', 'Q4'],\n x=[130, 170, 210, 260],\n name='Montreal',\n offsetgroup=\"Canada\",\n orientation='h'\n ),\n go.Bar(\n y=['Q1', 'Q2', 'Q3', 'Q4'],\n x=[160, 210, 260, 310],\n name='Toronto',\n offsetgroup=\"Canada\",\n orientation='h'\n )\n]\n\nlayout = go.Layout(\n title={\n 'text': 'Quarterly Sales by City, Grouped by Country'\n },\n yaxis={\n 'title': {\n 'text': 'Quarter'\n }\n },\n xaxis={\n 'title': {\n 'text': 'Sales'\n }\n },\n barmode='stack'\n)\n\nfig = go.Figure(data=data, layout=layout)\n\nfig.show()\n\n```\n\n\n\nUsing plotly 6.0.0.","author":{"url":"https://github.com/neutralino","@type":"Person","name":"neutralino"},"datePublished":"2025-02-03T11:48:59Z","url":"https://github.com/plotly/plotly.py/issues/5007"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:cdcb9809-ae31-5786-8094-23424886e5ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89EE:1F2D:10F6FF0:156EE61:6B014E61 |
| html-safe-nonce | ae7e4d5c3d95662602a25ccee84c08e7f29594de1fcbd7f3f3e7422068a8c3b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUVFOjFGMkQ6MTBGNkZGMDoxNTZFRTYxOjZCMDE0RTYxIiwidmlzaXRvcl9pZCI6IjIxMDYwNDQ1MjExMjgyMTgyMDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b7e71414faddf9ef93e05cdac89e78e33aa5baa0d3ce77cbc4cb14ebf4f37a36 |
| hovercard-subject-tag | issue:2827286329 |
| 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.py/5007/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35977af75016147e2482691709bb63bbe4a6315a131a02ef5adf3bd2f6271ace/plotly/plotly.py/issues/5007 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35977af75016147e2482691709bb63bbe4a6315a131a02ef5adf3bd2f6271ace/plotly/plotly.py/issues/5007 |
| og:image:alt | It appears the feature to allow offsetgroup to work with stacked/relative bar traces (plotly/plotly.js#7009) does not work with horizontally oriented bar traces. Taking the example from the documen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | neutralino |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579099 |
| octolytics-dimension-repository_nwo | plotly/plotly.py |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579099 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.py |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width