# New-ChartAxisX

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

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

[#](#method-new-chartaxisx-object-object-array-string-string-string)

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

### Example 1

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

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:089C825D50F5355F44CAB7445BC8C240D20DC35AF423D24ABEFF0B8D516A35C6 -->
