[@kineviz/graphxr-api](README.md) / Exports

# @kineviz/graphxr-api

## Table of contents

### Enumerations

- [ExpandNodesEdgeDirection](enums/ExpandNodesEdgeDirection.md)
- [ExpandNodesStatusCode](enums/ExpandNodesStatusCode.md)
- [Neo4jResultType](enums/Neo4jResultType.md)
- [PropertyMergeStrategy](enums/PropertyMergeStrategy.md)

### Classes

- [ApiEdge](classes/ApiEdge.md)
- [ApiLayoutGraph](classes/ApiLayoutGraph.md)
- [ApiNode](classes/ApiNode.md)
- [BaseGraph](classes/BaseGraph.md)
- [LegacyLayoutGraph](classes/LegacyLayoutGraph.md)
- [Neo4jResult](classes/Neo4jResult.md)

### Interfaces

- [API](interfaces/API.md)
- [AlignByOptions](interfaces/AlignByOptions.md)
- [AreGraphSnapshotsEqualOptions](interfaces/AreGraphSnapshotsEqualOptions.md)
- [AxesOptions](interfaces/AxesOptions.md)
- [AxisOptions](interfaces/AxisOptions.md)
- [CameraOptions](interfaces/CameraOptions.md)
- [Category](interfaces/Category.md)
- [CategoryConfig](interfaces/CategoryConfig.md)
- [CollectNodesOptions](interfaces/CollectNodesOptions.md)
- [ColorNodesByPropertyOptions](interfaces/ColorNodesByPropertyOptions.md)
- [CreateNodesOptions](interfaces/CreateNodesOptions.md)
- [EgoOptions](interfaces/EgoOptions.md)
- [ExpandNodesOptions](interfaces/ExpandNodesOptions.md)
- [ExplodeCollectionsOptions](interfaces/ExplodeCollectionsOptions.md)
- [ExtractOptions](interfaces/ExtractOptions.md)
- [ExtractProperty](interfaces/ExtractProperty.md)
- [GraphMergeOptions](interfaces/GraphMergeOptions.md)
- [LabelsConfig](interfaces/LabelsConfig.md)
- [LayoutContext](interfaces/LayoutContext.md)
- [LayoutGraph](interfaces/LayoutGraph.md)
- [LayoutResult](interfaces/LayoutResult.md)
- [LegacyGraph](interfaces/LegacyGraph.md)
- [LegacyNodeCollection](interfaces/LegacyNodeCollection.md)
- [LinkOptions](interfaces/LinkOptions.md)
- [MapOptions](interfaces/MapOptions.md)
- [MappedProperty](interfaces/MappedProperty.md)
- [MergeNodesOptions](interfaces/MergeNodesOptions.md)
- [MergeOptions](interfaces/MergeOptions.md)
- [MergeRelationshipsOptions](interfaces/MergeRelationshipsOptions.md)
- [Neo4jEdge](interfaces/Neo4jEdge.md)
- [Neo4jNode](interfaces/Neo4jNode.md)
- [Neo4jOptions](interfaces/Neo4jOptions.md)
- [Neo4jResponseContent](interfaces/Neo4jResponseContent.md)
- [NodeFilterOptions](interfaces/NodeFilterOptions.md)
- [ObservableLayoutGraphOptions](interfaces/ObservableLayoutGraphOptions.md)
- [PageRankOptions](interfaces/PageRankOptions.md)
- [ParametricDimension](interfaces/ParametricDimension.md)
- [ParametricOptions](interfaces/ParametricOptions.md)
- [RelationshipConfig](interfaces/RelationshipConfig.md)
- [RequestData](interfaces/RequestData.md)
- [RotateOptions](interfaces/RotateOptions.md)
- [Runtime](interfaces/Runtime.md)
- [RxjsSubscription](interfaces/RxjsSubscription.md)
- [ScaleOptions](interfaces/ScaleOptions.md)
- [SearchGraph](interfaces/SearchGraph.md)
- [SetCategoryCaptionPropertiesOptions](interfaces/SetCategoryCaptionPropertiesOptions.md)
- [SetCategorySizePropertyOptions](interfaces/SetCategorySizePropertyOptions.md)
- [ShiftOptions](interfaces/ShiftOptions.md)
- [ShortcutOptions](interfaces/ShortcutOptions.md)
- [ShortestPathOptions](interfaces/ShortestPathOptions.md)
- [SortByPropertyOptions](interfaces/SortByPropertyOptions.md)
- [TraceNeighborsOptions](interfaces/TraceNeighborsOptions.md)
- [TweenPositionOptions](interfaces/TweenPositionOptions.md)
- [TweenPositionUpdateEvent](interfaces/TweenPositionUpdateEvent.md)
- [UncollectNodesOptions](interfaces/UncollectNodesOptions.md)

### Type Aliases

- [AggregateOptions](modules.md#aggregateoptions)
- [Betweenness](modules.md#betweenness)
- [BetweennessResult](modules.md#betweennessresult)
- [CategoryId](modules.md#categoryid)
- [Closeness](modules.md#closeness)
- [ClosenessResult](modules.md#closenessresult)
- [Color](modules.md#color)
- [ConnectedComponent](modules.md#connectedcomponent)
- [ConnectedComponentResult](modules.md#connectedcomponentresult)
- [DijkstraEdge](modules.md#dijkstraedge)
- [Dimension](modules.md#dimension)
- [DistributionOptions](modules.md#distributionoptions)
- [EdgeFilter](modules.md#edgefilter)
- [EdgeId](modules.md#edgeid)
- [EdgeStyle](modules.md#edgestyle)
- [EdgeStyleValue](modules.md#edgestylevalue)
- [EdgeStyles](modules.md#edgestyles)
- [Filter](modules.md#filter)
- [GetApiOptions](modules.md#getapioptions)
- [GraphxrEvent](modules.md#graphxrevent)
- [GraphxrEventCallback](modules.md#graphxreventcallback)
- [GraphxrEventCallbackId](modules.md#graphxreventcallbackid)
- [InterpolatePositionFunction](modules.md#interpolatepositionfunction)
- [LayoutFunction](modules.md#layoutfunction)
- [LayoutNodesFunction](modules.md#layoutnodesfunction)
- [LegacyEdge](modules.md#legacyedge)
- [LegacyNode](modules.md#legacynode)
- [LouvainResult](modules.md#louvainresult)
- [MakeRandomGraphOptions](modules.md#makerandomgraphoptions)
- [MapFormula](modules.md#mapformula)
- [MergeRelationshipsData](modules.md#mergerelationshipsdata)
- [Neo4jData](modules.md#neo4jdata)
- [Neo4jGraphData](modules.md#neo4jgraphdata)
- [Neo4jId](modules.md#neo4jid)
- [Neo4jQuery](modules.md#neo4jquery)
- [Neo4jQueryFunction](modules.md#neo4jqueryfunction)
- [Neo4jTableData](modules.md#neo4jtabledata)
- [NodeFilter](modules.md#nodefilter)
- [NodeId](modules.md#nodeid)
- [NodeIdToPosition](modules.md#nodeidtoposition)
- [NodeIdToPositionEntry](modules.md#nodeidtopositionentry)
- [NodeStyle](modules.md#nodestyle)
- [NodeStyleValue](modules.md#nodestylevalue)
- [NodeStyles](modules.md#nodestyles)
- [ObjectType](modules.md#objecttype)
- [ObservableLayoutGraph](modules.md#observablelayoutgraph)
- [ObserveCallback](modules.md#observecallback)
- [PageRank](modules.md#pagerank)
- [PageRankResult](modules.md#pagerankresult)
- [Position](modules.md#position)
- [Properties](modules.md#properties)
- [PropertyKey](modules.md#propertykey)
- [PropertyValue](modules.md#propertyvalue)
- [RelationshipId](modules.md#relationshipid)
- [SerializedEdgeStyles](modules.md#serializededgestyles)
- [SerializedNodeStyles](modules.md#serializednodestyles)
- [Sort](modules.md#sort)

### API Variables

- [Api](modules.md#api)

### Other Variables

- [AXES](modules.md#axes)
- [DEFAULT\_CATEGORY\_ID](modules.md#default_category_id)
- [DEFAULT\_RELATIONSHIP\_ID](modules.md#default_relationship_id)
- [DIMENSIONS](modules.md#dimensions)
- [EDGE\_STYLES](modules.md#edge_styles)
- [GRAPHXR\_API\_VERSION](modules.md#graphxr_api_version)
- [MINIMUM\_GRAPHXR\_VERSION](modules.md#minimum_graphxr_version)
- [NODE\_STYLES](modules.md#node_styles)
- [defaultLinkOptions](modules.md#defaultlinkoptions)
- [mapFormula](modules.md#mapformula-1)
- [runtime](modules.md#runtime)

### Algorithm Functions

- [traceNeighbors](modules.md#traceneighbors)

### Camera Functions

- [flyToCenter](modules.md#flytocenter)
- [flyToPosition](modules.md#flytoposition)
- [setCameraOptions](modules.md#setcameraoptions)
- [setCameraRotating](modules.md#setcamerarotating)

### Category Functions

- [getCategoryColor](modules.md#getcategorycolor)
- [setCategoryCaptionProperties](modules.md#setcategorycaptionproperties)
- [setCategorySizeProperty](modules.md#setcategorysizeproperty)

### Centrality Functions

- [betweenness](modules.md#betweenness-1)
- [closeness](modules.md#closeness-1)
- [pageRank](modules.md#pagerank-1)

### Community Detection Functions

- [connectedComponent](modules.md#connectedcomponent-1)
- [louvain](modules.md#louvain)
- [stronglyConnectedComponent](modules.md#stronglyconnectedcomponent)

### Edge Functions

- [makeEdge](modules.md#makeedge)

### Events Functions

- [observe](modules.md#observe)
- [onChange](modules.md#onchange)

### Filter Functions

- [edgesByRelationship](modules.md#edgesbyrelationship)
- [nodesByCategory](modules.md#nodesbycategory)

### Graph Functions

- [getLayoutGraph](modules.md#getlayoutgraph)
- [makeGraph](modules.md#makegraph)
- [makeRandomGraph](modules.md#makerandomgraph)

### Grove Functions

- [getObservableLayoutGraph](modules.md#getobservablelayoutgraph)

### Layout Functions

- [alignBy](modules.md#alignby)
- [applyLayout](modules.md#applylayout)
- [circle](modules.md#circle)
- [cube](modules.md#cube)
- [distributionBy](modules.md#distributionby)
- [ego](modules.md#ego)
- [grid](modules.md#grid)
- [layout](modules.md#layout)
- [line](modules.md#line)
- [parametric](modules.md#parametric)
- [random](modules.md#random)
- [rotate](modules.md#rotate)
- [scale](modules.md#scale)
- [setParametricAxesOptions](modules.md#setparametricaxesoptions)
- [shift](modules.md#shift)
- [spiral](modules.md#spiral)

### Legend Functions

- [colorNodesByProperty](modules.md#colornodesbyproperty)

### Neo4j Functions

- [expandNodes](modules.md#expandnodes)
- [neo4j](modules.md#neo4j)
- [neo4jGraphDataToGraph](modules.md#neo4jgraphdatatograph)

### Node Functions

- [makeNode](modules.md#makenode)
- [makeNodeId](modules.md#makenodeid)

### Other Functions

- [areGraphSnapshotsEqual](modules.md#aregraphsnapshotsequal)
- [areGraphsEqual](modules.md#aregraphsequal)
- [createNodes](modules.md#createnodes)
- [dispatchGraphDataUpdate](modules.md#dispatchgraphdataupdate)
- [findGraphXRWindow](modules.md#findgraphxrwindow)
- [getApi](modules.md#getapi)
- [getCategoryConfig](modules.md#getcategoryconfig)
- [getRuntime](modules.md#getruntime)
- [makeCollectionNode](modules.md#makecollectionnode)
- [makeColor](modules.md#makecolor)
- [makeExpandNodesQuery](modules.md#makeexpandnodesquery)
- [mergeNodes](modules.md#mergenodes)
- [mergeRelationships](modules.md#mergerelationships)
- [on](modules.md#on)
- [propertyKeys](modules.md#propertykeys)
- [triggerForceLayout](modules.md#triggerforcelayout)

### Path Finding Functions

- [shortestPath](modules.md#shortestpath)

### Project Settings Functions

- [setAutoShowImage](modules.md#setautoshowimage)
- [setEdgeScale](modules.md#setedgescale)

### Properties Functions

- [comparePropertyValues](modules.md#comparepropertyvalues)

### Render Functions

- [getScene](modules.md#getscene)

### Runtime Functions

- [setRuntime](modules.md#setruntime)

### Sort Functions

- [sortByProperty](modules.md#sortbyproperty)

### Style Functions

- [makePosition](modules.md#makeposition)
- [makeRandomPosition](modules.md#makerandomposition)

### Transform Functions

- [aggregate](modules.md#aggregate)
- [collectNodes](modules.md#collectnodes)
- [explodeCollections](modules.md#explodecollections)
- [extract](modules.md#extract)
- [link](modules.md#link)
- [map](modules.md#map)
- [merge](modules.md#merge)
- [shortcut](modules.md#shortcut)
- [uncollectNodes](modules.md#uncollectnodes)

### Utility Functions

- [range](modules.md#range)
- [sleep](modules.md#sleep)

### window Functions

- [setFullscreen](modules.md#setfullscreen)

## Type Aliases

### AggregateOptions

Ƭ **AggregateOptions**: { `aggregateAlong`: [`RelationshipId`](modules.md#relationshipid) ; `aggregateTo`: [`CategoryId`](modules.md#categoryid) \| [`NodeFilter`](modules.md#nodefilter) \| [`NodeId`](modules.md#nodeid)[] \| [`ApiNode`](classes/ApiNode.md)[] ; `getPropertyFrom`: ``"edge"`` \| ``"node"``  } & `AggregateProperty` & [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)

#### Defined in

[transform/aggregate.ts:15](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/aggregate.ts#lines-15)

___

### Betweenness

Ƭ **Betweenness**: `number`

#### Defined in

[centrality/betweenness.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/betweenness.ts#lines-9)

___

### BetweennessResult

Ƭ **BetweennessResult**: `MapPolyfill`<[`NodeId`](modules.md#nodeid), [`Betweenness`](modules.md#betweenness)\>

#### Defined in

[centrality/betweenness.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/betweenness.ts#lines-10)

___

### CategoryId

Ƭ **CategoryId**: `Brand`<`string`, ``"CategoryId"``\>

#### Defined in

[category.ts:4](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/category.ts#lines-4)

___

### Closeness

Ƭ **Closeness**: `number`

#### Defined in

[centrality/closeness.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/closeness.ts#lines-9)

___

### ClosenessResult

Ƭ **ClosenessResult**: `MapPolyfill`<[`NodeId`](modules.md#nodeid), [`Closeness`](modules.md#closeness)\>

#### Defined in

[centrality/closeness.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/closeness.ts#lines-10)

___

### Color

Ƭ **Color**: `THREE.Color`

#### Defined in

[styles.ts:1](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-1)

___

### ConnectedComponent

Ƭ **ConnectedComponent**: [`NodeId`](modules.md#nodeid)[]

#### Defined in

[community-detection/connectedComponent.ts:5](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/community-detection/connectedComponent.ts#lines-5)

___

### ConnectedComponentResult

Ƭ **ConnectedComponentResult**: `MapPolyfill`<[`NodeId`](modules.md#nodeid), `number`\>

#### Defined in

[community-detection/connectedComponent.ts:6](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/community-detection/connectedComponent.ts#lines-6)

___

### DijkstraEdge

Ƭ **DijkstraEdge**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `id` | [`EdgeId`](modules.md#edgeid) |
| `sourceId` | [`NodeId`](modules.md#nodeid) |
| `targetId` | [`NodeId`](modules.md#nodeid) |
| `weight?` | `number` |

#### Defined in

[path-finding/shortestPath.ts:47](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/path-finding/shortestPath.ts#lines-47)

___

### Dimension

Ƭ **Dimension**: keyof `Pick`<[`Position`](modules.md#position), ``"x"`` \| ``"y"`` \| ``"z"``\>

#### Defined in

[styles.ts:3](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-3)

___

### DistributionOptions

Ƭ **DistributionOptions**: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) & { `bin?`: [`PropertyKey`](modules.md#propertykey) ; `binType?`: ``"number"`` \| ``"date"`` \| ``"categorical"`` ; `dimension`: [`Dimension`](modules.md#dimension) ; `spread?`: `number`  }

#### Defined in

[layout/distributionBy.ts:12](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/distributionBy.ts#lines-12)

___

### EdgeFilter

Ƭ **EdgeFilter**: [`Filter`](modules.md#filter)<[`ApiEdge`](classes/ApiEdge.md)\>

#### Defined in

[filter/filter.ts:6](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/filter/filter.ts#lines-6)

___

### EdgeId

Ƭ **EdgeId**: `Brand`<`string`, ``"EdgeId"``\>

#### Defined in

[edge.ts:7](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/edge.ts#lines-7)

___

### EdgeStyle

Ƭ **EdgeStyle**: keyof [`EdgeStyles`](modules.md#edgestyles)

#### Defined in

[styles.ts:50](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-50)

___

### EdgeStyleValue

Ƭ **EdgeStyleValue**: [`EdgeStyles`](modules.md#edgestyles)[[`EdgeStyle`](modules.md#edgestyle)]

#### Defined in

[styles.ts:51](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-51)

___

### EdgeStyles

Ƭ **EdgeStyles**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `alpha` | `number` |
| `color` | [`Color`](modules.md#color) |
| `highlight` | `boolean` |
| `selected` | `boolean` |
| `twinkled` | `boolean` |
| `visible` | `boolean` |
| `width` | `number` |

#### Defined in

[styles.ts:41](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-41)

___

### Filter

Ƭ **Filter**<`T`\>: (`obj`: `T`) => `boolean`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Type declaration

▸ (`obj`): `boolean`

##### Parameters

| Name | Type |
| :------ | :------ |
| `obj` | `T` |

##### Returns

`boolean`

#### Defined in

[filter/filter.ts:4](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/filter/filter.ts#lines-4)

___

### GetApiOptions

Ƭ **GetApiOptions**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `graphXrVersion?` | `string` |
| `runtime?` | [`Runtime`](interfaces/Runtime.md) |

#### Defined in

[index.ts:453](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/index.ts#lines-453)

___

### GraphxrEvent

Ƭ **GraphxrEvent**: ``"change"`` \| ``"select"`` \| ``"nearby"`` \| ``"load"``

#### Defined in

[on.ts:7](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/on.ts#lines-7)

___

### GraphxrEventCallback

Ƭ **GraphxrEventCallback**: (`event`: [`GraphxrEvent`](modules.md#graphxrevent), `data?`: `unknown`) => `void` & { `previousState?`: `GraphxrReduxState`  }

#### Defined in

[on.ts:8](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/on.ts#lines-8)

___

### GraphxrEventCallbackId

Ƭ **GraphxrEventCallbackId**: `Brand`<`string`, ``"ApiEventCallbackId"``\>

#### Defined in

[on.ts:11](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/on.ts#lines-11)

___

### InterpolatePositionFunction

Ƭ **InterpolatePositionFunction**: (`t`: `number`, `initial`: [`Position`](modules.md#position), `final`: [`Position`](modules.md#position)) => [`Position`](modules.md#position)

#### Type declaration

▸ (`t`, `initial`, `final`): [`Position`](modules.md#position)

##### Parameters

| Name | Type |
| :------ | :------ |
| `t` | `number` |
| `initial` | [`Position`](modules.md#position) |
| `final` | [`Position`](modules.md#position) |

##### Returns

[`Position`](modules.md#position)

#### Defined in

[camera/flyToPosition.ts:13](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/camera/flyToPosition.ts#lines-13)

___

### LayoutFunction

Ƭ **LayoutFunction**: (`view`: [`LayoutGraph`](interfaces/LayoutGraph.md)) => [`LayoutResult`](interfaces/LayoutResult.md)

#### Type declaration

▸ (`view`): [`LayoutResult`](interfaces/LayoutResult.md)

##### Parameters

| Name | Type |
| :------ | :------ |
| `view` | [`LayoutGraph`](interfaces/LayoutGraph.md) |

##### Returns

[`LayoutResult`](interfaces/LayoutResult.md)

#### Defined in

[layout/layout.ts:15](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/layout.ts#lines-15)

___

### LayoutNodesFunction

Ƭ **LayoutNodesFunction**: (`context`: [`LayoutContext`](interfaces/LayoutContext.md)) => [`LayoutResult`](interfaces/LayoutResult.md)

#### Type declaration

▸ (`context`): [`LayoutResult`](interfaces/LayoutResult.md)

##### Parameters

| Name | Type |
| :------ | :------ |
| `context` | [`LayoutContext`](interfaces/LayoutContext.md) |

##### Returns

[`LayoutResult`](interfaces/LayoutResult.md)

#### Defined in

[layout/layout.ts:13](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/layout.ts#lines-13)

___

### LegacyEdge

Ƭ **LegacyEdge**: [`EdgeStyles`](modules.md#edgestyles) & { `_neo4jID?`: `string` ; `id`: [`EdgeId`](modules.md#edgeid) ; `name`: [`RelationshipId`](modules.md#relationshipid) ; `properties`: [`Properties`](modules.md#properties) ; `sourceId`: [`NodeId`](modules.md#nodeid) ; `targetId`: [`NodeId`](modules.md#nodeid) ; `uid`: `string`  }

#### Defined in

[edge.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/edge.ts#lines-9)

___

### LegacyNode

Ƭ **LegacyNode**: [`NodeStyles`](modules.md#nodestyles) & { `category`: [`CategoryId`](modules.md#categoryid) ; `collection?`: [`LegacyNodeCollection`](interfaces/LegacyNodeCollection.md) ; `connectedEdge`: [`EdgeId`](modules.md#edgeid)[] ; `data`: { `detail`: { `data`: [`Properties`](modules.md#properties) ; `type`: [`CategoryId`](modules.md#categoryid)  }  } ; `id`: [`NodeId`](modules.md#nodeid) ; `neighbor`: [`NodeId`](modules.md#nodeid)[] ; `properties`: [`Properties`](modules.md#properties)  }

#### Defined in

[node.ts:15](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/node.ts#lines-15)

___

### LouvainResult

Ƭ **LouvainResult**: `MapPolyfill`<[`NodeId`](modules.md#nodeid), `number`\>

#### Defined in

[community-detection/louvain.ts:7](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/community-detection/louvain.ts#lines-7)

___

### MakeRandomGraphOptions

Ƭ **MakeRandomGraphOptions**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `edgeCount?` | `number` |
| `nodeCount?` | `number` |

#### Defined in

[makeRandomGraph.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeRandomGraph.ts#lines-10)

___

### MapFormula

Ƭ **MapFormula**: (`value`: [`PropertyValue`](modules.md#propertyvalue), `properties`: [`Properties`](modules.md#properties)) => [`PropertyValue`](modules.md#propertyvalue)

#### Type declaration

▸ (`value`, `properties`): [`PropertyValue`](modules.md#propertyvalue)

##### Parameters

| Name | Type |
| :------ | :------ |
| `value` | [`PropertyValue`](modules.md#propertyvalue) |
| `properties` | [`Properties`](modules.md#properties) |

##### Returns

[`PropertyValue`](modules.md#propertyvalue)

#### Defined in

[transform/map.ts:13](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/map.ts#lines-13)

___

### MergeRelationshipsData

Ƭ **MergeRelationshipsData**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `edge` | [`Properties`](modules.md#properties) |
| `source` | [`Properties`](modules.md#properties) |
| `target` | [`Properties`](modules.md#properties) |

#### Defined in

[transform/mergeRelationships.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/mergeRelationships.ts#lines-9)

___

### Neo4jData

Ƭ **Neo4jData**: [`Neo4jGraphData`](modules.md#neo4jgraphdata) \| [`Neo4jTableData`](modules.md#neo4jtabledata)

#### Defined in

[neo4j/neo4j.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-10)

___

### Neo4jGraphData

Ƭ **Neo4jGraphData**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `nodes` | [`Neo4jNode`](interfaces/Neo4jNode.md)[] |
| `relationships` | [`Neo4jEdge`](interfaces/Neo4jEdge.md)[] |

#### Defined in

[neo4j/neo4j.ts:31](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-31)

___

### Neo4jId

Ƭ **Neo4jId**: `number`

#### Defined in

[neo4j/neo4j.ts:47](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-47)

___

### Neo4jQuery

Ƭ **Neo4jQuery**: `Brand`<`string`, ``"Neo4jQuery"``\>

#### Defined in

[neo4j/neo4j.ts:48](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-48)

___

### Neo4jQueryFunction

Ƭ **Neo4jQueryFunction**: () => [`Neo4jQuery`](modules.md#neo4jquery)

#### Type declaration

▸ (): [`Neo4jQuery`](modules.md#neo4jquery)

##### Returns

[`Neo4jQuery`](modules.md#neo4jquery)

#### Defined in

[neo4j/neo4j.ts:49](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-49)

___

### Neo4jTableData

Ƭ **Neo4jTableData**: (`string` \| `number` \| ``null``)[][]

#### Defined in

[neo4j/neo4j.ts:36](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-36)

___

### NodeFilter

Ƭ **NodeFilter**: [`Filter`](modules.md#filter)<[`ApiNode`](classes/ApiNode.md)\>

#### Defined in

[filter/filter.ts:5](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/filter/filter.ts#lines-5)

___

### NodeId

Ƭ **NodeId**: `Brand`<`string`, ``"NodeId"``\>

#### Defined in

[node.ts:7](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/node.ts#lines-7)

___

### NodeIdToPosition

Ƭ **NodeIdToPosition**: `SafeMap`<[`NodeId`](modules.md#nodeid), [`Position`](modules.md#position)\>

#### Defined in

[layout/layout.ts:24](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/layout.ts#lines-24)

___

### NodeIdToPositionEntry

Ƭ **NodeIdToPositionEntry**: [[`NodeId`](modules.md#nodeid), [`Position`](modules.md#position)]

#### Defined in

[layout/layout.ts:23](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/layout.ts#lines-23)

___

### NodeStyle

Ƭ **NodeStyle**: keyof [`NodeStyles`](modules.md#nodestyles)

#### Defined in

[styles.ts:22](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-22)

___

### NodeStyleValue

Ƭ **NodeStyleValue**: [`NodeStyles`](modules.md#nodestyles)[[`NodeStyle`](modules.md#nodestyle)]

#### Defined in

[styles.ts:23](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-23)

___

### NodeStyles

Ƭ **NodeStyles**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `alpha` | `number` |
| `color` | [`Color`](modules.md#color) |
| `highlight` | `boolean` |
| `icon` | `number` |
| `pinned` | `boolean` |
| `position` | [`Position`](modules.md#position) |
| `selected` | `boolean` |
| `size` | `number` |
| `twinkled` | `boolean` |
| `visible` | `boolean` |

#### Defined in

[styles.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-10)

___

### ObjectType

Ƭ **ObjectType**: `Object`

#### Index signature

▪ [key: `string`]: `boolean` \| `string` \| `number` \| ``null`` \| `undefined`

#### Defined in

[runtime.ts:105](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/runtime.ts#lines-105)

___

### ObservableLayoutGraph

Ƭ **ObservableLayoutGraph**: `Iterator`<[`LayoutGraph`](interfaces/LayoutGraph.md)\> & [`LayoutGraph`](interfaces/LayoutGraph.md)

#### Defined in

[getObservableLayoutGraph.ts:12](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/getObservableLayoutGraph.ts#lines-12)

___

### ObserveCallback

Ƭ **ObserveCallback**: () => `void`

#### Type declaration

▸ (): `void`

##### Returns

`void`

#### Defined in

[observe.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/observe.ts#lines-9)

___

### PageRank

Ƭ **PageRank**: `number`

#### Defined in

[centrality/pageRank.ts:5](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/pageRank.ts#lines-5)

___

### PageRankResult

Ƭ **PageRankResult**: `SafeMap`<[`NodeId`](modules.md#nodeid), [`PageRank`](modules.md#pagerank)\>

#### Defined in

[centrality/pageRank.ts:6](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/pageRank.ts#lines-6)

___

### Position

Ƭ **Position**: `THREE.Vector3`

#### Defined in

[styles.ts:2](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-2)

___

### Properties

Ƭ **Properties**: `Record`<[`PropertyKey`](modules.md#propertykey), [`PropertyValue`](modules.md#propertyvalue)\>

#### Defined in

[properties.ts:6](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/properties.ts#lines-6)

___

### PropertyKey

Ƭ **PropertyKey**: `Brand`<`string`, ``"PropertyKey"``\>

#### Defined in

[properties.ts:3](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/properties.ts#lines-3)

___

### PropertyValue

Ƭ **PropertyValue**: `any`

#### Defined in

[properties.ts:5](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/properties.ts#lines-5)

___

### RelationshipId

Ƭ **RelationshipId**: `Brand`<`string`, ``"RelationshipId"``\>

#### Defined in

[relationship.ts:3](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/relationship.ts#lines-3)

___

### SerializedEdgeStyles

Ƭ **SerializedEdgeStyles**: `Partial`<`Omit`<[`EdgeStyles`](modules.md#edgestyles), ``"color"``\> & { `color`: `number`  }\>

#### Defined in

[styles.ts:54](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-54)

___

### SerializedNodeStyles

Ƭ **SerializedNodeStyles**: `Partial`<`Omit`<[`NodeStyles`](modules.md#nodestyles), ``"color"``\> & { `color`: `number`  }\>

#### Defined in

[styles.ts:37](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-37)

___

### Sort

Ƭ **Sort**<`T`\>: (`left`: `T`, `right`: `T`) => `number`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Type declaration

▸ (`left`, `right`): `number`

##### Parameters

| Name | Type |
| :------ | :------ |
| `left` | `T` |
| `right` | `T` |

##### Returns

`number`

#### Defined in

[sort/sort.ts:1](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/sort/sort.ts#lines-1)

## API Variables

### Api

• `Const` **Api**: `Object`

Perform a runtime check of the minimum required GraphXR and API version. If minimum requirements are met, return the API. Otherwise, throw an error.

**`Since`**

0.0.1

#### Type declaration

| Name | Type |
| :------ | :------ |
| `DIMENSIONS` | `Record`<``"x"`` \| ``"y"`` \| ``"z"``, ``"x"`` \| ``"y"`` \| ``"z"``\> |
| `ExpandNodesEdgeDirection` | typeof [`ExpandNodesEdgeDirection`](enums/ExpandNodesEdgeDirection.md) |
| `ExpandNodesStatusCode` | typeof [`ExpandNodesStatusCode`](enums/ExpandNodesStatusCode.md) |
| `_minimumGraphxrVersion` | `string` |
| `_version` | `string` |
| `aggregate` | (`options`: [`AggregateOptions`](modules.md#aggregateoptions)) => `TransformFunction` |
| `aggregateFormula` | { `average`: (`values`: `any`[]) => `number` ; `concatenate`: (`values`: `any`[]) => ``null`` \| `string` ; `count`: (`values`: `any`[]) => `number` ; `max`: (`values`: `any`[]) => `number` ; `min`: (`values`: `any`[]) => `number` ; `range`: (`values`: `any`[]) => `string` ; `sum`: (`values`: `any`[]) => `number` ; `takeFirst`: (`values`: `any`[]) => `any`  } |
| `aggregateFormula.average` | (`values`: `any`[]) => `number` |
| `aggregateFormula.concatenate` | (`values`: `any`[]) => ``null`` \| `string` |
| `aggregateFormula.count` | (`values`: `any`[]) => `number` |
| `aggregateFormula.max` | (`values`: `any`[]) => `number` |
| `aggregateFormula.min` | (`values`: `any`[]) => `number` |
| `aggregateFormula.range` | (`values`: `any`[]) => `string` |
| `aggregateFormula.sum` | (`values`: `any`[]) => `number` |
| `aggregateFormula.takeFirst` | (`values`: `any`[]) => `any` |
| `alignBy` | (`options`: [`AlignByOptions`](interfaces/AlignByOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `applyLayout` | (`view`: [`LayoutGraph`](interfaces/LayoutGraph.md), `computeLayout`: [`LayoutFunction`](modules.md#layoutfunction), `tweenOverrides?`: `Partial`<`TweenLayoutOptions`\>) => `Promise`<[`NodeIdToPosition`](modules.md#nodeidtoposition)\> |
| `areGraphSnapshotsEqual` | (`left`: `GraphSnapshot`, `right`: `GraphSnapshot`, `options`: `Partial`<[`AreGraphSnapshotsEqualOptions`](interfaces/AreGraphSnapshotsEqualOptions.md)\>) => `boolean` |
| `betweenness` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md)) => [`BetweennessResult`](modules.md#betweennessresult) |
| `circle` | (`options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `closeness` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md)) => [`ClosenessResult`](modules.md#closenessresult) |
| `collectNodes` | (`options?`: [`CollectNodesOptions`](interfaces/CollectNodesOptions.md)) => `TransformFunction` |
| `colorNodesByProperty` | (`options`: [`ColorNodesByPropertyOptions`](interfaces/ColorNodesByPropertyOptions.md)) => `void` |
| `comparePropertyValues` | (`left`: `any`, `right`: `any`, `ascending`: `boolean`) => `number` |
| `connectedComponent` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md)) => [`ConnectedComponentResult`](modules.md#connectedcomponentresult) |
| `convertToScreenCoordinates` | (`position`: `Vector3`) => [`Position`](modules.md#position) |
| `createNodes` | (`options`: [`CreateNodesOptions`](interfaces/CreateNodesOptions.md)) => `TransformFunction` |
| `cube` | (`options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `dispatchGraphDataUpdate` | () => `void` |
| `distributionBy` | (`options`: [`DistributionOptions`](modules.md#distributionoptions)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `edgesByRelationship` | (`relationship`: [`RelationshipId`](modules.md#relationshipid)) => [`EdgeFilter`](modules.md#edgefilter) |
| `ego` | (`options`: [`EgoOptions`](interfaces/EgoOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `expandNodes` | () => `Promise`<[`ExpandNodesStatusCode`](enums/ExpandNodesStatusCode.md)\> |
| `explodeCollections` | (`options?`: [`ExplodeCollectionsOptions`](interfaces/ExplodeCollectionsOptions.md)) => `TransformFunction` |
| `extract` | (`options`: [`ExtractOptions`](interfaces/ExtractOptions.md)) => `TransformFunction` |
| `flyToCenter` | (`view?`: [`LayoutGraph`](interfaces/LayoutGraph.md), `nodeIds?`: [`NodeId`](modules.md#nodeid)[], `offset`: `number`, `options?`: [`TweenPositionOptions`](interfaces/TweenPositionOptions.md)) => `Promise`<[`Position`](modules.md#position)\> |
| `flyToPosition` | (`position`: `Vector3`, `offset`: `number`, `options`: [`TweenPositionOptions`](interfaces/TweenPositionOptions.md)) => `Promise`<[`Position`](modules.md#position)\> |
| `getCategoryColor` | (`categoryId`: [`CategoryId`](modules.md#categoryid)) => [`Color`](modules.md#color) |
| `getCategoryConfig` | (`category`: [`CategoryId`](modules.md#categoryid)) => [`CategoryConfig`](interfaces/CategoryConfig.md) |
| `getGraphView` | () => `void` |
| `getLayoutGraph` | () => [`LegacyLayoutGraph`](classes/LegacyLayoutGraph.md) |
| `getObservableLayoutGraph` | (`options`: [`ObservableLayoutGraphOptions`](interfaces/ObservableLayoutGraphOptions.md)) => [`ObservableLayoutGraph`](modules.md#observablelayoutgraph) |
| `getRuntime` | () => [`Runtime`](interfaces/Runtime.md) |
| `getScene` | () => `THREE.Group` |
| `grid` | (`options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `layout` | (`computeLayout`: [`LayoutNodesFunction`](modules.md#layoutnodesfunction), `options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `line` | (`options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `link` | (`options`: [`LinkOptions`](interfaces/LinkOptions.md)) => `TransformFunction` |
| `louvain` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md)) => [`LouvainResult`](modules.md#louvainresult) |
| `makeCollectionNode` | (`category`: [`CategoryId`](modules.md#categoryid), `__namedParameters`: `NodeCollection`) => [`ApiNode`](classes/ApiNode.md) |
| `makeColor` | (`hexOrR`: `number`, `g?`: `number`, `b?`: `number`) => [`Color`](modules.md#color) |
| `makeEdge` | (`__namedParameters`: `Partial`<[`ApiEdge`](classes/ApiEdge.md)\>) => [`ApiEdge`](classes/ApiEdge.md) |
| `makeGraph` | () => [`LayoutGraph`](interfaces/LayoutGraph.md) |
| `makeNode` | (`__namedParameters`: `Partial`<[`ApiNode`](classes/ApiNode.md)\>) => [`ApiNode`](classes/ApiNode.md) |
| `makeNodeId` | () => [`NodeId`](modules.md#nodeid) |
| `makePosition` | (`__namedParameters`: `Partial`<`Vector3`\>) => [`Position`](modules.md#position) |
| `makeRandomGraph` | (`options`: [`MakeRandomGraphOptions`](modules.md#makerandomgraphoptions)) => [`LayoutGraph`](interfaces/LayoutGraph.md) |
| `makeRandomPosition` | () => [`Position`](modules.md#position) |
| `map` | (`options`: [`MapOptions`](interfaces/MapOptions.md)) => `TransformFunction` |
| `mapFormula` | { `toDate`: (`value`: `any`) => `string` ; `toNumber`: (`value`: `any`) => `number` ; `toString`: (`value`: `any`) => `string` ; `toWeek`: (`value`: `any`) => `string`  } |
| `mapFormula.toDate` | (`value`: `any`) => `string` |
| `mapFormula.toNumber` | (`value`: `any`) => `number` |
| `mapFormula.toString` | (`value`: `any`) => `string` |
| `mapFormula.toWeek` | (`value`: `any`) => `string` |
| `merge` | (`options`: [`MergeOptions`](interfaces/MergeOptions.md)) => `TransformFunction` |
| `mergeNodes` | (`options`: [`MergeNodesOptions`](interfaces/MergeNodesOptions.md)) => `TransformFunction` |
| `mergeRelationships` | (`options`: [`MergeRelationshipsOptions`](interfaces/MergeRelationshipsOptions.md)) => `TransformFunction` |
| `neo4j` | (`query`: [`Neo4jQuery`](modules.md#neo4jquery), `options`: [`Neo4jOptions`](interfaces/Neo4jOptions.md)) => `void` |
| `nodesByCategory` | (`category`: [`CategoryId`](modules.md#categoryid)) => [`NodeFilter`](modules.md#nodefilter) |
| `observe` | <T\>(`event`: [`GraphxrEvent`](modules.md#graphxrevent), `compute`: [`ObserveCallback`](modules.md#observecallback)) => `Iterator`<`T`\> |
| `on` | (`event`: [`GraphxrEvent`](modules.md#graphxrevent), `callback`: [`GraphxrEventCallback`](modules.md#graphxreventcallback), `callbackId?`: [`GraphxrEventCallbackId`](modules.md#graphxreventcallbackid)) => [`GraphxrEventCallbackId`](modules.md#graphxreventcallbackid) |
| `onChange` | <T\>(`cb`: [`ObserveCallback`](modules.md#observecallback)) => `Iterator`<`T`, `any`, `undefined`\> |
| `pageRank` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md), `options`: [`PageRankOptions`](interfaces/PageRankOptions.md)) => [`PageRankResult`](modules.md#pagerankresult) |
| `parametric` | (`options`: [`ParametricOptions`](interfaces/ParametricOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `random` | (`options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `range` | (`size`: `number`) => `number`[] |
| `rotate` | (`options`: [`RotateOptions`](interfaces/RotateOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `scale` | (`options`: [`ScaleOptions`](interfaces/ScaleOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `setAutoShowImage` | (`value`: `boolean`) => `boolean` |
| `setCameraOptions` | (`options`: [`CameraOptions`](interfaces/CameraOptions.md)) => `void` |
| `setCameraRotating` | (`rotating`: `boolean`) => `void` |
| `setCategoryCaptionProperties` | (`__namedParameters`: [`SetCategoryCaptionPropertiesOptions`](interfaces/SetCategoryCaptionPropertiesOptions.md)) => `Promise`<`unknown`\> |
| `setCategorySizeProperty` | (`__namedParameters`: [`SetCategorySizePropertyOptions`](interfaces/SetCategorySizePropertyOptions.md)) => `Promise`<`unknown`\> |
| `setEdgeScale` | (`value`: `number`) => `number` |
| `setFullscreen` | (`value`: `boolean`) => `boolean` |
| `setParametricAxesOptions` | (`options`: `Partial`<[`AxesOptions`](interfaces/AxesOptions.md)\>) => `void` |
| `setRuntime` | (`value`: [`Runtime`](interfaces/Runtime.md)) => `void` |
| `shift` | (`options`: [`ShiftOptions`](interfaces/ShiftOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `shortcut` | (`options`: [`ShortcutOptions`](interfaces/ShortcutOptions.md)) => `TransformFunction` |
| `shortestPath` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md), `options`: [`ShortestPathOptions`](interfaces/ShortestPathOptions.md)) => [`DijkstraEdge`](modules.md#dijkstraedge)[] \| ``null`` |
| `sleep` | (`ms`: `number`) => `Promise`<`number`\> |
| `sortByProperty` | (`__namedParameters`: [`SortByPropertyOptions`](interfaces/SortByPropertyOptions.md)) => [`Sort`](modules.md#sort)<[`ApiNode`](classes/ApiNode.md)\> |
| `spiral` | (`options?`: [`NodeFilterOptions`](interfaces/NodeFilterOptions.md)) => [`LayoutFunction`](modules.md#layoutfunction) |
| `stronglyConnectedComponent` | (`graph`: [`LayoutGraph`](interfaces/LayoutGraph.md)) => [`ConnectedComponentResult`](modules.md#connectedcomponentresult) |
| `traceNeighbors` | (`view`: [`LayoutGraph`](interfaces/LayoutGraph.md), `rootId`: [`NodeId`](modules.md#nodeid), `options`: [`TraceNeighborsOptions`](interfaces/TraceNeighborsOptions.md)) => `MapPolyfill`<[`NodeId`](modules.md#nodeid), `boolean`\> |
| `triggerForceLayout` | () => `void` |
| `uncollectNodes` | (`options?`: [`UncollectNodesOptions`](interfaces/UncollectNodesOptions.md)) => `TransformFunction` |

#### Defined in

[index.ts:363](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/index.ts#lines-363)

___

## Other Variables

### AXES

• `Const` **AXES**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `x` | `Vector3` |
| `y` | `Vector3` |
| `z` | `Vector3` |

#### Defined in

[layout/layout.ts:26](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/layout.ts#lines-26)

___

### DEFAULT\_CATEGORY\_ID

• `Const` **DEFAULT\_CATEGORY\_ID**: [`CategoryId`](modules.md#categoryid)

#### Defined in

[category.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/category.ts#lines-10)

___

### DEFAULT\_RELATIONSHIP\_ID

• `Const` **DEFAULT\_RELATIONSHIP\_ID**: [`RelationshipId`](modules.md#relationshipid)

#### Defined in

[relationship.ts:5](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/relationship.ts#lines-5)

___

### DIMENSIONS

• `Const` **DIMENSIONS**: `Record`<[`Dimension`](modules.md#dimension), [`Dimension`](modules.md#dimension)\>

#### Defined in

[styles.ts:4](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-4)

___

### EDGE\_STYLES

• `Const` **EDGE\_STYLES**: [`EdgeStyle`](modules.md#edgestyle)[]

#### Defined in

[styles.ts:52](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-52)

___

### GRAPHXR\_API\_VERSION

• `Const` **GRAPHXR\_API\_VERSION**: ``"0.0.256"``

#### Defined in

[version.ts:1](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/version.ts#lines-1)

___

### MINIMUM\_GRAPHXR\_VERSION

• `Const` **MINIMUM\_GRAPHXR\_VERSION**: ``"2.11.0"``

GraphXR must be this version or greater.
See package.json in the root directory of the `graph` repository.

#### Defined in

[minimumRequirements.ts:5](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/minimumRequirements.ts#lines-5)

___

### NODE\_STYLES

• `Const` **NODE\_STYLES**: [`NodeStyle`](modules.md#nodestyle)[]

#### Defined in

[styles.ts:24](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/styles.ts#lines-24)

___

### defaultLinkOptions

• `Const` **defaultLinkOptions**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `relationship` | [`RelationshipId`](modules.md#relationshipid) |

#### Defined in

[transform/link.ts:18](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/link.ts#lines-18)

___

### mapFormula

• `Const` **mapFormula**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `toDate` | (`value`: `any`) => `string` |
| `toNumber` | (`value`: `any`) => `number` |
| `toString` | (`value`: `any`) => `string` |
| `toWeek` | (`value`: `any`) => `string` |

#### Defined in

[transform/map.ts:27](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/map.ts#lines-27)

___

### runtime

• **runtime**: [`Runtime`](interfaces/Runtime.md)

#### Defined in

[runtime.ts:156](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/runtime.ts#lines-156)

## Algorithm Functions

### traceNeighbors

▸ **traceNeighbors**(`view`, `rootId`, `options?`): `MapPolyfill`<[`NodeId`](modules.md#nodeid), `boolean`\>

Highlight the root Node and all connected Edges and neighboring Nodes up to a specified depth.

**`Since`**

0.0.146

**`Example`**

```js
api.traceNeighbors(view, view.getNodes()[0].id, {depth: 3})
```

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `view` | [`LayoutGraph`](interfaces/LayoutGraph.md) | `undefined` |
| `rootId` | [`NodeId`](modules.md#nodeid) | `undefined` |
| `options` | [`TraceNeighborsOptions`](interfaces/TraceNeighborsOptions.md) | `defaultOptions` |

#### Returns

`MapPolyfill`<[`NodeId`](modules.md#nodeid), `boolean`\>

#### Defined in

[path-finding/traceNeighbors.ts:25](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/path-finding/traceNeighbors.ts#lines-25)

___

## Camera Functions

### flyToCenter

▸ **flyToCenter**(`view?`, `nodeIds?`, `offset?`, `options?`): `Promise`<[`Position`](modules.md#position)\>

Fly the camera to the center of a slice of nodes, optionally with an offset, optionally with a custom duration or tween function

**`Since`**

0.0.139

**`Example`**

```js
// Center of all nodes
api.flyToCenter(); 

// Center of a slice of nodes
const view = api.getLayoutGraph();
const slice = view.getNodes().slice(0, 10).map(node => node.id);
api.flyToCenter(view, slice); 

// Center of a slice of nodes with offset and duration
const view = api.getLayoutGraph();
const slice = view.getNodes().slice(0, 10).map(node => node.id);
api.flyToCenter(view, slice, -3, { duration: 0 });); 
```

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `view?` | [`LayoutGraph`](interfaces/LayoutGraph.md) | `undefined` |
| `nodeIds?` | [`NodeId`](modules.md#nodeid)[] | `undefined` |
| `offset` | `number` | `0` |
| `options?` | [`TweenPositionOptions`](interfaces/TweenPositionOptions.md) | `undefined` |

#### Returns

`Promise`<[`Position`](modules.md#position)\>

#### Defined in

[camera/flyToCenter.ts:30](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/camera/flyToCenter.ts#lines-30)

___

### flyToPosition

▸ **flyToPosition**(`position`, `offset?`, `options?`): `Promise`<[`Position`](modules.md#position)\>

Fly the camera to a position, optionally with an offset, optionally with a custom duration or tween function

**`Since`**

0.0.138

**`Example`**

```js
const view = api.getLayoutGraph();
const firstNode = view.getNodes()[0];
const position = firstNode.getStyle('position');
api.flyToPosition(position); // no offset
api.flyToPosition(position, -3); // with an offset
api.flyToPosition(position, 0, { duration: 0 }); // instantly
```

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `position` | `Vector3` | `undefined` |
| `offset` | `number` | `0` |
| `options` | [`TweenPositionOptions`](interfaces/TweenPositionOptions.md) | `defaultTween` |

#### Returns

`Promise`<[`Position`](modules.md#position)\>

#### Defined in

[camera/flyToPosition.ts:44](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/camera/flyToPosition.ts#lines-44)

___

### setCameraOptions

▸ **setCameraOptions**(`options`): `void`

Set camera rotation, rotation axes visibility, camera speed

**`Since`**

0.0.249

**`Example`**

```js
api.setCameraOptions({
  hideAxes: true,
  rotating: true,
  speed: 0.5,
});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`CameraOptions`](interfaces/CameraOptions.md) |

#### Returns

`void`

#### Defined in

[camera/setCameraOptions.ts:24](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/camera/setCameraOptions.ts#lines-24)

___

### setCameraRotating

▸ **setCameraRotating**(`rotating`): `void`

Enable or disable rotating of the graph scene

**`Since`**

0.0.138

**`Example`**

```js
api.setCameraRotating(true);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `rotating` | `boolean` |

#### Returns

`void`

#### Defined in

[camera/setCameraRotating.ts:13](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/camera/setCameraRotating.ts#lines-13)

___

## Category Functions

### getCategoryColor

▸ **getCategoryColor**(`categoryId`): [`Color`](modules.md#color)

Returns the default Node Color of a Category

**`Since`**

0.0.8

#### Parameters

| Name | Type |
| :------ | :------ |
| `categoryId` | [`CategoryId`](modules.md#categoryid) |

#### Returns

[`Color`](modules.md#color)

#### Defined in

[getCategoryColor.ts:12](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/getCategoryColor.ts#lines-12)

___

### setCategoryCaptionProperties

▸ **setCategoryCaptionProperties**(`«destructured»`): `Promise`<`unknown`\>

Set the properties which will display as captions for the given category.

**`Since`**

0.0.138

**`Example`**

```js
api.setCategoryCaptionProperties('Episodes', ['millionViewers']);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | [`SetCategoryCaptionPropertiesOptions`](interfaces/SetCategoryCaptionPropertiesOptions.md) |

#### Returns

`Promise`<`unknown`\>

#### Defined in

[setCategoryCaptionProperties.ts:23](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/setCategoryCaptionProperties.ts#lines-23)

___

### setCategorySizeProperty

▸ **setCategorySizeProperty**(`«destructured»`): `Promise`<`unknown`\>

Set the property which will affect the size of the nodes in the category.

**`Since`**

0.0.198

**`Example`**

```js
api.setCategorySizeProperty({category: 'Movie', property: 'released'});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | [`SetCategorySizePropertyOptions`](interfaces/SetCategorySizePropertyOptions.md) |

#### Returns

`Promise`<`unknown`\>

#### Defined in

[setCategorySizeProperty.ts:23](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/setCategorySizeProperty.ts#lines-23)

___

## Centrality Functions

### betweenness

▸ **betweenness**(`graph`): [`BetweennessResult`](modules.md#betweennessresult)

Compute Betweenness score for each node in the graph

**`Since`**

0.0.100

**`Example`**

```js
const result = api.betweenness(api.getLayoutGraph())
view.applyTransform((graph) => {
  graph.getNodes().forEach(node => {
    node.properties.betweenness = result.get(node.id)
  })
  return graph;
})

#### Parameters

| Name | Type |
| :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) |

#### Returns

[`BetweennessResult`](modules.md#betweennessresult)

#### Defined in

[centrality/betweenness.ts:27](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/betweenness.ts#lines-27)

___

### closeness

▸ **closeness**(`graph`): [`ClosenessResult`](modules.md#closenessresult)

Compute Closeness score for each node in the graph

**`Since`**

0.0.101

**`Example`**

```js
const result = api.closeness(api.getLayoutGraph())
view.applyTransform((graph) => {
  graph.getNodes().forEach(node => {
    node.properties.closeness = result.get(node.id)
  })
  return graph;
})

#### Parameters

| Name | Type |
| :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) |

#### Returns

[`ClosenessResult`](modules.md#closenessresult)

#### Defined in

[centrality/closeness.ts:27](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/closeness.ts#lines-27)

___

### pageRank

▸ **pageRank**(`graph`, `options?`): [`PageRankResult`](modules.md#pagerankresult)

Compute PageRank for the entire graph

**`Since`**

0.0.98

**`Example`**

```js
const result = GraphXR.pageRank()
view.applyTransform((graph) => {
  graph.getNodes().forEach(node => {
    node.properties.pageRank = result.get(node.id)
  })
  return graph;
})
```

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) | `undefined` |
| `options` | [`PageRankOptions`](interfaces/PageRankOptions.md) | `defaultOptions` |

#### Returns

[`PageRankResult`](modules.md#pagerankresult)

#### Defined in

[centrality/pageRank.ts:33](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/centrality/pageRank.ts#lines-33)

___

## Community Detection Functions

### connectedComponent

▸ **connectedComponent**(`graph`): [`ConnectedComponentResult`](modules.md#connectedcomponentresult)

Find all Connected Components in the graph

**`Since`**

0.0.102

**`Example`**

```js
const result = api.connectedComponent(graph)
console.log(result.get('a'))
// 3

#### Parameters

| Name | Type |
| :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) |

#### Returns

[`ConnectedComponentResult`](modules.md#connectedcomponentresult)

#### Defined in

[community-detection/connectedComponent.ts:19](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/community-detection/connectedComponent.ts#lines-19)

___

### louvain

▸ **louvain**(`graph`): [`LouvainResult`](modules.md#louvainresult)

Find all Louvain components in the graph

**`Since`**

0.0.102

**`Example`**

```js
const result = api.louvain(graph)
console.log(result.get('a'))
// 3

#### Parameters

| Name | Type |
| :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) |

#### Returns

[`LouvainResult`](modules.md#louvainresult)

#### Defined in

[community-detection/louvain.ts:20](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/community-detection/louvain.ts#lines-20)

___

### stronglyConnectedComponent

▸ **stronglyConnectedComponent**(`graph`): [`ConnectedComponentResult`](modules.md#connectedcomponentresult)

Find all Strongly Connected Components in the graph

**`Since`**

0.0.102

**`Example`**

```js
const result = api.stronglyConnectedComponent(graph)
console.log(result.get('a'))
// 3

#### Parameters

| Name | Type |
| :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) |

#### Returns

[`ConnectedComponentResult`](modules.md#connectedcomponentresult)

#### Defined in

[community-detection/stronglyConnectedComponent.ts:24](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/community-detection/stronglyConnectedComponent.ts#lines-24)

___

## Edge Functions

### makeEdge

▸ **makeEdge**(`«destructured»`): [`ApiEdge`](classes/ApiEdge.md)

Creates an Edge object but does not add it to the graph space

**`Since`**

0.0.1

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | `Partial`<[`ApiEdge`](classes/ApiEdge.md)\> |

#### Returns

[`ApiEdge`](classes/ApiEdge.md)

#### Defined in

[makeEdge.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeEdge.ts#lines-9)

___

## Events Functions

### observe

▸ **observe**<`T`\>(`event`, `compute`): `Iterator`<`T`\>

Convert an async API event, like 'change', into an Iterator.
Useful in Grove to define variables which react to data changes

**`Since`**

0.0.53

**`Example`**

```js
personaNodes = observe(
  'change',
  () => api.getLayoutGraph().getNodes().filter(api.nodesByCategory('Persona'))
)
```

#### Type parameters

| Name |
| :------ |
| `T` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `event` | [`GraphxrEvent`](modules.md#graphxrevent) |
| `compute` | [`ObserveCallback`](modules.md#observecallback) |

#### Returns

`Iterator`<`T`\>

#### Defined in

[observe.ts:24](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/observe.ts#lines-24)

___

### onChange

▸ **onChange**<`T`\>(`cb`): `Iterator`<`T`, `any`, `undefined`\>

Convert graph data change into an observable Grove variable.

**`Since`**

0.0.249

**`Example`**

```js
personaNodes = onChange(
  () => api.getLayoutGraph().getNodes().filter(api.nodesByCategory('Persona'))
)
```

#### Type parameters

| Name |
| :------ |
| `T` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `cb` | [`ObserveCallback`](modules.md#observecallback) |

#### Returns

`Iterator`<`T`, `any`, `undefined`\>

#### Defined in

[onChange.ts:17](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/onChange.ts#lines-17)

___

## Filter Functions

### edgesByRelationship

▸ **edgesByRelationship**(`relationship`): [`EdgeFilter`](modules.md#edgefilter)

Returns a function which, given a Graph, returns all edges of a specific relationship

**`Since`**

0.0.41

#### Parameters

| Name | Type |
| :------ | :------ |
| `relationship` | [`RelationshipId`](modules.md#relationshipid) |

#### Returns

[`EdgeFilter`](modules.md#edgefilter)

#### Defined in

[edgesByRelationship.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/edgesByRelationship.ts#lines-10)

___

### nodesByCategory

▸ **nodesByCategory**(`category`): [`NodeFilter`](modules.md#nodefilter)

Returns a function which, given a Node, returns true if the Node is in a certain category

**`Since`**

0.0.41

**`Example`**

```js
aggregate({
  aggregateTo: nodesByCategory('Season'),
  aggregateAlong: "inSeason",
  getPropertyFrom: "node",
  sourceProperty: "millionViewers",
  targetProperty: "minMillionViewers",
  formula: "min",
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `category` | [`CategoryId`](modules.md#categoryid) |

#### Returns

[`NodeFilter`](modules.md#nodefilter)

#### Defined in

[filter/nodesByCategory.ts:21](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/filter/nodesByCategory.ts#lines-21)

___

## Graph Functions

### getLayoutGraph

▸ **getLayoutGraph**(): [`LegacyLayoutGraph`](classes/LegacyLayoutGraph.md)

Returns a Graph which allows mutation of the Graph visualization.

**`Since`**

0.0.1

**`Example`**

```js
const graph = api.getLayoutGraph();
graph.addNodes([
  api.makeNode({category: "Episodes", properties: {episodeNumber: 1, seasonNumber: 1}}),
]);
```

#### Returns

[`LegacyLayoutGraph`](classes/LegacyLayoutGraph.md)

#### Defined in

[getLayoutGraph.ts:16](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/getLayoutGraph.ts#lines-16)

___

### makeGraph

▸ **makeGraph**(): [`LayoutGraph`](interfaces/LayoutGraph.md)

Returns a Graph useful for in-memory Graph operations

**`Since`**

0.0.42

#### Returns

[`LayoutGraph`](interfaces/LayoutGraph.md)

#### Defined in

[makeGraph.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeGraph.ts#lines-9)

___

### makeRandomGraph

▸ **makeRandomGraph**(`options?`): [`LayoutGraph`](interfaces/LayoutGraph.md)

Returns a random Graph

**`Since`**

0.0.254

**`Example`**

```ts
const random = api.makeRandomGraph();
// Replace the current graph
api.getLayoutGraph().replace(random);
// or merge it
api.getLayoutGraph().assign(random);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`MakeRandomGraphOptions`](modules.md#makerandomgraphoptions) |

#### Returns

[`LayoutGraph`](interfaces/LayoutGraph.md)

#### Defined in

[makeRandomGraph.ts:26](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeRandomGraph.ts#lines-26)

___

## Grove Functions

### getObservableLayoutGraph

▸ **getObservableLayoutGraph**(`options?`): [`ObservableLayoutGraph`](modules.md#observablelayoutgraph)

Returns a Generator which resolves to the LegacyLayoutGraph. The Generator emits whenever the window global GraphXR owned GraphObservable object emits.
It's useful in Grove to create cells which react to graph data changes.

**`Since`**

0.0.231

**`Example`**

```js
// This is a Grove cell
selectedNodes = api.getObservableLayoutGraph().getVisibleNodes().filter(node => node.getStyle("selected"));
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ObservableLayoutGraphOptions`](interfaces/ObservableLayoutGraphOptions.md) |

#### Returns

[`ObservableLayoutGraph`](modules.md#observablelayoutgraph)

#### Defined in

[getObservableLayoutGraph.ts:28](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/getObservableLayoutGraph.ts#lines-28)

___

## Layout Functions

### alignBy

▸ **alignBy**(`options`): [`LayoutFunction`](modules.md#layoutfunction)

Given one of x, y, or z, find the center of that dimension
and align all Nodes to that center on that dimension only.

**`Since`**

0.0.70

**`Example`**

```js
GraphXR.alignBy({
  dimension: 'x',
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`AlignByOptions`](interfaces/AlignByOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/alignBy.ts:23](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/alignBy.ts#lines-23)

___

### applyLayout

▸ **applyLayout**(`view`, `computeLayout`, `tweenOverrides?`): `Promise`<[`NodeIdToPosition`](modules.md#nodeidtoposition)\>

Sets the positions of Nodes. Optionally animate the position.
If tween provided with the LayoutResult, use it.
Override the default tweens returned by (for example) line() and circle() by providing TweenLayoutOverrides.
If tween is undefined, set all the positions immediately

**`Since`**

0.0.1

**`Example`**

```js
// Basic example
GraphXR.applyLayout(GraphXR.getLayoutGraph(), GraphXR.line())

// Layouts can be tweened, or not.
GraphXR.applyLayout(GraphXR.getLayoutGraph(), GraphXR.circle(), {duration: 3000})
GraphXR.applyLayout(GraphXR.getLayoutGraph(), GraphXR.cube(), {duration: 3000, interpolate: myInterpolate})

// Define your own layout!
GraphXR.applyLayout(
  GraphXR.getLayoutGraph(),
  {
    final: new Map(GraphXR.getNodes().map(n => [n, GraphXR.makeRandomPosition()])),
    tween: {
      duration: 3000,
      interpolate: myInterpolate,
    }
  }
)

// Sort and Filter can apply to the geometric layouts.
// Also, note that you can call applyLayout on a LayoutGraph.
GraphXR.getLayoutGraph().applyLayout(
  GraphXR.line({
    sort: 'price', // shorthand for GraphXR.sortByProperty({property: 'price', ascending: true})
    filter: GraphXR.nodesByCategory('Item'),
  })
))
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `view` | [`LayoutGraph`](interfaces/LayoutGraph.md) |
| `computeLayout` | [`LayoutFunction`](modules.md#layoutfunction) |
| `tweenOverrides?` | `Partial`<`TweenLayoutOptions`\> |

#### Returns

`Promise`<[`NodeIdToPosition`](modules.md#nodeidtoposition)\>

#### Defined in

[layout/applyLayout.ts:47](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/applyLayout.ts#lines-47)

___

### circle

▸ **circle**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

All the Nodes spread on a circle

**`Since`**

0.0.19

**`Example`**

```js
GraphXR.circle()
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/circle.ts:17](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/circle.ts#lines-17)

___

### cube

▸ **cube**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

All the Nodes spread on a cube.

**`Since`**

0.0.19

**`Example`**

```js
GraphXR.cube()
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/cube.ts:17](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/cube.ts#lines-17)

___

### distributionBy

▸ **distributionBy**(`options`): [`LayoutFunction`](modules.md#layoutfunction)

Equally space Nodes on one of the x, y, or z axes while keeping the other two
dimensions constant. Optionally bin the Nodes by a property value. Optionally
scale the spacing by a "spread" factor (the higher the spread, the farther apart).

**`Since`**

0.0.69

**`Example`**

```js
// Equally space Nodes on the x-axis
GraphXR.getLayoutGraph().applyLayout(GraphXR.distributionBy({
  dimension: 'x', // y or z
}))

// Equally space Nodes on the x-axis and bin the Nodes by "seasonNumber"
GraphXR.getLayoutGraph().applyLayout(GraphXR.distributionBy({
  bin: 'seasonNumber',
  dimension: 'x',
}))

// Equally space Nodes on the x-axis and bin the Nodes by "seasonNumber" in descending order
GraphXR.getLayoutGraph().applyLayout(GraphXR.distributionBy({
  bin: 'seasonNumber',
  dimension: 'x',
  reverse: true,
}))
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`DistributionOptions`](modules.md#distributionoptions) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/distributionBy.ts:47](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/distributionBy.ts#lines-47)

___

### ego

▸ **ego**(`options`): [`LayoutFunction`](modules.md#layoutfunction)

Ego reveals hierarchal data by arranging nodes in a tree, where a node's depth in
the tree is equal to the length of the shortest path to the node. The tree projects
linearly in one direction, or radially around the root[s].

**`Since`**

0.0.93

**`Example`**

```js
// The minimum requirements
const graph = api.getLayoutGraph();
graph.applyLayout(api.ego({
  filter: (node) => node.properties.Level === 1, // Find the root node[s]
}));

// Applying optional settings
const graph = api.getLayoutGraph();
graph.applyLayout(api.ego({
  depth: 3, // maximum depth of the tree; default 100
  edgeLength: 1 // visual length of the edges in the tree; default 0.2
  mode: 'rings' // 'tree' or 'rings'; default 'tree'
  orientation: 'down' // 'up', 'down', 'left', or 'right'; default 'right'
  sortByProperty: 'ComponentName' // arrange child nodes in ascending order by a property
  [sortByProperty: api.sortByProperty({property: "ComponentName", ascending: false})] // same as above, but descending
}))
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`EgoOptions`](interfaces/EgoOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/ego.ts:71](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/ego.ts#lines-71)

___

### grid

▸ **grid**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

Equally space Nodes on the x-axis, y-axis, z=0.

**`Since`**

0.0.19

**`Example`**

```js
GraphXR.grid()
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/grid.ts:17](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/grid.ts#lines-17)

___

### layout

▸ **layout**(`computeLayout`, `options?`): [`LayoutFunction`](modules.md#layoutfunction)

A decorator for the circle, cube, grid, line, and spiral layouts.
You can construct your own layout by providing a layout function.

#### Parameters

| Name | Type |
| :------ | :------ |
| `computeLayout` | [`LayoutNodesFunction`](modules.md#layoutnodesfunction) |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/layout.ts:68](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/layout.ts#lines-68)

___

### line

▸ **line**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

Equally space Nodes on the x-axis, y=0, z=0.

**`Since`**

0.0.1

**`Example`**

```js
GraphXR.line()
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/line.ts:18](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/line.ts#lines-18)

___

### parametric

▸ **parametric**(`options`): [`LayoutFunction`](modules.md#layoutfunction)

Map the x, y, and/or z dimensions to the range [-2, 2] by applying a linear scale
to all or a subset of the domain of a property.

If a dimension is omitted, it is flattened to align with the grid.

**`Since`**

0.0.68

**`Example`**

```js
// Line up Nodes on the x-axis, ordered by seasonNumber.
// Also set y and z to 0
GraphXR.parametric({
  x: 'seasonNumber',
  y: 0,
  z: 0,
})

// Line up Nodes on the x-axis, ordered by seasonNumber descending. Align y and z to the grid.
GraphXR.parametric({
  x: 'seasonNumber',
  reverse: true,
})

// Linearly scale seasonNumber, episodeNumber, and millionViewers on the x, y, and z dimensions respectively
GraphXR.parametric({
  x: 'seasonNumber',
  y: 'episodeNumber',
  z: 'millionViewers',
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ParametricOptions`](interfaces/ParametricOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/parametric.ts:56](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/parametric.ts#lines-56)

___

### random

▸ **random**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

Set each node to a random point.

**`Since`**

0.0.93

**`Example`**

```js
GraphXR.random()
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/random.ts:15](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/random.ts#lines-15)

___

### rotate

▸ **rotate**(`options`): [`LayoutFunction`](modules.md#layoutfunction)

Given one of the x, y, or z dimensions, find the center point of all the Nodes
and rotate all Nodes around the axis passing through the center point
and lying on the dimension given.

**`Since`**

0.0.72

**`Example`**

```js
GraphXR.rotate({
  dimension: 'x',
  theta: 90,
})

GraphXR.rotate({
  dimension: 'z',
  theta: 45
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`RotateOptions`](interfaces/RotateOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/rotate.ts:31](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/rotate.ts#lines-31)

___

### scale

▸ **scale**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

Scale the distance of each node from a computed center by a constant factor.

**`Since`**

0.0.90

**`Example`**

```js
// Expand a set of nodes from its center by a factor of 2
GraphXR.scale({
  x: 2,
  y: 2,
  z: 2,
})
```

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `options` | [`ScaleOptions`](interfaces/ScaleOptions.md) | `defaultOptions` |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/scale.ts:34](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/scale.ts#lines-34)

___

### setParametricAxesOptions

▸ **setParametricAxesOptions**(`options`): `void`

Sets the axes options. Parametric layout automatically sets these.

**`Since`**

0.0.143

**`Example`**

```ts
// Hide the axes
api.setParametricAxesOptions({
  showAxes: false,
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | `Partial`<[`AxesOptions`](interfaces/AxesOptions.md)\> |

#### Returns

`void`

#### Defined in

[layout/setParametricAxesOptions.ts:34](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/setParametricAxesOptions.ts#lines-34)

___

### shift

▸ **shift**(`options`): [`LayoutFunction`](modules.md#layoutfunction)

Add a constant vector to the position of each node.

**`Since`**

0.0.90

**`Example`**

```js
GraphXR.shift({
  x: 1,
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ShiftOptions`](interfaces/ShiftOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/shift.ts:23](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/shift.ts#lines-23)

___

### spiral

▸ **spiral**(`options?`): [`LayoutFunction`](modules.md#layoutfunction)

All the Nodes spread on a spiral

**`Since`**

0.0.19

**`Example`**

```js
GraphXR.spiral()
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`NodeFilterOptions`](interfaces/NodeFilterOptions.md) |

#### Returns

[`LayoutFunction`](modules.md#layoutfunction)

#### Defined in

[layout/spiral.ts:16](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/layout/spiral.ts#lines-16)

___

## Legend Functions

### colorNodesByProperty

▸ **colorNodesByProperty**(`options`): `void`

Applies a color scale to all nodes by a certain property.

**`Since`**

0.0.201

**`Example`**

```js
api.colorNodesByProperty({property: 'Episodes'});
api.colorNodesByProperty({property: 'Episodes', scale: 'BuGn'});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ColorNodesByPropertyOptions`](interfaces/ColorNodesByPropertyOptions.md) |

#### Returns

`void`

#### Defined in

[colorNodesByProperty.ts:22](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/colorNodesByProperty.ts#lines-22)

___

## Neo4j Functions

### expandNodes

▸ **expandNodes**(): `Promise`<[`ExpandNodesStatusCode`](enums/ExpandNodesStatusCode.md)\>

Queries Neo4j for nodes connected to the source nodes and then adds them to the graph.

See [ExpandNodesOptions](interfaces/ExpandNodesOptions.md) for options.

It returns a status code indicating whether there are more results available. See [ExpandNodesStatusCode](enums/ExpandNodesStatusCode.md).

**`Since`**

0.0.187

**`Example`**

```js
const status = await api.expandNodes({sourceNodeIds: ['1']});
if (status === api.ExpandNodeStatusCode.MAYBE_MORE_RESULTS_AVAILABLE) {
  // call api.expandNodes with same parameters
} else if (status === api.ExpandNodeStatusCode.NO_MORE_RESULTS_AVAILABLE) {
  // all done
}
```

#### Returns

`Promise`<[`ExpandNodesStatusCode`](enums/ExpandNodesStatusCode.md)\>

#### Defined in

[neo4j/expandNodes.ts:88](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/expandNodes.ts#lines-88)

___

### neo4j

▸ **neo4j**(`query`, `options?`): `void`

Execute a Neo4j query. Results appear in the graph workspace

**`Since`**

0.0.114

**`Example`**

```js
api.neo4j(`MATCH (n) RETURN n LIMIT 10`)
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `query` | [`Neo4jQuery`](modules.md#neo4jquery) |
| `options` | [`Neo4jOptions`](interfaces/Neo4jOptions.md) |

#### Returns

`void`

#### Defined in

[neo4j/neo4j.ts:61](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4j.ts#lines-61)

___

### neo4jGraphDataToGraph

▸ **neo4jGraphDataToGraph**(`content`): [`LayoutGraph`](interfaces/LayoutGraph.md)

Converts a Neo4j Graph response to a Graph, which we can merge into the graph workspace.

**`Since`**

0.0.130

**`Example`**

```js
api.getLayoutGraph().assign((await api.neo4j(`MATCH (p:Person {name: 'Kevin Bacon'})-[d:ACTED_IN *1..3]-(hollywood) return DISTINCT p, hollywood, d`)).toGraph());
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `content` | [`Neo4jGraphData`](modules.md#neo4jgraphdata) |

#### Returns

[`LayoutGraph`](interfaces/LayoutGraph.md)

#### Defined in

[neo4j/neo4jGraphDataToGraph.ts:21](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/neo4jGraphDataToGraph.ts#lines-21)

___

## Node Functions

### makeNode

▸ **makeNode**(`«destructured»?`): [`ApiNode`](classes/ApiNode.md)

Creates a Node object but does not add it to the graph space

**`Since`**

0.0.1

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | `Partial`<[`ApiNode`](classes/ApiNode.md)\> |

#### Returns

[`ApiNode`](classes/ApiNode.md)

#### Defined in

[makeNode.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeNode.ts#lines-10)

___

### makeNodeId

▸ **makeNodeId**(): [`NodeId`](modules.md#nodeid)

Creates a random NodeId

**`Since`**

0.0.8

#### Returns

[`NodeId`](modules.md#nodeid)

#### Defined in

[makeNodeId.ts:10](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeNodeId.ts#lines-10)

___

## Other Functions

### areGraphSnapshotsEqual

▸ **areGraphSnapshotsEqual**(`left`, `right`, `options`): `boolean`

#### Parameters

| Name | Type |
| :------ | :------ |
| `left` | `GraphSnapshot` |
| `right` | `GraphSnapshot` |
| `options` | `Partial`<[`AreGraphSnapshotsEqualOptions`](interfaces/AreGraphSnapshotsEqualOptions.md)\> |

#### Returns

`boolean`

#### Defined in

[areGraphSnapshotsEqual.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/areGraphSnapshotsEqual.ts#lines-9)

___

### areGraphsEqual

▸ **areGraphsEqual**(`leftGraph`, `rightGraph`): `boolean`

#### Parameters

| Name | Type |
| :------ | :------ |
| `leftGraph` | [`SearchGraph`](interfaces/SearchGraph.md) |
| `rightGraph` | [`SearchGraph`](interfaces/SearchGraph.md) |

#### Returns

`boolean`

#### Defined in

[areGraphSnapshotsEqual.ts:150](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/areGraphSnapshotsEqual.ts#lines-150)

___

### createNodes

▸ **createNodes**(`options`): `TransformFunction`

Create nodes from an Array of raw node `data`.
The raw node data is supplied as a list of dictionaries.
Then an object with the following properties must be provided:
- `category`: The category of the nodes to be created.
- `keys`: The keys of the properties to be created.

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`CreateNodesOptions`](interfaces/CreateNodesOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/createNodes.ts:19](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/createNodes.ts#lines-19)

___

### dispatchGraphDataUpdate

▸ **dispatchGraphDataUpdate**(): `void`

Useful for forcing the UI to update after updating graph data.

#### Returns

`void`

#### Defined in

[dispatchGraphDataUpdate.ts:8](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/dispatchGraphDataUpdate.ts#lines-8)

___

### findGraphXRWindow

▸ **findGraphXRWindow**(): `Window` \| `undefined`

#### Returns

`Window` \| `undefined`

#### Defined in

[runtime.ts:132](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/runtime.ts#lines-132)

___

### getApi

▸ **getApi**(`«destructured»?`): `Promise`<[`API`](interfaces/API.md)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | [`GetApiOptions`](modules.md#getapioptions) |

#### Returns

`Promise`<[`API`](interfaces/API.md)\>

#### Defined in

[index.ts:458](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/index.ts#lines-458)

___

### getCategoryConfig

▸ **getCategoryConfig**(`category`): [`CategoryConfig`](interfaces/CategoryConfig.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `category` | [`CategoryId`](modules.md#categoryid) |

#### Returns

[`CategoryConfig`](interfaces/CategoryConfig.md)

#### Defined in

[getCategoryConfig.ts:4](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/getCategoryConfig.ts#lines-4)

___

### getRuntime

▸ **getRuntime**(): [`Runtime`](interfaces/Runtime.md)

#### Returns

[`Runtime`](interfaces/Runtime.md)

#### Defined in

[runtime.ts:158](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/runtime.ts#lines-158)

___

### makeCollectionNode

▸ **makeCollectionNode**(`category`, `«destructured»`): [`ApiNode`](classes/ApiNode.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `category` | [`CategoryId`](modules.md#categoryid) |
| `«destructured»` | `NodeCollection` |

#### Returns

[`ApiNode`](classes/ApiNode.md)

#### Defined in

[collection-node/makeCollectionNode.ts:6](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/collection-node/makeCollectionNode.ts#lines-6)

___

### makeColor

▸ **makeColor**(`hexOrR`, `g?`, `b?`): [`Color`](modules.md#color)

#### Parameters

| Name | Type |
| :------ | :------ |
| `hexOrR` | `number` |
| `g?` | `number` |
| `b?` | `number` |

#### Returns

[`Color`](modules.md#color)

#### Defined in

[makeColor.ts:4](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeColor.ts#lines-4)

___

### makeExpandNodesQuery

▸ **makeExpandNodesQuery**(`options?`): [`Neo4jQuery`](modules.md#neo4jquery)

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ExpandNodesOptions`](interfaces/ExpandNodesOptions.md) |

#### Returns

[`Neo4jQuery`](modules.md#neo4jquery)

#### Defined in

[neo4j/expandNodes.ts:92](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/neo4j/expandNodes.ts#lines-92)

___

### mergeNodes

▸ **mergeNodes**(`options`): `TransformFunction`

Merge nodes from an Array of raw node `data`.
The raw node data is supplied as a list of dictionaries.
Then an object with the following properties must be provided:
- `category`: The category of the nodes to be created.
- `keys`: The keys of the properties to be created.
- `inputs`: Tha JSON Objects to be created.

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`MergeNodesOptions`](interfaces/MergeNodesOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/mergeNodes.ts:22](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/mergeNodes.ts#lines-22)

___

### mergeRelationships

▸ **mergeRelationships**(`options`): `TransformFunction`

Merge Relationships from an Array of raw node `data`.
The raw node data is supplied as a list of dictionaries.
Then an object with the following properties must be provided:
- `edge`: 
     - `relationship`: The keys of the properties to be merged.
     - `keys`: The keys of the properties to be merged.
- `source`: 
     - `category`: The category of the nodes to be merged.
     - `keys`: The keys of the properties to be merged.
- `target`: 
     - `category`: The category of the nodes to be merged.
     - `keys`: The keys of the properties to be merged.
- `inputs`: Tha JSON Objects to be merged.

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`MergeRelationshipsOptions`](interfaces/MergeRelationshipsOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/mergeRelationships.ts:46](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/mergeRelationships.ts#lines-46)

___

### on

▸ **on**(`event`, `callback`, `callbackId?`): [`GraphxrEventCallbackId`](modules.md#graphxreventcallbackid)

#### Parameters

| Name | Type |
| :------ | :------ |
| `event` | [`GraphxrEvent`](modules.md#graphxrevent) |
| `callback` | [`GraphxrEventCallback`](modules.md#graphxreventcallback) |
| `callbackId?` | [`GraphxrEventCallbackId`](modules.md#graphxreventcallbackid) |

#### Returns

[`GraphxrEventCallbackId`](modules.md#graphxreventcallbackid)

#### Defined in

[on.ts:17](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/on.ts#lines-17)

___

### propertyKeys

▸ **propertyKeys**(`properties`): [`PropertyKey`](modules.md#propertykey)[]

The only purpose of this function is to cast Object.keys to PropertyKey[]

#### Parameters

| Name | Type |
| :------ | :------ |
| `properties` | [`Properties`](modules.md#properties) |

#### Returns

[`PropertyKey`](modules.md#propertykey)[]

#### Defined in

[properties.ts:11](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/properties.ts#lines-11)

___

### triggerForceLayout

▸ **triggerForceLayout**(): `void`

#### Returns

`void`

#### Defined in

[triggerForceLayout.ts:3](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/triggerForceLayout.ts#lines-3)

___

## Path Finding Functions

### shortestPath

▸ **shortestPath**(`graph`, `options`): [`DijkstraEdge`](modules.md#dijkstraedge)[] \| ``null``

Returns all shortest paths from the source to target node.

**`Since`**

0.0.254

**`Example`**

```js
const graph = api.getLayoutGraph()
const nodes = graph.getNodes()
const sourceId = nodes[0].id
const targetId = nodes[nodes.length - 1].id
const paths = api.shortestPath(graph, {sourceId, targetId})
// Optionally provide a custom weight property
const weightProperty = 'weight_property'
const paths = api.shortestPath(view, {sourceId, targetId, weightProperty})
console.log(paths)
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `graph` | [`LayoutGraph`](interfaces/LayoutGraph.md) |
| `options` | [`ShortestPathOptions`](interfaces/ShortestPathOptions.md) |

#### Returns

[`DijkstraEdge`](modules.md#dijkstraedge)[] \| ``null``

#### Defined in

[path-finding/shortestPath.ts:30](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/path-finding/shortestPath.ts#lines-30)

___

## Project Settings Functions

### setAutoShowImage

▸ **setAutoShowImage**(`value`): `boolean`

Enable or disable auto-show image on Nodes.

**`Since`**

0.0.138

**`Example`**

```js
api.setAutoShowImage(true);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `boolean` |

#### Returns

`boolean`

#### Defined in

[setAutoShowImage.ts:14](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/setAutoShowImage.ts#lines-14)

___

### setEdgeScale

▸ **setEdgeScale**(`value`): `number`

Set the edge scale

**`Since`**

0.0.138

**`Example`**

```js
api.setEdgeScale(5);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `number` |

#### Returns

`number`

#### Defined in

[setEdgeScale.ts:14](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/setEdgeScale.ts#lines-14)

___

## Properties Functions

### comparePropertyValues

▸ **comparePropertyValues**(`left`, `right`, `ascending?`): `number`

Returns -1 if left < right, 0 if left == right, and 1 if left > right
Flips the sign if ascending = false.

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `left` | `any` | `undefined` |
| `right` | `any` | `undefined` |
| `ascending` | `boolean` | `true` |

#### Returns

`number`

#### Defined in

[sort/comparePropertyValues.ts:8](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/sort/comparePropertyValues.ts#lines-8)

___

## Render Functions

### getScene

▸ **getScene**(): `THREE.Group`

Returns a THREE.Group in which one can add new THREE objects to the 3d space

**`Since`**

0.0.1

**`Example`**

```js
getScene().add(new THREE.DirectionalLight(0x404040));
```

#### Returns

`THREE.Group`

#### Defined in

[getScene.ts:12](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/getScene.ts#lines-12)

___

## Runtime Functions

### setRuntime

▸ **setRuntime**(`value`): `void`

An optional function which enables test runners to inject a mock Window object into the API. Most of the time, you won't call this function because the API runtime object defaults to `window`.

**`Since`**

0.0.1

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value` | [`Runtime`](interfaces/Runtime.md) | typically a mock of the Window |

#### Returns

`void`

#### Defined in

[runtime.ts:169](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/runtime.ts#lines-169)

___

## Sort Functions

### sortByProperty

▸ **sortByProperty**(`«destructured»`): [`Sort`](modules.md#sort)<[`ApiNode`](classes/ApiNode.md)\>

Returns a function which compares two property values.

**`Example`**

```js
nodes.sort(GraphXR.sortByProperty({property: 'size'}))
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | [`SortByPropertyOptions`](interfaces/SortByPropertyOptions.md) |

#### Returns

[`Sort`](modules.md#sort)<[`ApiNode`](classes/ApiNode.md)\>

#### Defined in

[sort/sortByProperty.ts:19](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/sort/sortByProperty.ts#lines-19)

___

## Style Functions

### makePosition

▸ **makePosition**(`«destructured»`): [`Position`](modules.md#position)

Creates a Position (x,y,z)

**`Since`**

0.0.1

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | `Partial`<`Vector3`\> |

#### Returns

[`Position`](modules.md#position)

#### Defined in

[makePosition.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makePosition.ts#lines-9)

___

### makeRandomPosition

▸ **makeRandomPosition**(): [`Position`](modules.md#position)

Creates a random Position (x,y,z)

**`Since`**

0.0.16

#### Returns

[`Position`](modules.md#position)

#### Defined in

[makeRandomPosition.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/makeRandomPosition.ts#lines-9)

___

## Transform Functions

### aggregate

▸ **aggregate**(`options`): `TransformFunction`

For each Node in the aggregateTo Category, collect the value of the targetProperty from every neighbor of that
Node connected by an Edge of the aggregateAlong Relationship into an array. Then, run a
mapping function formula on the array and store the resulting value in a property of the Node.

**`Since`**

0.0.25

**`Example`**

```js
// For each Season Node, make a new property "episodeNumbers" which is a concatentation of all the
// episodeNumber property values from Episodes connected to the Season along the inSeason relationship
api.getLayoutGraph().applyTransform(api.aggregate({
  aggregateTo: 'Season',
  aggregateAlong: 'inSeason',
  getPropertyFrom: 'node',
  sourceProperty: 'episodeNumber',
  targetProperty: 'episodeNumbers',
  formula: 'concatenate'
}))

// For each Season Node, make a new property "maxEpisodeNumber" which is the maximum of all the
// episodeNumber property values from inSeason edges connected to the Season.
api.getLayoutGraph().applyTransform(api.aggregate({
  aggregateTo: 'Season',
  aggregateAlong: 'inSeason',
  getPropertyFrom: 'edge',
  sourceProperty: 'episodeNumber',
  targetProperty: 'maxEpisodeNumber',
  formula: 'max'
}))

// aggregateTo can be a function, a category, an array of nodes, or an array of node ids
api.getLayoutGraph().applyTransform(api.aggregate({
  // function
  aggregateTo: node => node.category === 'Season',
  // category
  aggregateTo: 'Season',
  // array of nodes
  aggregateTo: api.getLayoutGraph().getNodes().filter(node => node.category === 'Season'),
  // array of node ids
  aggregateTo: api.getLayoutGraph().getNodes().filter(node => node.category === 'Season').map(node => node.id),
}))

// formula can be a function or a string
api.getLayoutGraph().applyTransform(api.aggregate({
 // function
 formula: (values) => values.reduce((a, b) => a + b, 0),
 // string
 formula: 'sum',
}))
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`AggregateOptions`](modules.md#aggregateoptions) |

#### Returns

`TransformFunction`

#### Defined in

[transform/aggregate.ts:72](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/aggregate.ts#lines-72)

___

### collectNodes

▸ **collectNodes**(`options?`): `TransformFunction`

Merge input nodes into new or existing collection nodes

**`Since`**

0.0.149

**`Example`**

```js
// These are the same
api.getLayoutGraph().applyTransform(
  api.collectNodes()
)
api.getLayoutGraph().applyTransform(
  api.collectNodes({
    nodes: api.getLayoutGraph().getNodes()
  })
)
api.getLayoutGraph().applyTransform(
  api.collectNodes({
    nodes: api.getLayoutGraph().getNodes().map(node => node.id)
  })
)

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`CollectNodesOptions`](interfaces/CollectNodesOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[collection-node/collectNodes.ts:54](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/collection-node/collectNodes.ts#lines-54)

___

### explodeCollections

▸ **explodeCollections**(`options?`): `TransformFunction`

For each collection node in the input, uncollect all nodes

**`Since`**

0.0.153

**`Example`**

```js
// These are the same
api.getLayoutGraph().applyTransform(
  api.explodeCollections()
)
api.getLayoutGraph().applyTransform(
  api.explodeCollections({
    nodes: api.getLayoutGraph().getNodes()
  })
)
api.getLayoutGraph().applyTransform(
  api.explodeCollections({
    nodes: api.getLayoutGraph().getNodes().map(node => node.id)
  })
)

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`ExplodeCollectionsOptions`](interfaces/ExplodeCollectionsOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[collection-node/explodeCollections.ts:32](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/collection-node/explodeCollections.ts#lines-32)

___

### extract

▸ **extract**(`options`): `TransformFunction`

Extract creates a new Category and Relationship linked to the input Nodes, based on the input prop options.

**`Since`**

0.0.1

**`Example`**

```js
api.getLayoutGraph().applyTransform(api.extract({
  category: "Episodes",
  props: [
    {
      name: "seasonNumber",
      newName: "seasonNumber",
      isSplit: false,
      splitChar: "",
      isKey: true,
    },
    {
      name: "millionViewers",
      newName: "millionViewers",
      isSplit: false,
      splitChar: "",
    },
    {
      name: "episodeAirDate",
      newName: "episodeAirDate",
      isSplit: false,
      splitChar: "",
    },
  ],
  newCategory: "Season Number",
  newRelationship: "inSeason",
  inheritLinks: false,
  skipEmpty: true,
}));
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ExtractOptions`](interfaces/ExtractOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/extract.ts:76](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/extract.ts#lines-76)

___

### link

▸ **link**(`options`): `TransformFunction`

For each Node A in the source category, create an edge to a Node B in the target category,
where A.sourceProperty === B.targetProperty

**`Since`**

0.0.36

**`Example`**

```js
const graph = api.getLayoutGraph();
graph.applyTransform(api.link({
  sourceCategory: "Roles",
  sourceProperty: "ParentName",
  targetCategory: "Roles",
  targetProperty: "ComponentName",
  relationship: "IS_PARENT_OF"
}))
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`LinkOptions`](interfaces/LinkOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/link.ts:39](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/link.ts#lines-39)

___

### map

▸ **map**(`options`): `TransformFunction`

For each Node in the category, or each Edge in the relationship, map the mappedProperties using
formula provided in the options. Optionally create a new name for the property.

**`Since`**

0.0.35

**`Example`**

```js
// Convert every episodeAirDate property to a week value, in Nodes of the Episodes category
map({
  category: 'Episode',
  mappedProperties: [
    {
      name: "episodeAirDate",
      newName: "newEpisodeAirDate",
      formula: GraphXR.mapFormula.toWeek,
    }
  ]
})

// Add 5 to every millionViewers property in Nodes belonging to the Episodes Category
map({
  category: 'Episode',
  mappedProperties: [
    {
      name: "millionViewers",
      newName: "newMillionViewers",
      formula: (millionViewers, properties) => Number(millionViewers) + 1,
    }
  ]
})

// Add 1 to every seasonNumber property in Edges belonging to the inSeason Relationship
map({
  relationship: 'inSeason',
  mappedProperties: [
    {
      name: "seasonNumber",
      newName: "newSeasonNumber",
      formula: (seasonNumber, properties) => Number(seasonNumber) + 1,
    }
  ]
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`MapOptions`](interfaces/MapOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/map.ts:79](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/map.ts#lines-79)

___

### merge

▸ **merge**(`options`): `TransformFunction`

Combine Nodes or Edges which have equivalent key properties.

**`Since`**

0.0.37

**`Example`**

```js
// Combine all Nodes with equal seasonNumber into one Node
merge({
  category: "Episodes",
  keyProperties: ['seasonNumber'],
  clearUnselectedProperties: false,
})

// Combine all emails between two persons sent on the same day (thus removing directionality)
merge({
  relationship: "SENT_MAIL_TO"
  keyProperties: ['sendDate'],
  clearUnselectedProperties: false,
})

// Combine all emails between two persons sent on the same day and preserve directionality
merge({
  relationship: "SENT_MAIL_TO"
  keyProperties: ['sendDate'],
  clearUnselectedProperties: false,
  directional: true,
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`MergeOptions`](interfaces/MergeOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/merge.ts:56](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/merge.ts#lines-56)

___

### shortcut

▸ **shortcut**(`options`): `TransformFunction`

Given incomingRelationship, centerCategory, and outgoingRelationship, Shortcut finds all unique paths
from node A to node C, traveling first along incomingRelationship, passing through centerCategory, and
travelling lastly through outgoingRelationship to arrive at C. Once it finds all unique paths from A to C,
Shortcut creates an edge A -> C with properties aggregated from the center nodes.

Written differently, A -R0-> [B] -R1-> C => A -R2-> C where R0 is incomingRelationship, B is centerCategory, 
R1 is outgoingRelationship, and R2 is the new relationship. [B] means the set of all nodes B which are 
between A and C.

**`Since`**

0.0.43

**`Example`**

```js
shortcut({
  incomingRelationship: 'IS_PARENT_OF',
  centerCategory: 'Node',
  outgoingRelationship: 'IS_PARENT_OF',
  shortcutRelationship: "IS_GRANDPARENT_OF",
  directional: true,
  aggregateProperties: [
    {
      sourceProperty: "age",
      targetProperty: "averageAge",
      formula: "average",
    },
  ],
  countLinks: false,
})
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `options` | [`ShortcutOptions`](interfaces/ShortcutOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[transform/shortcut.ts:59](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/transform/shortcut.ts#lines-59)

___

### uncollectNodes

▸ **uncollectNodes**(`options?`): `TransformFunction`

Remove the input nodes from their collection nodes

**`Since`**

0.0.153

**`Example`**

```js
// These are the same
api.getLayoutGraph().applyTransform(
  api.uncollectNodes()
)
api.getLayoutGraph().applyTransform(
  api.uncollectNodes({
    nodes: api.getLayoutGraph().getNodes()
  })
)
api.getLayoutGraph().applyTransform(
  api.uncollectNodes({
    nodes: api.getLayoutGraph().getNodes().map(node => node.id)
  })
)

#### Parameters

| Name | Type |
| :------ | :------ |
| `options?` | [`UncollectNodesOptions`](interfaces/UncollectNodesOptions.md) |

#### Returns

`TransformFunction`

#### Defined in

[collection-node/uncollectNodes.ts:35](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/collection-node/uncollectNodes.ts#lines-35)

___

## Utility Functions

### range

▸ **range**(`size`): `number`[]

Returns the numbers 0 to N-1

**`Since`**

0.0.254
const range = api.range(5); // [0, 1, 2, 3, 4]

#### Parameters

| Name | Type |
| :------ | :------ |
| `size` | `number` |

#### Returns

`number`[]

#### Defined in

[range.ts:7](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/range.ts#lines-7)

___

### sleep

▸ **sleep**(`ms`): `Promise`<`number`\>

Returns a promise that resolves after the given amount of milliseconds.

**`Since`**

0.0.143

**`Example`**

```ts
await api.sleep(1000); // Sleep for 1 second
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `ms` | `number` |

#### Returns

`Promise`<`number`\>

#### Defined in

[sleep.ts:9](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/sleep.ts#lines-9)

___

## window Functions

### setFullscreen

▸ **setFullscreen**(`value`): `boolean`

Hide panels and controls if fullscreen is enabled

**`Since`**

0.0.138

**`Example`**

```js
api.setFullscreen(true);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `boolean` |

#### Returns

`boolean`

#### Defined in

[setFullscreen.ts:14](https://bitbucket.org/kineviz/graphxr-api/src/c752a8c/src/setFullscreen.ts#lines-14)
