Adding a Viz to a Vizpad

Learn how to embed Tellius Vizpads using postMessage API—add charts to existing or new dashboards with flexible tab options.

To add a Viz (chart widget) to a Vizpad,

telliusFrame.postMessage({
    "actionType": "addToVizpad",
    "vizpadAndTabs": [{ //optional field 
        "vizpadId": "ID_of_Vizpad",
        "tabIds":: ["t1", "t2"], //optional field
    },
    {          
        "vizpadId": "ID_of_Vizpad",
    }], //optional field
    "newVizpadTitle": "abc", //optional field
    "viz": viz object that has to be saved in the vizpad
}, "*");

To add the Viz in a new Vizpad, the field vizpadAndTabs need not be specified.

  • vizpadAndTabs - It is an optional field. It is an array that consists of objects vizpadID and tabIDs.

  • vizpadID - ID of the vizpad where the viz has to be added.

  • tabID - It is an optional field, and it's an array of strings that accepts tabIDs of the Vizpad. If not specified, the Viz will be added to the first tab of the Vizpad.

  • newVizpadTitle - It is an optional field, and it mentions the title of the new Vizpad to be created.

Viz follows the same structure as the response from the web socket call.

Sample code using newVizpadTitle

Request

In the following code, vizpadID is not specified, but newVizpadTitle is included. So, a new Vizpad is created, and the Viz is added to the newly created Vizpad.

Response

Once successfully saved, the following response will be sent to the embedding app from Tellius. This structure is followed when vizpadID is not used.

Here, tabID and vizpadID refer to the tab and the Vizpad in which the Viz is added.

Sample code using vizpadAndTabs

Request

Response

Last updated

Was this helpful?