--- title: "New-StackedBarChart" slug: "new-stackedbarchart" updated: 2023-09-18T18:03:09Z published: 2023-09-18T18:03:09Z canonical: "support.nectarcorp.com/new-stackedbarchart" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.nectarcorp.com/llms.txt > Use this file to discover all available pages before exploring further. # New-StackedBarChart Creates a stacked bar chart PNG file based on the input data ## Description Creates a stacked bar chart PNG file based on the input data. ONLY WORKS IN MS WINDOWS ## Syntax ``` New-StackedBarChart -InputData -TimeObjectName -BarNames -BarColours -Interval -ChartName ``` ## Examples ### Example 1 ``` $Data = Get-NectarSessionCount -TimePeriod LAST WEEK New-StackedBarChart -InputData $Data -BarNames Good,Average,Poor -BarColors Green,Yellow,Red ``` Creates a bar chart using a variable from a previous command ### Example 2 ``` New-StackedBarChart -InputData (Get-NectarSessionCount -TimePeriod LAST WEEK) -BarNames Good,Average,Poor -BarColors Green,Yellow,Red ``` Same results as previous example, but shown as full command written within the New-StackedBarChart command ## Parameters **-InputData ** The data source to use for the chart. Can be either a variable or a command enclosed in brackets | Parameter | Value | | --- | --- | | Required | true | | Position | 1 | | Required | true | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-TimeObjectName ** The name of the data column to use for the time (x-axis) | Parameter | Value | | --- | --- | | Required | true | | Position | 2 | | Required | true | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-BarNames ** The names of the bars to display separated by commas. Must match up with the names of the desired column in the input data | Parameter | Value | | --- | --- | | Required | true | | Position | 3 | | Required | true | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-BarColours ** The colours of the bars to display separated by commas. Colours will be matched up with the BarNames by position. | Parameter | Value | | --- | --- | | Required | false | | Position | 4 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-Interval ** The interval between numbers to show on the axis. Defaults to auto. | Parameter | Value | | --- | --- | | Required | false | | Position | 5 | | Required | false | | Default Value | 0 | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-ChartName ** The name to use for the chart header and the filename. Defaults to 'Chart' | Parameter | Value | | --- | --- | | Required | false | | Position | 6 | | Required | false | | Default Value | Chart | | Accept pipeline input? | false | | Accept wildcard characters? | false |