d3-data-visualization
БесплатноБез исполняемых скриптовНе проверенBuild custom data visualizations with D3. Use when the user needs SVG or DOM-based charts, rich annotation, domain-native contextual backgrounds, data joins…
от openai★ 8 494 звезды на GitHubОб этом скилле
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
- the chart needs custom marks or nonstandard layouts
- SVG quality matters for export, print, or accessibility
- annotation and labeling are part of the design, not an afterthought
- the visualization needs custom vector background geometry such as a field, court, track, floor plan, schematic, or other meaningful contextual surface
- an editorial story needs data-bound generated cutouts, illustrated substrates, scrollytelling/parallax states, or animated annotation reveals in SVG
- the mark count is moderate enough for DOM or SVG
- the interaction model needs zoom, brush, drag, or coordinated views
- a UML-like, dependency, architecture, state, or flow diagram needs bespoke SVG annotation or product-specific composition after
../uml-and-software-architecture-visualization/SKILL.mdhas defined the diagram semantics - a declarative grammar would become harder to read than the resulting D3 code
Avoid D3-First DOM Rendering When
- mark counts are so large that DOM throughput becomes the bottleneck
- animation is continuous and frame budgets are tight
- the task would be faster to solve with Canvas2D or WebGL
Working Pattern
- Build a clean data model first.
- Separate:
- parsing and normalization
- scale construction
- derived geometry
- rendering
- interaction state
- Prefer stable keys in joins.
- Use D3 for math and behavior, not for hiding weak state management.
- Assess how many D3 instances may coexist on the page so DOM, layout, and event costs are evaluated at dashboard scale.
- 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.
- For art-directed stories, keep generated image, substrate, data-mark, label, and annotation layers separate so each can be reviewed and exported.
- Keep annotations and interaction overlays explicit.
- For SVG output, apply
./references/svg-polish-and-crispness.mdbefore calling the chart finished. Explicitly set font sizes, tick padding, gridline strokes, data stroke widths, icon sizes, label alignment, and zoom-stable stroke behavior. - For browser-facing work, use
../../references/foundations/mobile-first-responsive-visualization.mdso the D3 layout is recomputed for large-screen and mobile states rather than scaled down from one desktop SVG.
Editorial Defaults
- Build an explicit label layer. Direct end labels, inline keys, or panel labels should be considered before a detached legend.
- Build an explicit annotation layer. Callouts should attach to data points, ranges, thresholds, or domain geometry rather than floating as decoration.
- Keep gridlines, axes, and reference marks quiet. Most ink should be data, labels, or annotation.
- Default SVG chart polish: 10-12 px axis ticks, 11-13.5 px direct labels, 0.5-1 px non-data strokes, 1.5-2.25 px normal data lines, 2.5-3 px focus lines, short 4-6 px ticks, and no heavy chart border unless it carries meaning.
- Use D3 axes as geometry generators, then style them. Prefer
.tickSizeOuter(0), 6-8 px tick padding, quiet gridlines, removed domains when redundant, and fewer ticks before rotated or tiny labels. - Use
shape-rendering: crispEdgesfor straight axes, gridlines, and rectangular cells; do not apply it globally to curves, symbols, circles, or diagonal marks. - Use
vector-effect: non-scaling-strokefor zoomable outlines, axes, annotation connectors, map borders, and icons that should keep screen-stable stroke weight. - Use custom layout only when the story needs it; do not copy a publication's composition or visual identity.
- For narrow widths, provide either a simplified mark layout, small-multiple stack, or numbered annotation key below the chart.
- On mobile, make tap/focus the inspection path, enlarge hit areas beyond visible marks, provide drag alternatives, define pinch or zoom ownership, and keep the main chart visible when filters or settings open.
- Favor inspectable SVG for editorial charts that need export, accessibility, and precise labels. Move dense mark fields to Canvas only when the DOM count justifies it.
- For scrollytelling or parallax, use
../scrollytelling-and-parallax-data-visualization/SKILL.mdfor the scroll narrative, then let D3 own scales, derived geometry, data joins, labels, and SVG transitions. Keep each scene valid as a still. - For generated imagery, use D3/SVG for labels, anchors, masks, cl
Установить d3-data-visualization в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл d3-data-visualization?
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.
Как установить скилл d3-data-visualization?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл d3-data-visualization запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic