We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using VS Code ipython notebook, bokeh backend, macOS 14.5
[tool.poetry] name = "blah" version = "0.1.0" description = "" authors = ["Nick Irvine <115657443+nfi-hashicorp@users.noreply.github.com>"] [tool.poetry.dependencies] python = "^3.12" numpy = "^2.1.0" pandas = "^2.2.2" holoviews = "^1.19.1" [tool.poetry.group.dev.dependencies] ipykernel = "^6.29.5" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"
% code --version 1.92.1 eaa41d57266683296de7d118f574d0c2652e1fc4 arm64
When combining data with tz-aware datetimes, bars and overlays, we get this garbled mess:
instead of this:
Based on bars example
import holoviews as hv import pandas as pd hv.extension('bokeh') from bokeh.plotting import show data = pd.DataFrame({"x": pd.date_range("2017-01-01", "2017-01-03"), "y": [0, 2, -1]}) data_utc = pd.DataFrame({"x": pd.date_range("2017-01-01", "2017-01-03", tz="UTC"), "y": [0, 2, -1]}) bars = hv.Bars(data, ["x"], ["y"]) bars_utc = hv.Bars(data_utc, ["x"], ["y"]) # works show(hv.render(bars)) # works show(hv.render(hv.Overlay([bars]))) # works show(hv.render(bars_utc)) # busted show(hv.render(hv.Overlay([bars_utc])))
Renders as:
Strip the timezone
data_stripped = data_utc.copy() data_stripped["x"] = data_utc["x"].apply(lambda x: x.tz_convert(None)) bars_stripped = hv.Bars(data_stripped, ["x"], ["y"]) show(hv.render(hv.Overlay([bars_stripped])))
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
ALL software version info
Using VS Code ipython notebook, bokeh backend, macOS 14.5
Description of expected behavior and the observed behavior
When combining data with tz-aware datetimes, bars and overlays, we get this garbled mess:
instead of this:
Complete, minimal, self-contained example code that reproduces the issue
Based on bars example
Renders as:
Workaround
Strip the timezone
The text was updated successfully, but these errors were encountered: