Contains all methods related with the widget HTML container element and not the graphic itself. Some of then can be redefined in each widget and used in a instance of the widget.
Methods
# debugError(optsopt, rejectopt)
Personalize an captured error ocurred in the widget and show in the widget and the Web console.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
opts |
Object
|
<optional> |
{} | |
msg |
string
|
Message to show in the widget. |
||
console |
Object
|
|||
console.method |
string
|
A valid method of console Web API. |
||
console.msg |
string
|
Message to show int the console. |
||
reject |
boolean
|
<optional> |
false | Boolean to break the chain actions. |
# displayWashemoWidget(Widget, cfg, data)
Draw the widget with the given configuration and data.
Parameters:
Name | Type | Description |
---|---|---|
Widget |
any
|
Widget object to draw |
cfg |
Object
|
Configuration set according to the widget. |
data |
Object
|
Array
|
Data struture according to the widget. |
# drawError(msg)
Show an error in the widget container.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string
|
Error message. |
# getElementContainer() → {Object}
Get the widget container. The element container include the header and the graphic.
- HTML DOM element widget container.
Object
# getGraphicContainer() → {Object}
Get the chart container.
- Chart container HTML DOM element.
Object
# init()
Allow to initialize any widget. This method is overridden in each widget.
# redraw()
By default,it does nothing. This method should be overwritten in each widget. It's executed when redraw the widget.
# resize()
By default, it does nothing. This method should be overwritten in each widget. Resize method that trigger when de window change the size.
# setElementContainer(el)
Set the widget element container
Parameters:
Name | Type | Description |
---|---|---|
el |
Object
|
HTML DOM container. |
# setGraphicContainer(el)
Set the chart element container.
Parameters:
Name | Type | Description |
---|---|---|
el |
Object
|
HTML DOM container. |
# setTitle(title)
Set widget title to header.
Parameters:
Name | Type | Description |
---|---|---|
title |
string
|
Text to set. |
# show(forceRefreshopt)
Show the chart widget.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
forceRefresh |
boolean
|
<optional> |
false | force refresh widget. |
# showEl(forceRefreshopt)
Show the container widget.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
forceRefresh |
boolean
|
<optional> |
false | force refresh widget. |