Repository navigation
Releases
Releases · BenMacha/nervure
0.12.0
What Chart.js does and nervure did not: events on marks, a tooltip you control, legend options, plugins, stack groups, colours worked out from values, point shapes, richer axes, line segments, and more ways to animate.
Added
- Events on marks:
onClickandonHoverrender options receive the point under the pointer (chart type, series, stack, segment, label, value, index, item of the spec, colour, DOM event);onHovergetsnullwhen the pointer leaves. Enter on a mark reached with the keyboard callsonClick. Works onxy,pie,scatter,radar,heatmap,waterfall,treemap,pack,funneland every chart with tooltips. Vue@click/@hover, ReactonClick/onHover,point-click/point-hoverevents on<nervure-chart>. - Tooltip:
tooltip: false, or{ format, html, position }for every chart;htmlgets anescapehelper and loses scripts and event attributes.showTooltip(series, index),hideTooltip()andsetActive(series, index)on the handle. - Legend:
legendtakes{ position: 'top' | 'bottom' | 'left' | 'right', align, onClick }(returnfalseto keep a series);pieandradartakelegendtoo.legendItems()on the handle, to write a legend of your own withtoggle(). - Plugins:
pluginsrender option andregisterPlugin(), withbeforeDraw,afterDrawandonDestroy, the plot area, the hole of round charts and two layers, under and above the chart.nervure/pluginsshipsplotAreaBorder,centerLabelandemptyState, outside the main bundle. - Stack groups on
xycharts:stackon a series. Withstacked, bars sharing a stack pile up and the stacks stand side by side in each category, with a space between them, vertical or horizontal;stacked: 'percent'fills 100 % stack by stack,totalswrites one total by stack, and the keyboard says the stack. - Colours from values:
colorandcolorsof a series take(value, index, category) => colour(for example red below zero); pie charts takecolor: (value, index, name) => colourand scatter chartscolor: (y, index, label) => colour. The legend and the exports use the first colour worked out. From code only, not from JSON. - Point shapes:
dots: { shape, size }withcircle,square,triangle,diamond,cross,starorrect-rot, on line and area points, scatter points (shape), radar corners (dots) and in the legend. On lines cut into segments, points take the colour of their segment; dashed lines and dashed segments have no points. radius(corner radius of the bars) andbarWidth(share of a category taken by its bars) onxycharts.- Axes:
suggestedMin,suggestedMax,step,ticks,tickFormat(value, index)andgrid(false, or{ dashed, color }) on each axis ofxycharts;scatterand bubbles takexAxisandyAxiswith the same options (log scale included) andcenter: truefor axes crossing at zero. New typeAxisScale. - Lines:
gaps: 'break' | 'join' | 'zero'for missing values of lines, areas and bands (breakstays the default);segmentsdraw a stretch of a series another way (dashed,color,opacity,label), such as a forecast, with every curve, areas, zoom, keyboard reading and export. - Animation: named easings (
linear,ease,ease-in,ease-out,ease-in-out,bounce,elastic),loop: trueto replay the entrance, andline: 'trace' | 'grow' | 'draw'for how the lines ofxycharts come in. Nothing moves or loops for readers who ask for less motion. - Guide pages Events, Tooltip, Legend, Plugins, Series and bars, Axes, and Lines, gaps and segments; gallery samples
bar_stack_groupsandline_points(216 entries).
Changed
- A tap opens the tooltip on touch screens.
radar,heatmapandwaterfallare read mark by mark with the keyboard. - The shared core grew with events, tooltip control and plugins: one chart alone is now 13 to 15 kB gzipped (was 11 to 13), lines and bars 24 kB, the one-file build 178 kB (budget 180 kB).
0.11.0
Added
- Mermaid import,
nervure/mermaid:fromMermaid(text)turns Mermaid diagram text into a spec, and givesnullfor what it does not read, so an app can fall back to Mermaid.parseMermaid(text)also gives the kind of diagram and what was left out. Flowcharts, sequence diagrams, Gantt charts, timelines, mindmaps, pies, user journeys, quadrant charts, entity relationship diagrams, Kanban boards, XY charts and Sankey diagrams; front matter, fences, directives and comments are taken away. XY charts are read as assistants write them too: spaces between thousands, unquoted titles, one value per line, a missingxychart-betaheader. In the browser:cdn/nervure.mermaid.min.js, loaded aftercdn/nervure.min.js. quadrant:xRangeandyRange, the ends of the axes, so the lines between the zones cross at a known value.
Fixed
kanban: no negative card width when many columns share a narrow chart.
0.10.0
Added
- 63 new chart types and one new gallery entry: 214 charts and maps in all (199 types)
- Health (new
healthfamily, 20): blood pressure, glucose, heart rate zones, BMI, growth percentiles, vaccines, medication, pain scale, mood, fever, oxygen saturation, steps, nutrition, cycle wheel, hospital wards, emergency triage, epidemic curve, dental chart, audiogram, lab panel - Places (new
placesfamily, 19): transit map, departures board, stadium, car park, warehouse, meeting rooms, queues, lifts, property card, neighbourhood flower, skyline, bus line, exhibition hall, marina, energy label, travel time rings, route steps, train crowding, train graph - Sport (new
sportfamily, 18): shot map, pass network, touch map, basketball shots, tennis score and serves, swimming, track race, cycling stage, golf, running splits, match timeline, pizza, face-off, win probability, fight card, chess evaluation, medal table - Maps (6): flow, spike, dot density, hexbin, pin and pie maps; choropleth gallery entry for
map
- Health (new
Changed
- The browser one-file build no longer carries the made-up data and the dashboard templates: they are in
cdn/nervure.samples.min.js, to load aftercdn/nervure.min.jsfornervure.sample()andnervure.template(). Imports fromnervure/samplesandnervure/templatesare unchanged. - Budget of the one-file build: 180 kB gzipped (173 kB with 199 types).
- The thresholds of the health charts (blood pressure, BMI, hearing loss, fertile window) are general display rules, not medical advice.
0.9.0
Added
- 47 new chart types and 4 new gallery entries: 150 charts and maps in all (136 types)
- Distribution: density, cumulative distribution (
ecdf), Q-Q plot, raincloud, Wilkinson dot plot, strip plot, density contours, regression with its confidence band, forecast fan; bubble chart sample - Comparison: diverging bars, range bars, barcode, Cleveland dot plot, circular bars, small multiples (
facet), bubble matrix, scorecard, nested bars; 100 % stacked bars (stacked: 'percent'onxy) - Finance and time: point and figure, market depth, volume profile, drawdown, monthly returns, time spiral, Gantt with dependencies, milestones, 24-hour clock (new
timefamily) - Flows and diagrams: alluvial, nested circle packing, adjacency matrix, tidy tree, swimlane, customer journey, pyramid, decision tree, roadmap, SWOT, work breakdown structure
- Domains and maps: activity rings, battery, weather forecast, league table, sleep stages, elevation profile, seat map, moon phases, Dorling cartogram; bubble map and globe samples
- Distribution: density, cumulative distribution (
- Reading: linked cursors between charts (
sync,syncZoom, also for dashboards), time axis onxy(xScale: 'time'), keyboard reading of every mark with a live region, data table beside a chart (table) - Dense scatter plots painted on a canvas (
render: 'canvas' | 'auto'), with hover, click and export nervure/render: any chart as an SVG string on a server, without a browser;toMarkdown(spec)- Markdown export (
toMarkdown(), toolbarmd) and Figma export (toSVG({ figma: true }),copyForFigma(), toolbarfigma) - PHP packages:
benmacha/ux-nervure(Symfony UX: Twig component, Stimulus controller, chart builder) andbenmacha/laravel-nervure(Blade component,@nervureScripts, Livewire support) - Home page: the leaf of the logo, animated
Changed
- The one-file build grows to 128 kB gzipped (budget 132 kB); one chart alone is 11 to 13 kB, with the new reading features in the core
0.8.0
Added
thinon lines, areas and bars: long series keep their peaks and dips with far fewer points- Kagi chart (
kagi): a price line that turns only on a large enough move, thick above the last high, thin below the last low - Kanban board (
kanban): columns of cards with tags, people and a limit of work per column - Shaded zones on lines and bars (
zones): a period or a range of values - Progress bars: a mark (
target) and a second line (detail) on each bar - Gauges: several marks (
target: [100, 90]), and a figure that follows the size of the gauge (figureSizeto set it)
Fixed
- SVG export: the namespace was written twice in some engines, which gave a file other programs refused
- Shares of pies, funnels and sunbursts no longer take the format of the values (no more "12,5 € %")
- The marks of a gauge stay on its band and no longer cross the figure
0.7.0
Added
- 13 charts by domain: pitch, circuit, tournament bracket, podium, ranking, bar race, body, organ, heartbeat, floor plan, building, table plan, parliament
- Zoom and drag for any chart (
zoomoption), and for prices with axes drawn again - Dashboard templates by trade (
nervure/templates): real estate, restaurant, sport, health, business, finance, education, logistics - True sizes on maps:
equalEarthandgallPetersprojections,area,areaOf - Animated picture in the readme
0.6.0
Added
- Figures that count and stop exactly (
nervure/figure,<nervure-figure>,Figurein React,NervureFigurein Vue); the figures ofkpi,gauge,liquid,speedometer,thermometerandprogresscount too - Formats by options: currencies, percentages, units, short numbers from a threshold with your letters
- Comparisons with arrows: last year, a target, anything, in percent or in value
Changed
formattakes a function or options
0.5.0
Added
- MCP server for AI assistants (
npx -y nervure), a skill and a Claude Code plugin - Documentation site: a page for each chart with code that runs, a page for each map, an editor, comparisons, guides for Symfony and Laravel, brand page
- The 24 governorates and the delegations of Tunisia, places without regions, ISO codes and subregions of every country
- Sharing images for each page
Fixed
- Steep ribbons of a sankey keep their width
- The export button no longer covers the last tick of a right axis
0.4.0
Added
- 62 chart types: finance, distribution, comparison, circular, flow, diagrams, grids and maps
- Map files: world, continents, regions of every country, French departments and municipalities (
nervure/maps) - Dashboards with linked legends and movable cards (
nervure/dashboard) - Stimulus controller for Symfony UX, Rails and Laravel (
nervure/stimulus) - Animation options: speed, duration, delay, stagger, easing, effect, and when to start;
play() - Export menu, CSV, and a title, a subtitle and a caption written in the file only
- Themes by name,
--nervure-*CSS variables; styles of the page are kept in exports - Legend that shows and hides series, zoom by dragging, log scale
nervure/lazy, which fetches a chart type the first time it is drawn, andnervure/corewith the charts you pickregisterChartfor your own chart types, and sample data for each type (nervure/samples)
Changed
- One file for each chart; strict lint, types and a size budget
- The CDN file is built for each release and no longer kept in the repository
0.3.0
Added
- Vue component, Svelte action,
<nervure-chart>web component; the React component is ready for Next.js - Live data:
live,poll,events,socket,append, with retries, pause in hidden tabs and throttling eventStreamfor servers that speak WebResponseobjects- One-file build for CDNs (
cdn/nervure.min.js) refresh, to draw new data without animation- Documentation site, playground and
llms.txt
Changed
updatemerges its options with the previous ones