Dose rate dial
A dose rate of radiation on a logarithmic dial with its bands, and the dose added up against its limit. Good for radiation monitoring, labs, hospitals and the public around a site.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
import 'nervure/themes';
const spec = { type: 'doserate', value: 0.26, total: 0.37, limit: 1 };
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 doserate takes:
/** A dose rate of radiation on a logarithmic dial, with its bands and the dose added up. */
interface DoseRateSpec extends Base {
type: 'doserate';
/** µSv/h. */
value: number;
/** Bands of the dial: upper bound in µSv/h, name, colour. Usual levels by default. */
bands?: { to: number; name: string; color?: string }[];
/** Dose added up, mSv. */
total?: number;
/** A limit for `total`, mSv: 1 by default (the yearly public limit). */
limit?: 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