progressDoughNut ( width ; height ; defaultArray ; dataArray )
Generates a customisable, rounded progress doughnut using SVG for display in a FileMaker Web Viewer.
Be the first to rate this function Log in to vote
Jonni™ - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function creates a circular progress indicator rendered in SVG, using JSON-driven settings for colours, stroke width, font, and layout. The arc fills based on a percentage value and features smooth, rounded ends for a polished look. Perfect for visualising completion or status inside FileMaker layouts with no HTML required.
Default Array Example
JSONSetElement ( "" ;
[ "color.background" ; "#CCCCCC" ; 1 ] ;
[ "color.foreground" ; "#CB4400" ; 1 ] ;
[ "color.text" ; "#000000" ; 1 ] ;
[ "color.complete" ; "green" ; 1 ] ;
[ "stroke" ; 20 ; 2 ] ;
[ "endCap" ; "" ; 1 ] ; // round, butt, square - or empty
[ "font.size" ; 24 ; 2 ] ;
[ "font.weight" ; "bold" ; 1 ] ;
[ "font.name" ; "Helvetica Neue" ; 1 ] ;
[ "background.fill" ; "#FFFFFF" ; 1 ] ;
[ "displayValue" ; True ; 5 ] ;
[ "text.complete" ; "Done" ; 1 ]
)
Data Array Example
JSONSetElement ( "" ;
[ "value" ; 58 ; 2 ]
)
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.