Ascii progress bar help

I am trying to create an ASCII Progress Bar Inside a Note. (yet another, because there is not enough examples already :))

The Goal is to have two variants:

  1. Local active note task progress
  2. Complete Vault Task Progress

I was planning on adding Tags to the tasks so I could tailor the progress bar for each type of task

Here is one of numerous formats I have tried. But I am not having much luck:

TABLE round((length(filter(this.tasks, (t) => contains(t.tags, “#PROJ_1”) and t.complete)) / length(filter(this.tasks, (t) => contains(t.tags, “#PROJ_1”))) * 100), 2) as “Completion Percentage”, “▮”.repeat(floor(length(filter(this.tasks, (t) => contains(t.tags, “#PROJ_1”) and t.complete)) / length(filter(this.tasks, (t) => contains(t.tags, “#PROJ_1”))) * 10)) + “▯”.repeat(10 - floor(length(filter(this.tasks, (t) => contains(t.tags, “#PROJ_1”) and t.complete)) / length(filter(this.tasks, (t) => contains(t.tags, “#PROJ_1”))) * 10)) as “Progress”
FROM this.file.name

I have also tried following this example (I did get the progress bar to appear so I am pretty sure dataview js query and inline query is enabled:

I did not understand why there were so many headers so I attempted to strip it down a bit, but to no avail:

TABLE Task, length(filter(file.tasks.completed, (t) => t = true)) AS Status, (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 "PROGRESS BAR"
WHERE file.tasks

If anyone has time and skills some help would be appreciated. Thanks in Advance
-Tim C.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.