Back to start
Aioros.Graphs · d3 in C#

d3's drawing engine, byte for byte

Scales, shapes, curves, hierarchies, chords, sankeys and forces ported from d3 and tested against d3's own output: the same SVG path data, byte for byte, written by C# structs and spans with no allocation per point.
19/19
charts byte-identical to d3
2.7×
faster than d3 over those charts
3.8×
faster across 52 micro-benchmarks
How it is measured
Every ported function runs against fixtures d3 itself generated: ticks and labels bit for bit, SVG path data byte for byte. The timings are geometric means against d3 7.9.0 in Node on the lab's runner (docs/performance-history.md in the Graphs repository, section 6).

Live, from this server

Every sample below is XAML rendered by the server you are reading, and the same XAML runs natively on the desktop.
Each drawing is a small XAML control that calls Aioros.Graphs: on the web its paths are written into the page as SVG, on the desktop they are native geometry.
Force-directed network
Partition sunburst
Chord diagram
Circle packing
Tidy tree
Streamgraph

The XAML

Drawing/Sunburst.cs
var tree = Hierarchy.FromNested(root, n => n.Children, out _) .Sum(values); var parts = Partition.Compute(tree, new PartitionOptions { Width = 2 * Math.PI, Height = radius }); var arc = new ArcShape(parts.Y0[node], parts.Y1[node], parts.X0[node], parts.X1[node]); Arc.Write(ref sink, arc); // d3.arc()(…), byte for byte, into SVG or native geometry