Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLDiagram

Aliases: New-Diagram
Namespace PSWriteHTML
Aliases
New-Diagram

Creates a new HTML diagram with customizable options.

Remarks

This function creates a new HTML diagram with customizable options such as diagram data, height, width, image bundling, background image, background size, auto-resize, loading bar, filtering, and more.

Examples

Authored help example

EXAMPLE 1


New-HTMLDiagram -Diagram {
    // Diagram configuration settings here
} -Height 500 -Width 800 -BundleImages -BackGroundImage 'https://example.com/background.jpg' -BackgroundSize 'cover' -DisableLoader -EnableFiltering -MinimumFilteringChars 2 -EnableFilteringButton
        

Creates a new HTML diagram with custom configuration settings including height, width, bundled images, background image, disabled loading bar, enabled filtering, and a filtering button.

EXAMPLE 2


New-HTMLDiagram -Diagram {
    // More diagram configuration settings
} -Height 600 -Width 1000
        

Creates a new HTML diagram with additional configuration settings and default options for height and width.

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-HTMLDiagram [-BackGroundImage <Uri>] [-BackgroundSize <String>] [-BundleImages] [-Diagram <ScriptBlock>] [-DisableLoader] [-EnableFiltering] [-EnableFilteringButton] [-Height <Object>] [-MinimumFilteringChars <Int32>] [-NoAutoResize] [-Width <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BackGroundImage Uri optionalposition: 3pipeline: False
Specifies the background image for the diagram.
BackgroundSize String optionalposition: 4pipeline: False
Specifies the size of the background image. Default is '100% 100%'.
BundleImages SwitchParameter optionalposition: namedpipeline: False
Indicates whether to bundle images used in the diagram.
Diagram ScriptBlock optionalposition: 0pipeline: False
Specifies the diagram data to be displayed. This should be a ScriptBlock containing the diagram configuration.
DisableLoader SwitchParameter optionalposition: namedpipeline: Falsealiases: DisableLoadingBar
Indicates whether the loading bar should be disabled.
EnableFiltering SwitchParameter optionalposition: namedpipeline: False
Indicates whether filtering functionality is enabled.
EnableFilteringButton SwitchParameter optionalposition: namedpipeline: False
Indicates whether a filtering button should be displayed.
Height Object optionalposition: 1pipeline: False
Specifies the height of the diagram.
MinimumFilteringChars Int32 optionalposition: 5pipeline: False
Specifies the minimum number of characters required for filtering.
NoAutoResize SwitchParameter optionalposition: namedpipeline: False
Indicates whether auto-resize functionality is disabled.
Width Object optionalposition: 2pipeline: False
Specifies the width of the diagram.