Richardsl / heatmap-calendar-obsidian

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

Hover Preview - Unexpected Result #34

Closed ObsidianTTRPGProject closed 2 years ago

ObsidianTTRPGProject commented 2 years ago

Does anyone know why I am getting this result with the new Hover Preview?

CODE:


dv.span("**💀🧙‍♂️🧙‍♀️ D&D Session 🧙‍♀️🧙‍♂️💀**")

const calendarData = {
    colors: {
        blue: ["#ffdf04","#ffbe04","#ff9a03","#ff6d02","#ff2c01"]
    },
    entries: [],
    showCurrentDayBorder: false
}

for(let page of dv.pages('"0. Session Journals/Deadly Depth Inn"').where(p=>p.players)){
    calendarData.entries.push({
        date: page.sessionDate, // (required) Format YYYY-MM-DD
        intensity: page.players,
        content: await dv.span(`[](${page.file.name})`), //for hover preview
    })  
}

renderHeatmapCalendar(this.container, calendarData)

RESULT: Each box is displaying the title of the Note instead of nothing and the mouse over does not work. image

NOTE FRONT MATTER

---
sessionDate: 2022-02-06
players: 6
type: Session Journal
---
ObsidianTTRPGProject commented 2 years ago

Resolved: File has to be named: dd-mm-yyyy

Richardsl commented 2 years ago

Really? YYYY-MM-DD doesn't work?

ObsidianTTRPGProject commented 2 years ago

I had a description in my heading also.

dd-mm-yyyy

It didn't like the