Embeds the component into the HTML page.As a parameter jQuery call gets #pivotContainer – id of the HTML element you would like to have as a container for the component.This method allows you to insert the component into your HTML page and to provide it with all necessary information for the initialization. This is the first API call you need to know.

Starting from version 2.3 you can preset options for all reports using global object.

Note: Please do not forget to import jQuery and flexmonster.js before you start working with it.

Parameters

componentFolder – URL of the component’s folder which contains all necessary files. Also, it is used as a base URL for report files, localization files, styles, and images. Default value: flexmonster/.

global – an object that allows you to preset options for all reports. These options can be overwritten for concrete reports. The object structure is the same as for Report Object.

width – width of the component on the page (pixels or percent). Default value: 100%.

height – height of the component on the page (pixels or percent). Default value: 500.

report – property to set a report. It can be inline Report Object or URL to report JSON. XML reports are also supported in terms of backward compatibility.

toolbar – the parameter to embed the Toolbar or not. Default: false(without the Toolbar).

customizeCell – the function that allows the customizing of separate cells.

licenseKey – the license key.

Event handlers can also be set as properties for the jQuery call. Check the list here.

All the parameters are optional. If you run $("#pivotContainer").flexmonster() – empty component without the toolbar will be added with the default width and height.

Returns

Object, the reference to the embedded pivot table. If you want to work with multiple instances on the same page use these objects. All API calls are available through them.

After initialization, you can obtain an instance reference of the created component by selector as following:var pivot = $("#pivot").data("flexmonster");