bar
Configuration Structure
bar: {}horizontal
falseTransforms column charts into horizontal bar charts.
borderRadius
0Creates rounded corners on bars/columns. Available since v3.26.0.
borderRadiusApplication
'around'Specifies whether to apply rounding around both ends or only to a single end.
columnWidth
'70%'Percentage of available grid width occupied by columns. Range: 0% to 100%.
barHeight
'70%'Percentage of available grid height for horizontal bars. Range: 0% to 100%.
distributed
falseEnables discrete bar mode where each value represents one bar per series.
rangeBarOverlap
trueIn timeline charts, enables bars to overlap instead of stacking.
rangeBarGroupRows
falseIn multi-series timeline charts, groups horizontal rows together rather than stacking them vertically.
hideZeroBarsWhenGrouped
falsePrevents zero-value bars from occupying space in non-stacked grouped configurations.
isDumbbell
falseAdds dots at starting and ending points of range bars.
dumbbellColors
undefinedEndpoint colours for the y: [low, high] form, per series: [[startColor, endColor]].
chart.type: 'dumbbell' with one series per measure takes its colours from colors instead, so that each dot is coloured after the series it belongs to.
dumbbell
Available since v7.1.0. Applies to chart.type: 'dumbbell', and to any range bar drawn with isDumbbell.
The connector's thickness is barHeight (rows) or columnWidth (columns), and the size of the marked ends is markers.size: they are the bar and its markers, so they are configured as such. Only what is specific to the comparison lives here.
plotOptions: {
bar: {
barHeight: 6,
dumbbell: {
connector: { opacity: 0.55 },
dataLabels: { enabled: true },
tooltip: { differenceLabel: 'Change' }
}
}
}
connector
The line joining the marked ends.
color
undefinedA solid colour for the join.
Left undefined, the connector is a gradient between the two endpoint colours, resolved per row so that a row where the measures cross still runs the right way.
opacity
0.55Connector opacity. The join is context for the two marked ends, not a third mark competing with them.
dataLabels
A value written at each end of the connector, in that end's own colour.
Default on for chart.type: 'dumbbell' (the pair of numbers is the comparison, and reading them off an axis costs the glance the chart was meant to save), off for the bare isDumbbell flag on a range bar.
With three or more measures only the two extremes are labelled. Anything between them sits on the connector, where a label has nowhere to go that is not over the line or over its neighbour.
enabled
falseWhether to write a value at each marked end.
offset
6Clearance from the marked end, in px, outward from the connector.
colorFromMarker
trueWhen true, each label takes its own end's colour, so a value is tied to a measure by more than its position. Set false to colour them all through dumbbell.dataLabels.style.colors.
formatter
undefinedFormats one endpoint value. Receives (value, { seriesIndex, dataPointIndex, endpointIndex, w }), where endpointIndex says which measure the end belongs to.
It defaults to the value axis' own label formatter, not dataLabels.formatter. On a range bar that one reads out end - start, which is the gap rather than an endpoint.
plotOptions: {
bar: {
dumbbell: {
dataLabels: {
formatter: function (val) {
return val + '%'
}
}
}
}
}
style
Typography for the end labels.
fontSize
'12px'Font size for the end labels.
fontFamily
undefinedFont family for the end labels. Falls back to chart.fontFamily.
fontWeight
600Font weight for the end labels.
colors
undefinedLabel colours, indexed by endpoint. Used only when dumbbell.dataLabels.colorFromMarker is false.
tooltip
Tooltip wording specific to the dumbbell readout.
differenceLabel
'Difference'Names the gap between two endpoints, which is the reason the two dots are on one row.
The row appears only when exactly two endpoints are visible; with three or more, "the difference" names nothing.
isFunnel
falseActivates funnel chart mode.
isFunnel3d
trueApplies 3D shadow effects to funnel chart bars.
ranges
Defines color mappings for specific value ranges.
colors: {
ranges: [{
from: 0,
to: 10,
color: '#FF0000'
}]
}
backgroundBarColors
Custom background colors for bar rectangles.
backgroundBarOpacity
Transparency level for background bar colors.
backgroundBarRadius
Border radius for background bar rectangles.
position
Label placement options: top, center, or bottom.
maxItems
Maximum displayable data-labels on the chart.
hideOverflowingLabels
Hides overlapping labels in stacked charts.
orientation
Label orientation: horizontal or vertical.
enabled
Displays cumulative values in stacked configurations.
formatter
Custom formatting for total values.
dataLabels: {
total: {
formatter: function (val, opts) {
return opts.w.globals.seriesTotals[opts.dataPointIndex]
}
}
}
offsetX
Left positioning adjustment for total label.
offsetY
Vertical positioning adjustment for total label.
color
ForeColor of total label. Default: #373d3f.
fontSize
FontSize for total label. Default: 12px.
fontFamily
FontFamily for total label.
fontWeight
Font-weight for total label. Default: 600.