Command
New-ImageChartLine
Creates line chart data item.
Syntax
New-ImageChartLine [-Color <ChartColor>] [-Marker <ChartMarkerShape>] [-MarkerSize <Double>] [-Name] <String> [-SecondaryAxis] [-Smooth] [-Value] <Double[]> [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
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
New-ImageChartLine -Name 'Sales' -Value 10,20,18,24 -Color Green -SmoothCreates a smoothed line-series definition ready to be rendered by New-ImageChart.
Mark one series and plot it on the secondary axis
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
- Line color.
- -Marker ChartMarkerShape
- 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
- Marker diameter in pixels. Supplying it without -Marker draws circles.
- -Name String
- Label for the line.
- -SecondaryAxis SwitchParameter
- Plot the line against the secondary (right) Y axis. Use New-ImageChart -SecondaryYTitle to name that axis.
- -Smooth SwitchParameter
- Render the line using a smooth curve.
- -Value Double[]
- 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.
Outputs
ImagePlayground.ChartLine: Line chart definition.