Skip to content

Pipe chart ​

Pipes that narrow, leaks included, with a moving flow. Good for a process that loses something on the way.

The smallest code that works. change the code, then press Run

In your framework

import { Chart } from 'nervure/react';

const spec = {
  type: 'pipeline',
  flow: true,
  data: [
    { name: 'Visitors', value: 7872 },
    { name: 'Sign-ups', value: 3385 },
    { name: 'Trials', value: 2065 },
    { name: 'Customers', value: 1342 },
    { name: 'Subscribers', value: 483 },
  ],
};

export default function Example() {
  return <Chart spec={spec} style={{ height: 340 }} />;
}

Or import this chart alone: what each import weighs.

Options

Beside the fields shared by every chart (title, format, heading, export…), type pipeline takes:

/** Pipes from stage to stage; what is lost leaks out. */
interface PipelineSpec extends Base {
  type: 'pipeline';
  data: Item[];
  /** Moves the flow without end. */ flow?: boolean;
}

Style it

  • Colours: theme.palette, chart.setColor(name, colour), or --nervure-palette in your CSS. More
  • Marks: [data-series="name"], parts: [data-part="axes"], legend, series. What you change is kept in exports.
  • Movement: animation: false draws at once. More
  • Files: chart.download('png'), svg, csv. More

Close to it