I am trying to plot the occurrence of some predefined events (say A, B, C) throughout the year using a “calendar heatmap”, similar to that proposed in Colored calendar heatmap in dash.
Problem is, on a given day multiple events may occur. I would like to plot the different combinations (A+B, B+C, A+B+C, …) by splitting the associated heatmap cells in halves (or thirds) and color them with the labels’ colors.
This figure depicts an example:
What would be the best way to achieve this? I’ve considered different options but they all come with shortcomings:
- Use a datatable and then perform conditional style formatting of the cells with linear gradients. However, this then prevents me from using hover callbacks (I guess I could live without them but it would be nice to use them).
- Plot the heatmap for a single color, and then “fix” it for the remaining colors by adding some rectangle shapes on top. However, this feels hacky and it may be hard to make sure the colored rectangles align perfectly.