# Charts Bar Stacked

Charts Bar Stacked on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

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

Stars**1025**

Forks**115**

Open issues**0**

PowerShell Gallery downloads**7576901**

Release**v1.45.0**

Language: PowerShell Updated: 2026-11-19

Curated Examples

An example script from the PSWriteHTML repository.

- Source repository: [https://github.com/EvotecIT/PSWriteHTML](https://github.com/EvotecIT/PSWriteHTML)
- Example group: `Example23-Charts`

```powershell
Import-Module .\PSWriteHTML.psd1 -Force

New-HTML -TitleText 'My title' -Online -FilePath $PSScriptRoot\Example-ChartsBarStacked.html {
    New-HTMLTabStyle -SlimTabs
    New-HTMLTab -Name 'Bar Charts - Bar Stacked' -IconRegular chart-bar {

        New-HTMLSection -HeaderText 'Bar Charts 1 - Bar Stacked' -CanCollapse {
            New-HTMLPanel {
                $DataNames1 = 2001, 2002, 2003, 2004, 2005, 2006, 2007
                New-HTMLChart -Title 'Pets vs People' -TitleAlignment center {
                    New-ChartBarOptions -Type barStacked
                    New-ChartLegend -Name 'People', 'Pets'
                    New-ChartBar -Name $DataNames1[0] -Value 44, 53
                    New-ChartBar -Name $DataNames1[1] -Value 55, 32
                    New-ChartBar -Name $DataNames1[2] -Value 41, 33
                    New-ChartBar -Name $DataNames1[3] -Value 64, 52
                    New-ChartBar -Name $DataNames1[4] -Value 22, 13
                    New-ChartBar -Name $DataNames1[5] -Value 43, 44
                    New-ChartBar -Name $DataNames1[6] -Value 21, 32
                }
            }
        }
    }
    New-HTMLTab -Name 'Bar Charts - Bar Stacked 100%' -IconSolid audio-description {
        New-HTMLSection -HeaderText 'Bar Charts - Stacked 100%' -CanCollapse {
            New-HTMLPanel {
                $Data1 = 44, 55, 41, 37, 22, 43, 21
                $Data2 = 53, 32, 33, 52, 13, 43, 32
                $Data3 = 12, 17, 11, 9, 15, 11, 20
                $Data4 = 9, 7, 5, 8, 6, 9, 4
                $Data5 = 25, 12, 19, 32, 25, 24, 10
                $DataNames1 = 2008, 2009, 2010, 2011, 2012, 2013, 2014
                New-HTMLChart -Title 'Finctional Books Sales' {
                    New-ChartBarOptions -Type barStacked100Percent
                    New-ChartLegend -Names 'Marine Sprite', 'Striking Calf', 'Tank Picture', 'Tank Picture', 'Bucket Slope', 'Reborn Kid', 'Other' -LegendPosition top
                    for ($i = 0; $i -lt $Data1.Count; $i++) {
                        New-ChartBar -Name $DataNames1[$i] -Value $Data1[$i], $Data2[$i], $Data3[$i], $Data4[$i], $Data5[$i]
                    }
                }
            }
        }
    }

} -Show
```

<!-- PowerForge markdown artifact sha256:9F2379CC10BBCBC4E5387B0A9365678E2CB044013843275205B7EA7204B8E079 -->
