<aside> ❓ Visualises progress based on a goal and current completion.
</aside>
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" width="40px" /> By Ben • Latest • Was this helpful? Please consider buying me a coffee. Cheers!
</aside>
if(prop("Completed") / prop("Goal") >= 1, "✅", if(empty(prop("Completed")) and not empty(prop("Goal")), "0%", slice("✦✦✦✦✦✦✦✦✦✦", 0, floor(prop("Completed") / prop("Goal") * 10)) + " " + format(floor(prop("Completed") / prop("Goal") * 100)) + "%"))
if(prop("Completed") / prop("Goal") >= 1, "✅", slice("✦✦✦✦✦✦✦✦✦✦", 0, floor(prop("Completed") / prop("Goal") * 10)) + slice("✧✧✧✧✧✧✧✧✧✧", 0, ceil(10 - prop("Completed") / prop("Goal") * 10)) + " " + format(floor(prop("Completed") / prop("Goal") * 100)) + "%")
if(prop("Completed") / prop("Goal") >= 1, "✓", slice("++++++++++", 0, floor(prop("Completed") / prop("Goal") * 10)) + slice("−−−−−−−−−−", 0, ceil(10 - prop("Completed") / prop("Goal") * 10)))
if(prop("Completed") / prop("Goal") >= 1, "✓", slice("−−−−−−−−−−", 0, floor(prop("Completed") / prop("Goal") * 10)) + "♦︎" + slice("−−−−−−−−−−", 0, ceil(10 - prop("Completed") / prop("Goal") * 10)))
Inspired by Red Gregory's version
Character Entity Chart → Good reference for the symbols that can be used for the bars.
<aside>
⚠️ This uses a slightly different formula that includes a replaceAll
function to replace each x
with a chosen emoji. This is done because slice
does not play well with a lot of emojis.
</aside>
if(prop("Completed") / prop("Goal") >= 1, "✅", if(empty(prop("Completed")) and not empty(prop("Goal")), "0%", replaceAll(slice("xxxxxxxxxx", 0, floor(prop("Completed") / prop("Goal") * 10)), "x", "⭐️") + " " + format(floor(prop("Completed") / prop("Goal") * 100)) + "%"))
if(prop("Completed") / prop("Goal") >= 1, "✅", replaceAll(slice("xxxxxxxxxx", 0, floor(prop("Completed") / prop("Goal") * 10)), "x", "🌳") + replaceAll(slice("xxxxxxxxxx", 0, ceil(10 - prop("Completed") / prop("Goal") * 10)), "x", "🌱") + " " + format(floor(prop("Completed") / prop("Goal") * 100)) + "%")