BarGraphWorker ( )

Function stats

Average user rating
34
132
9999
Support
FileMaker 8.0 +
Date posted
09 December 2008
Last updated
11 December 2008
Version
Recursive function
Yes

Author Info
 The Shadow

22 functions

Average Rating 4.3

author_avatar



 

Function overview

Prototype

BarGraphWorker  ( numList;   maxValue;   colorIdx )


Parameters

numList  A list of number values


maxValue  The common max value for maximum bar width


colorIdx  The current color index


Description

A helper function to convert a number list into a bargraph via the ShowBar() function.

Examples

Sample input

BarGraphWorker( "5¶10"; 100; 0 )


Sample output

█ 5
██ 10

 

Function code

If ( IsEmpty(numList); "";
ShowBar( LeftValues(numList;1); maxValue; BarGraphColor( Mod(colorIdx;5) )
& ¶ & BarGraphWorker( RightValues( numList; ValueCount(numList)-1 ); maxValue; colorIdx+1 )
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/132

    Prototype: BarGraphWorker( numList; maxValue; colorIdx )
    Function Author: The Shadow (http://www.fmfunctions.com/mid/34)
    Last updated: 11 December 2008
    Version: 1.3

*/
// ===================================