Global

Methods

enableAlarmFlash(alarmFlashEnabledopt)

Enable or disable alarm flash (objects blinking when alarmed).
Parameters:
Name Type Attributes Default Description
alarmFlashEnabled boolean <optional>
true Enable/disable global alarm flash.
Source:

enableKeyboard(keyEnabledopt)

Enable or disable keyboard functions (zoom & pan).
Parameters:
Name Type Attributes Default Description
keyEnabled boolean <optional>
true Enable/disable Pan tool.
Source:

enableMouse(panEnabledopt, zoomEnabledopt)

Enable or disable pan and zoom via mouse.
Parameters:
Name Type Attributes Default Description
panEnabled boolean <optional>
true Enable/disable pan via mouse.
zoomEnabled boolean <optional>
true Enable/disable zoom via mouse.
Source:

enableTools(panEnabledopt, zoomEnabledopt)

Enable or disable pan and zoom tools.
Parameters:
Name Type Attributes Default Description
panEnabled boolean <optional>
true Enable/disable Pan tool.
zoomEnabled boolean <optional>
false Enable/disable Zoom tool.
Source:

getApiKey() → {string}

Recover the API Key.
Source:
Returns:
API Key.
Type
string

getComponentState() → {number}

Get the current state of the component.
Source:
Returns:
0=not loaded, 1=loaded and ready for graphics, 2=SVG graphics processed and ready for data.
Type
number

getComponentVersion() → {string}

Get SCADAvis.io Component Version.
Source:
Returns:
SCADAvis.io Component Version.
Type
string

getIframe() → {Object}

Get the DOM element of the iframe.
Source:
Returns:
DOM element reference.
Type
Object

getTagsList() → {string}

Get tags list from the loaded SVG graphics.
Source:
Returns:
Tags list.
Type
string

getValue(tag) → {nuber}

Get a value for a tag.
Parameters:
Name Type Description
tag Object Tag name.
Source:
Returns:
Returns the value for the tag or null if not found.
Type
nuber

getVersion() → {string}

Get SCADAvis.io API Version.
Source:
Returns:
SCADAvis.io API Version.
Type
string

hideWatermark()

Hides the watermark.
Source:

loadURL(svgurl)

Load the SVG synoptic display file from a SVG URL.
Parameters:
Name Type Description
svgurl string The SVG URL.
Source:

moveBy(dxopt, dyopt, animateopt)

Move the graphic. Multiple calls have cumulative effect.
Parameters:
Name Type Attributes Default Description
dx number <optional>
0 Horizontal distance.
dy number <optional>
0 Vertical distance.
animate boolean <optional>
false Animate or not.
Source:

on(event, callback)

Set event listeners.
Parameters:
Name Type Description
event string Event name, one of: "ready", "click" (the first parameter of callback is the element id).
callback function Callback function.
Source:
Returns:
True for valid event, false for invalid event name.

resetData()

Reset all data values and tags.
Source:

resetData()

Reset all data values and tags.
Source:

setColor(colorNumberopt, colorCodeopt)

Set color code for color shortcuts.
Parameters:
Name Type Attributes Description
colorNumber number <optional>
Color shortcut number.
colorCode string <optional>
Color code.
Source:

setValue(tag, value, failedopt, alarmedopt, descriptionopt) → {bool}

Set a value for a tag. The component will be updated immediately if the component is ready for data. Notice that updating the component at too many times per second can cause performance problems. Preferably update many values using storeValue() then call updateValues() once (repeat after a second or more).
Parameters:
Name Type Attributes Default Description
tag string Tag name.
value number Value for the tag.
failed bool <optional>
false True if value is bad or old, false or absent if value is good.
alarmed bool <optional>
false True if value is alarmed, false or absent if value is normal.
description string <optional>
tag Description.
Source:
Returns:
Returns true if the component was updated (true) or the value was buffered (false).
Type
bool

storeValue(tag, value, failedopt, alarmedopt, descriptionopt) → {bool}

Store a value for a tag. The component will not be updated until called updateValues().
Parameters:
Name Type Attributes Default Description
tag string Tag name.
value number Value for the tag.
failed bool <optional>
false True if value is bad or old, false or absent if value is good.
alarmed bool <optional>
false True if value is alarmed, false or absent if value is normal.
description string <optional>
tag Description.
Source:
Returns:
- Returns true if the component is ready for data, false if not.
Type
bool

updateValues(valuesopt)

Update values for tags to the component. Send all tags available.
Parameters:
Name Type Attributes Description
values Object.<string, number> <optional>
values in a object like { "tag1" : 1.0, "tag2": 1.2, "tag3": true }.
Source:

zoomTo(zoomLevelopt, targetopt, animateopt)

Apply zoom level. Multiple calls have cumulative effect.
Parameters:
Name Type Attributes Default Description
zoomLevel number <optional>
1.1 Zoom level. >1 zoom in, <1 zoom out.
target string | Object <optional>
{x:0,y:0} Id of object to zoom in/out or x/y coordinates.
animate boolean <optional>
false Animate or not.
Source:

zoomToOriginal(animateopt)

Apply default zoom level/position.
Parameters:
Name Type Attributes Default Description
animate boolean <optional>
false Animate or not.
Source: