# Creating Calendar Heatmaps

**URL:** <https://community.plotly.com/t/creating-calendar-heatmaps/62173>\
**Category:** 📊 Plotly Python\
**Tags:** show-and-tell\
**Created:** [March 22, 2022, 6:45pm UTC](https://community.plotly.com/t/creating-calendar-heatmaps/62173 "2022-03-22T18:45:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunorosilva](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/brunorosilva/32/18550_2.png) [@brunorosilva](https://community.plotly.com/u/brunorosilva)\
**Post date:** [March 22, 2022, 6:45pm UTC](https://community.plotly.com/t/creating-calendar-heatmaps/62173/1 "2022-03-22T18:45:56Z")

</div>

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](https://community.plotly.com/t/colored-calendar-heatmap-in-dash/10907/16) 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](https://github.com/brunorosilva/plotly-calplot) is open-source and available on [my Github](https://github.com/brunorosilva))

I’ve also written an article on medium describing exatcly how to use it, [check it out](https://python.plainenglish.io/interactive-calendar-heatmaps-with-plotly-the-easieast-way-youll-find-5fc322125db7)

Here’s what some samples look like

```auto
fig = calplot(
    dummy_df,
    x="ds",
    y="value",
    gap=0
)
fig.show()

```

 ![1_ry_c9NfaxBzqJgh2gNMLIA](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/1/8/18523e480eb7b59a59692ab6bc2b5bb05a6e81ec.png)

```auto
fig = calplot(
    dummy_df,
    x="ds",
    y="value",
    dark_theme=True
)
fig.show()

```

 ![1_XGNv8zBIk6WQLWJHdqtmlQ](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/6/3/63fe00448d3aa32dfde4f6d2cd0608deb6565185.png)

```auto
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()

```

 ![1_QumUagn94Yv5O0QK1d4OJw](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/1/e/1efee049abc293db5e716b8ebd07d758cb9ef7a9.png)

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [March 22, 2022, 8:36pm UTC](https://community.plotly.com/t/creating-calendar-heatmaps/62173/2 "2022-03-22T20:36:24Z")

</div>

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:

```auto
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")]
)

```

---

<div class="post-metadata">

**Author:** ![kmhurchla](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/kmhurchla/32/19859_2.png) [@kmhurchla](https://community.plotly.com/u/kmhurchla)\
**Post date:** [March 25, 2022, 1:33pm UTC](https://community.plotly.com/t/creating-calendar-heatmaps/62173/3 "2022-03-25T13:33:36Z")

</div>

Excited to check this out @brunorosilva, looks awesome and congrats on working through the challenges you had.

---

<div class="post-metadata">

**Author:** ![tyuji](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/tyuji/32/33827_2.png) [@tyuji](https://community.plotly.com/u/tyuji)\
**Post date:** [January 29, 2026, 3:19pm UTC](https://community.plotly.com/t/creating-calendar-heatmaps/62173/4 "2026-01-29T15:19:43Z")

</div>

I’m continuing the development of the plotly-calplot project under the repository  
[https://github.com/thomazyujibaba/plotly-calheatmap](https://github.com/thomazyujibaba/plotly-calheatmap)

Several improvements and new features have already been implemented, including:

1. Built-in aggregation — pass raw event data with agg=“sum” | “mean” | “count” | “max” instead of pre-aggregating

2. Vertical orientation — render months as rows using vertical=True

3. Hourly heatmap — hourly\_calheatmap() for hour × day grids per month

4. Month gap spacing — extra visual separation between months via month\_gap

5. Multi-year support with independent tick configurations per subplot

6. Year navigation buttons (navigation=True)

7. Localization support (locale parameter) for month and day names (e.g. pt\_BR, es, fr)

8. Customizable hovertemplate with friendly {placeholder} syntax and customdata columns

9. Fully customizable colorscales, including custom color lists

10. Month separator lines, configurable month label placement, and color scale with labels and ticks

11. Flexible layout options: gap, margin, font\_\*, paper\_bgcolor, plot\_bgcolor, and more

Special thanks to **[@brunorosilva](https://github.com/brunorosilva)** for the original project and foundation that made this continuation possible 🙏
