Widget

Widget

Base class for any kind of widget

Constructor

new Widget(config)

Source:
Parameters:
Name Type Description
config Object

Configuration object

Properties
Name Type Attributes Description
title String

Widget title

format function <optional>

Function to parse and transform data fetched from server. This function should return a human friendly value as it will be shown as the widget current value.

Methods

(protected) format() → {Object}

Source:

Processes the widget value and returns a human friendly version.

Returns:
  • Current widget value prepared to be shown
Type
Object

refresh()

Source:

Reloads the widget value using the formatted value.

render()

Source:

Renders the widget layout.