← ClaudeAtlas

swift-chartslisted

Implement, review, or improve data visualizations using Swift Charts. Use when building bar, line, area, point, pie, or donut charts; when adding chart selection, scrolling, or annotations; when plotting functions with vectorized BarPlot, LinePlot, AreaPlot, or PointPlot; when customizing axes, scales, legends, or foregroundStyle grouping; or when creating specialized visualizations like heat maps, Gantt charts, stacked/grouped bars, sparklines, or threshold lines.
dpearson2699/swift-ios-skills · ★ 640 · AI & Automation · score 81
Install: claude install-skill dpearson2699/swift-ios-skills
# Swift Charts Build data visualizations with Swift Charts targeting iOS 26+. Compose marks inside a `Chart` container, configure axes and scales with view modifiers, and use vectorized plots for large datasets. See [references/charts-patterns.md](references/charts-patterns.md) for extended patterns, accessibility, and theming guidance. ## Contents - [Workflow](#workflow) - [Chart Container](#chart-container) - [Mark Types](#mark-types) - [Axis Customization](#axis-customization) - [Scale Configuration](#scale-configuration) - [Foreground Style and Encoding](#foreground-style-and-encoding) - [Selection (iOS 17+)](#selection-ios-17) - [Scrollable Charts (iOS 17+)](#scrollable-charts-ios-17) - [Annotations](#annotations) - [Legend](#legend) - [Vectorized Plots (iOS 18+)](#vectorized-plots-ios-18) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Workflow ### 1. Build a new chart 1. Define data as an `Identifiable` struct or use `id:` key path. 2. Choose mark type(s): `BarMark`, `LineMark`, `PointMark`, `AreaMark`, `RuleMark`, `RectangleMark`, or `SectorMark`. 3. Wrap marks in a `Chart` container. 4. Encode visual channels: `.foregroundStyle(by:)`, `.symbol(by:)`, `.lineStyle(by:)`. 5. Configure axes with `.chartXAxis` / `.chartYAxis`. 6. Set scale domains with `.chartXScale(domain:)` / `.chartYScale(domain:)`. 7. Add selection, scrolling, or annotations as needed. 8. For 1000+ data points, use vectorized plots