CalendarHeatmap icon indicating copy to clipboard operation
CalendarHeatmap copied to clipboard

Object with YYYY-MM-DD Keys Doesn't work

Open JamoCA opened this issue 2 years ago • 1 comments

I've tried using an object with v.1.3.1 and it doesn't render anything when passed as data to the CalendarHeatmap function.

// Provide dates as an object.
// The key is the date, the value is event count. Make sure the date has this format: `YYYY-MM-DD`
var data = { "2017-09-23": 2, ...}

In order to render a graph, the only thing that works is to use an array of objects.

// Provide dates as an array of objects.
// Provide the keys `count` and date. Make sure, each date provided is unique for that day.
var data = [{count: 2, date: "2017-09-23"}, ...]

JamoCA avatar Oct 22 '21 00:10 JamoCA

Thank you for reporting the issue, I will check and provide a fix as soon as I find the time.

SeBassTian23 avatar Nov 11 '21 16:11 SeBassTian23