Kap.Dashboard.setPageSettings

Syntax

setPageSettings (settings);

Parameters

settings. JSON object that contains PageSettings and Callback fields.

PageSettings contains page settings:

Callback  - callback function fired on method calling. Optional parameter.

Description

The setPageSettings method defines page settings.

Example

To execute the example, the page must contain a dashboard constructor named kapBox. The BODY tag must contain a DIV element with the "but" identifier. Add a button that sets page options:

var pageSettButton = new PP.Ui.Button({
ParentNode: "but",
Content: "Page options",
Click: function () {
dashBoard.setPageSettings({
"PageSettings": {
"paperFormat": "A4",
"paperOrientation": "Portrait"
},
"Callback": function () { console.log(kapBox.getMeta().pageSettings.paperOrientation); }
});
}
});

After executing the example the Page Settings button is added in the page. Clicking this button sets portrait orientation and A4 paper size. The browser console displays Portrait (which corresponds to the selected orientation).

See also:

Kap.Dashboard