Title: [BUG]: `sankey`: `node.x` / `node.y` of `0` is ignored · Issue #8150 · plotly/plotly.js · GitHub
Open Graph Title: [BUG]: `sankey`: `node.x` / `node.y` of `0` is ignored · Issue #8150 · plotly/plotly.js
X Title: [BUG]: `sankey`: `node.x` / `node.y` of `0` is ignored · Issue #8150 · plotly/plotly.js
Description: Description Node coordinates of 0 for node.x or node.yare ignored and the node gets positioned automatically. Screenshots With 0 coords: With close to 0 coords: Steps to reproduce Open Plotly devtools and paste the following into browser...
Open Graph Description: Description Node coordinates of 0 for node.x or node.yare ignored and the node gets positioned automatically. Screenshots With 0 coords: With close to 0 coords: Steps to reproduce Open Plotly devto...
X Description: Description Node coordinates of 0 for node.x or node.yare ignored and the node gets positioned automatically. Screenshots With 0 coords: With close to 0 coords: Steps to reproduce Open Plotly devto...
Opengraph URL: https://github.com/plotly/plotly.js/issues/8150
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG]: `sankey`: `node.x` / `node.y` of `0` is ignored","articleBody":"### Description\n\nNode coordinates of `0` for `node.x` or `node.y`are ignored and the node gets positioned automatically.\n\n### Screenshots\n\nWith `0` coords:\n\n\u003cimg width=\"774\" height=\"450\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/337ea34c-0682-417a-baa6-ec082f3b91c5\" />\n\nWith close to `0` coords:\n\n\u003cimg width=\"774\" height=\"450\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5dc5cc29-6514-42c2-86a8-8a9dce1e571d\" />\n\n### Steps to reproduce\n\n- Open Plotly devtools and paste the following into browser devtools:\n```js\nPlotly.newPlot('g', [{\n type: 'sankey',\n arrangement: 'fixed',\n node: {label: ['a', 'b', 'c'], x: [0, 0.5, 0.8], y: [0, 0, 0.7]},\n link: {source: [0, 1], target: [1, 2], value: [1, 1]}\n}], {margin: {l: 0, r: 0, t: 0, b: 0}});\n```\n- Note that the center of `a` is not in the top left corner of the plot\n\n### Notes\n\n- This issue stems from the fact that the \"Force node position\" loop in `src/traces/sankey/render.js` uses a truthy test (`if(trace.node.x[p] && trace.node.y[p])`), and `0` is falsy\n- The fix is to change the test for missing values to `!= null`\n- The mock `sankey_x_y_with_arrows.json` sets `y: [0, 0, 0]`, so the fix changes its baseline\n- Discovered while working on #7826 \n","author":{"url":"https://github.com/camdecoster","@type":"Person","name":"camdecoster"},"datePublished":"2026-10-27T20:59:24Z","url":"https://github.com/plotly/plotly.js/issues/8150"}
| 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:8a6724b7-315b-0f64-8d01-4d505464c94d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB2E:3A8E64:7F2CAF:A8A1FE:6B01AE2C |
| html-safe-nonce | 2b36d551ac6b5b946c51e57e16ca2592f2fbf9ab21315e5a5542483bf19817d9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjJFOjNBOEU2NDo3RjJDQUY6QThBMUZFOjZCMDFBRTJDIiwidmlzaXRvcl9pZCI6IjU2ODQ0NDc5MzQ1NDkxNzU4NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6b0c784c243980d21586554644d9bac2703fd5c429c545e89654414fc9c42880 |
| hovercard-subject-tag | issue:6067588440 |
| 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/8150/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d0def0011589915b8d610cc494e1f00d16681f051662906fe9137d037c25547/plotly/plotly.js/issues/8150 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d0def0011589915b8d610cc494e1f00d16681f051662906fe9137d037c25547/plotly/plotly.js/issues/8150 |
| og:image:alt | Description Node coordinates of 0 for node.x or node.yare ignored and the node gets positioned automatically. Screenshots With 0 coords: With close to 0 coords: Steps to reproduce Open Plotly devto... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | camdecoster |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width