Foundation ComponentReact 18 & 19Zero Runtime CSS

Chart

Original SVG charts. Four views, one small API and every value within reach.

Interactive preview

A week in your workspaceSample data · built with DEVVY UI
A week in your workspace017345168Mon: 24Tue: 38Wed: 31Thu: 56Fri: 44Sat: 68Sun: 61MonWedFriSun
View data
A week in your workspace
LabelValue
Mon24
Tue38
Wed31
Thu56
Fri44
Sat68
Sun61

Usage

import { Chart } from "@devvy-ui/react";

<Chart title="Weekly activity" type="bar" data={[
  { label: "Mon", value: 24 },
  { label: "Tue", value: 38 },
  { label: "Wed", value: 31 },
]} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
datareadonly ChartDatum[]requiredLabel/value pairs; finite numbers.
title / descriptionstringrequired / —Visible chart caption and optional context.
typebar | line | area | donutbarSingle-series visualization.
valueFormatter(number) => stringcompact numberFormats axes and values.
dataLabel / emptyLabelstringView data / No data to display.Disclosure and empty-state copy.

Accessibility & behavior

Platform Behavior & Guidelines

An accessible named SVG, visible caption and native data-table disclosure. Bar, line and area support signed values. Donuts require nonnegative values and a positive finite total. Nonfinite values are omitted; unsupported/empty data shows the empty state. Axis labels shorten visually; the table retains full labels. Single series; aggregate large datasets before rendering. Theme with --dvy-chart-color and --dvy-chart-series-1 through -4. No new dependency or animation.

Source ownership

Add the audited implementation directly into your repository with the CLI:

node /path/to/devvy-ui/packages/cli/src/cli.mjs add chart

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Chart.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.