New Plugin: Heatmap Calendar

Hi all,

I’ve just released a progress tracker plugin called Heatmap Calendar for Obsidian. You can find it in the third-party plugins browser within the app.

Its intended to be used in tandem with Dataview JS to track Goals, Progress, Habits, Tasks, Exercise, New Year Resolutions, Finances or anything you want.

15 Likes

VERY HAPPY that someone is working on this! Great job OP, would love to see more work on this

3 Likes

Very cool plugin! Thank you very much. I have a question / feature proposal:
Is it possible to search for Data in Tags?
For example I am tracking Data with “obsidian-tracker”. Here you can add data to tags like this:
#mytag:15 or #mymultipledatatag:15/2/28

I´ve read the documentation of dataview but didn´t find a solution for searching data inside of tags.

If you want to have a look at the tracker:

Thank you very much for this plugin!!
I tried to adapt the code within the dataviewjs block in order to push to the calendar if a reoccurring task from a daily not is checked/completed or not I tried something like

for(let page of dv.pages('"PeriodicNotes/DailyNotes"').where(p => file.tasks.where(t => t.text === "NAME-OF-TASK").where(j => j.completed)){
	 
    calendarData.entries.push({
        date: page.file.name,
        content: await dv.span(`[✅](${page.file.name})`), //for hover preview
    }) 
}

but it did not work. Can someone help out? Thanks.

1 Like

Did you find the solution to this one?

Unfortunately not :frowning:

1 Like

@richardsl you think this is possible?

@richardsl - I think the plugin may be broken for the switch to 2023. I’m not seeing anything come up in the calendar for today, but the calendar shows the 2023 calendar. (So, the calendar is rendering 2023, but it’s not pulling events from 2023 into it.)

Also, I’d like to request a toggle buttons to go back/forth to the previous years. That would be awesome!

Thanks for your plugin. I use it daily!!!

I’m an idiot… the calendar works fine for 2023. Please disregard the bug…

(Still would love to see the toggle to move between years tho!)

Can you help me with my Queries

  1. Why it is not displaying anything
dv.span("** History**") 
const calendarData = {
    colors: {    
        green:       ["#c6e48b", "#7bc96f", "#49af5d", "#2e8840", "#196127"]
    },
    entries: []             
}
for (let page of dv.pages('"History_Research"').where(p => p.Heatmap)) {
   
    calendarData.entries.push(
        {
        date: page.file.name,   
        intensity:page.Heatmap 
    }
    )
}

renderHeatmapCalendar(this.container, calendarData)

"History_Research " is a folder with pages inside should a use journals or a dedicated page.


This is the output in the page named Heatmap
Can somebody tell me my faults and how to solve the issue

There is a good chance that the file names are not in the format YYYY-MM-DD. If you have a file name such as: YYYY-MM-DD dddd (i.e. 2024-01-01 Monday) then you will need to format your date parameter to only include the date value. Here’s my solution for doing that given the example mentioned:

const fileNameSplit = page.file.name.split(" "); // split file name into array as [date, name]
const date = fileNameSplit[0]; // Only use the first element, which is the date YYYY-MM-DD

Hi, I am Using the “Reminder” plugin with which my Tasks/to dos look like this:

- [ ] "Some random Task"  ⏰ YYYY-MM-DD 📅 YYYY-MM-DD

in this configuration “:alarm_clock: YYYY-MM-DD” is the Due date or reminder date and “:date: YYYY-MM-DD” is the date on which the task was originally issued.

A completed tasks looks like:

  • “Some Random Task” :white_check_mark: YYYY-MM-DD

Where :white_check_mark: YYYY-MM-DD is the date on which the task is compleded.

Further, I often (espacially in my daily notes, I use “nested tasks” i.e. something like:

  • “Some random Main-Task” :alarm_clock: YYYY-MM-DD :date: YYYY-MM-DD
    - “Some random Sub-Task” :alarm_clock: YYYY-MM-DD :date: YYYY-MM-DD
    - “Some Random already completed Sub-Task” :white_check_mark: YYYY-MM-DD

With this background and the code provided below, I have the following issues:

Issue A: The heat map is somehow disregarding the dates on completed “Sub-Tasks” and is counting them also for later days. I am not 100% sure but I think it is only for those in the daily note. For example today, “sub tasks” that were completed last week are still counted if the main task is not yet completed in the daily note.

Issue B: I would like to have a heat map for how many tasks are due in future. i.e. that (in a different block) the plugin is counting how many tasks have their due date (:alarm_clock: YYYY-MM-DD) as a specific time in future and is displaying a heat map for , lets say the next 6 month or year.

for all this, I would like the plugin to consider every task globally regardless if from meeting notes, dailies or whatever else.

Here is the code I am using right now:

title: Tasks Completed
graphType: month-track
dateRangeValue: 2
dateRangeType: LATEST_YEAR
startOfWeek: 0
showCellRuleIndicators: true
titleStyle:
  textAlign: left
  fontSize: 15px
  fontWeight: normal
dataSource:
  type: ALL_TASK
  value: ""
  dateField:
    type: FILE_CTIME
    value: completed
  filters:
    - id: "1722233363578"
      type: STATUS_IS
      value: COMPLETED
fillTheScreen: true
enableMainContainerShadow: false
cellStyleRules:
  - id: 1722196093823
    min: "1"
    max: "10"
    color: "#63aa82"
    text: ""
  - id: Halloween_a
    color: "#fdd577"
    min: "10"
    max: "20"
  - id: Halloween_b
    color: "#faaa53"
    min: "20"
    max: "30"
  - id: Halloween_c
    color: "#f07c44"
    min: "40"
    max: "50"
  - id: Halloween_d
    color: "#d94e49"
    min: "60"
    max: "70"
  - id: 1722195684421
    min: "70"
    max: "999"
    color: "#7c0793ff"
    text: ""
cellStyle:
  minHeight: 10px
  minWidth: 10px
mainContainerStyle:
  boxShadow: rgba(0, 0, 0, 0.16) 0px 1px 4px