Skip to main content

Handcrafted, agentic-ready, themeable, modular, lightweight charts

Get Started
Unovis 1.8 is here with new features, smaller bundles and faster builds
Framework Independent

Framework Independent

Use with React, Angular, Svelte, Vue, Solid,
or without any UI framework.

Smooth

Smooth

We pay attention to how the library components look and how they react to data changes. Styles are customizable via CSS variables.

Built with Typescript

Built with Typescript

Unovis is built with TypeScript, with its options documented in its types for your editor and your AI agent. Import individual components to keep your bundle small.

import React, { useCallback } from 'react'
import { VisXYContainer, VisAxis, VisArea, VisXYLabels, VisCrosshair, VisTooltip, VisBulletLegend } from '@unovis/react'
import { data, formats, DataRecord, getLabels, gradients, legendItems, svgDefs, tooltipTemplate } from './data'

const labels = getLabels(data)
const x = (d: DataRecord): number => d.year
const y = formats.map(f => (d: DataRecord): number => d[f])
const color = (_: DataRecord[], i: number): string => gradients[i]

export default function StackedArea (): JSX.Element {
return (
<>
<VisBulletLegend items={legendItems}/>
<VisXYContainer data={data} height={'50vh'} svgDefs={svgDefs}>
<VisArea x={x} y={y} color={color}/>
<VisAxis type='x' label='Year' numTicks={10} gridLine={false} domainLine={false}/>
<VisAxis type='y' label='Revenue (USD, billions)' numTicks={10}/>
<VisXYLabels
x={useCallback((d: DataRecord) => labels[d.year] ? d.year : undefined, [])}
y={useCallback((d: DataRecord) => labels[d.year]?.value, [])}
label={useCallback((d: DataRecord) => labels[d.year]?.label, [])}
backgroundColor={useCallback((d: DataRecord) => labels[d.year]?.color ?? 'none', [])}
clusterBackgroundColor="none"
clusterLabel={() => ''}
/>
<VisCrosshair x={x} yStacked={y} template={tooltipTemplate}/>
<VisTooltip/>
</VisXYContainer>
</>
)
}

Bundle size

The same chart in every library: a React line chart with smooth lines, a legend, a tooltip, a crosshair and animation, minified and gzipped. Unovis takes 52.4 KB, the smallest of the 9 libraries we measured.