isMeasureFormatInPercent()
Home > @gooddata/sdk-model > isMeasureFormatInPercent
isMeasureFormatInPercent() function
Gets a flag indicating whether a given measure has a format resulting in data being formatted as percentage
Signature:
export declare function isMeasureFormatInPercent(measureOrFormat: IMeasure | string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
measureOrFormat | IMeasure | string | measure or measure format to test |
Returns:
boolean
true if the measure format is in percent, false otherwise
Remarks
Measure format is considered to represent value in percent when A) format string has no conditional separators (i.e. no semicolons except a single one at the end); otherwise the parsing would need access to a particular value. B) percentage symbol is found (not directly preceded by backslash)