Gallery

Every mark the package draws, live.

Every preview is a <Chart> with one definition. Tab into any of them and use the arrow keys.

Bars

barY and barX. Series stack by colour; group: true puts them side by side; projected hatches the bars that are pencilled in rather than recorded.

Stacked by colour

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Projects and bookings per month
monthProjectsBookings
January 20262418
February 20263122
March 20262825
April 20263530
May 20264236
June 20263833

On their side

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Projects per city
projectsProjects
Paris51
Lyon35
Nantes28
Lille19

Projected bars, and a rule before a column

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Projects per month, the last two projected
monthProjects
January 202624
February 202631
March 202628
April 202635
May 202642
June 202638

tickY puts a short stroke on each bar (a target per month), tickX one per value along a category (a strip plot).

Lines and areas

lineY, lineX, areaY, areaX. A gap in the data is a gap in the line; areas stack by colour, and from/to draw a band between two values.

Stacked areas

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Projects and bookings per month
monthProjectsBookings
January 20262418
February 20263122
March 20262825
April 20263530
May 20264236
June 20263833

Round marks

arc (a pie), donut, radialBar, radar, funnel.

Donut

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Projects per city
cityprojects
Paris51 (38.3%)
Lyon35 (26.3%)
Nantes28 (21.1%)
Lille19 (14.3%)

Radar

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Two profiles compared
axisSeriesscore
SpeedTeam A4
SpeedTeam B9
QualityTeam A6
QualityTeam B8
CostTeam A8
CostTeam B7
ScopeTeam A4
ScopeTeam B6
RiskTeam A6
RiskTeam B5

Funnel, with the conversion from each step

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: From visit to booking
stepcount
Visits4,200
Sign-ups980 (23.3%)
Projects610 (62.2%)
Bookings240 (39.3%)

Statistics

histogram, boxY, violinY, ridgeline, dodgeY (a beeswarm), waffleY, differenceY, regressionY, hexbin, cell — written in-house, no dependency.

Box plots

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Days per stage
stageDays
Design2.33 (1.48 – 3.92)
Build5.02 (3.56 – 6.4)
Review7.96 (6.18 – 8.87)

Histogram

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Days per task
xTasks
1 – 219
2 – 314
3 – 416
4 – 511
5 – 613
6 – 713
7 – 87
8 – 914
9 – 109
10 – 114

Regression over a scatter

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Hours against size
SizeHours
54.0125.03
45.2317.85
4917.56
59.9929.9
48.2418.03
23.547.85
74.6950.51
84.858.1
76.2953.54
96.7272.69
85.9838.47
31.1427.75
24.2129.39
14.5216.03
28.68.29
70.0646.67
57.644.18
34.832.35
57.9637.88
52.1621.04
27.6717.03
83.4942.62
49.2829.3
54.1641.4
30.3716.09
22.6726.82
80.7852.74
53.4737.54
48.7123.81
36.729.07
90.0561.08
80.9652.08
28.169
56.6737.68
53.4925.34
41.8516.79
25.1629.57
22.629.8
58.9522.83
14.72-2.31
68.8230.07
84.3260.89
91.4150.03
38.6214.88
95.6659.93
19.876.95
71.8834.24
18.3125.12
47.5736.55
32.55.49
59.349.99
17.6919.19
42.819.02
45.5717.17
75.7256.18
41.2523.93
80.1638.63
15.580.38
94.4647.97
23.7421.13
86.2762.21
93.3746.32
11.485.46
27.923.09
35.9816.1
93.4971.07
49.8629.05
20.3316.94
55.9426.92
71.5654.24
67.3943.61
35.5423.75
61.239.14
29.926.44
17.281.37
98.0244.36
95.0451.3
11.2121.51
32.0425.59
82.5359.97
21.8611.08
40.3429.46
40.4320.91
52.4721.46
13.22-6.97
94.358.18
87.5352.57
86.4143.48
27.0229.12
10.289.94
98.0448.23
42.6423.31
79.7542.03
51.8644.54
72.5546.67
72.0440.43
51.9125.13
63.3137.32
87.0545.19
78.8436.82
16.5613.27
92.0569.85
95.5245.71
19.712.13
10.996.32
49.2215.39
75.6653.74
50.8739.42
61.4631.44
28.3531.12
67.7429.96
73.341.82
11.1514.07
22.171.05
16.5410.65
26.1829.83
51.1727.76
27.6123.81
46.4924.86
28.359.4

Heatmap

Arrow keys to move through the values, Enter to pin, Escape to leave.
010
Data: Bookings per day and hour
dayhour
Mon · 9h0
Mon · 11h5
Mon · 14h10
Mon · 16h4
Tue · 9h3
Tue · 11h8
Tue · 14h2
Tue · 16h7
Wed · 9h6
Wed · 11h0
Wed · 14h5
Wed · 16h10
Thu · 9h9
Thu · 11h3
Thu · 14h8
Thu · 16h2
Fri · 9h1
Fri · 11h6
Fri · 14h0
Fri · 16h5

Hierarchies, flows and maps

Each behind its own subpath, with the d3 layout it needs: @voila.dev/chart/hierarchy (treemap, sunburst, tree), @voila.dev/chart/sankey, @voila.dev/chart/force (forceGraph), @voila.dev/chart/geo (projection, geoShape, geoDot), @voila.dev/chart/contour (density2d), @voila.dev/chart/voronoi.

Treemap

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: Projects per team and type
xSeriesProjects
Web › SitesProjects40
Web › AppsProjects25
Mobile › iOSProjects18
Mobile › AndroidProjects14
Data › ReportsProjects12

Sankey

Arrow keys to move through the values, Enter to pin, Escape to leave.
Data: From visit to booking
xy
Visits → Sign-ups980
Sign-ups → Projects610
Projects → Bookings240
Projects → Dropped370
Visits980
Sign-ups980
Projects610
Bookings240
Dropped370
import { geoDot, geoShape, projection } from "@voila.dev/chart/geo";
 
defineChart({
	projection: projection("france", { domain: regions }),
	marks: [
		geoShape(regions.features, { name: (r) => r.properties.nom, color: (r) => r.properties.missions }),
		geoDot(cities, { longitude: "lon", latitude: "lat", name: "city", r: "missions" }),
	],
});