Skip to content

Work breakdown structure ​

A project cut into parts and sub-parts, with their codes. Good for planning a project and sharing out the work.

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

In your framework

import { Chart } from 'nervure/react';

const spec = {
  type: 'wbs',
  root: {
    name: 'New website',
    children: [
      { name: 'Plan', done: 1, children: [{ name: 'Goals', done: 1 }, { name: 'Budget', done: 1 }] },
      {
        name: 'Design',
        done: 0.7,
        children: [
          { name: 'Sitemap', done: 1 },
          { name: 'Mock-ups', done: 0.6, children: [{ name: 'Home' }, { name: 'Product page' }] },
        ],
      },
      { name: 'Build', done: 0.1, children: [{ name: 'Front end' }, { name: 'Back end' }, { name: 'Tests' }] },
      { name: 'Launch', done: 0, children: [{ name: 'Training' }, { name: 'Go live' }] },
    ],
  },
};

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 wbs takes:

/** The work of a project broken down, from the top, with its codes (1, 1.1, 1.2…). */
interface WbsSpec extends Base {
  type: 'wbs';
  root: WbsNode;
}

interface WbsNode {
  name: string;

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