3D radar
Radar polygons of several series raised as plates, one above the other. Good for a few profiles over five to eight measures, year after year.
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: 'radar3d',
axes: ['Speed', 'Price', 'Comfort', 'Safety', 'Range', 'Space'],
series: [
{ name: '2024', data: [69, 60, 46, 66, 43, 42] },
{ name: '2025', data: [75, 70, 49, 50, 48, 48] },
{ name: '2026', data: [97, 37, 75, 35, 62, 50] },
],
};
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 radar3d takes:
/** Radar polygons of several series, raised as plates stacked one above the other. */
interface Radar3DSpec extends Base3D {
type: 'radar3d';
axes: string[];
series: Series3D[];
/** Value at the rim: the highest value rounded up by default. */
max?: number;
legend?: boolean | LegendOptions;
}
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;
}
interface Series3D {
name: string;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