Reactor panel
A reactor with its control rods and fuel, and its power, temperature and pressure beside. Good for teaching, simulators and plant dashboards.
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: 'reactor', name: 'Unit 2', power: 81, rods: 15, temperature: 294.1, pressure: 154.4, nominal: 1300, state: 'running' };
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 reactor takes:
/** The state of a reactor: rods, power, temperature and pressure on one panel. */
interface ReactorSpec extends Base {
type: 'reactor';
/** % of the nominal power. */
power: number;
/** How far the control rods go into the core, in %. */
rods: number;
/** Coolant temperature, °C. */
temperature?: number;
/** Primary pressure, bar. */
pressure?: number;
/** Nominal electric power, MW: the power now is written in MW too. */
nominal?: number;
state?: 'running' | 'starting' | 'stopping' | 'shutdown' | 'refuelling';
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