stiankroknes / VisNetwork.Blazor

Blazor component for vis-js/vis-network javascript library.
https://stiankroknes.github.io/VisNetwork.Blazor/
MIT License
24 stars 9 forks source link

License: MIT GitHub issues GitHub forks GitHub stars

NuGet Downloads (official NuGet)

VisNetwork.Blazor

Blazor component for vis.js/vis-network.

Demo

You may see a working example here

Get Started

Install the NuGet package: VisNetwork.Blazor

Install using the Package Manager in your IDE or using the command line:

dotnet add package VisNetwork.Blazor

builder.Services.AddVisNetwork();


## vis-network

* Add a `Network` component in your .razor file and configure it as you need. See Sample-app for example usage.
```html
<Network Id="my-id" Data="@data" />

Providing custom options

To provide custom options the Options parameter can be used.

<Network Id="my-id" Data="@data" Options="NetworkOptions" />
private NetworkOptions NetworkOptions(Network network)
{
    return new NetworkOptions
    {
        AutoResize = true,
        Nodes = new NodeOption
        {
            BorderWidth = 1
        }
    };
}

Options can also be applied to the Network using the SetOptions API method.