BarOnly ( )

Function stats

Average user rating
34
130
9999
Support
FileMaker 8.0 +
Date posted
09 December 2008
Version
1
Recursive function
No

Author Info
 The Shadow

22 functions

Average Rating 4.3

author_avatar



 

Function overview

Prototype

BarOnly  ( amount;   maxValue;   color )


Parameters

amount  The amount for the bar


maxValue  The max value of the field


color  The bar color


Description

Tags:  Bargraph  

Part of a bar-graph function. The bar length is determined as a percentage of the max value, with each block being 5%.

Examples

Sample input

BarOnly( 5; 100; RGB(0;0;0) )


Sample output

 

Function code

// Show each 5% as a block
Let ( [ reps = Int( Round((amount/maxValue) * 100; 0) / 5);
bar = Repeat( TextFont( "█"; "ヒラギノ明朝 Pro W3"; ShiftJIS); reps )
];
TextColor( bar; color )
)

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

    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/130

    Prototype: BarOnly( amount; maxValue; color )
    Function Author: The Shadow (http://www.fmfunctions.com/mid/34)
    Last updated: 09 December 2008
    Version: 1

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