HtmlForgeX

API Reference

Class

VisNetworkNode

Namespace HtmlForgeX
Assembly HtmlForgeX

Represents a node in a Vis Network diagram.

Inheritance

  • Object
  • VisNetworkNode

Constructors

Methods

public VisNetworkNode IdValue(Object id) #
Returns: VisNetworkNode

Sets the node identifier.

Parameters

id System.Object requiredposition: 0
Identifier value.

Returns

The current VisNetworkNode instance.

public VisNetworkNode LabelText(String label) #
Returns: VisNetworkNode

Sets the text label shown on the node.

Parameters

label System.String requiredposition: 0
Label text.

Returns

The current VisNetworkNode instance.

NodeColor 2 overloads
public VisNetworkNode NodeColor(RGBColor color) #
Returns: VisNetworkNode

Sets the node color using a CSS color string.

Parameters

color System.String requiredposition: 0
Color value.

Returns

The current VisNetworkNode instance.

NodeColor(HtmlForgeX.RGBColor color) #

Sets the node color using an RGBColor object.

Parameters

color HtmlForgeX.RGBColor required
Color instance.

Returns

The current VisNetworkNode instance.

public VisNetworkNode NodeGroup(String group) #
Returns: VisNetworkNode

Assigns the node to a group.

Parameters

group System.String requiredposition: 0
Group name.

Returns

The current VisNetworkNode instance.

public VisNetworkNode NodeHidden(Boolean hidden = true) #
Returns: VisNetworkNode

Determines whether the node should be hidden.

Parameters

hidden System.Boolean = true optionalposition: 0
True to hide the node.

Returns

The current VisNetworkNode instance.

public VisNetworkNode NodePhysics(Boolean physics = true) #
Returns: VisNetworkNode

Enables or disables physics calculations for the node.

Parameters

physics System.Boolean = true optionalposition: 0
True to enable physics.

Returns

The current VisNetworkNode instance.

public VisNetworkNode NodeShape(VisNetworkNodeShape shape) #
Returns: VisNetworkNode

Sets the visual shape of the node.

Parameters

shape HtmlForgeX.VisNetworkNodeShape requiredposition: 0
Shape type.

Returns

The current VisNetworkNode instance.

public VisNetworkNode NodeSize(Double size) #
Returns: VisNetworkNode

Sets the size of the node.

Parameters

size System.Double requiredposition: 0
Size value.

Returns

The current VisNetworkNode instance.

public VisNetworkNode Position(Double x, Double y) #
Returns: VisNetworkNode

Sets the initial position of the node.

Parameters

x System.Double requiredposition: 0
X coordinate.
y System.Double requiredposition: 1
Y coordinate.

Returns

The current VisNetworkNode instance.

public VisNetworkNode SetCustom(String key, Object value) #
Returns: VisNetworkNode

Adds a custom property that will be serialized with the node.

Parameters

key System.String requiredposition: 0
Property name.
value System.Object requiredposition: 1
Property value.

Returns

The current VisNetworkNode instance.

public VisNetworkNode TitleText(String title) #
Returns: VisNetworkNode

Sets the tooltip title for the node.

Parameters

title System.String requiredposition: 0
Title text.

Returns

The current VisNetworkNode instance.

public VisNetworkNode UseImage(String url) #
Returns: VisNetworkNode

Uses an external image for the node.

Parameters

url System.String requiredposition: 0
URL of the image.

Returns

The current VisNetworkNode instance.

public VisNetworkNode UseImageOffline(String source, Int32 timeoutSeconds = 30) #
Returns: VisNetworkNode

Embeds an image from a file or URL into the document.

Parameters

source System.String requiredposition: 0
Local path or URL of the image.
timeoutSeconds System.Int32 = 30 optionalposition: 1
Download timeout in seconds.

Returns

The current VisNetworkNode instance.

public VisNetworkNode WithoutAutoEmbedding() #
Returns: VisNetworkNode

Prevents the library from automatically embedding the image when offline mode is active.

Returns

The current VisNetworkNode instance.

Properties

public Object Id { get; set; } #

Gets or sets the unique identifier of the node.

public String Label { get; set; } #

Gets or sets the text label displayed inside the node.

public String Title { get; set; } #

Gets or sets the tooltip title shown when hovering over the node.

public String Image { get; set; } #

Gets or sets the image URL or data URI used when the Shape is set to Image.

public Nullable<VisNetworkNodeShape> Shape { get; set; } #

Gets or sets the visual representation of the node.

public String Group { get; set; } #

Gets or sets the optional group name for the node.

public String Color { get; set; } #

Gets or sets the color of the node using a CSS color string.

public Nullable<Double> Size { get; set; } #

Gets or sets the size of the node in pixels.

public Nullable<Boolean> Hidden { get; set; } #

Gets or sets a value indicating whether the node should be hidden.

public Nullable<Boolean> Physics { get; set; } #

Gets or sets a value indicating whether physics calculations are enabled for this node.

public Nullable<Double> X { get; set; } #

Gets or sets the X coordinate used for the initial positioning of the node.

public Nullable<Double> Y { get; set; } #

Gets or sets the Y coordinate used for the initial positioning of the node.

public Boolean SkipAutoEmbedding { get; set; } #

Gets or sets a value indicating whether automatic image embedding should be skipped when offline mode is active.

public Dictionary<String, Object> Custom { get; } #

Gets a dictionary of custom key/value pairs that will be serialized along with the node definition.

Extension Methods

public static VisNetworkNodeOptions ToNodeOptions(VisNetworkNode node) #
Returns: VisNetworkNodeOptions

Converts legacy VisNetworkNode to new VisNetworkNodeOptions.

Parameters

node HtmlForgeX.VisNetworkNode requiredposition: 0