API Reference
Command
New-HtmlXDiagram
Creates a VisNetwork diagram container.
Remarks
Part of the HtmlForgeX.PowerShell DSL.
Examples
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
- Scriptblock that emits nodes and edges.
- DisablePhysicsAfterStabilization SwitchParameter
- Disables physics after stabilization to improve responsiveness.
- Id string
- Sets a custom diagram identifier.
- LazyInit SwitchParameter
- Defers initialization until the diagram becomes visible.
- LoadingBar SwitchParameter
- Enables the loading bar UI.
- PerformancePreset VisNetworkPerformancePreset
- Applies a performance preset for large graphs. Possible values: Default, LargeGraph
- Possible values:
Default,LargeGraph
Outputs
HtmlForgeX.VisNetwork