Skip to content
New issue

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

Support datetime column in for rasterize selector #6022

Closed
hoxbro opened this issue Dec 11, 2023 · 0 comments · Fixed by #6023
Closed

Support datetime column in for rasterize selector #6022

hoxbro opened this issue Dec 11, 2023 · 0 comments · Fixed by #6023
Labels
type: bug Something isn't correct or isn't working

Comments

@hoxbro
Copy link
Member

hoxbro commented Dec 11, 2023

The following will show hover information as numbers and not as datetimes.

import holoviews as hv
import numpy as np
import pandas as pd
import datashader as ds
from holoviews.operation.datashader import rasterize

hv.extension("bokeh")

n = 10000
df = pd.DataFrame(
    {
        "x": np.random.uniform(-180, 180, n),
        "y": np.random.uniform(-90, 90, n),
        "Timestamp": pd.date_range(start="2023-01-01", periods=n, freq="D"),
        "Value": np.random.rand(n) * 100,
    }
)

rasterize(hv.Points(df), aggregator=ds.count(), selector=ds.first("Value")).opts(tools=["hover"])

image

First discovered in holoviz/hvplot#1206

@hoxbro hoxbro added the type: bug Something isn't correct or isn't working label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant