3D timeline
Events on posts along a road that goes away from the eye. Good for a roadmap or the story of a project, on a slide.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
import 'nervure/3d';
const spec = {
type: 'timeline3d',
events: [
{ label: 'Idea', date: '2026-01-15', text: 'Late' },
{ label: 'First sketch', date: '2026-03-05', text: 'Late' },
{ label: 'Prototype', date: '2026-05-04', text: 'On time' },
{ label: 'Beta', date: '2026-07-17', text: 'Late' },
{ label: 'Launch', date: '2026-09-07', text: 'On time' },
{ label: 'Version 2', date: '2026-11-06', text: 'On time' },
],
};
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 timeline3d takes:
/** Events along a road that goes away from the eye, the first one in front. */
interface Timeline3DSpec extends Base3D {
type: 'timeline3d';
/** A `date` (a Date, a time in ms, a year or an ISO text) places an event; without one, they are evenly spaced. */
events: { label: string; date?: string | number | Date; text?: string; color?: string }[];
/** Colour of the road. */
color?: string;
}
interface Base3D extends Base {
/** Where the eye stands, in degrees: `azimuth` turns around the vertical axis, `elevation` rises from the floor (0) to straight above (90). */
view?: { azimuth?: number; elevation?: number };
/** Drag the chart, or focus its turn button and use the arrow keys, to turn the view. Home on the button goes back to `view`. */
rotate?: boolean;
}Style it
- Colours:
theme.palette,chart.setColor(name, colour), or--nervure-palettein your CSS. More - Marks:
[data-series="name"], parts:[data-part="axes"],legend,series. What you change is kept in exports. - Movement:
animation: falsedraws at once. More - Files:
chart.download('png'),svg,csv. More