$k. GraphConfiguration

new GraphConfiguration()

Configuration of a graph

Extends

Methods

(static) forContext(contextopt) → {$k.GraphConfiguration}

Returns the graph configuration for the context)

Parameters:
NameTypeAttributesDescription
context$k.SemanticElement<optional>

Context of the configuration

Since
  • 4.1.0
Deprecated
  • This function is deprecated and might be removed in future releases
Returns:
Type: 
$k.GraphConfiguration

(static) from(configurationElement) → {$k.GraphConfiguration}

Returns the confguration defined by the element

Parameters:
NameTypeDescription
configurationElement$k.SemanticElement

The configuration element

Since
  • 4.1.0
Returns:
Type: 
$k.GraphConfiguration

addElements(semanticElements) → {Array.<$k.SemanticElement>}

Set the node topics

Parameters:
NameTypeDescription
semanticElementsArray.<$k.SemanticElement>

The topics to add

Since
  • 4.1.0
Returns:

all elements in graph

Type: 
Array.<$k.SemanticElement>

categories(keyFilteropt, detailFilteropt) → {Array.<object>}

Parameters:
NameTypeAttributesDescription
keyFilterobject<optional>

Alternative 1 (preferred): a $k.JSONRenderContext Alternative 2 (compatibility only): A filter. See $k.JSONRenderContext.prototype.setFilters().

detailFilterobject<optional>

Only used if the key filter is not a $k.JSONRenderContext. See $k.JSONRenderContext.prototype.setLevelsOfDetail()

Since
  • 4.1.0
Returns:
Type: 
Array.<object>

collapse(semanticElement) → {Array.<object>}

Collapse neigbours from node

Parameters:
NameTypeDescription
semanticElementobject

The element to collapse

Since
  • 4.1.0
Returns:

The collapsed graph objects

Type: 
Array.<object>

configElement() → {$k.SemanticElement}

Since
  • 4.1.0
Returns:
Type: 
$k.SemanticElement

decorateElements(elements, decoration)

Add some JSON to each element

Parameters:
NameTypeDescription
elementsArray.<object>

The elements to be decorated

decorationobject

decoration object

Since
  • 4.3.0

expand(semanticElements, depthopt) → {Array.<object>}

Expand Node to its neighbours

Parameters:
NameTypeAttributesDescription
semanticElementsArray.<object>

The element to expand

depthInteger<optional>

The depth to expand

Since
  • 4.1.0
Returns:

The expanded graph objects

Type: 
Array.<object>

expandNodes(expandDepthopt) → {Array.<object>}

Expand the Nodes to their neighbours

Parameters:
NameTypeAttributesDescription
expandDepthinteger<optional>

The depth to expand the semantic objects via their connection, default value is 1

Since
  • 4.1.0
Returns:

The expanded graph objects

Type: 
Array.<object>

possibleRelationTargets(sourceTopic, keyFilteropt, detailFilteropt) → {Array.<object>}

Returns the possible relationtypes by targetTopic

Parameters:
NameTypeAttributesDescription
sourceTopicsemanticElement

Semantisches Element

keyFilterobject<optional>

Alternative 1 (preferred): a $k.JSONRenderContext Alternative 2 (compatibility only): A filter. See $k.JSONRenderContext.prototype.setFilters().

detailFilterobject<optional>

Only used if the key filter is not a $k.JSONRenderContext. See $k.JSONRenderContext.prototype.setLevelsOfDetail()

Since
  • 4.1.0
Returns:

Map with key: target Topic value: Array with possibleRelationTypes

Type: 
Array.<object>

render(keyFilteropt, detailFilteropt) → {Array.<object>}

Renders the graph node as literal objects

Parameters:
NameTypeAttributesDescription
keyFilterobject<optional>

Alternative 1 (preferred): a $k.JSONRenderContext Alternative 2 (compatibility only): A filter. See $k.JSONRenderContext.prototype.setFilters().

detailFilterobject<optional>

Only used if the key filter is not a $k.JSONRenderContext. See $k.JSONRenderContext.prototype.setLevelsOfDetail()

Since
  • 4.1.0
Returns:

The rendered graph objects

Type: 
Array.<object>

semanticElements() → {Array.<semanticElement>}

Since
  • 4.1.0
Returns:
Type: 
Array.<semanticElement>

setRenderContext(renderContextObject)

Set render context

Parameters:
NameTypeDescription
renderContextObjectRenderContext
Since
  • 5.3.0
Deprecated
  • This function is deprecated and might be removed in future releases