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.

Replay preview

Horizontal

Flip the orientation with the horizontal prop.

Replay preview

Multiple

Grouped bars for multiple series.

Replay preview

Stacked

Stack multiple series with the stacked prop.

Replay preview

Interactive

Toggle between series; totals update in the header.

Replay preview

Basic (card)

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

Replay preview

Multi-dataset (card)

Grouped series in a card with a trend badge.

Replay preview

Diagonal stripe pattern

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

Replay preview

Striped and solid

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

Replay preview

Dotted pattern

An elegant dotted SVG pattern fill with a matching stroke.

Replay preview

Dotted and solid

Compare a dotted series against a solid one.

Replay preview

Gradient

A soft vertical gradient fill via a linearGradient def.

Replay preview

Duotone gradient

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

Replay preview

3D gradient

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

Replay preview

3D isometric

A solid isometric 3D bar with shaded faces.

Replay preview

Animated

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

Replay preview

Vertical (horizontal layout)

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

Replay 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.