EaxMdService.setNormalization

Syntax

setNormalization(report: PP.Exp.EaxDocument, metadata: Object, callback: PP.Delegate);

Parameters

report. Express report document.

metadata. JSON object with the useNormalization field that indicates if data normalization is used.

callback. Callback function.

Description

The setNormalization method normalizes data of express report chart.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Move to the Chart view of the express report. Initially data of the express report chart is not normalized, a chart fragment is shown in the figure below:

Normalize data of the express report chart:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxDocument = expressBox.getSource();
// Determine metadata
var metadata = {
    useNormalization: True 
};
// Determine callback function
var onNormalization = function (sender, args) {     
    var chart = expressBox.getDataView().getChartView();
    chart.PropertyChanged.fire(sender, new PP.Mb.Ui.PropertyChangedEventArgs({
        PropertyName: PP.Exp.Ui.ControlType.Text,
        Metadata: {
            useNormalization: True    
        },
        TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.Chart, PP.Exp.Ui.ViewTypeUpdate.Table]
    }));
    // Refresh chart
    chart.refreshAll();
};
// Normalize express report chart data
eaxMdService.setNormalization(eaxDocument, metadata, PP.Delegate(onNormalization, this));

After executing the example data of the express report chart is normalized:

See also:

EaxMdService