Theme charts
Theme charts are made for one domain: they know its words, its usual scales and what people look for in it. They are plain SVG like the others, with tooltips, keyboard reading, legends where they help, the light and dark themes, reduced motion and the SVG, PNG, CSV and Markdown exports.
Load them
They are a separate entry, so they do not grow the main file:
import { createChart } from 'nervure';
import 'nervure/themes'; // registers the theme types
createChart(host, { type: 'amortization', amount: 250000, rate: 3.4, years: 20 });
createChart(other, { type: 'barometer', value: 1013.2, previous: 1009.8 });In a page without a bundler, load the browser file after the main one:
<script src="https://cdn.jsdelivr.net/npm/nervure"></script>
<script src="https://cdn.jsdelivr.net/npm/nervure/cdn/nervure.themes.min.js"></script>nervure/lazy knows them too: createChart from nervure/lazy fetches the code of a theme type the first time it is drawn.
Examples, not advice
Some charts draw a rule of their domain: a debt ratio limit (35 % by default, a common French rule), a reference price before a promotion (the lowest of the 30 days before, as European rules ask), a supply schedule with halvings. They are there to read a picture by. They are not financial, legal or technical advice, and every one of them can be changed in the spec.
Weather, nature and energy
The data are yours: nervure draws them and does not compute the weather, an index or a price. Units are written as you give them (unit, priceUnit…); the defaults are said below.
Weather
| Type | What it shows | Data |
|---|---|---|
meteogram | Temperature line, rain bars (mm) and a wind arrow for each step | data: [{ label, temperature, rain, wind, gust, direction }], feels |
windrose | % of the time the wind blows from each direction, by speed class | classes, data: [{ direction, values }], calm |
sunpath | Arc of the sun, sunrise and sunset, twilights, moon, now | sunrise, sunset, dawn, dusk, moonrise, moonset, now, previous |
barometer | Pressure in hPa on a dial, with the tendency over three hours | value, previous, since |
Nature
| Type | What it shows | Data |
|---|---|---|
treerings | One ring a year, as wide as its growth in mm | data: [{ year, width }], events |
riverlevel | River height with flood levels and a forecast | data: [{ label, level }], thresholds, forecastFrom |
airquality | An index on its bands (the United States bands by default) and its pollutants | value, pollutants, bands |
species | Small figures for the counts of a survey, and the change | data: [{ name, kind, count, previous }], each |
Electricity
| Type | What it shows | Data |
|---|---|---|
loadcurve | Load over a day (MW), peak hours, price (€/MWh) | data, every, price, peak |
genmix | Generation stacked by source, demand on top | sources: [{ name, kind, data }], demand, every, start |
plantboard | Units as tiles: state, output and capacity | data: [{ name, site, kind, capacity, output, state }] |
powermeter | Meter index on rolling digits, use since a reading, registers | value, previous, registers, power |
tariffclock | Tariff periods on a 24-hour dial, use of each hour, now | periods: [{ from, to, name, price }], usage, now |
kind gives a source its usual colour: nuclear, hydro, wind, solar, gas, coal, oil, bio, imports, storage, other.
Nuclear
| Type | What it shows | Data |
|---|---|---|
reactor | Control rods and fuel, power %, coolant °C, pressure bar | power, rods, temperature, pressure, nominal, state |
doserate | Dose rate in µSv/h on a logarithmic dial, dose in mSv against a limit | value, total, limit, bands |
reactorfleet | Each reactor over weeks, and the power the fleet has left | periods, data: [{ name, capacity, states }] |
The bands of doserate are rough usual levels, not a rule: give your own with bands.
Oil and gas
| Type | What it shows | Data |
|---|---|---|
crudespread | Two crude prices ($/bbl) and their gap | data: [{ label, first, second }], names |
tankfarm | Tanks in 3D filled to their level | data: [{ name, volume, capacity, product }], view |
refinery | Products of a barrel, light at the top | data: [{ name, share }], input |
gasstorage | % full over the year against past years and a target | periods, data, low, high, average, target |
degreedays | Heating degree days against the normal, gas used | data: [{ label, degreeDays, normal, use }], base |
Everyday life
Transport
| Type | What it shows |
|---|---|
delays | Lines down the side, hours across, each cell coloured by the average delay (on time, a little late, late, very late), and the share on time of each line. late sets the minutes from which a trip is late (5). |
modeshare | The share of each way of travelling (walk, bike, scooter, bus, tram, metro, train, car, carpool, plane), each with its icon, and a compare split under it: a goal or another year. |
journeys | Several ways of making one trip, their legs (walk, wait, ride, drive, bike, park) to scale, with the time, cost and co2 of each; the fastest is marked. |
{ type: 'delays', hours: ['07', '08', '09'], lines: [{ name: 'A', delays: [1.2, 6.5, 3] }, { name: 'B', delays: [0.4, 2.1, null] }] }Cars
| Type | What it shows |
|---|---|
carcluster | Speed and engine speed on two dials with a red zone, the gear, fuel (or the battery with electric: true, and power in kW on the second dial), temperature, range and odometer. |
evcharge | State of charge and charging power over a session, the energy added, the minute the target (80 %) is reached and, with a price, the cost. |
carservice | Work done above the road and work planned below it, along the odometer, the car where it is now and how far the next work is. |
Real estate
| Type | What it shows |
|---|---|
priceladder | Districts placed on one ladder by their price per m², from green to red, their low–high range beside, and a mark: the home studied. |
yieldgrid | The yearly yield of a rental for a range of prices and monthly rents; charges (a share of the rent) gives a net yield, target writes the cells that reach it in bold, mark rings the home studied. |
lots3d | A building in 3D, floor by floor, its lots coloured by sale state (free, reserved, sold), with rooms, area and price in the tooltip. It takes view and rotate like the 3D charts. |
The energy label of a home (classes A to G) is energy, in the main file.
Financing
| Type | What it shows |
|---|---|
amortization | A loan paid back in equal monthly payments: principal, interest and insurance of each year, and what is left to pay on its own scale. |
debtratio | Monthly charges against income on a dial, green under warn (33 %), amber up to limit (35 %), red above; the income cut into the charges and what is left to live on. |
borrowing | The loan one can get for each length in rates, from the income, the charges and the highest ratio, with the deposit and the price aimed at. |
Crypto
| Type | What it shows |
|---|---|
halving | Coins issued against the cap, the reward of each era and the blocks left to the next halving, from the block height. reward, interval, minutes and start describe the schedule. |
volcone | From daily prices: the range of past volatility (put on a year) over several windows, its middle half and median, and where it stands now. |
wallet | What each coin is worth, its share on a ring, its move over a day and, with cost, the gain or loss. |
Money
| Type | What it shows |
|---|---|
compound | Savings that grow with interest added each month: what was put in and what the interest added, with the year a goal is reached. |
envelopes | One envelope for each kind of spending, filled as the money goes; elapsed (the share of the month gone) marks the pace, amber ahead of it, red over budget. |
fxboard | An amount of the base currency in several others, with the move and the recent path of each rate. |
Products
| Type | What it shows |
|---|---|
specmatrix | Products side by side with their price and rating, feature by feature; the best value of each row is marked (better: 'low' for a weight or a price) and the product best in most rows is framed. |
ratings | The average in stars, how many reviews gave 5 to 1 star, and scores out of 5 by aspect. |
pricetrack | The price over time, its promotions, and the real cut of each against the lowest price of the window days before (30). |
stocklevel | Stock over time against its reorder point, safety stock and room, the orders placed and received with their lead time, and the days out of stock. |