Typedefs

InputChangeHandler : function

Input change handler

InteractiveTableColumn

Interactive table column

Visualization APIs in Siren

The following interfaces are available:

EnhancedTilemapVis

Kind: global interface


enhancedTilemapVis.renderGeoJsonCollection(id, layerName, geoJsonCollection, options)Promise

Render geo json as layer on the map

Kind: instance method of EnhancedTilemapVis
Returns: Promise - resolves when the operation is complete

Parameter Type Description

id

string

a unique id used for distinguishing between map layers

layerName

string

layer name

geoJsonCollection

JSON

json (returned from geo server)

options

JSON

options, currently there are following options available:</br> color {string} - color of the shapes on the map</br> layerGroup {string} - name of the group (used on map legend)</br> popupFields {string} - comma separated list of fields to be used in popups


enhancedTilemapVis.removeGeoJsonCollection(id)Promise

Remove geo json layer from the map

Kind: instance method of EnhancedTilemapVis
Returns: Promise - resolves when the operation is complete

Parameter Type Description

id

string

a unique id used for distinguishing between map layers


enhancedTilemapVis.getGeoBoundingBox()Promise

Get the currently visible map extend.

Kind: instance method of EnhancedTilemapVis
Returns: Promise - resolves an object of format ` { geo_bounding_box: { top_left: { lat, lon }, bottom_right : { lat, lon } } }` when the operation is complete


GraphBrowserVis

Kind: global interface


graphBrowserVis.addDocumentsByQuery(options)Promise

Adds entities to the graph.

Kind: instance method of GraphBrowserVis

Parameter Type Description

options

object

object defining the options of the expansion

options.searchId

string

a saved search id to use when querying elasticsearch for entities

options.query

JSON

a elasticsearch query object use to fetch entities


graphBrowserVis.addDocumentsFromDashboard(options)Promise

Adds entities from specific dashboard main search to the graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

options

object

api parameters

options.dashboardId

string

id of the dashboard which state should be used to fetch the main search entities

[options.limit]

number

number of nodes to be fetched from dashboard

[options.modalOption]

string

when 'SHOW_ADD_MODAL', shows the modal to select entities while adding nodes to the graph. If limit is specified this option is ignored.


graphBrowserVis.selectAllNodes()Promise

Selects all nodes present on the graph.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.expandSelectedNodes([options])Promise

Expands all selected nodes present on the graph.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Default Description

[options]

object

object defining the options of the expansion

[options.mode]

string

"modal"

expansion mode, can be 'modal', 'all' or 'subset'

[options.nodesLimitOverride]

number

if specified, overrides the maximum number of nodes that will be expanded from each selected node, which by default is set in the graph browser settings


graphBrowserVis.clean()Promise

Clean all nodes present on the graph.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.addNode(nodeId)Promise

Adds a single entity to the graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

nodeId

string

composed from document index, type, and id as "_index/_type/_id"


graphBrowserVis.expandNode(nodeId)Promise

Deprecated

Adds a single entity to the graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

nodeId

string

composed from document index, type, and id as "_index/_type/_id"


graphBrowserVis.expand(nodeIds)Promise

Adds entities to the graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

nodeIds

array

an array of ids composed from document index, type, and id as "_index/_type/_id"


graphBrowserVis.getCurrentGraph()Promise

Get the currently visible graph model

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves with the current graph model


graphBrowserVis.removeNodesById(idsToDelete)Promise

Removes nodes from the graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

idsToDelete

array

an array of node ids


graphBrowserVis.removeSelected()Promise

Removes the selected nodes from the graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.applyLenses()Promise

Applies the currently configured lenses to the whole graph

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.enableMapMode()Promise

Enables the map mode

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.disableMapMode()Promise

Disables the map mode

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.centerMapAt(lat, lon)Promise

Centers the map at the provided lat long coordinates

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

lat

number

latitude value

lon

number

longitude value


graphBrowserVis.setZoomLevel(zoomLevel)Promise

Sets the zoom level of the graph or the map

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

zoomLevel

number

the zoom level


graphBrowserVis.fit()Promise

Fits the graph view to its content.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.getCardsByType(type)Promise

Gets the list of configured cards.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

type

string

card type


graphBrowserVis.registerCard(type, config)Promise

Registers a card type.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Default Description

type

string

card type

config

[ 'Array' ].<Object>

card configurations

config.type

string

The configuration type must be set to 'input'.

config.name

string

A unique name for the html element.

[config.inputType]

string

"string"

The type of the html element. The supported values are 'string' and 'checkbox'.

[config.defaultValue]

string | boolean

The default value of the html element.


graphBrowserVis.updateCard(cardId, htmlWrapperGetter)Promise

Updates a specific card to htmlElement content.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

cardId

string

card id

htmlWrapperGetter

function

a function that resolves to card html wrapper elements


graphBrowserVis.selection(selection)Promise

If the selection parameter is defined, sets the graph selection. If the parameter is not defined returns the current selection.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

selection

array

array of node ids


graphBrowserVis.expandByRelation(nodes, relations)Promise

Expands the specified nodes ignoring relations not contained in the relations list.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

nodes

array

array of node ids

relations

array

array of relation ids


graphBrowserVis.crop()Promise

Removes elements that are not selected.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.undo()Promise

Undoes the last action.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.redo()Promise

Redoes the last undone action.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.standardLayout()Promise

Rearranges the nodes on the graph using the standard layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.hierarchicalLayout()Promise

Rearranges the nodes on the graph using the hierarchical layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.radialLayout()Promise

Rearranges the nodes on the graph using the radial layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.organicLayout()Promise

Rearranges the nodes on the graph using the organic layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.sequentialLayout()Promise

Rearranges the nodes on the graph using the sequential layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.lensLayout()Promise

Rearranges the nodes on the graph using the lens layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.structuralLayout()Promise

Rearranges the nodes on the graph using the structural layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.tweakLayout()Promise

Rearranges the nodes on the graph using the tweak layout settings.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.groupSelectedNodes()Promise

Groups the selected nodes in single node.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.ungroupSelectedNodes()Promise

Ungroups the selected group nodes.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.


graphBrowserVis.invertRelations([enableInvertedRelations])[ 'Promise' ].<boolean>

Invert the direction of the relations on the graph.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if relations are inverted.

Parameter Type Description

[enableInvertedRelations]

boolean

a boolean value that inverts the direction of the relations.


graphBrowserVis.highlight([enableHighlight])[ 'Promise' ].<boolean>

Enable/disable highlight of nodes on the graph.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if highlight is enabled.

Parameter Type Description

[enableHighlight]

boolean

a boolean value that set/reset node highlighting


graphBrowserVis.toggleLiveFilter()[ 'Promise' ].<boolean>

Enables the live filter or unlinks an existing live filter.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if there is a live filter enabled.


graphBrowserVis.toggleTimebar()[ 'Promise' ].<boolean>

Toggles the timebar.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if the toolbar is enabled.


graphBrowserVis.toggleMap()[ 'Promise' ].<boolean>

Toggles the map.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if the map is enabled.


graphBrowserVis.heatmap([enable])[ 'Promise' ].<boolean>

Toggles the heatmap if the map is enabled.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if the heatmap is enabled.

Parameter Type Description

[enable]

boolean

if defined it will enable or disable the heatmap.


graphBrowserVis.showNodesWithoutTime([enable])[ 'Promise' ].<boolean>

Toggles the visibility of the nodes without a time field when the timebar is enabled.

Kind: instance method of GraphBrowserVis
Returns: [ 'Promise' ].<boolean> - resolves to a boolean value which signifies if the heatmap is enabled.

Parameter Type Description

[enable]

boolean

if defined it will enable or disable the heatmap.


graphBrowserVis.saveGraph()Promise

Open the modal to save the graph.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the save operation is complete.


graphBrowserVis.loadGraph([options])Promise

Opens the load graph modal if no parameters are provided. Additional parameters can be used to load a graph object with/without confirmation to add the nodes to the current graph.

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the operation is complete.

Parameter Type Description

[options]

Object

optional parameter to load a graph object

options.graph

Object

the graph saved object that need to be loaded

[options.modalOption]

string

when 'CONFIRM_MODAL', the add nodes to graph confirmation modal is show. When empty, the graph is loaded without confimation.


graphBrowserVis.loadEntities()Promise

Open the modal to load entities

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the modal is closed.


graphBrowserVis.exportGraphAsAnxFile()Promise

Open the modal to export the graph as an anx file using IBM® i2® Analyst’s Notebook plugin

Kind: instance method of GraphBrowserVis
Returns: Promise - resolves when the modal is closed.


ScriptedPanelVis

Kind: global interface


scriptedPanelVis.appendHtmlElement(htmlElement, replace)Promise

Appends html element to the visualization panel

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves when the operation is complete

Parameter Type Description

htmlElement

Object

the html element to be appended

replace

boolean

when true instead of appending it replaces the panel content


scriptedPanelVis.getHtmlCheckboxInputElement(name, label, [checked])Promise

Get the html checkbox input element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html wrapper around the checkbox element

Parameter Type Default Description

name

string

name of the checkbox html wrapper element

label

string

label for the checkbox

options.onChange

InputChangeHandler

Function called when there is a change to the user input values

[checked]

boolean

false

checked state of the checkbox


scriptedPanelVis.getHtmlTextInputElement(name, label, [placeholder], [initialValue])Promise

Get the html text input element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html wrapper around the text input element

Parameter Type Default Description

name

string

name attribute of the text input html wrapper element

label

string

label for the text input

[placeholder]

string

"''"

placeholder attribute of the text input

[initialValue]

string

"''"

initial value of the text input


scriptedPanelVis.getInteractiveTable()HtmlElementWrapper

Get the html interactive table element

Kind: instance method of ScriptedPanelVis
Returns: HtmlElementWrapper - The HTML wrapper around the table element

Parameter Type Description

options.columns

[ 'Array' ].<InteractiveTableColumn>

The names of the columns and the field names used to retrieve the value

options.data

[ 'Array' ].<T>

The data objects to display

options.onSelect

function

Function called with selected objects called when any checkbox is clicked


scriptedPanelVis.getComboBox()HtmlElementWrapper

Get the combo box element

Kind: instance method of ScriptedPanelVis
Returns: HtmlElementWrapper - The HTML wrapper around the combo box element

Parameter Type Description

options.initialValues

[ 'Array' ].<string>

Initial selected values in the combo box

options.availableOptions

[ 'Array' ].<string>

The list of options shown in the dropdown (users are not restricted though)

options.onChange

function

Function called when there is a change to the user inputted values

options.placeholder

string

Placeholder text for the combo box when there are no values


scriptedPanelVis.getHtmlNumberInputElement(name, label, [placeholder], [initialValue])Promise

Get the html number input element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html wrapper around the number input element

Parameter Type Default Description

name

string

name attribute of the number input html wrapper element

label

string

label for the number input

[placeholder]

string

"''"

placeholder attribute of the number input element

[initialValue]

string

0

initial value of the number input element


scriptedPanelVis.getHtmlButtonElement(label, onclickFunction)Promise

Get the html button element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html wrapper around button element

Parameter Type Description

label

string

label for the button html wrapper element

onclickFunction

function

event handler function for the button click event


scriptedPanelVis.getHtmlSubmitButtonElement(label)Promise

Get the html submit button element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html wrapper around submit button element

Parameter Type Description

label

string

label for the submit button


scriptedPanelVis.getHtmlFormElement(onsubmitFunction)Promise

Get the html form element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html form element

Parameter Type Description

onsubmitFunction

function

event handler function for the form submit event


scriptedPanelVis.getHtmlElement(htmlString)Promise

Get the html for any complex html element

Kind: instance method of ScriptedPanelVis
Returns: Promise - resolves the html element

Parameter Type Description

htmlString

string

any custom html string


InputChangeHandler : function

Input change handler

Kind: global typedef

Parameter Type

event

[ 'ChangeEvent' ].<HTMLInputElement>


InteractiveTableColumn

Interactive table column

Kind: global typedef
Properties

Name Type Default Description

name

string

field

string

[imageUrlField]

boolean

false

To render field value as an image: <img src={fieldValue} />

[maxWidth]

string

"'100px'"

Max width for rendered imagess