Hi,
On my way to developing an application, I had a really hard time with making an interactive Calendar Heatmap (kinda like the one on Github and Gitlab), and thanks to this post on Plotly’s community forum I was able to make it.
Using the code provided and adding my own I managed to fix some bugs with pandas weekly data and make it into a package for anyone to use.
(This project is open-source and available on my Github )
I’ve also written an article on medium describing exatcly how to use it, check it out
Here’s what some samples look like
fig = calplot(
dummy_df,
x="ds",
y="value",
gap=0
)
fig.show()
fig = calplot(
dummy_df,
x="ds",
y="value",
dark_theme=True
)
fig.show()
fig = calplot(
dummy_df,
x="ds",
y="value",
dark_theme=True,
years_title=True,
colorscale="purples",
gap=0,
name="Data",
month_lines_width=3,
month_lines_color="#fff"
)
fig.show()
6 Likes
Welcome to the community @brunorosilva
Thank you for sharing this app with us. What I especially like about this is also the capability you give the user to create custom color scales easily:
fig = calplot(
dummy_df,
x="ds",
y="value",
gap=0,
colorscale=[(0.00, "white"), (0.33, "#999"),
(0.33, "#999"), (0.66, "#444"),
(0.66, "#444"), (1.00, "#000")]
)
2 Likes
Excited to check this out @brunorosilva , looks awesome and congrats on working through the challenges you had.
1 Like
tyuji
January 29, 2026, 3:19pm
4
I’m continuing the development of the plotly-calplot project under the repository
https://github.com/thomazyujibaba/plotly-calheatmap
Several improvements and new features have already been implemented, including:
Built-in aggregation — pass raw event data with agg=“sum” | “mean” | “count” | “max” instead of pre-aggregating
Vertical orientation — render months as rows using vertical=True
Hourly heatmap — hourly_calheatmap() for hour × day grids per month
Month gap spacing — extra visual separation between months via month_gap
Multi-year support with independent tick configurations per subplot
Year navigation buttons (navigation=True)
Localization support (locale parameter) for month and day names (e.g. pt_BR, es, fr)
Customizable hovertemplate with friendly {placeholder} syntax and customdata columns
Fully customizable colorscales, including custom color lists
Month separator lines, configurable month label placement, and color scale with labels and ticks
Flexible layout options: gap, margin, font_*, paper_bgcolor, plot_bgcolor, and more
Special thanks to @brunorosilva for the original project and foundation that made this continuation possible
1 Like