# VisNetworkGraph

Provides a typed compatibility envelope for common vis-network data and option concepts.

 Class  

`ChartForgeX.Interactivity`

**Namespace**

`ChartForgeX.Interactivity`

**Assembly**

`ChartForgeX.Interactivity`

**Source**

[VisNetworkCompat.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L13)

**Modifiers**

sealed

Provides a typed compatibility envelope for common vis-network data and option concepts. The converter keeps [GraphScene](/api/chartforgex-interactivity-graphscene/) as the reusable ChartForgeX graph contract.

## Inheritance

- object
- VisNetworkGraph

## Usage

 Explore 3 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Method [VisNetworkGraph.AddEdge](/api/chartforgex-interactivity-visnetworkgraph/#method-addedge-string-string-string-string-action-chartforgex-interactivity-visnetworkedge)
- Method [VisNetworkGraph.AddNode](/api/chartforgex-interactivity-visnetworkgraph/#method-addnode-string-string-action-chartforgex-interactivity-visnetworknode)
- Method [VisNetworkGraph.Create](/api/chartforgex-interactivity-visnetworkgraph/#method-create)

 Filter members   

    Show inherited   

 

## Constructors

 `public VisNetworkGraph()` [#](#constructor-ctor) 

[VisNetworkCompat.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L13)

## Methods

 `public VisNetworkGraph AddEdge(string id, string from, string to, string? label = null, Action<VisNetworkEdge>? configure = null)` [#](#method-addedge-string-string-string-string-action-chartforgex-interactivity-visnetworkedge) 

[VisNetworkCompat.cs:44](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L44)

Adds an edge to the compatibility graph.

Parameters

**id string required**

**from string required**

**to string required**

**label string? = null optional**

**configure System.Action<ChartForgeX.Interactivity.VisNetworkEdge>? = null optional**

Returns

 `VisNetworkGraph` 

 `public VisNetworkGraph AddNode(string id, string label, Action<VisNetworkNode>? configure = null)` [#](#method-addnode-string-string-action-chartforgex-interactivity-visnetworknode) 

[VisNetworkCompat.cs:34](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L34)

Adds a node to the compatibility graph.

Parameters

**id string required**

**label string required**

**configure System.Action<ChartForgeX.Interactivity.VisNetworkNode>? = null optional**

Returns

 `VisNetworkGraph` 

 `public static VisNetworkGraph Create()` [#](#method-create) 

[VisNetworkCompat.cs:28](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L28)

Creates a new compatibility graph.

Returns

 `VisNetworkGraph` A graph that can be converted to [GraphScene](/api/chartforgex-interactivity-graphscene/). 

 `public GraphScene ToGraphScene(string id, string title)` [#](#method-tographscene-string-string) 

[VisNetworkCompat.cs:54](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L54)

Converts this compatibility graph into the reusable ChartForgeX graph scene model.

Parameters

**id string required**

**title string required**

Returns

 `GraphScene` 

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public List<VisNetworkNode> Nodes { get; }` [#](#property-nodes) 

[VisNetworkCompat.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L13)

Gets the vis-style node collection.

 `public List<VisNetworkEdge> Edges { get; }` [#](#property-edges) 

[VisNetworkCompat.cs:16](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L16)

Gets the vis-style edge collection.

 `public Dictionary<string, VisNetworkGroupOptions> Groups { get; }` [#](#property-groups) 

[VisNetworkCompat.cs:19](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L19)

Gets group defaults keyed by group id.

 `public VisNetworkOptions Options { get; }` [#](#property-options) 

[VisNetworkCompat.cs:22](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity/VisNetworkCompat.cs#L22)

Gets vis-style graph options.

<!-- PowerForge markdown artifact sha256:6905DE4EA19EF81D2D34C2DBA5D7BE0D55B7CCAA60CACA145B3FBFDFFBE3E73A -->
