Sakun Labs

Replicating D3 charts with Swift Charts

D3 is a powerful library for visualizing information. A common use case is building very flexible charting solutions.

I wanted to take Apple's Swift Charts for a spin, and see how much of the common D3 visualizations I could faithfully replicate.

This macOS project is a sample of my efforts. I would say I got close to 99% there, and the rest 1% was me wanting to wrap up my timebox on this project, rather than Swift Charts' shortcomings.

Histogram🔗

Screenshot of Charts 01 at Jul 5, 2024 at 10_15_40 PM

Area Difference🔗

Screenshot of Charts 01 at Jul 5, 2024 at 10_05_30 PM

Diverging Chart🔗

Bar Chart Transitions🔗

Bee Swarm🔗

Screenshot of Charts 01 at Jul 5, 2024 at 10_08_16 PM

Box Plot🔗

Screenshot of Charts 01 at Jul 5, 2024 at 10_08_38 PM