Title: px.timeline chart incorrectly displays timeframes of 10 seconds and smaller. · Issue #2658 · plotly/plotly.py · GitHub
Open Graph Title: px.timeline chart incorrectly displays timeframes of 10 seconds and smaller. · Issue #2658 · plotly/plotly.py
X Title: px.timeline chart incorrectly displays timeframes of 10 seconds and smaller. · Issue #2658 · plotly/plotly.py
Description: The following piece of python code that uses a ISO-formatted date string produces the graph below. import plotly.express as px import pandas as pd bars = pd.DataFrame([{'Task': 'kitter_pick', 'Start': '2020-07-22T23:09:18.221013', 'Finis...
Open Graph Description: The following piece of python code that uses a ISO-formatted date string produces the graph below. import plotly.express as px import pandas as pd bars = pd.DataFrame([{'Task': 'kitter_pick', 'Star...
X Description: The following piece of python code that uses a ISO-formatted date string produces the graph below. import plotly.express as px import pandas as pd bars = pd.DataFrame([{'Task': 'kitter_...
Opengraph URL: https://github.com/plotly/plotly.py/issues/2658
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"px.timeline chart incorrectly displays timeframes of 10 seconds and smaller.","articleBody":"\r\nThe following piece of python code that uses a ISO-formatted date string produces the graph below.\r\n```\r\nimport plotly.express as px\r\nimport pandas as pd\r\n\r\nbars = pd.DataFrame([{'Task': 'kitter_pick', 'Start': '2020-07-22T23:09:18.221013', 'Finish': '2020-07-22T23:09:25.221013', 'Counter': 2465}])\r\n\r\nfig = px.timeline(bars, x_start=\"Start\", x_end=\"Finish\", y=\"Task\",hover_name='Counter')\r\nfig.update_yaxes(autorange=\"reversed\") # otherwise tasks are listed from the bottom up\r\nfig.show()\r\n```\r\n[result][1]\r\nThe snippet is similar to https://plotly.com/python/time-series/ from the plotly documentation.\r\n\r\nThe timescale is completely incorrect due to the finish attribute being incorrectly interpreted by plotly.\r\n\r\nWhen changing the timestrings slightly you obtain the correct result:\r\n```\r\nbars = pd.DataFrame([{'Task': 'kitter_pick', 'Start': '2020-07-22T23:09:18.221013', 'Finish': '2020-07-22T23:10:25.221013', 'Counter': 2465}])\r\n```\r\n[correct result][2]\r\n\r\nDoes anybody know why this happens and if there is a way around this?\r\n\r\nI have also tried:\r\n* datetime.datetime objects\r\n* np.datetime64 objects\r\n\r\nBoth gave the same results\r\n\r\n[stackoverflow link](https://stackoverflow.com/questions/63035572/why-does-plotly-incorrectly-interpret-this-iso-datetime-string)\r\n\r\n [1]: https://i.stack.imgur.com/SDmeV.png\r\n [2]: https://i.stack.imgur.com/c5q6z.png","author":{"url":"https://github.com/Denpeer","@type":"Person","name":"Denpeer"},"datePublished":"2020-07-22T14:35:48Z","url":"https://github.com/plotly/plotly.py/issues/2658"}
| 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:8ea0de98-a6a1-5f6a-8196-cc2c572519ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C43C:2D02CB:51ABA4:6BE05A:6B017A40 |
| html-safe-nonce | d72cc73118345c758fc3c47da9ac756552c1a92c07749d9fce9588e38f446c63 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDNDOjJEMDJDQjo1MUFCQTQ6NkJFMDVBOjZCMDE3QTQwIiwidmlzaXRvcl9pZCI6Ijg0NzE4MjgxNTE0MTA5ODE0NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dd9874d78e46c54707d51ad1653c9e96d287fba6b828769a68c1380180b43c20 |
| hovercard-subject-tag | issue:663811897 |
| 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/2658/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ae1e8be7b2bb405c7cdef9965e747fa96b91862ff6939bac1e7de3da88a4013/plotly/plotly.py/issues/2658 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ae1e8be7b2bb405c7cdef9965e747fa96b91862ff6939bac1e7de3da88a4013/plotly/plotly.py/issues/2658 |
| og:image:alt | The following piece of python code that uses a ISO-formatted date string produces the graph below. import plotly.express as px import pandas as pd bars = pd.DataFrame([{'Task': 'kitter_pick', 'Star... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Denpeer |
| 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