Skip to content

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:

ts
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:

html
<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 ​

TypeWhat it showsData
meteogramTemperature line, rain bars (mm) and a wind arrow for each stepdata: [{ label, temperature, rain, wind, gust, direction }], feels
windrose% of the time the wind blows from each direction, by speed classclasses, data: [{ direction, values }], calm
sunpathArc of the sun, sunrise and sunset, twilights, moon, nowsunrise, sunset, dawn, dusk, moonrise, moonset, now, previous
barometerPressure in hPa on a dial, with the tendency over three hoursvalue, previous, since

Nature ​

TypeWhat it showsData
treeringsOne ring a year, as wide as its growth in mmdata: [{ year, width }], events
riverlevelRiver height with flood levels and a forecastdata: [{ label, level }], thresholds, forecastFrom
airqualityAn index on its bands (the United States bands by default) and its pollutantsvalue, pollutants, bands
speciesSmall figures for the counts of a survey, and the changedata: [{ name, kind, count, previous }], each

Electricity ​

TypeWhat it showsData
loadcurveLoad over a day (MW), peak hours, price (€/MWh)data, every, price, peak
genmixGeneration stacked by source, demand on topsources: [{ name, kind, data }], demand, every, start
plantboardUnits as tiles: state, output and capacitydata: [{ name, site, kind, capacity, output, state }]
powermeterMeter index on rolling digits, use since a reading, registersvalue, previous, registers, power
tariffclockTariff periods on a 24-hour dial, use of each hour, nowperiods: [{ 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 ​

TypeWhat it showsData
reactorControl rods and fuel, power %, coolant °C, pressure barpower, rods, temperature, pressure, nominal, state
doserateDose rate in µSv/h on a logarithmic dial, dose in mSv against a limitvalue, total, limit, bands
reactorfleetEach reactor over weeks, and the power the fleet has leftperiods, data: [{ name, capacity, states }]

The bands of doserate are rough usual levels, not a rule: give your own with bands.

Oil and gas ​

TypeWhat it showsData
crudespreadTwo crude prices ($/bbl) and their gapdata: [{ label, first, second }], names
tankfarmTanks in 3D filled to their leveldata: [{ name, volume, capacity, product }], view
refineryProducts of a barrel, light at the topdata: [{ name, share }], input
gasstorage% full over the year against past years and a targetperiods, data, low, high, average, target
degreedaysHeating degree days against the normal, gas useddata: [{ label, degreeDays, normal, use }], base

Everyday life ​

Transport ​

TypeWhat it shows
delaysLines 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).
modeshareThe 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.
journeysSeveral 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.
ts
{ type: 'delays', hours: ['07', '08', '09'], lines: [{ name: 'A', delays: [1.2, 6.5, 3] }, { name: 'B', delays: [0.4, 2.1, null] }] }

Cars ​

TypeWhat it shows
carclusterSpeed 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.
evchargeState of charge and charging power over a session, the energy added, the minute the target (80 %) is reached and, with a price, the cost.
carserviceWork 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 ​

TypeWhat it shows
priceladderDistricts placed on one ladder by their price per m², from green to red, their low–high range beside, and a mark: the home studied.
yieldgridThe 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.
lots3dA 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 ​

TypeWhat it shows
amortizationA loan paid back in equal monthly payments: principal, interest and insurance of each year, and what is left to pay on its own scale.
debtratioMonthly 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.
borrowingThe 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 ​

TypeWhat it shows
halvingCoins 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.
volconeFrom daily prices: the range of past volatility (put on a year) over several windows, its middle half and median, and where it stands now.
walletWhat each coin is worth, its share on a ring, its move over a day and, with cost, the gain or loss.

Money ​

TypeWhat it shows
compoundSavings that grow with interest added each month: what was put in and what the interest added, with the year a goal is reached.
envelopesOne 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.
fxboardAn amount of the base currency in several others, with the move and the recent path of each rate.

Products ​

TypeWhat it shows
specmatrixProducts 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.
ratingsThe average in stars, how many reviews gave 5 to 1 star, and scores out of 5 by aspect.
pricetrackThe price over time, its promotions, and the real cut of each against the lowest price of the window days before (30).
stocklevelStock 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.