PrxMdService.getChart

Syntax

getChart (report, chartId, asImage, imageProp, useObjectsUrl, callback);

Parameters

report. Report for which the chart is obtained.

chartId. Chart ID.

asImage. Indicates how the chart will be obtained: True - as an image, False - as the component Chart.

imageProp. Image parameters.

useObjectsUrl. Determines whether to use handler to show images (required to ensure correct performance in Internet Explorer 9 and later versions): True - use, False - do not use.

callback. Callback function.

Description

The getChart method gets report chart metadata.

Example

To execute this example, the page must contain the ReportBox component named reportBox (see Example of the ReportBox Component Layout). The opened regular report must contain a chart. Add a button, clicking which will show metadata of regular report chart to the browser console:

        getChartMeta = function () {
           ident = reportBox.getDataView().getGridView().getControl().getModel().getObjects()[0].getIdent();
           prxMbService.getChart(prxReport, ident, False, PP.Mb.NULL, False, function (sender, args) {
              var res = JSON.parse(args.ResponseText);
              var cChartData = res.GetChartResult;
              console.log(cChartData)
           });
        };
        var chartMeta = new PP.Ui.Button({
           ParentNode: "but",
           Content: "Get chart metadata",
           Click: getChartMeta
        });;

After executing the example the browser console shows JSON object that contains metadata of regular report chart.

See also:

PrxMdService