D3 data visualization

From openai/plugins · View interactive version

D3 data visualization is an AI agent skill from the GitHub repository openai/plugins. Build custom data visualizations with D3. Use when the user needs SVG or DOM-based charts, rich annotation, domain-native contextual backgrounds, data joins, custom scales or interactions, scroll-driven SVG scene states, or precise control over browser visualization behavior.

How to use this skill

Skill file

D3 Data Visualization

Overview

Use this skill for custom browser visualizations where SVG or DOM semantics matter and a declarative grammar no longer fits cleanly. D3 is strongest when the chart needs bespoke scales, marks, layouts, transitions, zooming, brushing, annotations, or vector export.

Default assumption: use D3 for scales, layouts, geometry, labels, annotation layers, and behavior. Do not turn D3 into the entire application architecture if a framework already owns the surrounding UI.

Choose D3 When

Avoid D3-First DOM Rendering When

Working Pattern

  1. Build a clean data model first.
  2. Separate:
  1. Prefer stable keys in joins.
  2. Use D3 for math and behavior, not for hiding weak state management.
  3. Assess how many D3 instances may coexist on the page so DOM, layout, and event costs are evaluated at dashboard scale.
  4. If using a contextual surface, keep source units and render scales explicit, draw the background as a separate layer, and adapt mark placement or layout forces to the domain geometry.
  5. For art-directed stories, keep generated image, substrate, data-mark, label, and annotation layers separate so each can be reviewed and exported.
  6. Keep annotations and interaction overlays explicit.
  7. For SVG output, apply ./references/svg-polish-and-crispness.md before calling the chart finished. Explicitly set font sizes, tick padding, gridline strokes, data stroke widths, icon sizes, label alignment, and zoom-stable stroke behavior.
  8. For browser-facing work, use ../../references/foundations/mobile-first-responsive-visualization.md so the D3 layout is recomputed for large-screen and mobile states rather than scaled down from one desktop SVG.

Editorial Defaults

Core D3 Building Blocks

Integration Rules

Output Expectations

References

Representative Prompts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.