Methods
This page describes the available methods within the HTML Canvas class
HTML Canvas methods
getHeaders
Returns the available Authentication Headers accordingly if the dashboard is public or not.
openDrawer
Embed a url's content in a drawer and displays it.
setDashboardDevice
Changes the currently selected device in a dynamic dashboard.
setDashboardDateRange
Changes the selected time range in a dashboard.
setRealTime
Turn on or off the dashboard's real time update.
refreshDashboard
Refreshes the dashboard data in all widget.
getHeaders
getHeadersArguments: None
Signature: ubidots.getHeaders()
Return:
{
Authorization: "Bearer receivedJWTToken",
Content-type: "application/json"
}openDrawer
openDrawerArguments: options: Object [mandatory] => An object containing the content's url and the drawer's width in px:
{
url: "https://url.com",
width: 500 // Read as 500px
}Signature:
ubidots.openDrawer(
{
url: "https://some-url",
width: <width>
}
);
Return: None
setDashboardDevice
setDashboardDeviceArguments: deviceId: string [Mandatory] =>The ID of the device that you want to set.
Signature: ubidots.setDashboardDevice(<deviceId>)
Return: None
setDashboardDateRange
setDashboardDateRangeArguments: timeframe: Object [Mandatory] => An object containing the start and end timestamps:
Copy
{
"startTime": 1642282088000,
"endTime": 1673818088000
}Signature: ubidots.setDashboardDateRange(<timeframe>)
Return: None
setRealTime
setRealTimeArguments: rt: Bool [Mandatory] => A boolean indicating the real time update setting
Signature: ubidots.setRealTime(<rt>)
Return: None
refreshDashboard
refreshDashboardArguments: None
Signature: ubidots.refreshDashboard()
Return: None
setFullScreen
setFullScreenArguments: screenSetting: string(toggle | enable | disabled) [Mandatory] => A string representing the full screen setting.
Signature: ubidots.setFullScreen(<screenSetting>)
Return: None
Last updated
Was this helpful?