that adds a formula and a column format to generate progress rings and pies, such as these:
ProgressRing(0.75)
ProgressRing(0.75,drawPie: true)
💍 The ProgressRing() formula
The ProgressRing() formula provides 13 parameters to allow for some degree of customization, even though only the first one is actually mandatory. Let’s have a look at them now:
Parameter
Description
Type
Defaults to
Parameter
Description
Type
Defaults to
value
Value to represent
Number
Mandatory
max
Maximum value
Number
1
fillColorLight
Filled color in light mode
SVG named color or #RRGGBB
purple
emptyColorLight
Empty color in light mode
SVG named color or #RRGGBB
lightgray
fillColorDark
Filled color in dark mode
SVG named color or #RRGGBB
purple
empyColorDark
Empty color in dark mode
SVG named color or #RRGGBB
dimgray
radius
Radius of ring/pie
Pixels
100
thickness
Stroke width used to draw the ring arcs.
Pixels
75
drawPie
Draws a pie instead of a ring
Trueor False
False
steps
Number of circular sections of the ring/pie
Number
16
stepRounding
Type of rounding applied to value to determine the ring/pie section to draw as filled.
down → Rounds down
near → Nearest rounding
up → Rounds up
round
avoidFalseComplete
Will never draw a full ring/pie if value not equal to max, regardless stepRounding mode.
True or False
True
avoidFalseEmpty
Will always draw the first outer ring/pie section filled if value greater than 0, regardless stepRounding mode.
🌓 Light/Dark mode appearance will automatically toggle the colors used in progress rings.
⚙️ Some examples
Straightforward use
In its simple form, you only need to provide a value between 0 and 1 to create a progress ring with all the default values for the rest of the parameters.
ProgressRing(0.60)
Optional parameters
There are a lot of parameters that you may not want to use, in that case just set their values by name (yes, Coda rocks!):
To use progress rings inside a table, simply insert a new column, type your progress ring formula and adjust the column width for the desired visual result (the ring will grow and shrink accordingly).
💡 Add a canvas progress ring to summarize the information inside the table!
You can experiment and familiarize yourself with the behaviour of all the parameters using this playground.
value
000
0.5
fillColorLight
purple
emptyColorLight
lightgray
radius
100
drawPie
no
avoidFalseComplete
yes
stepRounding
near
max
1
fillColorDark
purple
emptyColorDark
dimgray
thickness
75
steps
16
avoidFalseEmpty
yes
Back to default optional params
☝️ Next steps and comments
This little thing has been made just for the sake of going through the whole process of building and publishing a Pack and get some fun along that learning path, so honestly I don’t have that many great plans for it. But anyway, these are a couple of optional features that I might add at some point in the future:
Change the color of the filled part of the ring according to a set of breakpoint values to better depict progress.
Display the value, or maybe value / max percentage, as a text element next or even inside (provided there is enough room) progress rings.
You can get the source code of the latest release in this 🐙