To get access to the contents of the whole book you need to purchase a copy.
Introduction
Thank you so much for purchasing a copy of "Swift Charts Beyond the Basics". This book is written for developers who already know how to build a basic chart and want to gain a deeper understanding of working with data and the Swift Charts framework.
Swift Charts provides a declarative way to create data visualizations for apps across Apple platforms. When a chart needs to represent more involved data, provide a carefully controlled presentation, or support interaction and accessibility, it becomes important to understand how the framework interprets the content we give it. The structure of the data, the way values are represented, and the mappings between those values and visual properties all influence what the finished chart communicates.
We wrote this book to help you make informed decisions as those requirements become more complex. Instead of focusing only on how to produce a particular result, we explain the framework behavior behind the APIs and how different choices affect the meaning, appearance, and behavior of a chart.
We bring complementary experience to this subject. Natalia has spent many years building mobile apps and worked on UI frameworks at Apple as a member of the core SwiftUI team. Matthaus began his engineering career in data science and has extensive experience building with Swift and Swift Charts, including consulting on applications that work with large and complex datasets. By combining these perspectives, we can examine charts as interactive components in an app and as representations of the data behind them.
The book begins with the data itself. We consider time-series, categorical, proportional, distributional, spatial, and multivariable data, along with the preparation that different relationships and comparisons may require. We then examine how Swift Charts turns prepared values into chart content through marks, plots, grouping, and composition.
From there, we explore how values participate in scales, how chart content is arranged, and how data values become positions, colors, sizes, symbols, and other visual properties. We examine the roles of axes and legends, the relationships among chart layers, and the effects of drawing order, compositing, blend modes, masks, and custom styling.
The later chapters consider charts as interactive parts of an app. We look at how SwiftUI dependencies affect chart updates, how to keep changing state at an appropriate boundary, and how selection, inspection, legends, and scrolling help people explore data. The final chapter brings these ideas together through chart animation, including transitions between plotted values, changing viewports and scale domains, and multiple levels of detail.
Accessibility is part of these decisions throughout the book. We consider semantic descriptions, differentiation beyond color, contrast, text scaling, reduced transparency, interaction alternatives, and the relationship between a chart's visual and accessible representations where they apply to each subject.
The chapters build on one another, but you can also use the book as a reference and open it at the topic you need. Each section provides the context required to understand its subject while contributing to the broader explanation developed throughout the book.
By the end of the book, you'll have a stronger understanding of how Swift Charts works and how the decisions you make shape the information a chart presents. This will help you approach new datasets and visualization requirements with the knowledge needed to choose and implement an appropriate solution.
The content of this book is copyright Nil Coalescing Limited. It may not be shared or redistributed without prior written permission. If you discover any issues or would like to provide feedback, you can contact support@nilcoalescing.com. Release notes and updates are available at books.nilcoalescing.com/swift-charts-beyond-the-basics.
We hope you enjoy the book!