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
*/
// ===================================
// Show each 5% as a block__LITBR__Let ( [ reps = Int( Round((amount/maxValue) * 100; 0) / 5);__LITBR__ bar = Repeat( TextFont( "█"; "ヒラギノ明朝 Pro W3"; ShiftJIS); reps )__LITBR__ ];__LITBR__ TextColor( bar; color )__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/130__LITBR____LITBR__ Prototype: BarOnly( amount; maxValue; color )__LITBR__ Function Author: The Shadow (http://www.fmfunctions.com/mid/34)__LITBR__ Last updated: 09 December 2008__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================