Toggle Sidebar B
AppearanceLight & dark mode D

Chart Bar

Bar charts built on unovis-vue. One ChartBar covers vertical/horizontal orientation, single or grouped series, and stacking.

Default

A single-series vertical bar chart.

Dark previewReplay preview

Horizontal

Flip the orientation with the horizontal prop.

Dark previewReplay preview

Multiple

Grouped bars for multiple series.

Dark previewReplay preview

Stacked

Stack multiple series with the stacked prop.

Dark previewReplay preview

Interactive

Toggle between series; totals update in the header.

Dark previewReplay preview

Basic (card)

A single-series bar in a card with a header, trend badge, and grid.

Dark previewReplay preview

Multi-dataset (card)

Grouped series in a card with a trend badge.

Dark previewReplay preview

Diagonal stripe pattern

Frame a bar with a diagonal stripe SVG pattern via svgDefs + barFill.

Dark previewReplay preview

Striped and solid

Mix a stripe-filled series with a solid one using a per-key barFill map.

Dark previewReplay preview

Dotted pattern

An elegant dotted SVG pattern fill with a matching stroke.

Dark previewReplay preview

Dotted and solid

Compare a dotted series against a solid one.

Dark previewReplay preview

Gradient

A soft vertical gradient fill via a linearGradient def.

Dark previewReplay preview

Duotone gradient

A 50/50 duotone fill using a hard-stop horizontal gradient.

Dark previewReplay preview

3D gradient

An isometric 3D bar with gradient faces, rendered by ChartBar3D.

Dark previewReplay preview

3D isometric

A solid isometric 3D bar with shaded faces.

Dark previewReplay preview

Animated

Bars collapse to a tick and expand on hover, surfacing the value.

Dark previewReplay preview

Vertical (horizontal layout)

A horizontal, grouped bar chart with category labels on the left.

Dark previewReplay preview

API Reference

ChartBar

PropTypeDefaultDescription
dataRecord<string, any>[]Series rows.
configChartConfigMap of key → { label, color }.
dataKeystring"value"Single-series row key.
dataKeysstring[]nullMulti-series row keys (overrides dataKey).
xKeystring"date"Row key for the category axis.
horizontalbooleanfalseRender horizontal bars.
stackedbooleanfalseStack multi-series bars.
legendbooleanfalseRender a legend below the chart.
roundedCornersnumber6Bar corner radius.
barPaddingnumber0.2Fraction of each band left empty between bars.
gridbooleanfalseDraw horizontal grid lines behind the bars.
svgDefsstringnullRaw SVG <defs> string (patterns/gradients/filters) injected into the chart.
barFillstring | Record<string, string>nullOverride the fill; a string for every series or a per-key map (e.g. url(#pattern)).
barStrokestringnullOutline color drawn around every bar.
barStrokeWidthnumber1Outline width.
xTickFormatter(d) => stringnullCustom category tick formatter.
yTickFormatter(d) => stringnullCustom value tick formatter.

ChartBar3D

PropTypeDefaultDescription
dataRecord<string, any>[]Series rows.
configChartConfigMap of key → { label, color }.
xKeystring"month"Row key for the category axis.
valueKeystring"value"Row key for the bar value.
mode"gradient" | "solid""gradient"Gradient faces or a single color with shaded faces.
colorOverridestringnullOverride the bar color.
barCategoryGapnumber0.2Fraction of each band left as gap.

ChartBarAnimated

PropTypeDefaultDescription
dataRecord<string, any>[]Series rows.
configChartConfigMap of key → { label, color }.
xKeystring"month"Row key for the category axis.
valueKeystring"value"Row key for the bar value.
colorOverridestringnullOverride the bar color.
EventDescription
update:activeFires with the hovered bar's value (or null on leave).

ChartBarInteractive

PropTypeDefaultDescription
dataRecord<string, any>[]Series rows.
configChartConfigTheming map; series with a color become toggles.
dataKeysstring[]nullOverride which series are selectable.
xKeystring"date"Row key for the category axis.
titlestring""Optional header title.
descriptionstring""Optional header description.