Toggle Sidebar B
header.lightDarkMode 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.

Horizontal

Flip the orientation with the horizontal prop.

Multiple

Grouped bars for multiple series.

Stacked

Stack multiple series with the stacked prop.

Interactive

Toggle between series; totals update in the header.

Basic (card)

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

Multi-dataset (card)

Grouped series in a card with a trend badge.

Diagonal stripe pattern

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

Striped and solid

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

Dotted pattern

An elegant dotted SVG pattern fill with a matching stroke.

Dotted and solid

Compare a dotted series against a solid one.

Gradient

A soft vertical gradient fill via a linearGradient def.

Duotone gradient

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

3D gradient

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

3D isometric

A solid isometric 3D bar with shaded faces.

Animated

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

Vertical (horizontal layout)

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

API Reference

Props, events, and slots for each sub-component.

ChartBar

Props

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

Props

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

Props

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.

Events

EventDescription
update:activeFires with the hovered bar's value (or null on leave).

ChartBarInteractive

Props

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.