Nightingale rose chart
Petals of the same angle, as large as their value. Good for months, directions, and other things that turn.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
const spec = {
type: 'rose',
data: [
{ name: 'Olives', value: 68 },
{ name: 'Honey', value: 49 },
{ name: 'Rice', value: 73 },
{ name: 'Cheese', value: 22 },
{ name: 'Nuts', value: 75 },
{ name: 'Soup', value: 33 },
{ name: 'Coffee', value: 74 },
{ name: 'Juice', value: 8 },
],
};
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 rose takes:
/** Petals of equal angle, as long as their value. */
interface RoseSpec extends Base {
type: 'rose';
data: Item[];
inner?: number;
}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