# Interface: BarControllerDatasetOptions

# Hierarchy

# Properties

# animation

animation: false | AnimationSpec<"bar"> & { onComplete?: (this: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>, event: AnimationEvent) => void ; onProgress?: (this: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>, event: AnimationEvent) => void }

# Inherited from

AnimationOptions.animation

# Defined in

types/index.d.ts:1747


# animations

animations: AnimationsSpec<"bar">

# Inherited from

AnimationOptions.animations

# Defined in

types/index.d.ts:1757


# backgroundColor

backgroundColor: ScriptableAndArray<Color, ScriptableContext<"bar">>

# Inherited from

ScriptableAndArrayOptions.backgroundColor

# Defined in

types/index.d.ts:1807


# barPercentage

barPercentage: number

Percent (0-1) of the available width each bar should be within the category width. 1.0 will take the whole category width and put the bars right next to each other.

Default

0.9

# Defined in

types/index.d.ts:114


# barThickness

barThickness: number | "flex"

Manually set width of each bar in pixels. If set to 'flex', it computes "optimal" sample widths that globally arrange bars side by side. If not set (default), bars are equally sized based on the smallest interval.

# Defined in

types/index.d.ts:124


# base

base: ScriptableAndArray<number, ScriptableContext<"bar">>

The base value for the bar in data units along the value axis.

# Inherited from

ScriptableAndArrayOptions.base

# Defined in

types/index.d.ts:2080


# borderColor

borderColor: ScriptableAndArray<Color, ScriptableContext<"bar">>

# Inherited from

ScriptableAndArrayOptions.borderColor

# Defined in

types/index.d.ts:1806


# borderRadius

borderRadius: ScriptableAndArray<number | BorderRadius, ScriptableContext<"bar">>

Border radius

Default

0

# Inherited from

ScriptableAndArrayOptions.borderRadius

# Defined in

types/index.d.ts:2092


# borderSkipped

borderSkipped: ScriptableAndArray<boolean | "end" | "start" | "left" | "top" | "bottom" | "right" | "middle", ScriptableContext<"bar">>

Skipped (excluded) border: 'start', 'end', 'left', 'right', 'bottom', 'top', 'middle', false (none) or true (all).

Default

'start'

# Inherited from

ScriptableAndArrayOptions.borderSkipped

# Defined in

types/index.d.ts:2086


# borderWidth

borderWidth: ScriptableAndArray<number | { bottom?: number ; left?: number ; right?: number ; top?: number }, ScriptableContext<"bar">>

Width of the border, number for all sides, object to specify width for each side specifically

Default

0

# Inherited from

ScriptableAndArrayOptions.borderWidth

# Defined in

types/index.d.ts:2105


# categoryPercentage

categoryPercentage: number

Percent (0-1) of the available width each category should be within the sample width.

Default

0.8

# Defined in

types/index.d.ts:119


# clip

clip: number | false | ChartArea

How to clip relative to chartArea. Positive value allows overflow, negative value clips that many pixels inside chartArea. 0 = clip at chartArea. Clipping can also be configured per side: clip: {left: 5, top: false, right: -2, bottom: 0}

# Inherited from

ControllerDatasetOptions.clip

# Defined in

types/index.d.ts:75


# grouped

grouped: boolean

Should the bars be grouped on index axis

Default

true

# Defined in

types/index.d.ts:146


# hidden

hidden: boolean

Configures the visibility state of the dataset. Set it to true, to hide the dataset from the chart.

Default

false

# Inherited from

ControllerDatasetOptions.hidden

# Defined in

types/index.d.ts:93


# hoverBackgroundColor

hoverBackgroundColor: ScriptableAndArray<Color, ScriptableContext<"bar">>

# Inherited from

ScriptableAndArrayOptions.hoverBackgroundColor

# Defined in

types/index.d.ts:1813


# hoverBorderColor

hoverBorderColor: ScriptableAndArray<Color, ScriptableContext<"bar">>

# Inherited from

ScriptableAndArrayOptions.hoverBorderColor

# Defined in

types/index.d.ts:1812


# hoverBorderWidth

hoverBorderWidth: ScriptableAndArray<number, ScriptableContext<"bar">>

# Inherited from

ScriptableAndArrayOptions.hoverBorderWidth

# Defined in

types/index.d.ts:1811


# indexAxis

indexAxis: "x" | "y"

The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts.

Default

'x'

# Inherited from

ControllerDatasetOptions.indexAxis

# Defined in

types/index.d.ts:71


# inflateAmount

inflateAmount: ScriptableAndArray<number | "auto", ScriptableContext<"bar">>

Amount to inflate the rectangle(s). This can be used to hide artifacts between bars. Unit is pixels. 'auto' translates to 0.33 pixels when barPercentage * categoryPercentage is 1, else 0.

Default

'auto'

# Inherited from

ScriptableAndArrayOptions.inflateAmount

# Defined in

types/index.d.ts:2099


# label

label: string

The label for the dataset which appears in the legend and tooltips.

# Inherited from

ControllerDatasetOptions.label

# Defined in

types/index.d.ts:79


# maxBarThickness

maxBarThickness: number

Set this to ensure that bars are not sized thicker than this.

# Defined in

types/index.d.ts:129


# minBarLength

minBarLength: number

Set this to ensure that bars have a minimum length in pixels.

# Defined in

types/index.d.ts:134


# normalized

normalized: boolean

Chart.js is fastest if you provide data with indices that are unique, sorted, and consistent across datasets and provide the normalized: true option to let Chart.js know that you have done so.

# Inherited from

ControllerDatasetOptions.normalized

# Defined in

types/index.d.ts:63


# order

order: number

The drawing order of dataset. Also affects order for stacking, tooltip and legend.

# Inherited from

ControllerDatasetOptions.order

# Defined in

types/index.d.ts:83


# parsing

parsing: false | { [key: string]: string; }

How to parse the dataset. The parsing can be disabled by specifying parsing: false at chart options or dataset. If parsing is disabled, data must be sorted and in the formats the associated chart type and scales use internally.

# Inherited from

ControllerDatasetOptions.parsing

# Defined in

types/index.d.ts:54


# pointStyle

pointStyle: PointStyle

Point style for the legend

Default

'circle;

# Defined in

types/index.d.ts:140


# stack

stack: string

The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack).

# Inherited from

ControllerDatasetOptions.stack

# Defined in

types/index.d.ts:88


# transitions

transitions: TransitionsSpec<"bar">

# Inherited from

AnimationOptions.transitions

# Defined in

types/index.d.ts:1758


# xAxisID

xAxisID: string

The ID of the x axis to plot this dataset on.

# Defined in

types/index.d.ts:104


# yAxisID

yAxisID: string

The ID of the y axis to plot this dataset on.

# Defined in

types/index.d.ts:108