> ## Documentation Index
> Fetch the complete documentation index at: https://neo.tvk.company/llms.txt
> Use this file to discover all available pages before exploring further.

# Bar Chart

> Draws vertical bars for one or more series of values.

## Examples

> [tab] Basic Usage
>
> ```dart Single Series lines theme={null}
> NeoBarChart(
>   points: [
>     NeoChartPoint(label: "Mon", value: 12),
>     NeoChartPoint(label: "Tue", value: 18),
>     NeoChartPoint(label: "Wed", value: 9),
>     NeoChartPoint(label: "Thu", value: 22),
>     NeoChartPoint(label: "Fri", value: 15),
>   ],
> ),
> ```
>
> ```dart Tap a Bar lines theme={null}
> NeoBarChart(
>   points: [
>     NeoChartPoint(label: "Mon", value: 12),
>     NeoChartPoint(label: "Tue", value: 18),
>     NeoChartPoint(label: "Wed", value: 9),
>   ],
>   onPointTap: (index) {
>     // Handle the tapped column
>   },
> ),
> ```

> [tab] Series
>
> ```dart Grouped Bars lines theme={null}
> NeoBarChart(
>   series: ["Desktop", "Mobile"],
>   points: [
>     NeoChartPoint.group(label: "Jan", values: [186, 80]),
>     NeoChartPoint.group(label: "Feb", values: [305, 200]),
>     NeoChartPoint.group(label: "Mar", values: [237, 120]),
>   ],
> ),
> ```

> [tab] Highlight and Format
>
> ```dart Highlight the Max lines theme={null}
> NeoBarChart(
>   highlight: .max,
>   points: [
>     NeoChartPoint(label: "Mon", value: 12),
>     NeoChartPoint(label: "Tue", value: 28),
>     NeoChartPoint(label: "Wed", value: 9),
>   ],
> ),
> ```
>
> ```dart Currency lines theme={null}
> // import 'package:intl/intl.dart';
> NeoBarChart(
>   format: NumberFormat.currency(locale: "nl_NL", symbol: "€"),
>   points: [
>     NeoChartPoint(label: "Jan", value: 12400),
>     NeoChartPoint(label: "Feb", value: 9800),
>     NeoChartPoint(label: "Mar", value: 15200),
>   ],
> ),
> ```

## Properties

### Required

**points** `List\<NeoChartPoint\>` *required*

One entry per column, in order. See [NeoChartPoint](#neochartpoint).

### Content

**series** `List\<String\>` (default: const \[])

Names for the bars in each column. With names, every column draws one bar per name. A value missing from a point counts as 0, and extra values are left out. Two or more names add a legend. Without names, each column draws as many bars as the point with the most values.

**format** `NumberFormat?`

A `NumberFormat` from `package:intl` for the values. The readout shows the full value. The axis shows a compact form of the same format, such as `12K` for 12,400. Defaults to `NumberFormat.decimalPattern()` for the current locale.

**semanticLabel** `String?`

What a screen reader hears. When null, it hears the first and last column, such as "Mon 12, Fri 15".

### Styling

**highlight** `NeoChartHighlight?`

Mutes every bar except the highest (`.max`) or lowest (`.min`). Hovering or selecting a bar takes over from the highlight. Nothing is highlighted when all values are equal.

### State

**onPointTap** `ValueChanged\<int\>?`

Called with the column index when a bar or its column label is tapped.

## NeoChartPoint

One column of the chart.

### NeoChartPoint()

One bar.

**label** `String` *required*

The column label under the bar.

**value** `double` *required*

The bar's value. A negative value draws below the zero line. `NaN` and infinite values count as 0.

### NeoChartPoint.group()

One bar per series. Pair it with `series` on the chart.

**label** `String` *required*

The column label under the bars.

**values** `List\<double\>` *required*

One value per series, in the order of `series`.

## Enums

### NeoChartHighlight

Which bar `highlight` keeps in color.

* `max`: The highest value.
* `min`: The lowest value.

## Best Practices

* Keep to four series or fewer. The colors repeat from the fifth series.
* Set `semanticLabel` when the first and last column do not sum up the chart.

## Behavior

* Hover a column, or drag across the columns on touch, to see a readout with the label and each series' value.
* Tap a bar or its column label to select it. The other bars dim, and the readout stays. Tap it again, or empty space in the chart, to clear the selection. Tap a legend item to select that series.
* Bars grow in from the zero line, and new values animate from the old bars. With reduced motion, bars are drawn at once.
* A parent with a fixed height sets the height. Otherwise the chart is 240 high (`NeoBarChart.fallbackExtent`) within the parent's limits. The chart fills the width it gets.
* When column labels would collide, the chart shows every few labels at an even step, starting with the first. The readout still names each column.
* Series colors come from the theme's `brand` and `ink`.
* Inside a [`NeoSkeleton`](https://neo.tvk.company/widgets/utilities/skeleton), the bars become bones.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.