Halving and supply
Coins issued against the cap, the reward of each era, and the blocks left to the next halving. Good for explaining the supply of a coin with halvings.
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: 'halving', height: 920510 };
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 halving takes:
/** Supply of a coin that halves its reward on a schedule: coins issued, reward of each era, the next halving. */
interface HalvingSpec extends Base {
type: 'halving';
/** Current block height. */
height: number;
/** Reward of the first era: 50 by default. */
reward?: number;
/** Blocks between two halvings: 210 000 by default. */
interval?: number;
/** Minutes between blocks: 10 by default. */
minutes?: number;
/** Year of the first block: 2009 by default. */
start?: number;
/** `BTC` by default. */
symbol?: string;
/** Eras drawn: 8 by default. */
eras?: 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