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-HTMLChart

Namespace PSWriteHTML

Creates a new HTML chart with customizable settings.

Remarks

This function creates a new HTML chart with customizable settings such as title, subtitle, dimensions, colors, and more.

Examples

Authored help example

EXAMPLE 1


New-HTMLChart -Title "Sales Data" -ChartSettings {
    // Chart configuration settings here
}
        

Creates a new HTML chart with the title "Sales Data" and custom chart settings.

EXAMPLE 2


New-HTMLChart -Title "Sales Data" -SubTitle "Quarterly Sales" -Height 400 -Width 600 -Gradient -Id "SalesChart"
        

Creates a new HTML chart with the title "Sales Data", subtitle "Quarterly Sales", height of 400, width of 600, gradient colors, and specified ID.

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-HTMLChart [-ChartSettings <ScriptBlock>] [-Gradient] [-Group <String>] [-Height <Object>] [-Id <String>] [-Patterned] [-SubTitle <String>] [-SubTitleAlignment <center|left|right>] [-SubTitleColor <String>] [-SubTitleFloating <Nullable`1>] [-SubTitleFontFamily <String>] [-SubTitleFontSize <Object>] [-SubTitleFontWeight <normal>] [-SubTitleMargin <Nullable`1>] [-SubTitleOffsetX <Nullable`1>] [-SubTitleOffsetY <Nullable`1>] [-Title <String>] [-TitleAlignment <center|left|right>] [-TitleColor <String>] [-TitleFloating <Nullable`1>] [-TitleFontFamily <String>] [-TitleFontSize <Object>] [-TitleFontWeight <normal>] [-TitleMargin <Nullable`1>] [-TitleOffsetX <Nullable`1>] [-TitleOffsetY <Nullable`1>] [-Width <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

ChartSettings ScriptBlock optionalposition: 0pipeline: False
Specifies the settings for the chart. This should be a ScriptBlock containing the chart configuration.
Gradient SwitchParameter optionalposition: namedpipeline: Falsealiases: GradientColors
Indicates whether to use gradient colors in the chart.
Group String optionalposition: 24pipeline: False
Specifies the group to which the chart belongs.
Height Object optionalposition: 21pipeline: False
Specifies the height of the chart. Default is 350.
Id String optionalposition: 23pipeline: False
Specifies the ID of the chart. If not provided, a random ID will be generated.
Patterned SwitchParameter optionalposition: namedpipeline: Falsealiases: PatternedColors
Indicates whether to use patterned colors in the chart.
SubTitle String optionalposition: 11pipeline: False
Specifies the subtitle of the chart.
SubTitleAlignment String optionalposition: 12pipeline: Falsevalues: 3
Specifies the alignment of the chart subtitle. Valid values are 'center', 'left', or 'right'.
Possible values: center, left, right
SubTitleColor String optionalposition: 20pipeline: False
Specifies the color of the chart subtitle.
SubTitleFloating Nullable`1 optionalposition: 16pipeline: False
Specifies whether the chart subtitle should float.
SubTitleFontFamily String optionalposition: 19pipeline: False
Specifies the font family of the chart subtitle.
SubTitleFontSize Object optionalposition: 17pipeline: False
Specifies the font size of the chart subtitle.
SubTitleFontWeight String optionalposition: 18pipeline: Falsevalues: 13
Specifies the font weight of the chart subtitle. Valid values are 'normal', 'bold', 'bolder', 'lighter', or numeric values from '100' to '900'.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
SubTitleMargin Nullable`1 optionalposition: 13pipeline: False
Specifies the margin of the chart subtitle.
SubTitleOffsetX Nullable`1 optionalposition: 14pipeline: False
Specifies the horizontal offset of the chart subtitle.
SubTitleOffsetY Nullable`1 optionalposition: 15pipeline: False
Specifies the vertical offset of the chart subtitle.
Title String optionalposition: 1pipeline: False
Specifies the title of the chart.
TitleAlignment String optionalposition: 2pipeline: Falsevalues: 3
Specifies the alignment of the chart title. Valid values are 'center', 'left', or 'right'.
Possible values: center, left, right
TitleColor String optionalposition: 10pipeline: False
Specifies the color of the chart title.
TitleFloating Nullable`1 optionalposition: 6pipeline: False
Specifies whether the chart title should float.
TitleFontFamily String optionalposition: 9pipeline: False
Specifies the font family of the chart title.
TitleFontSize Object optionalposition: 7pipeline: False
Specifies the font size of the chart title.
TitleFontWeight String optionalposition: 8pipeline: Falsevalues: 13
Specifies the font weight of the chart title. Valid values are 'normal', 'bold', 'bolder', 'lighter', or numeric values from '100' to '900'.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
TitleMargin Nullable`1 optionalposition: 3pipeline: False
Specifies the margin of the chart title.
TitleOffsetX Nullable`1 optionalposition: 4pipeline: False
Specifies the horizontal offset of the chart title.
TitleOffsetY Nullable`1 optionalposition: 5pipeline: False
Specifies the vertical offset of the chart title.
Width Object optionalposition: 22pipeline: False
Specifies the width of the chart.