@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
28 lines (27 loc) • 1.15 kB
TypeScript
import { Localization } from "@gooddata/typings";
import { OverTimeComparisonType } from "../interfaces/OverTimeComparison";
/**
* Factory that builds formatted localized suffix string for derived measure based on the over time comparison type.
* The suffix is used during AFM execution and for bucket item titles.
*
* @internal
*/
export default class DerivedMeasureTitleSuffixFactory {
private readonly locale;
/**
* Create a new instance of the class.
* @param {Localization.ILocale} locale - The locale used for translation.
*/
constructor(locale: Localization.ILocale);
/**
* Returns formatted localized suffix string for derived measure based on the over time comparison type.
* In case when unsupported over time comparison type is provided the empty string is returned.
*
* @param {OverTimeComparisonType} overTimeComparisonType - The over time comparison type for which the
* suffix must be obtained.
* @returns {string}
*/
getSuffix(overTimeComparisonType: OverTimeComparisonType): string;
private getSuffixLocalizationKey;
private translateKey;
}