EaxMdService.setRowColumn

Syntax

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

Parameters

report. Express report document.

metadata. Settings of chart axes swapping. This parameter is a JSON object that has the seriesInRows property indicating that rows data is shown in chart series.

callback. Callback function.

Description

The setRowColumn method swaps axes 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), and a chart must be loaded in express report working area. Swap vertical and horizontal axes of the chart:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxAnalyzer = expressBox.getSource();
// Determine metadata
var metadata = {
    seriesInRows: False // Data series are displayed relative to vertical axis
};
// Determine arguments for callback function
var args = new PP.Mb.Ui.PropertyChangedEventArgs({   
    PropertyName: PP.Exp.Ui.RibbonChartEnum.RowColumn,
    Metadata: metadata,
    TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.Chart, PP.Exp.Ui.ViewTypeUpdate.Table]
});
// Determine callback function
var onPanelChanged = function (n, t) {        
    var chartView = expressBox.getDataView().getChartView();    
    t ? (chartView.DataChanged.fire(chartView, t.Args), t.Args.fireCallback(n, t)) : chartView.DataChanged.fire(chartView, t);
};
// Swap horizontal and vertical chart axes
eaxMbService.setRowColumn(eaxAnalyzer, metadata, PP.Delegate(this.onPanelChanged, eaxMdService, args));
// Refresh express report
expressBox.refreshAll();

After executing the example horizontal and vertical axes of express report chart are swapped.

See also:

EaxMdService