EaxMdService.setChartSelectionAction

Syntax

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

Parameters

report. Express report document.

metadata. Metadata that contains information concerning selected chart series (Method property) and the operation to be performed for these series (Selection property).

callback. Callback function.

Description

The setChartSelectionAction method determines operation performed on selected series 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. Before executing the example the express report chart looked as follows:

Exclude the second and the third series from the chart:

// Get a service used to work with express report
var eaxMdService = expressBox.getService();
// Get express report document
var eaxAnalyzer = expressBox.getSource();
// Determine chart series and an action to execute with them
var metadata = {
    Method: "Exclude", // Series exclude operation
    Selection: { // Select series to exclude
        series: {
            Item: [{
                index: 1, // Second series
                points: {
                    Item: [1]
                }
            }, {
                index: 2, // Third series
                points: {
                    Item: [1]
                }
            }]
        }
    }
};
// Determine callback function
var onSetSelectionAction = function () {
    var chartView = expressBox.getDataView().getChartView();  
    var mapView = expressBox.getDataView().getMapView();    
    mapView.MetadataChanged.fire(chartView, new PP.Mb.Ui.PropertyChangedEventArgs({
        TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.Table]
    }));
    // Refresh chart
    chartView.refreshAll();
};
// Exclude the second and the third series from the chart
eaxMdService.setChartSelectionAction(eaxAnalyzer, metadata, PP.Delegate(onSetSelectionAction, this));

After executing the example the second and the third series are excluded from the chart:

See also:

EaxMdService