Richardsl / heatmap-calendar-obsidian

An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Apache License 2.0
614 stars 102 forks source link

Cells are not showing #65

Closed MudcrabDev closed 1 year ago

MudcrabDev commented 1 year ago

I'm trying to troubleshoot why my heatmap isn't working so I whipped up this example. Nothing shows when this is rendered:

dv.span("Sleep Heatmap")

const calendarData = {
    intensityScaleStart: 1,   
    intensityScaleEnd: 12,
    year: 2023,  
    entries: [], 
}

calendarData.entries.push = ({
        date: "2023-01-13",
        intensity: 5,
})

renderHeatmapCalendar(this.container, calendarData)

image

I'm trying to setup a heatmap in my vault and I was testing using the file names (example: "2023-01-11") and including the date as a field within a note, but the cells are not appearing for some reason and I can't figure out why. Dataview appears to be working properly as it's retrieving the data from the notes without any problem, it just doesn't appear on the heatmap itself. I'm not seeing any errors in the web console either.

I can't figure out if I'm doing something wrong or it's broken. For what it's worth another plugin I use is having problems as well, so maybe an update broke things. I tried the example vault and the heatmaps there still work. Linux Appimage, Obsidian 1.1.9, Heatmap Calendar 0.5.3

MudcrabDev commented 1 year ago

I just realized my error. There's an equals sign on this line: calendarData.entries.push = ({

It should be this: calendarData.entries.push({

How embarrasing. I'm going to leave this here however in case anyone else encounters the same problem, hopefully my mistake might help them seeing as this doesn't produce any errors in the console and was difficult to troubleshoot.