# New-ImageTableBlock

Creates a visual table block from PowerShell objects.

 Command  

**Module**

`imageplayground`

**Inputs**

 `System.Management.Automation.PSObject[]` 

**Outputs**

 `ChartForgeX.VisualBlocks.ChartTable` 

Creates a visual table block from PowerShell objects.

## Syntax

```
New-ImageTableBlock
[-Align <IDictionary>]
[-Dense]
[-Header <String[]>]
[-Height <Int32>]
[-InputObject] <PSObject[]>
[-NoHeader]
[-NoRowStriping]
[[-Property] <Object[]>]
[-StatusColumn <String>]
[-Subtitle <String>]
[-Theme <ChartTheme>]
[-Title <String>]
[-Width <Int32>]
[<CommonParameters>]
```

 [#](#method-new-imagetableblock-idictionary-switchparameter-string-int32-psobject-switchparameter-switchparameter-object-string-string-charttheme-string-int32) 

Parameter set: `All Parameter Sets`

## Description

Pipe objects in and choose columns with -Property, the same way as Select-Object or Format-Table. Property accepts property names and calculated property hashtables with Name (or Label), Expression, FormatString, Alignment, and Width keys.

Rows can be PowerShell objects, hashtables, or arrays of values in column order. Without -Property, the columns come from the first row.

## Examples

### Build a table from pipeline objects

```powershell
Get-Service | Select-Object -First 5 | New-ImageTableBlock -Property Name, Status -StatusColumn Status -Title Services
```

Creates one table block with a Name and a Status column. Missing properties produce empty cells.

### Format and align columns with calculated properties

```powershell
$services | New-ImageTableBlock -Title Services -StatusColumn Status -Width 616 -Height 270 -Property Name, Status,
                @{ Name = 'Requests'; Expression = { [int] $_.Requests }; FormatString = 'N0'; Alignment = 'Right' },
                @{ Name = 'P95'; Expression = { "$($_.P95) ms" }; Alignment = 'Right' }
```

Formats the request count with thousands separators, appends a unit to latency, and sizes the block for a dashboard grid.

### Supply rows explicitly

```powershell
New-ImageTableBlock -Title Services -Column Name, Status -Row @{ Name = 'API'; Status = 'Healthy' }, @{ Name = 'Database'; Status = 'Warning' } -Dense
```

-Column and -Row remain available as aliases of -Property and -InputObject.

## Parameters

**-Align IDictionary optionalaliases: Alignment**

Column alignment keyed by property or displayed header. Values are Left, Center, or Right.

**-Dense SwitchParameter optional**

Use compact row spacing.

**-Header String[] optional**

Displayed column names. Defaults to the property names.

**-Height Int32 optional**

Block height in pixels. The width keeps its default unless -Width is also supplied.

**-InputObject PSObject[] requiredposition: 1pipeline: True (ByValue)aliases: Row, Rows**

Rows can be objects, hashtables, or arrays of values in column order.

**-NoHeader SwitchParameter optional**

Hide the table header.

**-NoRowStriping SwitchParameter optional**

Disable alternating row surfaces.

**-Property Object[] optionalposition: 0aliases: Column, Columns**

Calculated properties accept Name (or Label), Expression (a property name or a script block using $_), FormatString, Alignment (Left, Center, Right), and Width. When omitted, the columns are the properties of the first row.

**-StatusColumn String optionalaliases: StatusProperty**

Column, by property or displayed header, that contains semantic status values such as Healthy, Warning, or Failed.

**-Subtitle String optional**

Optional block subtitle.

**-Theme ChartTheme optional**

ChartForgeX theme.

Possible values: `Default`, `Dark`, `Light`, `Colorblind`, `Aurora`, `Editorial`, `Candy`, `PeopleInfographic`, `Terminal`, `TransparentOverlayDark`, `Minimal`, `DashboardLight`, `SaasDashboardLight`, `RestaurantDashboardLight`

**-Title String optional**

Optional block title.

**-Width Int32 optional**

Block width in pixels. The height keeps its default unless -Height is also supplied.

## 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).

<!-- PowerForge markdown artifact sha256:D52DC43735B0C7442E1354CB48F60B4C5DD6E15D8FF916959992C56372BC6FE9 -->
