ai-skills/d3

D3.js + React

Clean D3.js charts inside React: D3 does the math, React draws.

No install. Give your AI the link to the skill.

Read https://github.com/holtzy/dataviz-skills/blob/main/d3/SKILL.md
and use it to build my chart with D3 and React.

Works with any assistant that can open a URL. Otherwise, paste the content of the SKILL.md file instead.

By Yan Holtz Β· Updated November 5, 2026

πŸ“š Based on the D3 Loves React course
React and D3 code for a barplot, seen at an angle

What it does

  • Uses D3 for the math only (scales, shapes, layouts) and React for the rendering.
  • Sets up margins, axes as React components, and a responsive wrapper.
  • Switches from SVG to canvas when there are too many marks.
  • Animates transitions with Motion.

When to use it

When you build a chart with D3 in a React or Next.js app. For vanilla D3, without React, it is not the right fit.