Charts

Chart Containers

Props shared by AreaChart, BarChart, LineChart, ComposedChart, ScatterChart, PieChart, RadarChart, RadialBarChart and FunnelChart

A chart container (<BarChart>, <PieChart>, …) holds the data, the size and the layout, and renders its series, axes, tooltip and legend from the default slot. The tables below list the container props once. Each chart page lists only what is specific to that chart.

Common props

All nine containers accept these props.

PropTypeDefaultDescription
dataArray[]Rows shared by all series
width / height / aspectnumberfills the parentSize. See Chart size
initial-dimension{ width, height }{ width: 640, height: 360 }Size before the first measurement. See Chart size
margin{ top, right, bottom, left }{ top: 5, right: 5, bottom: 5, left: 5 }Space between the chart edge and the plot area
layout'horizontal' | 'vertical''horizontal'Direction of the category axis. Polar charts set their own layout
stack-offset'none' | 'expand' | 'positive' | 'sign' | 'silhouette' | 'wiggle''none'How stacked series are offset; expand gives 100 % stacks; use sign when stacked values can be negative
reverse-stack-orderbooleanfalsePut the last stacked series at the base
sync-idstring | number—Charts with the same id share the tooltip and the Brush range
sync-method'index' | 'value' | function'index'How a synced chart finds the active point: by row index, by category value, or with your function
is-animation-activebooleantrueDefault animation setting for all series
transitionChartTransitionmotion tokensDefault timing for all series
titlestringthe chart type, for example 'Bar chart'Accessible name
descstring—Accessible description
accessibility-layerbooleantrueKeyboard navigation and screen-reader support
tab-indexnumber0Tab order of the chart, with the accessibility layer
rolestring'application', or 'img' without the accessibility layerARIA role of the chart
idstringgeneratedStable id for the chart's SVG ids
compactbooleanfalseRender only the SVG, without the wrapper and the HTML tooltip and legend
class, style—Set on the chart wrapper

Chart pointer events (@click, @mousemove, …) are listed in Events and v-model.

Bar sizing

AreaChart, BarChart, LineChart, ComposedChart, ScatterChart and RadialBarChart also accept these props. A barSize or maxBarSize on a series overrides them.

PropTypeDefaultDescription
bar-category-gapnumber | string'10%'Space between categories, in px or percent of the category width
bar-gapnumber | string4Space between bars of one category: px, or 'N%' of the category width
bar-sizenumber | string—Width of every bar; without it, bars share the category width
max-bar-sizenumber—Upper limit of the bar width

Polar props

PieChart, RadarChart and RadialBarChart also accept these props. Percent strings are relative to the plot area.

PropTypeDefaultDescription
cx, cynumber | string'50%'Center of the chart
inner-radiusnumber | string0Inner radius
outer-radiusnumber | string'80%'Outer radius
start-anglenumber0 (Pie, RadialBar), 90 (Radar)Start angle in degrees
end-anglenumber360 (Pie, RadialBar), -270 (Radar)End angle in degrees

Synchronized charts

Give two charts the same sync-id. Hovering one chart moves the tooltip in the other.

<template>
  <LineChart
    :data="data"
    :height="150"
    sync-id="week"
  >
    <Line data-key="visits" />
    <Tooltip />
  </LineChart>
  <AreaChart
    :data="data"
    :height="150"
    sync-id="week"
  >
    <Area data-key="signups" />
    <Tooltip />
  </AreaChart>
</template>
Copyright © 2026