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 |
|
a unique id used for distinguishing between map layers |
layerName |
|
layer name |
geoJsonCollection |
|
json (returned from geo server) |
options |
|
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 |
|
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
-
-
.addDocumentsByQuery(index, query)
⇒Promise
-
.addDocumentsFromDashboard(dashboardId)
⇒Promise
-
.selectAllNodes()
⇒Promise
-
.expandSelectedNodes()
⇒Promise
-
.clean()
⇒Promise
-
.addNode(nodeId)
⇒Promise
-
.expandNode(nodeId)
⇒Promise
-
.getCurrentGraph()
⇒Promise
-
.removeNodesById(idsToDelete)
⇒Promise
-
.applyLenses()
⇒Promise
-
.enableMapMode()
⇒Promise
-
.disableMapMode()
⇒Promise
-
.centerMapAt(lat, lon)
⇒Promise
-
.setZoomLevel(zoomLevel)
⇒Promise
-
.getCardsByType(type)
⇒Promise
-
.registerCard(type, config)
⇒Promise
-
.updateCard(cardId, htmlElementWrappers)
⇒Promise
-
.selection(selection)
⇒Promise
-
.expandByRelation(nodes, relations)
⇒Promise
-
graphBrowserVis.addDocumentsByQuery(index, query)
⇒ Promise
Adds entities to the graph
Kind: instance method of GraphBrowserVis
Parameter | Type | Description |
---|---|---|
index |
|
an index pattern to use when query elasticsearch for entities |
query |
|
a elasticsearch query object use to fetch entities |
graphBrowserVis.addDocumentsFromDashboard(dashboardId)
⇒ Promise
Adds entities from specific dashboard main search to the graph
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
Parameter | Type | Description |
---|---|---|
dashboardId |
|
id of the dashboard which state should be used to fetch the main search entities |
graphBrowserVis.selectAllNodes()
⇒ Promise
Selects all nodes present on the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
graphBrowserVis.expandSelectedNodes()
⇒ Promise
Expands all selected nodes present on the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
graphBrowserVis.clean()
⇒ Promise
Clean all nodes present on the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
graphBrowserVis.addNode(nodeId)
⇒ Promise
Adds a single entity to the graph
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
Parameter | Type | Description |
---|---|---|
nodeId |
|
composed from document index, type, and id as "_index/_type/_id" |
graphBrowserVis.expandNode(nodeId)
⇒ Promise
Adds a single entity to the graph
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
Parameter | Type | Description |
---|---|---|
nodeId |
|
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 completed
Parameter | Type | Description |
---|---|---|
idsToDelete |
|
an array of node ids |
graphBrowserVis.applyLenses()
⇒ Promise
Applies the currently configured lenses to the whole graph
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
graphBrowserVis.enableMapMode()
⇒ Promise
Enables the map mode
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
graphBrowserVis.disableMapMode()
⇒ Promise
Disables the map mode
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
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 completed
Parameter | Type | Description |
---|---|---|
lat |
|
latitude value |
lon |
|
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 completed
Parameter | Type | Description |
---|---|---|
zoomLevel |
|
the zoom level |
graphBrowserVis.getCardsByType(type)
⇒ Promise
Gets the list of configured cards.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
Parameter | Type | Description |
---|---|---|
type |
|
card type |
graphBrowserVis.registerCard(type, config)
⇒ Promise
Registers a card type.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
Parameter | Type | Description |
---|---|---|
type |
|
card type |
config |
|
card configuration |
graphBrowserVis.updateCard(cardId, htmlElementWrappers)
⇒ Promise
Updates a specific card with the passed htmlElement content.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation completed
Parameter | Type | Description |
---|---|---|
cardId |
|
card id |
htmlElementWrappers |
|
array of 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 completed
Parameter | Type | Description |
---|---|---|
selection |
|
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 completed
Parameter | Type | Description |
---|---|---|
nodes |
|
array of node ids |
relations |
|
array of relation ids |
ScriptedPanelVis
Kind: global interface
-
-
.appendHtmlElement(htmlElement, replace)
⇒Promise
-
.getHtmlCheckboxInputElement(name, label, checked)
⇒Promise
-
.getHtmlTextInputElement(name, label, placeholder)
⇒Promise
-
.getInteractiveTable()
⇒HtmlElementWrapper
-
.getHtmlNumberInputElement(name, label, placeholder)
⇒Promise
-
.getHtmlSubmitButtonElement(label)
⇒Promise
-
.getHtmlFormElement(onsubmitFunction)
⇒Promise
-
.getHtmlElement(htmlString)
⇒Promise
-
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 |
|
the html element to be appended |
replace |
|
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 | Description |
---|---|---|
name |
|
name of the checkbox html wrapper element |
label |
|
label for the checkbox |
checked |
|
checked state of the checkbox |
scriptedPanelVis.getHtmlTextInputElement(name, label, placeholder)
⇒ 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 | Description |
---|---|---|
name |
|
name attribute of the text input html wrapper element |
label |
|
label for the text input |
placeholder |
|
placeholder attribute 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 |
|
The names of the columns and the field names used to retrieve the value |
options.data |
|
The data objects to display |
options.onSelect |
|
Function called with selected objects called when any checkbox is clicked |
scriptedPanelVis.getHtmlNumberInputElement(name, label, placeholder)
⇒ 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 | Description |
---|---|---|
name |
|
name attribute of the number input html wrapper element |
label |
|
label for the number input |
placeholder |
|
placeholder attribute of the number input |
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 |
|
label for the button html wrapper element |
onclickFunction |
|
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 |
|
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 |
|
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 |
|
any custom html string |