API Reference
VisNetworkNodeOptions
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) #VisNetworkNodeOptionsSets the border width of the node.
Parameters
- width System.Double
- Border width.
- selectedWidth System.Nullable{System.Double} = null
- Optional width when selected.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithBrokenImage(String url) #VisNetworkNodeOptionsSets the fallback image URL when the main image fails to load. Used when shape is 'image' or 'circularImage'.
Parameters
- url System.String
- The URL of the broken image placeholder
Returns
The node options for method chaining
public VisNetworkNodeOptions WithChosen(VisNetworkChosenOptions chosenOptions) #VisNetworkNodeOptionsEnables or disables the chosen state for the node.
Parameters
- enabled System.Boolean
- 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
- Chosen configuration.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithColor(VisNetworkColorOptions colorOptions) #VisNetworkNodeOptionsSets the node color.
Parameters
- color HtmlForgeX.RGBColor
- Color value.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithColor(String color) #VisNetworkNodeOptionsSets the node color using a string.
Parameters
- color System.String
- Color value.
Returns
The node options for method chaining.
WithColor(HtmlForgeX.VisNetworkColorOptions colorOptions) #Sets complex color options for the node.
Parameters
- colorOptions HtmlForgeX.VisNetworkColorOptions
- Color options.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithCustomShape(VisNetworkCustomShape customShape) #VisNetworkNodeOptionsSets a custom shape for the node using the provided custom shape definition.
Parameters
- customShape HtmlForgeX.VisNetworkCustomShape
- The custom shape to use for rendering the node
Returns
The node options for method chaining
public VisNetworkNodeOptions WithFixed(Boolean fixedX, Boolean fixedY) #VisNetworkNodeOptionsFixes the node position on the X and Y axis.
Parameters
- fixedX System.Boolean
- Fix horizontal position.
- fixedY System.Boolean
- Fix vertical position.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithFont(Action<VisNetworkFontOptions> configure) #VisNetworkNodeOptionsConfigures font options for the node label.
Parameters
- configure System.Action{HtmlForgeX.VisNetworkFontOptions}
- Delegate to configure font options.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithGroup(String group) #VisNetworkNodeOptionsAssigns the node to a group for shared styling.
Parameters
- group System.String
- The group name
Returns
The node options for method chaining
public VisNetworkNodeOptions WithHeightConstraint(Nullable<Double> minimum = null, Nullable<Double> maximum = null) #VisNetworkNodeOptionsSets height constraints for the node.
Parameters
- minimum System.Nullable{System.Double} = null
- Minimum height.
- maximum System.Nullable{System.Double} = null
- Maximum height.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithHtmlLabel(Action<VisNetworkLabelBuilder> configure) #VisNetworkNodeOptionsSets an HTML-formatted label with multi-line support. Automatically enables HTML multi-line mode.
Parameters
- htmlLabel System.String
- 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}
- Action to configure the label builder
Returns
The node options for method chaining
public VisNetworkNodeOptions WithIcon(Action<VisNetworkIconOptions> configure) #VisNetworkNodeOptionsConfigures an icon for the node.
Parameters
- configure System.Action{HtmlForgeX.VisNetworkIconOptions}
- Delegate to configure icon options.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithId(Object id) #VisNetworkNodeOptionsSets the unique identifier for the node.
Parameters
- id System.Object
- The identifier (can be string, number, or any object)
Returns
The node options for method chaining
public VisNetworkNodeOptions WithImage(String imageUrl) #VisNetworkNodeOptionsSets the image URL for an image node.
Parameters
- imageUrl System.String
- URL of the image.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithImageObject(VisNetworkImageOptions imageOptions) #VisNetworkNodeOptionsSets image options for an image node.
Parameters
- imageOptions HtmlForgeX.VisNetworkImageOptions
- Options describing the image.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithImagePadding(Int32 padding) #VisNetworkNodeOptionsSets uniform padding around the image in pixels. Used when shape is 'image' or 'circularImage'.
Parameters
- padding System.Int32
- The padding value in pixels
Returns
The node options for method chaining
public VisNetworkNodeOptions WithImagePadding(Int32 top, Int32 right, Int32 bottom, Int32 left) #VisNetworkNodeOptionsSets individual padding values for each side of the image. Used when shape is 'image' or 'circularImage'.
Parameters
- top System.Int32
- Top padding in pixels
- right System.Int32
- Right padding in pixels
- bottom System.Int32
- Bottom padding in pixels
- left System.Int32
- Left padding in pixels
Returns
The node options for method chaining
public VisNetworkNodeOptions WithLabel(String label) #VisNetworkNodeOptionsSets the plain text label for the node.
Parameters
- label System.String
- The label text (use \n for line breaks)
Returns
The node options for method chaining
public VisNetworkNodeOptions WithLabelHighlightBold(Boolean highlightBold = true) #VisNetworkNodeOptionsEnables or disables bold highlight of the node label.
Parameters
- highlightBold System.Boolean = true
- True to highlight in bold.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithLevel(Int32 level) #VisNetworkNodeOptionsSets the hierarchical level of the node.
Parameters
- level System.Int32
- The level value.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithMargin(Double margin) #VisNetworkNodeOptionsSets a uniform margin around the node.
Parameters
- margin System.Double
- Margin value.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithMargin(Double top, Double right, Double bottom, Double left) #VisNetworkNodeOptionsSets individual margins around the node.
Parameters
- top System.Double
- Top margin.
- right System.Double
- Right margin.
- bottom System.Double
- Bottom margin.
- left System.Double
- Left margin.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithMarkdownLabel(String markdownLabel) #VisNetworkNodeOptionsSets a Markdown-formatted label with multi-line support. Automatically enables Markdown multi-line mode.
Parameters
- markdownLabel System.String
- The Markdown-formatted label content
Returns
The node options for method chaining
public VisNetworkNodeOptions WithMass(Double mass) #VisNetworkNodeOptionsSets the physics mass of the node.
Parameters
- mass System.Double
- Mass value.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithOpacity(Double opacity) #VisNetworkNodeOptionsSets the node opacity.
Parameters
- opacity System.Double
- Opacity value.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithOption(String key, Object value) #VisNetworkNodeOptionsSets a custom option that is not yet represented as a typed property.
Parameters
- key System.String
- value System.Object
public VisNetworkNodeOptions WithPhysics(Boolean physics = true) #VisNetworkNodeOptionsEnables or disables physics for the node.
Parameters
- physics System.Boolean = true
- True to enable physics.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithPosition(Double x, Double y) #VisNetworkNodeOptionsSets the initial position of the node.
Parameters
- x System.Double
- The X coordinate
- y System.Double
- The Y coordinate
Returns
The node options for method chaining
public VisNetworkNodeOptions WithScaling(Action<VisNetworkScalingOptions> configure) #VisNetworkNodeOptionsConfigures node scaling options.
Parameters
- configure System.Action{HtmlForgeX.VisNetworkScalingOptions}
- Delegate to configure scaling.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithShadow(VisNetworkShadowOptions shadowOptions) #VisNetworkNodeOptionsEnables or disables shadow for the node.
Parameters
- enabled System.Boolean = true
- 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
- Shadow configuration.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithShape(VisNetworkNodeShape shape) #VisNetworkNodeOptionsSets the node shape.
Parameters
- shape HtmlForgeX.VisNetworkNodeShape
- Shape to use.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithShapeProperties(Action<VisNetworkShapeProperties> configure) #VisNetworkNodeOptionsConfigures additional shape properties.
Parameters
- configure System.Action{HtmlForgeX.VisNetworkShapeProperties}
- Delegate to configure the shape properties.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithSize(Double size) #VisNetworkNodeOptionsSets the node size.
Parameters
- size System.Double
- Size value.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithTitle(String title) #VisNetworkNodeOptionsSets the tooltip text that appears when hovering over the node.
Parameters
- title System.String
- The tooltip text
Returns
The node options for method chaining
public VisNetworkNodeOptions WithValue(Double value) #VisNetworkNodeOptionsSets the scaling value of the node.
Parameters
- value System.Double
- Value used for scaling.
Returns
The node options for method chaining.
public VisNetworkNodeOptions WithWidthConstraint(Nullable<Double> minimum = null, Nullable<Double> maximum = null) #VisNetworkNodeOptionsSets width constraints for the node.
Parameters
- minimum System.Nullable{System.Double} = null
- Minimum width.
- maximum System.Nullable{System.Double} = null
- Maximum width.
Returns
The node options for method chaining.
Inherited Methods
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> 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).