Skip to content

ubidots/ubidots-html-canvas

Repository files navigation

Ubidots HTML Canvas

This repository provides the library that is used to communicate Ubidots' HTML Canvas widgets with the dashboard.

For now it provides access to the following events:

  • A device has been selected in the dashboard
  • The date range of data shown in the dashboard has changed.
  • A new token has been generated by Ubidots.
  • The real time status has changed

It provide the following 'setters' methods

  • setDashboardDevice: Ability to set the selected device in a dynamic dashboard

  • setDashboardDateRange: Ability to set the date and time range in a dashboard, dynamic or static.

  • setRealTime: Ability to turn on or off the dashboard read time update

  • refreshDashboard: Ability to refresh the dashboard data in all widget

Usage

If you want to use this library in your Ubidots' HTML Canvas, you can read the following article in our help center.

HTML Canvas: Interacting with account data

Development environment

Requirements

  • Node v10 or greater. We recommend using the latest LTS version (Node 12 at the time of writing this README).
  • Yarn

Generate production file

After you clone this repository in your local machine you must execute the following steps in order to generate the production file:

  • Install the dependencies of the project: yarn install.
  • Transpile the src files: yarn build.

You must now have folder called build/ in the projects' root folder which contains two files:

  • ubidots-html-canvas.js
  • ubidots-html-canvas.js.map

Run tests

If you'd like to run the current tests of the project you must execute the following command: yarn unit which will run every file that is in the tests/ folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published