Custom Widgets


The customizable widget allows visualization of data from the One Platform on a dashboard using customizable JavaScript.  Developer documentation can be found at this page which is updated by our development team:

Custom Widget - Developer Documentation


Custom Widget Grid and Sizes

Widgets on a ‘Custom’ dashboard are laid out in a grid for placement. Each grid is 248px wide and 204px tall, with default spacing of 16px. Custom dashboards allow for 2 or 6 maximum columns in the grid, depending on dashboard configuration.  For a 2x2 widget, the total size includes the x spacing but not the y spacing. The total 2x2 dimensions would be 2 * 248px + 16px = 512px wide and 2 * 204px = 408px tall

The Width and Height fields accept positive integers indicating how many grids the widget spans.

NOTE: The Width of the widget will be automatically modified if the value entered exceeds the maximum that the dashboard allows. Adding a 6 width graph to a four column dashboard would result in the graph being re-sized to 4 grids.


Custom Widget Editor


FAQ about Custom Widgets

'Can a widget refresh faster than 10 seconds?'

The answer is yes, depending on which method you choose to pass information to your widget. Using the default construction, the device/dataport represented by a JavaScript object, would have a maximum refresh rate of 10 seconds. An alternative to the Portals object would be to make use of the custom widget read API, allowing your widget to have as fast of resolution as your dataport. The tradeoff between the two is ease of use to speed. Consider your application and the need of how quickly data needs to be visualized. 

Widget Read API

NOTE: The behavior of the Read API will be affected by recording values into the past. Making use of the 'Record' RPC would fool the Read API. It will only return the latest values with respect to the time period passed into the function(usually current time), rather than the newest items added to the dataport. 


More Information

Custom Widget - Developer Documentation / API

NEWPortals API - More functionality that can be used in custom widgets


For deploying a custom widget for your whole subdomain.

Turning Custom Widget into Subdomain Domain Widget


Example Code

More information about example code can be found on the Custom Widget Example Code



When users besides the portal owner view a dashboard containing a custom widget, they will be required to press a confirmation button to execute the JavaScript in the widget. These other users will also have the option to execute all custom widget code within your dashboard, in the case you use multiple custom widgets.

Have more questions? Submit a request