30 lines
859 B
Markdown
30 lines
859 B
Markdown
up:: [[gestion]]
|
|
title:: "my efforts shown as heatmaps"
|
|
#s/PKM
|
|
|
|
```dataviewjs
|
|
// Update this object
|
|
const trackerData = {
|
|
entries: [],
|
|
separateMonths: true,
|
|
heatmapTitle: "This is the title for your heatmap",
|
|
heatmapSubtitle: "This is the subtitle for your heatmap. You can use it as a description.",
|
|
}
|
|
|
|
// Path to the folder with notes
|
|
const PATH_TO_YOUR_FOLDER = "daily";
|
|
// Name of the parameter you want to see on this heatmap
|
|
const PARAMETER_NAME = 'kung_fu';
|
|
|
|
// You need dataviewjs plugin to get information from your pages
|
|
for(let page of dv.pages(`"${PATH_TO_YOUR_FOLDER}"`).where((p) => p[PARAMETER_NAME])){
|
|
trackerData.entries.push({
|
|
date: page.file.name,
|
|
intensity: page[PARAMETER_NAME],
|
|
content: await dv.span(`[](${page.file.name})`)
|
|
});
|
|
}
|
|
|
|
renderHeatmapTracker(this.container, trackerData);
|
|
```
|