How to use the @gooddata/typings.VisualizationObject.isPopMeasureDefinition function in @gooddata/typings

To help you get started, we’ve selected a few @gooddata/typings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gooddata / gooddata-js / src / DataLayer / converters / MeasureConverter.ts View on Github external
function convertMeasureDefinition(definition: IMeasureDefinitionType): AFM.MeasureDefinition {
    if (VisualizationObject.isMeasureDefinition(definition)) {
        return convertSimpleMeasureDefinition(definition);
    } else if (VisualizationObject.isPopMeasureDefinition(definition)) {
        return convertPopMeasureDefinition(definition);
    } else if (VisualizationObject.isPreviousPeriodMeasureDefinition(definition)) {
        return convertPreviousPeriodMeasureDefinition(definition);
    } else if (VisualizationObject.isArithmeticMeasureDefinition(definition)) {
        return convertArithmeticMeasureDefinition(definition);
    } else {
        throw Error("The measure definition is not supported: " + JSON.stringify(definition));
    }
}