Podium
First, second and third, with pictures. Good for results and prizes.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
const spec = {
type: 'podium',
unit: ' s',
data: [{ name: 'Ines', value: 58.1 }, { name: 'Nour', value: 60.5 }, { name: 'Adam', value: 63.5 }],
};
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 podium takes:
interface PodiumSpec extends Base {
type: 'podium';
/** First, second, third. */
data: { name: string; value?: number; image?: string; color?: string }[];
unit?: 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