thiennc-tesoglobal/ios-skills/swift-charts

Claude Code and agent skill by thiennc-tesoglobal/ios-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Builds or reviews Swift Charts visualizations, including bar, line, area, point, sector, vectorized, and 3D charts. Use for marks, axes, scales, legends, annotations, selection, scrolling, styling, accessibility, large datasets, plots, or spatial surfaces.

Install

npx vskill@latest install thiennc-tesoglobal/ios-skills/swift-charts

SKILL.md

The same SKILL.md was published earlier as thiennc-tesoglobal/ios-skills/swift-charts.

Swift Charts

Build data visualizations with Swift Charts targeting iOS 26+. Compose marks inside Chart or Chart3D, configure axes and scales with view modifiers, and use vectorized plots or 3D plots when the data calls for them.

Use the task-specific chart references routed below instead of loading every recipe.

Contents

Workflow

  1. Identify the analytical question, data shape, deployment target, and accessibility requirement before choosing marks.
  2. Select the smallest mark set and encode series, categories, scales, and domains explicitly where ambiguity matters.
  3. Add axes, legends, annotations, selection, or scrolling only when they improve interpretation.
  4. Prefer vectorized plots or aggregation for large datasets and avoid expensive per-mark decoration.
  5. Verify empty/single/extreme data, localization, Dynamic Type, VoiceOver summaries, selection, and performance.

Route by Task

Core Decisions

  • Choose marks from the question being answered, not visual novelty.
  • Preserve truthful scale domains and label units/aggregation clearly.
  • Encode multiple line series with an explicit series dimension.
  • Keep charts readable at large text sizes and expose nonvisual summaries.

Common Mistakes

1. Missing series parameter for multi-line charts
swift
// WRONG -- all points connect into one line
Chart {
ForEach(allCities) { item in
LineMark(x: .value("Date", item.date), y: .value("Temp", item.temp))
}
}
// CORRECT -- separate lines per city
Chart {
ForEach(allCities) { item in
LineMark(x: .value("Date", item.date), y: .value("Temp", item.temp))
.foregroundStyle(by: .value("City", item.city))
}
}
2. Too many SectorMark slices
swift
// WRONG -- 20 tiny sectors are unreadable
Chart(twentyCategories, id: \.name) { item in
SectorMark(angle: .value("Value", item.value))
}
// CORRECT -- group into top 5 + "Other"
Chart(groupedData, id: \.name) { item in
SectorMark(angle: .value("Value", item.value))
.foregroundStyle(by: .value("Category", item.name))
}
3. Missing scale domain when zero-baseline matters
swift
// WRONG -- axis starts at ~95; small changes look dramatic
Chart(data) {
LineMark(x: .value("Day", $0.day), y: .value("Score", $0.score))
}
// CORRECT -- explicit domain for honest representation
Chart(data) {
LineMark(x: .value("Day", $0.day), y: .value("Score", $0.score))
}
.chartYScale(domain: 0...100)
4. Static foregroundStyle overriding data encoding
swift
// WRONG -- static color overrides by-value encoding
BarMark(x: .value("X", item.x), y: .value("Y", item.y))
.foregroundStyle(by: .value("Category", item.category))
.foregroundStyle(.blue)
// CORRECT -- use only the data encoding
BarMark(x: .value("X", item.x), y: .value("Y", item.y))
.foregroundStyle(by: .value("Category", item.category))
5. Individual marks for 10,000+ data points
swift
// WRONG -- creates 10,000 mark views; slow
Chart(largeDataset) { item in
PointMark(x: .value("X", item.x), y: .value("Y", item.y))
}
// CORRECT -- vectorized plot (iOS 18+)
Chart {
PointPlot(largeDataset, x: .value("X", \.x), y: .value("Y", \.y))
}
6. Fixed chart height breaking Dynamic Type
swift
// WRONG -- clips axis labels at large text sizes
Chart(data) { ... }
.frame(height: 200)
// CORRECT -- adaptive sizing
Chart(data) { ... }
.frame(minHeight: 200, maxHeight: 400)
7. KeyPath modifier after value modifier on vectorized plots
swift
// WRONG -- compiler error
BarPlot(data, x: .value("X", \.x), y: .value("Y", \.y))
.opacity(0.8)
.foregroundStyle(\.color)
// CORRECT -- KeyPath modifiers first
BarPlot(data, x: .value("X", \.x), y: .value("Y", \.y))
.foregroundStyle(\.color)
.opacity(0.8)
8. Missing accessibility labels
swift
// WRONG -- VoiceOver users get no context
Chart(data) {
BarMark(x: .value("Month", $0.month), y: .value("Sales", $0.sales))
}
// CORRECT -- add per-mark accessibility
Chart(data) { item in
BarMark(x: .value("Month", item.month), y: .value("Sales", item.sales))
.accessibilityLabel("\(item.month)")
.accessibilityValue("\(item.sales) units sold")
}
9. Treating angle selection as category selection

chartAngleSelection(value:) binds the selected plottable angle value. For pie and donut charts, map that numeric value through cumulative sector ranges before comparing it to a category label.

Review Checklist

  • [ ] Data model uses Identifiable or chart uses id: key path
  • [ ] Mark type matches goal (bar=comparison, line=trend, sector=proportion)
  • [ ] Multi-series lines use series: parameter or .foregroundStyle(by:)
  • [ ] Axes configured with appropriate labels, ticks, and grid lines
  • [ ] Scale domain set explicitly when zero-baseline matters
  • [ ] Pie/donut uses positive values, 5-7 sectors, and "Other" grouping
  • [ ] Selection binding type matches axis data type (Date? for date axis)
  • [ ] Pie/donut angle selection maps numeric angle values back to categories
  • [ ] Scrollable charts set .chartXVisibleDomain(length:) for viewport
  • [ ] Vectorized plots used for datasets exceeding 1000 points
  • [ ] KeyPath modifiers applied before value modifiers on vectorized plots
  • [ ] Chart3D used only for real 3D data or surfaces, with z scale and pose reviewed
  • [ ] Accessibility labels added to marks for VoiceOver
  • [ ] Chart tested with Dynamic Type and Dark Mode
  • [ ] Legend visible and positioned, or intentionally hidden
  • [ ] Ensure chart data model types are Sendable; update chart data on @MainActor

References

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
7-day trend score
7

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/thiennc-tesoglobal/ios-skills/swift-charts/badge)](https://verified-skill.com/skills/thiennc-tesoglobal/ios-skills/swift-charts)

Something wrong with this skill or its page? Tell us.