Emergency triage
Patients waiting at each triage level, and their wait against its target. Good for emergency room screens and reports.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
const spec = {
type: 'triage',
data: [
{ level: 1, waiting: 1, wait: 1, target: 1 },
{ level: 2, waiting: 1, wait: 12, target: 10 },
{ level: 3, waiting: 6, wait: 40, target: 60 },
{ level: 4, waiting: 13, wait: 107, target: 120 },
{ level: 5, waiting: 4, wait: 116, target: 240 },
],
};
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 triage takes:
/** An emergency room: patients waiting at each triage level, and their wait against its target. */
interface TriageSpec extends Base {
type: 'triage';
data: TriageLevel[];
}
interface TriageLevel {
/** 1 (immediate) to 5 (not urgent). */
level: 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