# Bar chart

Vertical, horizontal, stacked, percent, gradient, and patterned bar charts.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).





<ComponentPreview name="ex-bar-chart">
  <div className="h-[430px] w-full rounded-xl border">
    <ChartcnExampleBarChart />
  </div>
</ComponentPreview>

## Install [#install]

```bash
npx shadcn@latest add @chartcn/bar-chart
```

Bar variants use ECharts gradients, decals, rounded item styles, emphasis, and background bars. Set `layout="horizontal"` for horizontal bars.
