tanstack-charts
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, debug, migrate, or plan TanStack Charts pre-alpha charting with current docs. Use for @tanstack/charts, @tanstack/charts/react, @tanstack/charts/react-native, @tanstack/charts/scales/*, defineChart, svgAnimation, motion(), tooltip/portal, layout stack/group, groupBy/binX/rollingWindow/rank/normalize/fold/waterfall/mosaic, lineY, areaY, barY, boxY, violinY, waffleY, ridgelineY, differenceY, linearRegressionY, rect, cell, dot, hexagon, crosshair, whenFocused, decorative, facet, polar, geoShape, treemap, sunburst, sankeyDiagram, hexbin, contour, brushX, zoomX, keyedSelection, Chart, Canvas, grammar-of-graphics marks/channels/scales, and migrations from Recharts, Chart.js, ECharts, Observable Plot, archived react-charts, @tanstack/react-charts, @tanstack/charts-scales, or TanStack Charts 0.0.x–0.13.x.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when work touches TanStack Charts, especially mark composition, transforms, compact vs D3 scales, React Chart, SSR, …
- Very specific: line 10
Treat the library as pre-alpha (0.14.0 at skill refresh).
- Distinctive: line 28
Keep rows in their natural shape.
- Very specific: line 33
Default SVG animation option is svgAnimation, not animate.
- Distinctive: line 39
Default to SVG. Import polar, geo, Canvas, export, motion, spatial, hierarchy, network, brush/zoom only through exact subpaths.
- Very specific: line 40
Prefer built-in marks (boxY, waffleY, violinY, composites) before createMark.
- Distinctive: line 44
Prefer the repo's existing checks.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TanStack Charts
Use this skill when work touches TanStack Charts, especially mark composition, transforms, compact vs D3 scales, React Chart, SSR, tooltips/focus, Canvas, optional motion(), React Native, spatial/hierarchy/network entries, or migrations.
Treat the library as pre-alpha (0.14.0 at skill refresh). Official docs say it is not ready for production use. Verify current docs and the npm latest version before relying on edge APIs. Prefer official docs / GitHub tag v0.14.0 over stale search or archived react-charts.
Workflow
- Confirm the stack is the new TanStack Charts on the unified package:
- Correct:
bun add @tanstack/chartsplus framework peers. ImportChartfrom@tanstack/charts/react, scales from@tanstack/charts/scales/linear(and/band,/point,/ordinal). - Compatibility only:
@tanstack/react-charts,@tanstack/charts-scales, and other@tanstack/*-chartsadapter packages still exist for existing apps. Do not add them to new code. - Wrong: unscoped
react-charts, oroptions/primaryAxis/secondaryAxes/UserSerie.
- Correct:
- Refresh versions and URLs from source-map.md.
- Installation,
defineChart, scales, axes, tooltip extensions: setup-core.md. - Marks,
decorative, polar/geo, composites: marks-composition.md. - Eager transforms vs mark layout: transforms-layouts.md.
- Adapters, sizing, focus, crosshair, brush/zoom/cursor/selection, motion, SSR: frameworks-interaction.md.
- Testing, large data, Canvas, custom marks, AI checks, migrations: production-patterns.md.
Implementation Judgment
- A chart is a composition of marks, not a chart-type component. Prefer the smallest mark set that answers the question.
- Keep rows in their natural shape. Do not invent a library-owned series wrapper.
- Install one package:
@tanstack/charts. Compact scales: exact@tanstack/charts/scales/*(no/scalesbarrel). Import and declare everyd3-*the application source uses. Pass factories for inferred domains, or configured instances for fixed domains. Never assign pixel ranges to positional scales the chart owns. - Both positional scales are required when marks materialize those dimensions.
- Axis presentation lives under
axis/axis.ticks/axis.tickLabels.axis: falsehides a guide and keeps the scale. Set the axis tonullonly when no mark uses that dimension. - Memoize the complete
defineChart(...)against every captured value. Definition identity is the update boundary. Responsive{ chart: ({ width }) => …, svgAnimation, tooltip, … }retains outer options. - Default SVG animation option is
svgAnimation, notanimate.motion()ignoressvgAnimationand reads definition-levelmotion. - Bars/areas with a single length channel stack implicitly. Use
layout: group()for side-by-side bars;layout: stack({ order, offset })only when order/offset must be explicit;y1/y2orx1/x2opts out. - Native tooltips:
tooltipfrom@tanstack/charts/tooltip. Escape clipping withportalfrom@tanstack/charts/tooltip/portal. ReactrenderTooltipBodyrequires@tanstack/charts/react/tooltip. Grouped rows default to visual mark order. - Channel and transform accessors use
(datum, { index, data }), not(datum, index, data). - Rolling transforms:
rollingWindow, notwindow. Reducer helper:delta, notdifference. - Supply
ariaLabelon every mounted chart. Usefocus: falseto omit generated focus geometry;focusRing: falsewhen authored focus marks replace the ring;focusDisabledwhen an app gesture owns the surface. Radial grouped focus:focusGroupAnglefrom@tanstack/charts/polar. - Default to SVG. Import polar, geo, Canvas, export, motion, spatial, hierarchy, network, brush/zoom only through exact subpaths.
- Prefer built-in marks (
boxY,waffleY,violinY, composites) beforecreateMark. Wrap a sibling layer withdecorative(...)when only one layer should own hit-testing.
Verification
Prefer the repo's existing checks. For meaningful Charts work, include the relevant subset:
- Package check:
@tanstack/chartson0.14.x(or the project's pin). New code imports adapters/scales from that package, not@tanstack/react-charts/@tanstack/charts-scales. - Typecheck for channels, scales, axis options, tooltip host brands, motion,
ChartPointcallbacks—no unexpected casts. createChartScene/renderChartSvgfor domains, geometry, keys, a11y markup.- Interaction tests: focus, keyboard, tooltip, selection, brush/zoom, resize, empty data, destroy.
- Light/dark smoke when theme tokens or tooltip surface CSS change.
- SSR/hydration smoke for
initialWidth, formatters, Canvas shells,idPrefix. - Bundle measurement when adding polar, geo, Canvas, export, motion, spatial, hierarchy, network, or extra D3 modules.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

