SwiftViz package providing visualization components library inspired by D3

What's New

Scales and Ticks release


If you were looking at previous versions, this is a notably breaking change where we re-worked most of the API around scales and generated tick marks (and labelled values) associated with such scales. The scales are collapsed, more heavily using generics, and prepared for supporting scaling functions that don't have tick marks associated with them - such as interpolating through a color range or radius size for a circular mark.

The library additionally has a new dependency on swift-numerics to support both interpolation as well as an implementation of "nice" values for generating output tick values that are more visually pleasing.

As a last update set to this, ticks and the labels were separate in previous versions, where now Ticks are generic and have a default label mechanism to support providing a label from a tick, potentially with a formatter that you provide.

These are base constructs and pieces to building further visualization tools, and not considered in any final form. Additional scales, and additional scaling capabilities as well as data structures that support additional visualizations (such as histograms and binning) may get added in the future. This provides an API footprint to test and work from for further iteration consideration.


codecov @heckj

A collection of utilities and libraries to provide some of the pieces needed in generating data visualization. Loosely based on the APIs and mechanisms created by Mike Bostock and contributors to D3.js

Build and test

git clone https://github.com/swiftviz/swiftviz
cd swiftviz
swiftformat --lint . && swiftlint
swift test -v


  • Swift Tools 5.5.0
View More Packages from this Author


Last updated: Sun Jan 14 2024 17:20:21 GMT-1000 (Hawaii-Aleutian Standard Time)