I was wondering, if anybody has figured out a way, to display a progress bar in a note representing the number of incomplete divided by total tasks in a note?
I imagine a combination of Dataview and one of the chart plugins might be able to do it. Just wanted to hear if somebody else already figured it out before I start hacking .
Hi.
I don’t understand if you want this only for one note or multiple note.
But I leave here a Table for test purposes (just to check what elements and functions you can use):
```dataview
TABLE file.tasks.text, length(file.tasks.text) as Total, file.tasks.completed, filter(file.tasks.completed, (t) => t = true) as C, length(filter(file.tasks.completed, (t) => t = true)) AS Completed, (length(filter(file.tasks.completed, (t) => t = true)) / length(file.tasks.text)) * 100 AS BB, "<progress value='" + (length(filter(file.tasks.completed, (t) => t = true)) / length(file.tasks.text)) * 100 + "' max='100'></progress>" AS Progress
FROM "your folder"
WHERE file.tasks
```
Base code for html progress bar:
<progress value='75' max='100'></progress>
For one note (with the query in same note) you can use the inline query bellow, but you have some update issues (to update the values you need to go to another note and return):
To those interested in explore another type of “progress bar”, this is another alternative (but attention, it’s an online bar, i.e., an embed external url):
Do you use the new obsidian feature “Live Preview”?
I don’t use it, but I think that inline queries don’t work in Live Preview!
If not the case, see your inline prefix defined in Settings > Dataview.