Time-Series Bar Chart#

A bar chart showing values across time. This plot is useful for showing counts or totals over regular intervals like days, months, or years.

import pandas as pd
import numpy as np
import hvplot.pandas  # noqa

np.random.seed(0)
dates = pd.date_range("2024-01-01", periods=12, freq="ME")
values = np.random.randint(100, 500, size=12)
df = pd.DataFrame({'date': dates, 'sales': values})

df.hvplot.bar(
    x='date',
    y='sales',
    xlabel="Month",
    ylabel="Sales",
    title="Monthly Sales (Bokeh)",
)
import pandas as pd
import numpy as np
import hvplot.pandas  # noqa
hvplot.extension('matplotlib')

np.random.seed(0)
dates = pd.date_range("2024-01-01", periods=12, freq="ME")
values = np.random.randint(100, 500, size=12)
df = pd.DataFrame({'date': dates, 'sales': values})

df.hvplot.bar(
    x='date',
    y='sales',
    xlabel="Month",
    ylabel="Sales",
    title="Monthly Sales (Bokeh)",
)
This web page was generated from a Jupyter notebook and not all interactivity will work on this website.