Skip to content

BarSeriesType API

Demos

Import

import { BarSeriesType } from '@mui/x-charts'

Properties

type

Type:'bar'


colorOptional

Type:string


dataOptional

Data associated to each bar.

Type:(number | null)[]


dataKeyOptional

The key used to retrieve data from the dataset.

Type:string


highlightScopeOptional

The scope to apply when the series is highlighted.

Type:Partial<HighlightScope>


idOptional

Type:SeriesId


labelOptional

The label to display on the tooltip or the legend. It can be a string or a function.

Type:string | ((location: 'tooltip' | 'legend') => string)


layoutOptional

Layout of the bars. All bar should have the same layout.

Type:'horizontal' | 'vertical'

Default:'vertical'


stackOptional

The key that identifies the stacking group.
Series with the same stack property will be stacked together.

Type:string


stackOffsetOptional

Defines how stacked series handle negative values.

Type:StackOffsetType

Default:'diverging'


stackOrderOptional

The order in which series' of the same group are stacked together.

Type:StackOrderType

Default:'none'


valueFormatterOptional

Formatter used to render values in tooltip or other data display.

Type:SeriesValueFormatter<TValue>


xAxisKeyOptional

The id of the x-axis used to render the series.

Type:string


yAxisKeyOptional

The id of the y-axis used to render the series.

Type:string