SwiftUI Chart3D Developer
Quick Start
Use this skill for Swift Charts 3D visualization work. For windows,
RealityView, Model3D, attachments, gestures outside charts, or immersive
scene lifecycle, switch to $spatial-swiftui-developer.
- Confirm the third dimension adds meaningful information; prefer 2D charts when depth does not improve interpretation.
- Choose the chart form: 3D marks for sampled data or
SurfacePlotfory = f(x, z)surfaces. - Bind
Chart3DPosewhen the chart needs a stable initial view or interactive rotation state. - Set explicit x/y/z domains and labels so the plot volume remains readable.
Load References When
| Reference | When to Use |
|-----------|-------------|
| charts-3d.md | When implementing Chart3D, SurfacePlot, 3D marks, scales, axes, pose, or camera projection. |
Workflow
- Define x, y, and z semantics before writing marks.
- Choose marks, surface style, chart scales, and axis labels.
- Add pose and projection only when they improve interpretation.
- Keep chart state in SwiftUI and avoid mixing Chart3D with RealityKit scene ownership unless the surrounding view requires it.
Guardrails
- Do not use
Chart3Dfor novelty; a 2D chart is often clearer. - Do not leave unlabeled axes or implicit domains for production charts.
- Do not route general spatial UI layout questions here; use
$spatial-swiftui-developer.
Output Expectations
Provide:
- why
Chart3Dis warranted - which chart reference was used
- the marks, surface, scales, labels, and pose chosen
- the fallback to 2D or spatial SwiftUI routing if applicable