Visualization APIs in Siren
The following interfaces are available:
Typedefs
InputChangeHandler
:function
-
Input change handler
InteractiveTableColumn
-
Interactive table column
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(options)
⇒Promise
-
.addDocumentsFromDashboard(options)
⇒Promise
-
.addDocumentsFromGraph(options)
⇒Promise
-
.selectAll()
⇒Promise
-
.selectAllNodes()
⇒Promise
-
.invertNodesSelection()
⇒Promise
-
.extendNodesSelection()
⇒Promise
-
.expandSelectedNodes([options])
⇒Promise
-
.clean()
⇒Promise
-
.addNode(nodeId, entityId)
⇒Promise
-
.expandNode(nodeId)
⇒Promise
-
.expand(nodeIds)
⇒Promise
-
.getCurrentGraph()
⇒Promise
-
.removeNodesById(idsToDelete)
⇒Promise
-
.removeSelected()
⇒Promise
-
.applyLenses()
⇒Promise
-
.enableMapMode()
⇒Promise
-
.disableMapMode()
⇒Promise
-
.centerMapAt(lat, lon)
⇒Promise
-
.setZoomLevel(zoomLevel)
⇒Promise
-
.fit()
⇒Promise
-
.registerCard(type, config)
⇒Promise
-
.updateCard(cardId, htmlWrapperGetter)
⇒Promise
-
.selection(selection)
⇒Promise
-
.expandByRelation([options])
⇒Promise.<Array.<Object>>
-
.crop()
⇒Promise
-
.undo()
⇒Promise
-
.redo()
⇒Promise
-
.standardLayout()
⇒Promise
-
.hierarchicalLayout()
⇒Promise
-
.compactHierarchicalLayout()
⇒Promise
-
.radialLayout()
⇒Promise
-
.gForceLayout()
⇒Promise
-
.organicLayout()
⇒Promise
-
.sequentialLayout()
⇒Promise
-
.lensLayout()
⇒Promise
-
.structuralLayout()
⇒Promise
-
.tweakLayout()
⇒Promise
-
.groupSelectedNodes([options])
⇒Promise
-
.ungroupSelectedNodes()
⇒Promise
-
.invertRelations([enableInvertedRelations])
⇒Promise.<boolean>
-
.highlight([enableHighlight])
⇒Promise.<boolean>
-
.toggleLiveFilter()
⇒Promise.<boolean>
-
.toggleTimebar()
⇒Promise.<boolean>
-
.toggleMap()
⇒Promise.<boolean>
-
.heatmap([enable])
⇒Promise.<boolean>
-
.timebarNodeVisibility(mode)
⇒Promise.<string>
-
.saveGraph(saveAs)
⇒Promise
-
.loadGraph([options])
⇒Promise
-
.loadEntities()
⇒Promise
-
.downloadGraphAsImage()
⇒Promise
-
.exportGraphToBlobURL()
⇒Promise
-
.exportGraphAsAnxFile()
⇒Promise
-
.findCommonCommunicators([options])
⇒Promise
-
.selectByEntityType([options])
⇒Promise
-
.findShortestPath([options])
⇒Promise
-
.selectByEdgeCount([options])
⇒Promise
-
.showNodeCountByType()
⇒Promise
-
.isNodeCombo()
⇒Promise
-
.sort(sortOptions)
⇒Promise
-
.createRecord()
⇒Promise
-
.viewRecord()
⇒Promise
-
.addOrEditLinks()
⇒Promise
-
.isHighlightEnabled()
⇒Promise.<Boolean>
-
.isLiveFilterEnabled()
⇒Promise.<Boolean>
-
.isDirectRelation()
⇒Promise.<Boolean>
-
.isNodesSelectionEmpty()
⇒Promise.<Boolean>
-
.isComboNodeInSelection()
⇒Promise.<Boolean>
-
.isEdgeInSelection()
⇒Promise.<Boolean>
-
.isAnxExportServiceAvailable()
⇒Promise.<Boolean>
-
.isUndoable()
⇒Promise.<Boolean>
-
.isRedoable()
⇒Promise.<Boolean>
-
.isMapEnabled()
⇒Promise.<Boolean>
-
.isTimebarEnabled()
⇒Promise.<Boolean>
-
.isHeatmapEnabled()
⇒Promise.<Boolean>
-
.isEditLinkEnabled()
⇒Promise.<Boolean>
-
.isRecordViewEnabled()
⇒Promise.<Boolean>
-
.isEditedItemInSelection()
⇒Promise.<Boolean>
-
.isCreateLocalNodeMode()
⇒Promise.<Boolean>
-
.reCount()
⇒Promise.<void>
-
.entitiesWithNoCounts(entityIds)
⇒Promise.<Array.<string>>
-
.updateItemsUI(updateItems)
⇒Promise.<void>
-
.resetItemsUI(resetItems)
⇒Promise.<void>
-
.resetItemsUIFromSelection(propertiesToReset)
⇒Promise.<void>
-
.createTextBox(config)
⇒Promise.<void>
-
.createLocalNode(config)
⇒Promise.<void>
-
.createLocalEdge(config)
⇒Promise.<void>
-
.getGraphModel()
⇒Promise
-
.isCreateLocalEdgeMode()
⇒Promise.<boolean>
-
.getItemCanvasPoint(id)
⇒Promise.<Point>
-
graphBrowserVis.addDocumentsByQuery(options)
⇒ Promise
Adds entities to the graph.
Kind: instance method of GraphBrowserVis
Parameter | Type | Description |
---|---|---|
options |
|
object defining the options of the expansion |
options.searchId |
|
a saved search id to use when querying elasticsearch for entities |
options.query |
|
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 |
|
api parameters |
options.dashboardId |
|
id of the dashboard which state should be used to fetch the main search entities |
[options.limit] |
|
number of nodes to be fetched from dashboard |
[options.modalOption] |
|
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.addDocumentsFromGraph(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 |
|
api parameters |
options.savedGraphId |
|
id of the graph from which the nodes need to be fetched from |
graphBrowserVis.selectAll()
⇒ Promise
Selects all items present on the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation is complete.
graphBrowserVis.selectAllNodes()
⇒ Promise
Selects all nodes and combos present on the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation is complete.
graphBrowserVis.invertNodesSelection()
⇒ Promise
Inverts the nodes selection.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation is complete.
graphBrowserVis.extendNodesSelection()
⇒ Promise
Extends the nodes selection to include nodes connected directly to selected ones by a relation.
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 defining the options of the expansion |
|
[options.mode] |
|
|
expansion mode, can be 'modal', 'all' or 'subset' |
[options.nodesLimitOverride] |
|
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, entityId)
⇒ 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 |
|
composed from document index and id as "<_index>/_doc/<_id>" |
entityId |
|
id of the saved search to which the node belong to |
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 |
|
composed from document index and id as "<_index>/_doc/<_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 |
|
an array of ids composed from document index and id as "<_index>/_doc/<_id>" |
graphBrowserVis.getCurrentGraph()
⇒ Promise
Deprecated
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 |
|
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 |
|
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 is complete.
Parameter | Type | Description |
---|---|---|
zoomLevel |
|
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.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 |
|
card type |
|
config |
|
card configurations |
|
config.type |
|
The configuration type must be set to 'input'. |
|
config.name |
|
A unique name for the html element. |
|
[config.inputType] |
|
|
The type of the html element. The supported values are 'string' and 'checkbox'. |
[config.defaultValue] |
|
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 |
|
card id |
htmlWrapperGetter |
|
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.
NOTE - The document id part of the provided node ids should be URI encoded. Ids that come from sirenAPI calls will already be correctly encoded, any user provided id will have to be encoded by adding the following code to the script:
const encodedIdsArray = idsArray.map((id) => { const parts = id.split('/'); parts[parts.length - 1] = encodeURIComponent(parts[parts.length - 1]); return parts.join('/'); });
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation is complete.
Parameter | Type | Description |
---|---|---|
selection |
|
array of node ids |
graphBrowserVis.expandByRelation([options])
⇒ Promise.<Array.<Object>>
Expands the specified nodes ignoring relations not contained in the relations list. If no parameters are passed, opens up a modal to select the relations based on the current nodes on the graph browser.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Array.<Object>>
- resolves when the operation is complete.
Parameter | Type | Description |
---|---|---|
[options] |
|
optional parameter to specify nodes and relations |
options.nodeIds |
|
array of node ids |
options.relationIds |
|
array of relation ids |
options.returnOnlyNew |
|
Will return only node objects that were not on the graph prior to this expansion. Default: true. |
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.compactHierarchicalLayout()
⇒ 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.gForceLayout()
⇒ Promise
Rearranges the nodes on the graph using the gForce 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([options])
⇒ Promise
Groups the selected nodes in single node.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the operation is complete.
Parameter | Type | Description |
---|---|---|
[options] |
|
optional parameter |
[options.groupName] |
|
optional name for the group |
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] |
|
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] |
|
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] |
|
if defined it will enable or disable the heatmap. |
graphBrowserVis.timebarNodeVisibility(mode)
⇒ Promise.<string>
Changes how nodes without time are displayed when the timebar is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<string>
- resulves to a string value which signifies the current visibility mode.
Parameter | Type | Description |
---|---|---|
mode |
|
: visibility mode. Can be one of 'allNodes', 'onlyNodesConnectedToItemWithTime', 'onlyNodesWithTime' |
graphBrowserVis.saveGraph(saveAs)
⇒ Promise
Open the modal to save the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the save operation is complete.
Parameter | Type | Description |
---|---|---|
saveAs |
|
if true, saves as new graph. |
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] |
|
optional parameter to load a graph object |
options.graph |
|
the graph saved object that need to be loaded |
[options.modalOption] |
|
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.downloadGraphAsImage()
⇒ Promise
Exports the graph as a PNG file in A0 landscape format with a white background.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the file has been sent to the user.
graphBrowserVis.exportGraphToBlobURL()
⇒ Promise
Exports the graph to a blob URL containing a PNG file in A0 landscape format with a white background. The URL must be revoked by the caller once it has been processed.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves with the blob URL.
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.
graphBrowserVis.findCommonCommunicators([options])
⇒ Promise
Detect paths that minimizes distance between three or more input nodes. If no parameters are passed, opens a modal to configure the maximum path length, the maximum retrieved records per join and join type.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
[options] |
|
optional parameter |
options.maxPathLength |
|
maximum length of the path |
options.maxJoinRecordsCount |
|
maximum number of records to join |
options.joinType |
|
type of join used. Can be one of HASH_JOIN, BROADCAST_JOIN or INDEX_JOIN |
graphBrowserVis.selectByEntityType([options])
⇒ Promise
Selects nodes on the graph browser which belong to a given list of entities. If no parameters are passed, opens modal that shows selectable lists of entities on the graph. On confirm graph browser selects the nodes which belong to the entities selected.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
[options] |
|
optional parameter |
options.entityIds |
|
array of entity ids |
graphBrowserVis.findShortestPath([options])
⇒ Promise
Find the shortest path between two nodes on the graph. If no parameters are passed, opens a modal to configure the maximum path length, the maximum retrieved records per join and join type.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
[options] |
|
optional parameter |
options.maxPathLength |
|
maximum length of the path |
options.maxJoinRecordsCount |
|
maximum number of records to join |
options.joinType |
|
type of join used. Can be one of HASH_JOIN, BROADCAST_JOIN or INDEX_JOIN |
graphBrowserVis.selectByEdgeCount([options])
⇒ Promise
Select nodes based on the number of edges they are connected to. If no parameters are passed opens a modal to configure the number of edges and to include the invisible edges or not.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
[options] |
|
optional parameter |
options.edgeCount |
|
number of edges |
options.isVisibleEdgesOnly |
|
considers invisible edges when false |
graphBrowserVis.showNodeCountByType()
⇒ Promise
Opens modal that displays a summary of all entities on the graph with number of nodes per entity.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when the modal is closed.
graphBrowserVis.isNodeCombo()
⇒ Promise
Returns true
if the passed itemId
is a node combo.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
graphBrowserVis.sort(sortOptions)
⇒ Promise
Sorts the nodes in the Graph Browser according to the type of sorting that is specified. Passing 'label' or 'count' as the type sorts the nodes accordingly. Sorting is in ascending order by default. To do a custom comparison, set the type as 'custom' and pass the function to compare the nodes.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
sortOptions |
|
options for sorting nodes |
sortOptions.type |
|
must be one of 'label', 'count' or 'custom' |
sortOptions.compareFunction |
|
Compare function that required for type 'custom' |
[sortOptions.order] |
|
Optional parameter that accepts 'DESC' to sort in descending order |
graphBrowserVis.createRecord()
⇒ Promise
Opens the record view to create a new record for the passed entity id. When the record is saved from the record view, it is added as a node to the Graph Browser.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
graphBrowserVis.viewRecord()
⇒ Promise
Opens the selected node in a record view. Any edits to the record in the record view are updated in the Graph Browser nodes when the user saves them.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
graphBrowserVis.addOrEditLinks()
⇒ Promise
Opens the modal that allows users to add or edit links between two selected nodes with a relation between them. Entity identifier nodes are not considered.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves when operation is complete.
graphBrowserVis.isHighlightEnabled()
⇒ Promise.<Boolean>
Returns true
when the highlighting of connected nodes is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isLiveFilterEnabled()
⇒ Promise.<Boolean>
Returns true
when the live filter is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isDirectRelation()
⇒ Promise.<Boolean>
Returns true
when the graph shows direct relations.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isNodesSelectionEmpty()
⇒ Promise.<Boolean>
Returns true
when the current selection is empty.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isComboNodeInSelection()
⇒ Promise.<Boolean>
Returns true
when a combo node is present in the selection.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isEdgeInSelection()
⇒ Promise.<Boolean>
Returns true
when an edge is present in the selection.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isAnxExportServiceAvailable()
⇒ Promise.<Boolean>
Returns true
when the ANX file service is available.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isUndoable()
⇒ Promise.<Boolean>
Returns true
when an action can be undone.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isRedoable()
⇒ Promise.<Boolean>
Returns true
when a previously undone action can be redone.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isMapEnabled()
⇒ Promise.<Boolean>
Returns true
when the map mode is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isTimebarEnabled()
⇒ Promise.<Boolean>
Returns true
when the timebar mode is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isHeatmapEnabled()
⇒ Promise.<Boolean>
Returns true
when the heatmap is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isEditLinkEnabled()
⇒ Promise.<Boolean>
Returns true
when at least two nodes are selected that have a relation between
their entities. Entity identifier nodes are not considered.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isRecordViewEnabled()
⇒ Promise.<Boolean>
Returns true
when exactly one node is selected.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isEditedItemInSelection()
⇒ Promise.<Boolean>
Returns true
if at least one item with edited UI properties is selected.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.isCreateLocalNodeMode()
⇒ Promise.<Boolean>
Returns true
if create local node mode is enabled.
Kind: instance method of GraphBrowserVis
Returns: Promise.<Boolean>
- resolves when operation is complete.
graphBrowserVis.reCount()
⇒ Promise.<void>
Performs a recount of the selected nodes or of all nodes if nothing is selected.
Kind: instance method of GraphBrowserVis
Returns: Promise.<void>
- resolves when operation is complete.
graphBrowserVis.entitiesWithNoCounts(entityIds)
⇒ Promise.<Array.<string>>
Disables counts for the passed entity ids
Kind: instance method of GraphBrowserVis
Returns: Promise.<Array.<string>>
- resolves when operation is complete. Returns the array of disabled entity ids.
Parameter | Type | Description |
---|---|---|
entityIds |
|
Entity ids to be configured. |
graphBrowserVis.updateItemsUI(updateItems)
⇒ Promise.<void>
Updates items UI. Nodes: label - color - font icon - size - font style - badges Edges: label - color - width - font style - direction - rotation Combos: label - color - size - font icon - font style
Kind: instance method of GraphBrowserVis
Returns: Promise.<void>
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
updateItems |
|
|
updateItems[].id |
|
Id of the item that has to be updated |
updateItems[].type |
|
Supports 'node', 'edge' and 'combo' type |
updateItems[].cfg |
|
Object containing the properties to apply |
updateItems[].cfg.color |
|
New color for the item |
updateItems[].cfg.colorOpacity |
|
New color opacity for the item |
updateItems[].cfg.borderColor |
|
New border color for the item |
updateItems[].cfg.borderOpacity |
|
New border opacity for the item |
updateItems[].cfg.size |
|
New size for the item (node / combo) |
updateItems[].cfg.fontIcon |
|
New font icon for the item |
updateItems[].cfg.iconColor |
|
New icon color for the item (node/combo) |
updateItems[].cfg.iconColorOpacity |
|
New icon color opacity for the item (node/combo) |
updateItems[].cfg.imageUrl |
|
New image icon for the item |
updateItems[].cfg.label |
|
New label for the item |
updateItems[].cfg.autoRotate |
|
(Edge only) When false the label stays horizontal |
updateItems[].cfg.arrow |
|
(Edge only) Arrow configuration |
updateItems[].cfg.arrow.direction |
|
(Edge only) - 'left', 'right', 'both' or 'none' |
updateItems[].cfg.width |
|
(Edge only) - New width of the edge |
updateItems[].cfg.style |
|
(Edge only) - New style of the edge - 'solid', 'dashed', 'dotted' |
updateItems[].cfg.fontStyle |
|
Updates to the label font style |
updateItems[].cfg.fontStyle.color |
|
New color for the label |
updateItems[].cfg.fontStyle.highlight |
|
New color for the label background |
updateItems[].cfg.fontStyle.bold |
|
When |
updateItems[].cfg.fontStyle.italic |
|
When |
updateItems[].cfg.fontStyle.size |
|
Number between 0-10 to set min or max size respectively |
updateItems[].cfg.badges |
|
New badges for the item |
updateItems[].cfg.badges[].pos |
|
Position of the badge 'ne', 'nw', 'se', 'sw' supported |
updateItems[].cfg.badges[].text |
|
Text content for the badge |
updateItems[].cfg.badges[].fontIcon |
|
Font icon content for the badge |
updateItems[].cfg.badges[].color |
|
Color for the badge |
graphBrowserVis.resetItemsUI(resetItems)
⇒ Promise.<void>
Resets selected items UI Nodes: label - color - font icon - size - font style - badges Edges: label - color - width - direction - rotation Combos: label - color - size - font icon - font style
Kind: instance method of GraphBrowserVis
Returns: Promise.<void>
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
resetItems |
|
An array of item ids |
resetItems[].id |
|
id of the item that has to be reset |
resetItems[].type |
|
supports 'node', 'edge' and 'combo' type |
resetItems[].properties |
|
string array of the properties to reset. One of |
graphBrowserVis.resetItemsUIFromSelection(propertiesToReset)
⇒ Promise.<void>
Resets items UI Nodes: label - color - font icon - size - badges Edges: label - color - width - direction Combos: label - color - size - font icon
Kind: instance method of GraphBrowserVis
Returns: Promise.<void>
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
propertiesToReset |
|
String array of the properties to reset |
graphBrowserVis.createTextBox(config)
⇒ Promise.<void>
Creates a texbox on the graph.
Kind: instance method of GraphBrowserVis
Returns: Promise.<void>
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
config |
|
|
config.id |
|
Id of the textbox |
config.text |
|
Content of the textbox |
config.position |
|
Position of the textbox |
graphBrowserVis.createLocalNode(config)
⇒ Promise.<void>
Creates a local node on the graph. Passing '' as the entityId will use the None type to create the node
Kind: instance method of GraphBrowserVis
Returns: Promise.<void>
- resolves when operation is complete.
Parameter | Type | Description |
---|---|---|
config |
|
|
[config.id] |
|
Optional parameter, by default it will generate an Id |
config.entityId |
|
Entity type that will be used to create the node |
[config.position] |
|
Optional parameter that will position the node, by default it will be placed in the center of the graph |
graphBrowserVis.createLocalEdge(config)
⇒ Promise.<void>
Toggles local edge insertion mode.
Kind: instance method of GraphBrowserVis
Parameter | Type | Description |
---|---|---|
config |
|
|
config.sourceId |
|
Id of the source node |
config.targetId |
|
Id of the target node |
graphBrowserVis.getGraphModel()
⇒ Promise
Gets the low level graph model.
Kind: instance method of GraphBrowserVis
Returns: Promise
- resolves with the current graph model.
graphBrowserVis.isCreateLocalEdgeMode()
⇒ Promise.<boolean>
Returns a boolean indicating if the edge insertion mode is currently active.
Kind: instance method of GraphBrowserVis
graphBrowserVis.getItemCanvasPoint(id)
⇒ Promise.<Point>
Returns the screen coordinates of a canvas node.
Kind: instance method of GraphBrowserVis
Parameter | Type | Description |
---|---|---|
id |
|
The id of the node. |
ScriptedPanelVis
Kind: global interface
-
-
.appendHtmlElement(htmlElement, replace)
⇒Promise
-
.renderReactElement(reactElementConfig)
⇒Promise
-
.getHtmlCheckboxInputElement(name, label, [checked])
⇒Promise
-
.getHtmlTextInputElement(name, label, [placeholder], [initialValue])
⇒Promise
-
.getInteractiveTable()
⇒HtmlElementWrapper
-
.getComboBox()
⇒HtmlElementWrapper
-
.getHtmlNumberInputElement(name, label, [placeholder], [initialValue])
⇒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.renderReactElement(reactElementConfig)
⇒ Promise
Renders react element to the visualization panel
Kind: instance method of ScriptedPanelVis
Returns: Promise
- resolves when the operation is complete
Parameter | Type | Description |
---|---|---|
reactElementConfig |
|
the configuration to render react element |
reactElementConfig.Element |
|
the react element to be rendered |
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 |
|
name of the checkbox html wrapper element |
|
label |
|
label for the checkbox |
|
options.onChange |
Function called when there is a change to the user input values |
||
[checked] |
|
|
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 |
|
name attribute of the text input html wrapper element |
|
label |
|
label for the text input |
|
[placeholder] |
|
|
placeholder attribute of the text input |
[initialValue] |
|
|
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 |
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.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 |
|
Initial selected values in the combo box |
options.availableOptions |
|
The list of options shown in the dropdown (users are not restricted though) |
options.onChange |
|
Function called when there is a change to the user inputted values |
options.placeholder |
|
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 |
|
name attribute of the number input html wrapper element |
|
label |
|
label for the number input |
|
[placeholder] |
|
|
placeholder attribute of the number input element |
[initialValue] |
|
|
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 |
|
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 |