Project

PSWriteHTML

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

Stars 1,019
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.41.0
Language: PowerShell Updated: 2026-10-03
Command

New-ChartAxisX

Module PSWriteHTML

Creates a new X-axis for a chart with specified parameters.

Syntax

New-ChartAxisX [[-MaxValue] <Object>] [[-MinValue] <Object>] [[-Names] <Array>] [[-TimeZoneOffset] <String>] [[-TitleText] <String>] [[-Type] <datetime|category|numeric>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new X-axis for a chart with the provided parameters. It allows customization of the axis name, title, type, minimum and maximum values, and timezone offset.

Examples

Authored help example

EXAMPLE 1

New-ChartAxisX -Names @('Jan', 'Feb', 'Mar') -TitleText 'Months' -Type 'category'

Creates a new X-axis with categories 'Jan', 'Feb', 'Mar' and title 'Months'.

EXAMPLE 2

New-ChartAxisX -Names @('2020-01-01', '2020-02-01', '2020-03-01') -TitleText 'Dates' -Type 'datetime' -MinValue (Get-Date '2020-01-01') -MaxValue (Get-Date '2020-03-01') -TimeZoneOffset '+02:00'

Creates a new X-axis with datetime values, title 'Dates', and timezone offset of +2 hours.

Parameters

-MaxValue Object optionalposition: 4
The maximum value of the X-axis.
-MinValue Object optionalposition: 3
The minimum value of the X-axis.
-Names Array optionalposition: 0aliases: Name
An array of names for the X-axis categories.
-TimeZoneOffset String optionalposition: 5
The timezone offset to adjust the X-axis values.
-TitleText String optionalposition: 1aliases: Title
The title text to be displayed for the X-axis.
-Type String optionalposition: 2
The type of the X-axis data. Accepted values are 'datetime', 'category', or 'numeric'. Default is 'category'.
Possible values: datetime, category, numeric

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.