HtmlForgeX

API Reference

Command

New-HtmlXDiagram

Namespace HtmlForgeX.PowerShell
Outputs
HtmlForgeX.VisNetwork

Creates a VisNetwork diagram container.

Remarks

Part of the HtmlForgeX.PowerShell DSL.

Examples

Authored help example

Example 1: Create a simple diagram with nodes and an edge.


New-HtmlXDiagram -LoadingBar {
    New-HtmlXDiagramNode -Id 1 -Label "Server"
    New-HtmlXDiagramNode -Id 2 -Label "Database"
    New-HtmlXDiagramEdge -From 1 -To 2 -Label "uses"
}
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-HtmlXDiagram [-Content <ScriptBlock>] [-DisablePhysicsAfterStabilization] [-Id <string>] [-LazyInit] [-LoadingBar] [-PerformancePreset <Default|LargeGraph>] [<CommonParameters>]
#

Parameters

Content ScriptBlock optionalposition: 0pipeline: false
Scriptblock that emits nodes and edges.
DisablePhysicsAfterStabilization SwitchParameter optionalposition: namedpipeline: false
Disables physics after stabilization to improve responsiveness.
Id string optionalposition: namedpipeline: false
Sets a custom diagram identifier.
LazyInit SwitchParameter optionalposition: namedpipeline: false
Defers initialization until the diagram becomes visible.
LoadingBar SwitchParameter optionalposition: namedpipeline: false
Enables the loading bar UI.
PerformancePreset VisNetworkPerformancePreset optionalposition: namedpipeline: falsevalues: 2
Applies a performance preset for large graphs. Possible values: Default, LargeGraph
Possible values: Default, LargeGraph

Outputs

HtmlForgeX.VisNetwork