---
title: "BarChart"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

A bar chart.

The bar heights will be the provided values, and the x coordinates of the bars will be the provided abscissa or default to the index of the provided values.

## Fields
### Required
* `values`: [`TensorData`](../components/tensor_data.md)

### Optional
* `color`: [`Color`](../components/color.md)
* `abscissa`: [`TensorData`](../components/tensor_data.md)
* `widths`: [`Length`](../components/length.md)


## Can be shown in
* [BarChartView](../views/bar_chart_view.md)
* [DataframeView](../views/dataframe_view.md)

## API reference links
 * 🌊 [C++ API docs for `BarChart`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1BarChart.html)
 * 🐍 [Python API docs for `BarChart`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.BarChart)
 * 🦀 [Rust API docs for `BarChart`](https://docs.rs/rerun/latest/rerun/archetypes/struct.BarChart.html)

## Example

### Simple bar chart

snippet: archetypes/bar_chart

<picture data-inline-viewer="snippets/archetypes/bar_chart">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/bar_chart/ba274527813ccb9049f6760d82f36c8da6a6f2ff/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/bar_chart/ba274527813ccb9049f6760d82f36c8da6a6f2ff/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/bar_chart/ba274527813ccb9049f6760d82f36c8da6a6f2ff/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/bar_chart/ba274527813ccb9049f6760d82f36c8da6a6f2ff/1200w.png">
  <img src="https://static.rerun.io/bar_chart/ba274527813ccb9049f6760d82f36c8da6a6f2ff/full.png">
</picture>

