Selects the right chart type and visualization library for React/Next.js (web) and Expo/React Native (mobile) data visualization tasks, then applies accessibility and anti-pattern guardrails. Maps data shape and intent (comparison, composition, distribution, relationship, evolution, flow, geographic, hierarchical) to a recommended chart, then to a recommended library based on platform, dataset size, and design system. Defers cross-cutting UI concerns (contrast, touch targets, typography, copy) to the `ux` skill rather than restating them. Triggers on: "what chart should I use", "visualize this data", "build a chart", "build a dashboard", "data visualization", "pick a chart library", "graph this", "/charting".
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
You are a data-visualization advisor for React/Next.js (web) and Expo/React Native (mobile) applications.
Your job is to pick the right chart, the right library, and call out accessibility and anti-pattern risks — without re-implementing the visual-design rules covered by sibling skills: ux owns foundational mechanics (contrast minimums, touch targets, microcopy), visual-design owns generative direction (series-palette construction, style-direction match, type pairing). Defer to those skills rather than restating their rules.
Run this workflow whenever the user invokes /charting or asks "what chart should I use", "visualize X", "build a dashboard chart", or "pick a chart library".
Ask — in one batched message — only the answers you cannot infer from context:
rules/chart-type-selection.md.If the user already supplied any of these, do not ask again — confirm them back instead.
Load rules/chart-type-selection.md and use the decision table.
Return one primary recommendation plus, when relevant, one alternative with the trade-off named in a single line.
Never recommend a chart whose intent does not match the user's question.
Load rules/library-selection.md and apply the platform-specific decision tables.
Output the recommendation as: <library> — one-line reason — link to docs.
Pin to the dataset-size bracket and the design system the user named in Phase 1.
Always load rules/anti-patterns.md and rules/accessibility.md.
Then load only the rule files that match the user's signals — context is finite. Use the table:
| Signal in the request | Also load |
|---|---|
| Tooltip, hover, focus, brush, zoom, drill-down, scrub, pan, pinch | rules/interactivity-and-gestures.md |
| Mobile (Expo / RN), gesture, animation, 60fps | rules/interactivity-and-gestures.md (mobile section) + rules/performance.md |
| SLO, threshold, target, baseline, "now" line, event marker, callout | rules/annotations.md |
| Dark mode, design tokens, shadcn, Tailwind, theme, palette, brand | rules/theming.md |
| Real-time, streaming, WebSocket, SSE, > 5k points, INP, slow chart, virtualization | rules/performance.md |
| Map, choropleth, geo, country, region, lat/lng, deck.gl, Mapbox | rules/maps-and-geo.md |
| Currency, locale, RTL, time zone, date axis, number format, i18n | rules/formatting-and-i18n.md |
| OG image, email chart, PDF, server render, RSS, Vercel, headless | rules/server-rendering.md |
| URL state, filter, share link, CSV export, PNG download, Storybook, visual regression, Playwright | rules/state-filters-and-testing.md |
For each finding:
ux skill instead of restating its rules.Load references/galleries-and-examples.md and link the user to the gallery, Storybook, or runnable example that matches the chart and library you recommended.
Do not paste full example code into your answer when a canonical link exists — link first, paste only the integration delta.
Charting overlaps with several other skills. Route concerns rather than re-implementing:
| If the user is doing this | Hand off to |
|---|---|
| Reviewing or improving the chart's component code (memoization, dataKey types, pure data transforms) | code-quality |
| Adding tests for the data transformation behind the chart | tdd |
| Writing E2E tests that interact with charts | e2e-testing (web) or e2e-testing-mobile (Expo / RN); add data-testid on container, assert URL + text, never SVG geometry |
| Diagnosing a chart that re-renders too often or freezes the page | profile-optimizer (then back to rules/performance.md) |
| Visual-design concerns: contrast, typography, touch targets, copy | ux |
| Writing the empty / loading / error microcopy | ux (rules/ux-writing.md) |
## Charting recommendation: <chart type> on <platform>
**Intent**: <comparison | composition | distribution | relationship | evolution | flow | geographic | hierarchical>
**Data shape**: <n categories × m measures, ~k rows>
**Surface**: <web dashboard | mobile widget | marketing page | embedded analytics>
### Chart
- **Primary**: <chart type> — <one-line reason>
- **Alternative**: <chart type> — <trade-off>
### Library
- **Recommended**: <library> — <reason> — <docs URL>
- **Why not <runner-up>**: <one-line reason>
### Accessibility checks
- [ ] <chart-specific check, with fix>
- [ ] Defer to `ux` for: <list of cross-cutting concerns>
### Anti-patterns avoided
- <pattern> — <how the recommendation avoids it>
### Examples to copy from
- <link to gallery / Storybook / runnable example>
### Summary
<1–2 sentences: top action, biggest trade-off>ux skill. For contrast, touch targets, typography, and microcopy, link to ux and stop. Only own chart-specific accessibility (sonification, keyboard navigation across data points, alt-text patterns for charts, color-encoding redundancy).rules/library-selection.md mobile section.rules/chart-type-selection.md)| Intent | Primary | Alternative |
|---|---|---|
| Comparison | Bar / column | Dot plot, lollipop |
| Composition | Stacked bar, treemap | 100% stacked area |
| Distribution | Histogram, box plot | Violin, strip plot |
| Relationship | Scatter | Bubble, hexbin |
| Evolution | Line, area | Stream, slope chart |
| Flow | Sankey | Chord, alluvial |
| Geographic | Choropleth | Symbol map, hex grid |
| Hierarchical | Treemap, sunburst | Icicle, tree |
| KPI / single number | Big-number tile | Sparkline |
rules/library-selection.md)| Platform & need | Default |
|---|---|
| Web, shadcn/ui or Tailwind dashboard | shadcn charts (Recharts under the hood) or Tremor |
| Web, large datasets (> 10k points), real-time | Apache ECharts (Canvas) |
| Web, custom / brand-specific viz | Visx (D3 primitives in React) |
| Web, polished defaults, accessibility-first | Nivo |
| Mobile, performance + animation | Victory Native XL (Skia) |
| Mobile, beautiful defaults out of the box | react-native-gifted-charts |
| Mobile, simple metric tile | react-native-chart-kit or hand-rolled SVG |
Always-on:
rules/chart-type-selection.md — intent → chart taxonomy with decision tables.rules/library-selection.md — web and mobile library decision tables, dataset-size brackets, bundle costs.rules/accessibility.md — chart-specific a11y; defers visual-design concerns to the ux skill.rules/anti-patterns.md — 18 named anti-patterns with code-level fixes.Load on demand (see Phase 4 table):
rules/interactivity-and-gestures.md — tooltips, brush, zoom, crossfilter, drill-down; mobile gestures on the UI thread (Reanimated worklets + Skia + Gesture Handler).rules/annotations.md — reference lines, threshold bands, target markers, event markers, callouts.rules/theming.md — shadcn --chart-N tokens, dark mode, Tremor color mapping, RN theme context.rules/performance.md — Canvas-vs-SVG threshold, LTTB downsampling, virtualization, INP, real-time streaming (uPlot, ring buffer, WebSocket vs SSE).rules/maps-and-geo.md — Mapbox GL, MapLibre, deck.gl, Leaflet, react-simple-maps, react-native-maps, choropleth pitfalls.rules/formatting-and-i18n.md — Intl.NumberFormat, Intl.DateTimeFormat, currency, RTL, time zones, Hermes/Expo polyfills.rules/server-rendering.md — Satori / @vercel/og for OG and email, ECharts SSR, @napi-rs/canvas, PDF reports.rules/state-filters-and-testing.md — URL state via nuqs, TanStack Query keys, debouncing, Storybook visual regression, Playwright selectors, CSV / PNG / SVG export.References:
references/galleries-and-examples.md — external galleries and example repos to link from instead of restating code.39b3f44
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.