I wanted to use this to visualize my habit tracking data, and so I needed to specify the maximum possible count manually (instead of it being the max of counts present in input data).
Sample usage:
echo '{
"2020-05-16": 2,
"2020-05-17": 6,
"2020-05-18": 1,
"2020-05-19": 10,
"2020-05-20": 30
}' | calendarheatmap -maxcount 10 > chart.png

I wanted to make the counts be float
instead of int
, but I had doubts on whether your code assumes that they are int
s. float
s are more general and usable.
PS: I have also fixed os.Setenv("CALENDAR_HEATMAP_ASSETS_PATH", "charts/assets")
with a default value for the actual Getenv
.
PPS: Take a look at https://github.com/NightMachinary/calendarheatmap/blob/master/tests2.org for the later commits' effects.