Skip to content
nervurejsPublic

About

nervure, JavaScript charts for React, Vue, Svelte, Angular and HTML: 230 animated SVG charts, maps, diagrams and 3D charts, live data, exports, Mermaid import, no dependency. MIT.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

255 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nervure

nervure, JavaScript charts for React, Vue, Svelte, Angular and HTML.
295 animated SVG charts, maps and diagrams (272 types), live data, dashboards, SVG, PNG and CSV export. No dependency. Symfony and Laravel too.

Documentation · Charts · Editor · AI assistants · Live data

CI npm MIT license

Charts drawn by nervure

Why nervure

  • Plain SVG. No canvas, no virtual DOM, nothing to install beside it. Style it, inspect it, print it.
  • Animated. Charts draw themselves once, and stay still for people who ask for reduced motion.
  • Yours to change. Palette, colours by name, titles, labels, reference lines and notes, from the spec or later from code.
  • Careful with labels. They skip, shorten, turn or move apart instead of overlapping.
  • Safe and accessible. Data is never parsed as HTML. Charts are described to screen readers, and clickable marks work with the keyboard.
  • Exports. SVG and PNG, including your own header or watermark.

Install

npm install nervure
yarn add nervure
pnpm add nervure
bun add nervure
deno add npm:nervure

Or one script tag:

<script src="https://cdn.jsdelivr.net/npm/nervure@0.4"></script>
<script src="https://unpkg.com/nervure@0.4"></script>

Use

import { createChart } from 'nervure';

const chart = createChart(document.querySelector('#chart'), {
  type: 'xy',
  categories: ['Jan', 'Feb', 'Mar', 'Apr'],
  legend: true,
  series: [
    { name: 'This year', data: [12, 18, 25, 31] },
    { name: 'Last year', data: [10, 14, 20, 24], dashed: true },
  ],
});

The element needs a height; the chart follows its size.

Framework Import
JavaScript, TypeScript nervure
React, Next.js, Remix, Gatsby nervure/react
Vue 3, Nuxt nervure/vue
Svelte, SvelteKit nervure/svelte
Angular, Solid, Astro, Lit, plain HTML nervure/element: <nervure-chart>
Symfony UX and Turbo, Rails, Laravel nervure/stimulus, or <nervure-chart>
Live data nervure/live, and nervure/server on your server
Dashboards nervure/dashboard
Maps nervure/maps
Mermaid text nervure/mermaid: fromMermaid(text) gives a spec (guide)

Guides: frameworks, Symfony and Laravel, CDN.