Charts / Bar chart

Charts

Bar chart

Magnitude compared across periods or categories: flat columns from zero, a small radius at the data end only, a light baseline.

import { EcoBarChart } from "vue-ecosphere"

Columns

Every cap carries its value, so the chart needs no y-axis and no gridlines. Hover or focus a column for the change on the month before.

Requests closed

7116%

Against last period

The dark line across each column is last year’s figure. The dashed gridlines carry the scale, so the caps stay unlabelled.

Closed, against last year

This year
Last year

Stacked

Parts of a whole over a few periods, separated by a 2px gap; only the top segment is rounded. The total on each cap, the latest parts in the legend.

Requests by outcome

Replied42
Awaiting review21
Blocked8

Horizontal

The form for long category names: nothing is rotated.

Open requests by team

Emphasis and a target

October in accent, the other months in s-rest, and the target as a hairline. Only the month the chart is about carries its value.

Stacked over time, interactive

A year of periods keeps a y-axis and prints only the latest total. Focus a column: the others dim and the ChartTooltip lists every family, top segment first. Chart | Table shows the same figures as rows.

Revenue by product family

Before tax, November 2025 – October 2026

Hardware$41.2k
Services$22.1k
Support$11.6k

Narrow and empty

At 360px the bands narrow, bars keep 60% of them and labels thin to every other month. With no data the figure is replaced at the chart's height.

Revenue by product family

At 360px: every other month labelled

Hardware$41.2k
Services$22.1k
Support$11.6k

Revenue by product family

No data

No revenue recorded yet

Columns appear after the first month closes.

API

NameTypeDefaultDescription
labelsstring[]—Period or category labels on the axis.
data(number | null)[]—One series. Bars always grow from zero; null is a gap, never a zero.
seriesChartSeries[]—Stacked series, bottom segment first (largest at the bottom), in s1, s2, s3.
form"columns" | "ghost" | "stacked" | "horizontal" | "emphasis""columns"Each form answers a different question. Defaults to stacked when series is given.
ghost(number | null)[]—Last period's values: a ghost line 6 units wider than the bar on each side.
name / ghostNamestring"This year" / "Last year"Legend names for the ghost form.
currentnumber | stringlatestHighlighted label (xl on) and, in the emphasis form, the one bar in accent.
target / targetLabelnumber / string—A target hairline with its label; the tooltip gives the distance from it.
titlesstring[]—Long period names for the tooltip and hit labels (“October 2026”).
unitstring—Words after a figure: “requests closed”.
valueFormat / capFormat / tickFormat(v: number) => string—Full figures; cap labels and legend values; y ticks.
axisbooleanghost, or stacked past 8A y-axis with nice ticks (1, 2, 2.5 or 5 × 10ⁿ, about four steps). Caps or axis, never both.
height / widthnumber234 / measuredviewBox height; the width follows the frame (ResizeObserver) unless fixed.
title / subtitle / captionstring—chart__head and a closing chart__sub. Slots head, actions and footer override them.
ariaLabelstring—Label of the svg group. Each band's hit area has its own complete label.
emptyTitle / emptyTextstring—chart__empty at the chart's height when there is no data.
tooltip / pointLabel(i: number) => …—Override the ChartTooltip card or the hit label for a band.
@active-change(i: number | null)—The band under the pointer or focus.