chartRowStacks ( width ; height ; defaultArray ; dataArray )
// Draws stacked horizontal rows based on range and value input using SVG. Customisable with JSON for appearance, padding, stroke, and alignment.
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)
Row Stacks Chart is a stacked column chart widget for FileMaker layouts, styled and rendered using scalable SVG. Each column can define its own height, stroke, color, and cap style, while shared defaults like padding, stroke width, and background fill are set centrally. Rows align left, center, or right based on layout needs. Perfect for visualising multi-part progress or distribution metrics. Optimised for FileMaker Pro, Go, and WebDirect.
Default Array Example
JSONSetElement ( "" ;
[ "min" ; 0 ; 2 ] ;
[ "max" ; 50 ; 2 ] ;
[ "padding" ; 10 ; 2 ] ;
[ "stroke" ; 20 ; 2 ] ;
[ "endCap" ; "round" ; 1 ] ;
[ "background.fill" ; "#FFFFFF" ; 1 ] ;
[ "color.background" ; "#CCCCCC" ; 1 ] ;
[ "color.foreground" ; "#CB4400" ; 1 ] ;
[ "align" ; "center" ; 1 ]
)
Data Array Example
JSONSetElement ( "" ;
[ "columns[+]value" ; 30 ; 2 ] ;
[ "columns[:]color" ; "#F4511E" ; 1 ] ;
[ "columns[:]stroke" ; 10 ; 2 ] ;
[ "columns[:]cap" ; "" ; 1 ] ;
[ "columns[+]value" ; 25 ; 2 ] ;
[ "columns[+]value" ; 45 ; 2 ] ;
[ "columns[:]color" ; "#F4511E" ; 1 ] ;
[ "columns[:]cap" ; "square" ; 1 ] ;
[ "columns[+]value" ; 15 ; 2 ] ;
[ "columns[:]color" ; "#F4511E" ; 1 ] ;
[ "columns[:]stroke" ; 18 ; 2 ] ;
[ "columns[:]cap" ; "" ; 1 ] ;
[ "columns[+]value" ; 32 ; 2 ] ;
[ "columns[:]color" ; "#F4511E" ; 1 ] ;
[ "columns[+]value" ; 22 ; 2 ] ;
[ "columns[:]color" ; "#F4511E" ; 1 ] ;
[ "columns[:]cap" ; "" ; 1 ]
)
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.