# New-ImageChartLine

Creates line chart data item. Review available syntax, parameters, pipeline guidance, and reference details in ImagePlayground commands for ChartForgeX.

 Command  

**Module**

`imageplayground`

**Inputs**

 `None` 

**Outputs**

 `ImagePlayground.ChartLine` 

Creates line chart data item.

## Syntax

```
New-ImageChartLine
[-Color <ChartColor>]
[-Marker <ChartMarkerShape>]
[-MarkerSize <Double>]
[-Name] <String>
[-SecondaryAxis]
[-Smooth]
[-Value] <Double[]>
[<CommonParameters>]
```

 [#](#method-new-imagechartline-chartcolor-chartmarkershape-double-string-switchparameter-switchparameter-double) 

Parameter set: `All Parameter Sets`

## Description

Use this cmdlet inside New-ImageChart to define a line-series dataset. Lines can share a chart with bar, area, scatter, and other line definitions.

Markers are configured per series, so one line can show markers while another does not.

## Examples

### Create line-series data

```powershell
New-ImageChartLine -Name 'Sales' -Value 10,20,18,24 -Color Green -Smooth
```

Creates a smoothed line-series definition ready to be rendered by New-ImageChart.

### Mark one series and plot it on the secondary axis

```powershell
New-ImageChart -XLabel Mon, Tue, Wed, Thu -SecondaryYTitle 'Error rate (%)' -FilePath combo.png {
    New-ImageChartBar -Name Requests -Value 410, 380, 455, 520
    New-ImageChartLine -Name 'Error rate' -Value 1.2, 0.8, 2.4, 1.1 -Marker Diamond -MarkerSize 8 -SecondaryAxis
}
```

Combines bars and a marked line; the line uses the right-hand axis.

## Parameters

**-Color ChartColor optional**

Line color.

**-Marker ChartMarkerShape optional**

None (the default) draws no markers. Circle, Square, Diamond, Triangle, Plus, Cross, and Star draw markers on this series only.

Possible values: `Circle`, `Square`, `Diamond`, `Triangle`, `Plus`, `Cross`, `Star`

**-MarkerSize Double optional**

Marker diameter in pixels. Supplying it without -Marker draws circles.

**-Name String requiredposition: 0aliases: Label**

Label for the line.

**-SecondaryAxis SwitchParameter optional**

Plot the line against the secondary (right) Y axis. Use New-ImageChart -SecondaryYTitle to name that axis.

**-Smooth SwitchParameter optional**

Render the line using a smooth curve.

**-Value Double[] requiredposition: 1**

Y values for the line.

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

## Outputs

ImagePlayground.ChartLine: Line chart definition.

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