bar

Configuration Structure

bar: {
horizontal: boolean,
columnWidth: string | number,
barHeight: string | number,
distributed: boolean,
borderRadius: number,
borderRadiusApplication: 'around' | 'end',
borderRadiusWhenStacked: 'all' | 'last',
rangeBarOverlap: boolean,
rangeBarGroupRows: boolean,
isDumbbell: boolean,
dumbbellColors: string[][],
isFunnel: boolean,
isFunnel3d: boolean,
colors: { ... },
ranges: Array,
from: number,
to: number,
color: string,
backgroundBarColors: string[],
backgroundBarRadius: number,
dataLabels: { ... },
maxItems: number,
hideOverflowingLabels: boolean,
position: string,
orientation: 'horizontal' | 'vertical',
total: { ... },
enabled: boolean,
formatter: Function,
offsetX: number,
offsetY: number,
style: { ... },
color: string,
fontSize: string,
fontFamily: string,
fontWeight: number | string,
}

horizontal

Default: false

Transforms column charts into horizontal bar charts.

borderRadius

Default: 0

Creates rounded corners on bars/columns. Available since v3.26.0.

borderRadiusApplication

Default: 'around'

Specifies whether to apply rounding around both ends or only to a single end.

borderRadiusWhenStacked

Default: 'last'

Controls whether rounding applies to all bars or exclusively the final rendered dataset. Options: all, last.

columnWidth

Default: '70%'

Percentage of available grid width occupied by columns. Range: 0% to 100%.

barHeight

Default: '70%'

Percentage of available grid height for horizontal bars. Range: 0% to 100%.

distributed

Default: false

Enables discrete bar mode where each value represents one bar per series.

rangeBarOverlap

Default: true

In timeline charts, enables bars to overlap instead of stacking.

rangeBarGroupRows

Default: false

In multi-series timeline charts, groups horizontal rows together rather than stacking them vertically.

hideZeroBarsWhenGrouped

Default: false

Prevents zero-value bars from occupying space in non-stacked grouped configurations.

isDumbbell

Default: false

Adds dots at starting and ending points of range bars.

dumbbellColors

Default: undefined

Custom color options for dumbbell endpoint dots.

isFunnel

Default: false

Activates funnel chart mode.

isFunnel3d

Default: true

Applies 3D shadow effects to funnel chart bars.

ranges

bar.colors.ranges

Defines color mappings for specific value ranges.

colors: {
    ranges: [{
        from: 0,
        to: 10,
        color: '#FF0000'
    }]
}

backgroundBarColors

bar.colors.backgroundBarColors

Custom background colors for bar rectangles.

backgroundBarOpacity

bar.colors.backgroundBarOpacity

Transparency level for background bar colors.

backgroundBarRadius

bar.colors.backgroundBarRadius

Border radius for background bar rectangles.

position

bar.dataLabels.position

Label placement options: top, center, or bottom.

maxItems

bar.dataLabels.maxItems

Maximum displayable data-labels on the chart.

hideOverflowingLabels

bar.dataLabels.hideOverflowingLabels

Hides overlapping labels in stacked charts.

orientation

bar.dataLabels.orientation

Label orientation: horizontal or vertical.

enabled

bar.dataLabels.total.enabled

Displays cumulative values in stacked configurations.

formatter

bar.dataLabels.total.formatter

Custom formatting for total values.

dataLabels: {
    total: {
        formatter: function (val, opts) {
            return opts.w.globals.seriesTotals[opts.dataPointIndex]
        }
    }
}

offsetX

bar.dataLabels.total.offsetX

Left positioning adjustment for total label.

offsetY

bar.dataLabels.total.offsetY

Vertical positioning adjustment for total label.

color

bar.colors.ranges.color

ForeColor of total label. Default: #373d3f.

fontSize

bar.dataLabels.total.style.fontSize

FontSize for total label. Default: 12px.

fontFamily

bar.dataLabels.total.style.fontFamily

FontFamily for total label.

fontWeight

bar.dataLabels.total.style.fontWeight

Font-weight for total label. Default: 600.