Brian Dunning's FileMaker Custom Functions

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™   Jonni™ - Show more from this author

  Sample input:
progressDoughNut ( 400 ; 400 ; $defaultArray ; $dataArray )
  Sample output:
SVG graphic displaying a doughnut type progress indicator

  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

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 21 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: