Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raheelahmad/Swift-D3-Charts

Replicating D3 Charts with Swift Charts
https://github.com/raheelahmad/Swift-D3-Charts

Last synced: about 1 month ago
JSON representation

Replicating D3 Charts with Swift Charts

Awesome Lists containing this project

README

        

# Reproducing some D3 Charts with Swift Charts

[D3](https://d3js.org) is a powerful library for visualizing information. A common use case is building very flexible charting solutions.

I learnt Apple's [Swift Charts](https://developer.apple.com/documentation/charts) while building the statistics view for my music app [Muziqi for iOS](https://sakunlabs.com/muziqi).
But then I wanted to take the library for a more serious 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
Screenshot of Charts 01 at Jul 5, 2024 at 10_03_41 PM

## Band Chart
Screenshot of Charts 01 at Jul 5, 2024 at 10_04_14 PM

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

## Diverging Chart

https://github.com/raheelahmad/Swift-D3-Charts/assets/54114/41ce63ee-ff3e-41af-8936-506fe4be8930

## Horizontal Bar Chart

Screenshot of Safari at Jul 5, 2024 at 10_07_02 PM

## Bar Chart Transitions

https://github.com/raheelahmad/Swift-D3-Charts/assets/54114/659168bb-5a45-4f1e-a599-563c13a51889

## 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