Skip to content

Product roadmap ​

Work on periods, by theme and by status, with today marked. Good for sharing what is done, under way and planned.

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

In your framework

import { Chart } from 'nervure/react';

const spec = {
  type: 'roadmap',
  periods: ['Q1', 'Q2', 'Q3', 'Q4', 'Q1 next'],
  themes: ['Mobile app', 'Payments', 'Search', 'Support'],
  now: 1.6,
  items: [
    { theme: 'Mobile app', name: 'New design', start: 0, end: 2, status: 'done' },
    { theme: 'Mobile app', name: 'Offline mode', start: 2, end: 4, status: 'risk' },
    { theme: 'Mobile app', name: 'Widgets', start: 1, end: 3, status: 'doing' },
    { theme: 'Payments', name: 'Wallets', start: 0, end: 1, status: 'done' },
    { theme: 'Payments', name: 'Instalments', start: 1, end: 3, status: 'doing' },
    { theme: 'Payments', name: 'Invoices', start: 3, end: 5, status: 'planned' },
    { theme: 'Search', name: 'Filters', start: 0, end: 2, status: 'done' },
    { theme: 'Search', name: 'Suggestions', start: 2, end: 3, status: 'planned' },
    { theme: 'Support', name: 'Chat', start: 1, end: 2, status: 'done' },
    { theme: 'Support', name: 'Help centre', start: 2, end: 5, status: 'planned' },
  ],
};

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

/** Themes in rows and work on periods; `start`, `end` and `now` count periods from 0, halves included. */
interface RoadmapSpec extends Base {
  type: 'roadmap';
  periods: string[];
  themes: string[];
  items: { theme: string; name: string; start: number; end: number; status?: RoadmapStatus; color?: string }[];
  now?: number;
  /** Names of the statuses in the legend. */
  statusLabels?: Partial<Record<RoadmapStatus, string>>;
}

type RoadmapStatus = 'done' | 'doing' | 'planned' | 'risk';

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