# New-HTMLDiagram

Creates a new HTML diagram with customizable options.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates a new HTML diagram with customizable options.

## Syntax

```
New-HTMLDiagram
[[-BackGroundImage] <Uri>]
[[-BackgroundSize] <String>]
[-BundleImages]
[[-Diagram] <ScriptBlock>]
[-DisableLoader]
[-EnableFiltering]
[-EnableFilteringButton]
[[-Height] <Object>]
[[-MinimumFilteringChars] <Int32>]
[-NoAutoResize]
[[-Width] <Object>]
[<CommonParameters>]
```

[#](#method-new-htmldiagram-uri-string-switchparameter-scriptblock-switchparameter-switchparameter-switchparameter-object-int32-switchparameter-object)

Parameter set: `All Parameter Sets`

## Description

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

### Example 1

```powershell
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

```powershell
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.

## Parameters

**-BackGroundImage Uri optionalposition: 3**

Specifies the background image for the diagram.

**-BackgroundSize String optionalposition: 4**

Specifies the size of the background image. Default is '100% 100%'.

**-BundleImages SwitchParameter optional**

Indicates whether to bundle images used in the diagram.

**-Diagram ScriptBlock optionalposition: 0**

Specifies the diagram data to be displayed. This should be a ScriptBlock containing the diagram configuration.

**-DisableLoader SwitchParameter optionalaliases: DisableLoadingBar**

Indicates whether the loading bar should be disabled.

**-EnableFiltering SwitchParameter optional**

Indicates whether filtering functionality is enabled.

**-EnableFilteringButton SwitchParameter optional**

Indicates whether a filtering button should be displayed.

**-Height Object optionalposition: 1**

Specifies the height of the diagram.

**-MinimumFilteringChars Int32 optionalposition: 5**

Specifies the minimum number of characters required for filtering.

**-NoAutoResize SwitchParameter optional**

Indicates whether auto-resize functionality is disabled.

**-Width Object optionalposition: 2**

Specifies the width of the diagram.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:3503F4F7CEBBF4750D65AB926035F515D42BF68A943B522991CD198556326F47 -->
