The Nubisco chart family provides a small, opinionated set of data-visualization primitives that share the design system's typography, color palette, and theming. Charts are rendered as inline SVG, support light and dark themes out of the box, and resize responsively to their container.
<template>
<NbBarChart title="Quarterly revenue" :series="series" />
</template>
<script setup lang="ts">
const series = [
{
name: 'EU',
data: [
{ x: 'Q1', y: 32 },
{ x: 'Q2', y: 41 },
{ x: 'Q3', y: 38 },
{ x: 'Q4', y: 47 },
],
},
{
name: 'NA',
data: [
{ x: 'Q1', y: 28 },
{ x: 'Q2', y: 33 },
{ x: 'Q3', y: 36 },
{ x: 'Q4', y: 44 },
],
},
]
</script>Available chart types
| Component | Use for |
|---|---|
NbBarChart | Comparing discrete categories side by side |
NbGanttChart | Visualizing project timelines, dependencies, and milestones |
NbInterpolationChart | Interactive piecewise-linear mapping calibration |
NbLineChart | Showing trends over time or any ordered dimension |
NbPieChart | Communicating part-to-whole relationships across few buckets |
More chart types (Area, Radar, Bubble, Histogram, Heatmap, Tree, Network, Alluvial) are on the roadmap, see the Roadmap tab.
Shared API
Every chart component accepts the following common props so dashboards can be built without learning a new contract per chart:
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | - | Optional chart title |
subtitle | string | - | Optional secondary line under the title |
height | number | string | 280 | Container height (px when number) |
showLegend | boolean | true | Render a legend below the chart |
showTooltip | boolean | true | Show interactive hover tooltip |
showGrid | boolean | true | Render axis gridlines (cartesian charts) |
colors | string[] | palette | Override the categorical palette |
Cartesian charts (NbBarChart, NbLineChart) accept a series: IChartSeries[] prop; categorical charts (NbPieChart) accept a data: ICategoricalDatum[] prop.
Theming
Charts paint through eight semantic role tokens, --nb-c-chart-1 to --nb-c-chart-8, which default to Nubisco ramps and follow the light / dark theme with no configuration. A white-label product redefines those eight on :root and every chart in the app follows, including ones nobody has written yet. They used to name the brand ramps directly, which meant an override could not reach them.
To colour one chart specifically, pass colors with any CSS color string, including raw hex, rgb, or your own custom properties.
Choosing between categorical, sequential and diverging scales, how many series colour can carry, the measured contrast and colour-vision numbers, and the full white-label recipe are on Chart Color.
<template>
<NbLineChart
:series="series"
:colors="['var(--nb-c-info)', 'var(--nb-c-success)', '#f59e0b']"
/>
</template>