Title: Choropleth maps don't reset accurately when layout.geo.scope is changed · Issue #3831 · plotly/plotly.js · GitHub
Open Graph Title: Choropleth maps don't reset accurately when layout.geo.scope is changed · Issue #3831 · plotly/plotly.js
X Title: Choropleth maps don't reset accurately when layout.geo.scope is changed · Issue #3831 · plotly/plotly.js
Description: First and foremost, I thought I would mention that this issue is only occurring with Plotly.react as I was able to implement a correct alternative by using Plotly.newPlot but unfortunately means that I won't be able to use react-plotly f...
Open Graph Description: First and foremost, I thought I would mention that this issue is only occurring with Plotly.react as I was able to implement a correct alternative by using Plotly.newPlot but unfortunately means th...
X Description: First and foremost, I thought I would mention that this issue is only occurring with Plotly.react as I was able to implement a correct alternative by using Plotly.newPlot but unfortunately means th...
Opengraph URL: https://github.com/plotly/plotly.js/issues/3831
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Choropleth maps don't reset accurately when layout.geo.scope is changed","articleBody":"First and foremost, I thought I would mention that this issue is only occurring with `Plotly.react` as I was able to implement a correct alternative by using `Plotly.newPlot` but unfortunately means that I won't be able to use react-plotly for this component. \r\n\r\nWith that out of the way, the bug occurs when the layout scope is changed and either 1. a double click event is triggered or 2. reset is pressed in the mode bar. When the plot is changed through the dropdown though, there is no issue. All examples below can be reproduced in [this code pen](https://codepen.io/mbkupfer/pen/BEXONJ?editors=0010). \r\n\r\nIn cases where scope is not 'usa', the reset changed the lon/lat values to whatever the initial plot's geo scope was set at. This is very pronounced when switching from 'world' to 'north america', thus I chose that for the example, but this occurs in any situation. If the initial plot is set to 'north america', then it would be the reverse.\r\n\r\nIn cases where the plot is changed to 'usa' though, the js actually throws an error! The error is: \r\n`TypeError: centerPx is null`. \r\n\r\nSo this is actually two errors, but they both seem to have the same root cause. \r\n\r\nLet me know if I can provide any more clarity. ","author":{"url":"https://github.com/mbkupfer","@type":"Person","name":"mbkupfer"},"datePublished":"2019-05-03T04:39:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/3831/plotly.js/issues/3831"}
| 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:ef2e3484-2a25-8d02-0012-69081f4de96b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C16E:1D308B:ED3CB1:154FD85:6A5898CC |
| html-safe-nonce | 4e2f048a8ad8d4fc682a2fdf5e2408733d9d409418378cc888a01f7ea92ae77f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTZFOjFEMzA4QjpFRDNDQjE6MTU0RkQ4NTo2QTU4OThDQyIsInZpc2l0b3JfaWQiOiIzNjEyNzQzNjg4NzgxMzM4ODI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e138711c2ff44424e52828711f30c48dae94befb27bfcc82dd270ccdb9d29066 |
| hovercard-subject-tag | issue:439883603 |
| 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/3831/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1139fb51709bfd2078b577a2e7b0e3ae3da1a67043b4fc4ca64495282ee659c7/plotly/plotly.js/issues/3831 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1139fb51709bfd2078b577a2e7b0e3ae3da1a67043b4fc4ca64495282ee659c7/plotly/plotly.js/issues/3831 |
| og:image:alt | First and foremost, I thought I would mention that this issue is only occurring with Plotly.react as I was able to implement a correct alternative by using Plotly.newPlot but unfortunately means th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mbkupfer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width