# New-ImageChart

Creates an image chart from definitions. Review available syntax, parameters, pipeline guidance, and reference details in ImagePlayground API Reference.

Project

ImagePlayground

Automate image processing, codes, metadata, charts, topology, and visual stories from PowerShell.

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

Stars **102**

Forks **7**

Open issues 

Total downloads **708,853**

Release **ImagePlayground-PowerShellModule.v3.2.7**

Language: C# Updated: 2026-11-18

Command 

**Module**

`ImagePlayground`

**Inputs**

`ChartForgeX.Core.Chart` `System.Object[]`

**Outputs**

`ChartForgeX.Core.Chart`

Creates an image chart from definitions.

## Syntax

```
New-ImageChart
[-Annotation <Object[]>]
[-AnnotationsDefinition <ScriptBlock>]
[-Background <ChartColor>]
[-ChartsDefinition] <ScriptBlock>
[-Dpi <Double>]
-FilePath <String>
[-Height <Int32>]
[-Options <ChartRenderOptions>]
[-PassThru]
[-Show]
[-ShowGrid]
[-Theme <ChartTheme>]
[-Watermark <VisualWatermark[]>]
[-Width <Int32>]
[-XTitle <String>]
[-YTitle <String>]
[<CommonParameters>]
```

[#](#method-new-imagechart-object-scriptblock-chartcolor-scriptblock-double-string-int32-chartrenderoptions-switchparameter-switchparameter-switchparameter-charttheme-visualwatermark-int32-string-string)

Parameter set: `ScriptBlock`

```
New-ImageChart
[-Annotation <Object[]>]
[-AnnotationsDefinition <ScriptBlock>]
[-Background <ChartColor>]
-ChartScript <ScriptBlock>
[-Dpi <Double>]
-FilePath <String>
[-Height <Int32>]
[-Options <ChartRenderOptions>]
[-PassThru]
[-Show]
[-ShowGrid]
[-Theme <ChartTheme>]
[-Watermark <VisualWatermark[]>]
[-Width <Int32>]
[-XTitle <String>]
[-YTitle <String>]
[<CommonParameters>]
```

[#](#method-new-imagechart-object-scriptblock-chartcolor-scriptblock-double-string-int32-chartrenderoptions-switchparameter-switchparameter-switchparameter-charttheme-visualwatermark-int32-string-string-2)

Parameter set: `ChartScript`

```
New-ImageChart
[-Annotation <Object[]>]
[-AnnotationsDefinition <ScriptBlock>]
[-Background <ChartColor>]
-Chart <Chart>
[-Dpi <Double>]
-FilePath <String>
[-Height <Int32>]
[-Options <ChartRenderOptions>]
[-PassThru]
[-Show]
[-ShowGrid]
[-Theme <ChartTheme>]
[-Watermark <VisualWatermark[]>]
[-Width <Int32>]
[-XTitle <String>]
[-YTitle <String>]
[<CommonParameters>]
```

[#](#method-new-imagechart-object-scriptblock-chartcolor-chart-double-string-int32-chartrenderoptions-switchparameter-switchparameter-switchparameter-charttheme-visualwatermark-int32-string-string)

Parameter set: `Chart`

```
New-ImageChart
[-Annotation <Object[]>]
[-AnnotationsDefinition <ScriptBlock>]
[-Background <ChartColor>]
-Definition <Object[]>
[-Dpi <Double>]
-FilePath <String>
[-Height <Int32>]
[-Options <ChartRenderOptions>]
[-PassThru]
[-Show]
[-ShowGrid]
[-Theme <ChartTheme>]
[-Watermark <VisualWatermark[]>]
[-Width <Int32>]
[-XTitle <String>]
[-YTitle <String>]
[<CommonParameters>]
```

[#](#method-new-imagechart-object-scriptblock-chartcolor-object-double-string-int32-chartrenderoptions-switchparameter-switchparameter-switchparameter-charttheme-visualwatermark-int32-string-string)

Parameter set: `Definition`

## Description

Use this cmdlet to render one or more chart definitions into a final image file.

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Choose an ImagePlayground workflow](/projects/imageplayground/docs/workflows/) Guide
  
  Choose between image processing, codes, metadata, charts, topology, and visual-story workflows.
- [Curated ImagePlayground examples](/projects/imageplayground/examples/) Example
  
  Start with focused PowerShell examples, including branch-aware organization hierarchy rendering.

## Examples

### Create a simple bar chart and save it

```powershell
New-ImageChart -ChartsDefinition {
    New-ImageChartBar -Name 'Q1' -Value 12,18,25 -Color CornflowerBlue
    New-ImageChartBar -Name 'Q2' -Value 14,20,28 -Color Orange
} -FilePath chart.png -XTitle 'Month' -YTitle 'Revenue'
```

Builds chart definitions inside a script block and renders them into a PNG file.

### Create a line chart with annotations and preview it

```powershell
$defs = @(
    New-ImageChartLine -Name 'CPU' -Value 35,42,58,61,49 -Color LimeGreen -Smooth
)
$ann = @(
    New-ImageChartAnnotation -X 3 -Y 61 -Text 'Peak' -Arrow
)
New-ImageChart -Definition $defs -Annotation $ann -FilePath cpu-usage.png -Theme Dark -ShowGrid -Show
```

Renders a themed line chart and overlays an annotation highlighting the peak value.

## Parameters

**-Annotation Object[] optional**

Annotations for the chart.

**-AnnotationsDefinition ScriptBlock optional**

ScriptBlock producing annotations.

**-Background ChartColor optional**

Chart background color.

**-ChartsDefinition ScriptBlock requiredposition: 0sets: ScriptBlock**

ScriptBlock producing chart definitions.

**-Dpi Double optional**

PNG physical resolution metadata in dots per inch.

**-FilePath String required**

The image format is inferred from the file extension.

**-Height Int32 optional**

Height of the chart.

**-Options ChartRenderOptions optional**

Renderer options created by New-ImageChartOptions.

**-PassThru SwitchParameter optional**

Write the ChartForgeX chart to the pipeline after rendering.

**-Show SwitchParameter optional**

Open the image after creation.

**-ShowGrid SwitchParameter optional**

Display grid lines.

**-Theme ChartTheme optional**

Chart theme.

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

**-Watermark VisualWatermark[] optional**

Watermarks applied to static SVG, HTML, or PNG output.

**-Width Int32 optional**

Width of the chart.

**-XTitle String optional**

X axis title.

**-YTitle String optional**

Y axis title.

**-ChartScript ScriptBlock requiredsets: ChartScript**

The script block receives the chart as its first argument and can mutate it directly or return a replacement chart.

**-Chart Chart requiredpipeline: True (ByValue)sets: Chart**

ChartForgeX chart object to render.

**-Definition Object[] requiredpipeline: True (ByValue)sets: Definition**

Chart definitions provided directly.

## 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:B2E4DB13BFD830EFBB6128954799397F98DCB6A70113D829180012B27A7B6B48 -->
