HtmlForgeX

API Reference

Class

VisNetworkNodeOptions

Namespace HtmlForgeX
Assembly HtmlForgeX

Represents comprehensive configuration options for a node in VisNetwork.

Inheritance

  • Object
  • VisNetworkNodeOptions

Constructors

public VisNetworkNodeOptions() #

Methods

public VisNetworkNodeOptions WithBorderWidth(Double width, Nullable<Double> selectedWidth = null) #
Returns: VisNetworkNodeOptions

Sets the border width of the node.

Parameters

width System.Double requiredposition: 0
Border width.
selectedWidth System.Nullable{System.Double} = null optionalposition: 1
Optional width when selected.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithBrokenImage(String url) #
Returns: VisNetworkNodeOptions

Sets the fallback image URL when the main image fails to load. Used when shape is 'image' or 'circularImage'.

Parameters

url System.String requiredposition: 0
The URL of the broken image placeholder

Returns

The node options for method chaining

WithChosen 2 overloads
public VisNetworkNodeOptions WithChosen(VisNetworkChosenOptions chosenOptions) #
Returns: VisNetworkNodeOptions

Enables or disables the chosen state for the node.

Parameters

enabled System.Boolean requiredposition: 0
True to enable chosen state.

Returns

The node options for method chaining.

WithChosen(HtmlForgeX.VisNetworkChosenOptions chosenOptions) #

Sets detailed chosen options for the node.

Parameters

chosenOptions HtmlForgeX.VisNetworkChosenOptions required
Chosen configuration.

Returns

The node options for method chaining.

WithColor 3 overloads
public VisNetworkNodeOptions WithColor(VisNetworkColorOptions colorOptions) #
Returns: VisNetworkNodeOptions

Sets the node color.

Parameters

color HtmlForgeX.RGBColor requiredposition: 0
Color value.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithColor(String color) #
Returns: VisNetworkNodeOptions

Sets the node color using a string.

Parameters

color System.String requiredposition: 0
Color value.

Returns

The node options for method chaining.

WithColor(HtmlForgeX.VisNetworkColorOptions colorOptions) #

Sets complex color options for the node.

Parameters

colorOptions HtmlForgeX.VisNetworkColorOptions required
Color options.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithCustomShape(VisNetworkCustomShape customShape) #
Returns: VisNetworkNodeOptions

Sets a custom shape for the node using the provided custom shape definition.

Parameters

customShape HtmlForgeX.VisNetworkCustomShape requiredposition: 0
The custom shape to use for rendering the node

Returns

The node options for method chaining

public VisNetworkNodeOptions WithFixed(Boolean fixedX, Boolean fixedY) #
Returns: VisNetworkNodeOptions

Fixes the node position on the X and Y axis.

Parameters

fixedX System.Boolean requiredposition: 0
Fix horizontal position.
fixedY System.Boolean requiredposition: 1
Fix vertical position.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithFont(Action<VisNetworkFontOptions> configure) #
Returns: VisNetworkNodeOptions

Configures font options for the node label.

Parameters

configure System.Action{HtmlForgeX.VisNetworkFontOptions} requiredposition: 0
Delegate to configure font options.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithGroup(String group) #
Returns: VisNetworkNodeOptions

Assigns the node to a group for shared styling.

Parameters

group System.String requiredposition: 0
The group name

Returns

The node options for method chaining

public VisNetworkNodeOptions WithHeightConstraint(Nullable<Double> minimum = null, Nullable<Double> maximum = null) #
Returns: VisNetworkNodeOptions

Sets height constraints for the node.

Parameters

minimum System.Nullable{System.Double} = null optionalposition: 0
Minimum height.
maximum System.Nullable{System.Double} = null optionalposition: 1
Maximum height.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithHidden(Boolean hidden = true) #
Returns: VisNetworkNodeOptions

Sets whether the node is hidden.

Parameters

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

Returns

The node options for method chaining.

WithHtmlLabel 2 overloads
public VisNetworkNodeOptions WithHtmlLabel(Action<VisNetworkLabelBuilder> configure) #
Returns: VisNetworkNodeOptions

Sets an HTML-formatted label with multi-line support. Automatically enables HTML multi-line mode.

Parameters

htmlLabel System.String requiredposition: 0
The HTML-formatted label content

Returns

The node options for method chaining

WithHtmlLabel(System.Action{HtmlForgeX.VisNetworkLabelBuilder} configure) #

Builds an HTML-formatted label using a fluent builder. Automatically enables HTML multi-line mode.

Parameters

configure System.Action{HtmlForgeX.VisNetworkLabelBuilder} required
Action to configure the label builder

Returns

The node options for method chaining

public VisNetworkNodeOptions WithIcon(Action<VisNetworkIconOptions> configure) #
Returns: VisNetworkNodeOptions

Configures an icon for the node.

Parameters

configure System.Action{HtmlForgeX.VisNetworkIconOptions} requiredposition: 0
Delegate to configure icon options.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithId(Object id) #
Returns: VisNetworkNodeOptions

Sets the unique identifier for the node.

Parameters

id System.Object requiredposition: 0
The identifier (can be string, number, or any object)

Returns

The node options for method chaining

public VisNetworkNodeOptions WithImage(String imageUrl) #
Returns: VisNetworkNodeOptions

Sets the image URL for an image node.

Parameters

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

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithImageObject(VisNetworkImageOptions imageOptions) #
Returns: VisNetworkNodeOptions

Sets image options for an image node.

Parameters

imageOptions HtmlForgeX.VisNetworkImageOptions requiredposition: 0
Options describing the image.

Returns

The node options for method chaining.

WithImagePadding 2 overloads
public VisNetworkNodeOptions WithImagePadding(Int32 padding) #
Returns: VisNetworkNodeOptions

Sets uniform padding around the image in pixels. Used when shape is 'image' or 'circularImage'.

Parameters

padding System.Int32 requiredposition: 0
The padding value in pixels

Returns

The node options for method chaining

public VisNetworkNodeOptions WithImagePadding(Int32 top, Int32 right, Int32 bottom, Int32 left) #
Returns: VisNetworkNodeOptions

Sets individual padding values for each side of the image. Used when shape is 'image' or 'circularImage'.

Parameters

top System.Int32 requiredposition: 0
Top padding in pixels
right System.Int32 requiredposition: 1
Right padding in pixels
bottom System.Int32 requiredposition: 2
Bottom padding in pixels
left System.Int32 requiredposition: 3
Left padding in pixels

Returns

The node options for method chaining

public VisNetworkNodeOptions WithLabel(String label) #
Returns: VisNetworkNodeOptions

Sets the plain text label for the node.

Parameters

label System.String requiredposition: 0
The label text (use \n for line breaks)

Returns

The node options for method chaining

public VisNetworkNodeOptions WithLabelHighlightBold(Boolean highlightBold = true) #
Returns: VisNetworkNodeOptions

Enables or disables bold highlight of the node label.

Parameters

highlightBold System.Boolean = true optionalposition: 0
True to highlight in bold.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithLevel(Int32 level) #
Returns: VisNetworkNodeOptions

Sets the hierarchical level of the node.

Parameters

level System.Int32 requiredposition: 0
The level value.

Returns

The node options for method chaining.

WithMargin 2 overloads
public VisNetworkNodeOptions WithMargin(Double margin) #
Returns: VisNetworkNodeOptions

Sets a uniform margin around the node.

Parameters

margin System.Double requiredposition: 0
Margin value.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithMargin(Double top, Double right, Double bottom, Double left) #
Returns: VisNetworkNodeOptions

Sets individual margins around the node.

Parameters

top System.Double requiredposition: 0
Top margin.
right System.Double requiredposition: 1
Right margin.
bottom System.Double requiredposition: 2
Bottom margin.
left System.Double requiredposition: 3
Left margin.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithMarkdownLabel(String markdownLabel) #
Returns: VisNetworkNodeOptions

Sets a Markdown-formatted label with multi-line support. Automatically enables Markdown multi-line mode.

Parameters

markdownLabel System.String requiredposition: 0
The Markdown-formatted label content

Returns

The node options for method chaining

public VisNetworkNodeOptions WithMass(Double mass) #
Returns: VisNetworkNodeOptions

Sets the physics mass of the node.

Parameters

mass System.Double requiredposition: 0
Mass value.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithOpacity(Double opacity) #
Returns: VisNetworkNodeOptions

Sets the node opacity.

Parameters

opacity System.Double requiredposition: 0
Opacity value.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithOption(String key, Object value) #
Returns: VisNetworkNodeOptions

Sets a custom option that is not yet represented as a typed property.

Parameters

key System.String requiredposition: 0
value System.Object requiredposition: 1
public VisNetworkNodeOptions WithPhysics(Boolean physics = true) #
Returns: VisNetworkNodeOptions

Enables or disables physics for the node.

Parameters

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

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithPosition(Double x, Double y) #
Returns: VisNetworkNodeOptions

Sets the initial position of the node.

Parameters

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

Returns

The node options for method chaining

public VisNetworkNodeOptions WithScaling(Action<VisNetworkScalingOptions> configure) #
Returns: VisNetworkNodeOptions

Configures node scaling options.

Parameters

configure System.Action{HtmlForgeX.VisNetworkScalingOptions} requiredposition: 0
Delegate to configure scaling.

Returns

The node options for method chaining.

WithShadow 2 overloads
public VisNetworkNodeOptions WithShadow(VisNetworkShadowOptions shadowOptions) #
Returns: VisNetworkNodeOptions

Enables or disables shadow for the node.

Parameters

enabled System.Boolean = true requiredposition: 0
True to enable shadow.

Returns

The node options for method chaining.

WithShadow(HtmlForgeX.VisNetworkShadowOptions shadowOptions) #

Applies custom shadow options to the node.

Parameters

shadowOptions HtmlForgeX.VisNetworkShadowOptions required
Shadow configuration.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithShape(VisNetworkNodeShape shape) #
Returns: VisNetworkNodeOptions

Sets the node shape.

Parameters

shape HtmlForgeX.VisNetworkNodeShape requiredposition: 0
Shape to use.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithShapeProperties(Action<VisNetworkShapeProperties> configure) #
Returns: VisNetworkNodeOptions

Configures additional shape properties.

Parameters

configure System.Action{HtmlForgeX.VisNetworkShapeProperties} requiredposition: 0
Delegate to configure the shape properties.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithSize(Double size) #
Returns: VisNetworkNodeOptions

Sets the node size.

Parameters

size System.Double requiredposition: 0
Size value.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithTitle(String title) #
Returns: VisNetworkNodeOptions

Sets the tooltip text that appears when hovering over the node.

Parameters

title System.String requiredposition: 0
The tooltip text

Returns

The node options for method chaining

public VisNetworkNodeOptions WithValue(Double value) #
Returns: VisNetworkNodeOptions

Sets the scaling value of the node.

Parameters

value System.Double requiredposition: 0
Value used for scaling.

Returns

The node options for method chaining.

public VisNetworkNodeOptions WithWidthConstraint(Nullable<Double> minimum = null, Nullable<Double> maximum = null) #
Returns: VisNetworkNodeOptions

Sets width constraints for the node.

Parameters

minimum System.Nullable{System.Double} = null optionalposition: 0
Minimum width.
maximum System.Nullable{System.Double} = null optionalposition: 1
Maximum width.

Returns

The node options for method chaining.

Properties

public Nullable<VisNetworkNodeShape> Shape { get; set; } #
JsonPropertyName("shape") JsonIgnore(Condition = 3)

Gets or sets the visual shape of the node.

public Nullable<Double> Size { get; set; } #
JsonPropertyName("size") JsonIgnore(Condition = 3)

Gets or sets the size of the node.

public Nullable<Double> Mass { get; set; } #
JsonPropertyName("mass") JsonIgnore(Condition = 3)

Gets or sets the mass used by the physics engine.

public Nullable<Double> Value { get; set; } #
JsonPropertyName("value") JsonIgnore(Condition = 3)

Gets or sets the value used for scaling.

public VisNetworkScalingOptions Scaling { get; set; } #
JsonPropertyName("scaling") JsonIgnore(Condition = 3)

Gets or sets scaling options for the node.

public Object Color { get; set; } #
JsonPropertyName("color") JsonIgnore(Condition = 3)

Gets or sets the color configuration of the node.

public Nullable<Double> Opacity { get; set; } #
JsonPropertyName("opacity") JsonIgnore(Condition = 3)

Gets or sets the opacity of the node.

public VisNetworkFontOptions Font { get; set; } #
JsonPropertyName("font") JsonIgnore(Condition = 3)

Gets or sets font options for the label.

public Object Image { get; set; } #
JsonPropertyName("image") JsonIgnore(Condition = 3)

Gets or sets the image or image options for image nodes.

public String BrokenImage { get; set; } #
JsonPropertyName("brokenImage") JsonIgnore(Condition = 3)

Gets or sets the fallback image URL when the main image fails to load. Used when shape is 'image' or 'circularImage'.

public Object ImagePadding { get; set; } #
JsonPropertyName("imagePadding") JsonIgnore(Condition = 3)

Gets or sets the padding around the image. Can be a number for uniform padding or an object with top, right, bottom, left properties. Used when shape is 'image' or 'circularImage'.

public VisNetworkIconOptions Icon { get; set; } #
JsonPropertyName("icon") JsonIgnore(Condition = 3)

Gets or sets icon options when using icon shaped nodes.

public VisNetworkShapeProperties ShapeProperties { get; set; } #
JsonPropertyName("shapeProperties") JsonIgnore(Condition = 3)

Gets or sets additional shape properties.

public Nullable<Double> BorderWidth { get; set; } #
JsonPropertyName("borderWidth") JsonIgnore(Condition = 3)

Gets or sets the border width of the node.

public Nullable<Double> BorderWidthSelected { get; set; } #
JsonPropertyName("borderWidthSelected") JsonIgnore(Condition = 3)

Gets or sets the border width when the node is selected.

public Object Chosen { get; set; } #
JsonPropertyName("chosen") JsonIgnore(Condition = 3)

Gets or sets chosen options for node selection.

public Nullable<Boolean> LabelHighlightBold { get; set; } #
JsonPropertyName("labelHighlightBold") JsonIgnore(Condition = 3)

Gets or sets a value indicating whether label text is bold when highlighted.

public Object Shadow { get; set; } #
JsonPropertyName("shadow") JsonIgnore(Condition = 3)

Gets or sets shadow options for the node.

public Object Margin { get; set; } #
JsonPropertyName("margin") JsonIgnore(Condition = 3)

Gets or sets margin around the node content.

public Object WidthConstraint { get; set; } #
JsonPropertyName("widthConstraint") JsonIgnore(Condition = 3)

Gets or sets width constraints for the node.

public Object HeightConstraint { get; set; } #
JsonPropertyName("heightConstraint") JsonIgnore(Condition = 3)

Gets or sets height constraints for the node.

public String CtxRenderer { get; set; } #
JsonPropertyName("ctxRenderer") JsonIgnore(Condition = 3)

Gets or sets the name of the custom canvas renderer function.

public Object Id { get; set; } #
JsonPropertyName("id")

Gets or sets the unique identifier for the node.

public String Label { get; set; } #
JsonPropertyName("label") JsonIgnore(Condition = 3)

Gets or sets the label displayed on the node.

public String Title { get; set; } #
JsonPropertyName("title") JsonIgnore(Condition = 3)

Gets or sets the tooltip text for the node.

public String Group { get; set; } #
JsonPropertyName("group") JsonIgnore(Condition = 3)

Gets or sets the group this node belongs to.

public Nullable<Double> X { get; set; } #
JsonPropertyName("x") JsonIgnore(Condition = 3)

Gets or sets the initial X position of the node.

public Nullable<Double> Y { get; set; } #
JsonPropertyName("y") JsonIgnore(Condition = 3)

Gets or sets the initial Y position of the node.

public Nullable<Int32> Level { get; set; } #
JsonPropertyName("level") JsonIgnore(Condition = 3)

Gets or sets the hierarchical level of the node.

public Nullable<Boolean> Hidden { get; set; } #
JsonPropertyName("hidden") JsonIgnore(Condition = 3)

Gets or sets a value indicating whether the node is initially hidden.

public Nullable<Boolean> Physics { get; set; } #
JsonPropertyName("physics") JsonIgnore(Condition = 3)

Gets or sets a value indicating whether the node is affected by physics.

public Object Fixed { get; set; } #
JsonPropertyName("fixed") JsonIgnore(Condition = 3)

Gets or sets fixed positioning flags for the node.

SkipAutoEmbedding #

Internal flag to track whether auto-embedding should be skipped for this node. This is not serialized to JSON.

public Dictionary<String, Object> AdditionalOptions { get; set; } #
JsonExtensionData JsonIgnore(Condition = 3)

Allows setting node options not yet covered by the typed model (escape hatch for vis-network parity). Keys should match vis-network option names (typically camelCase).