d3-visualization
8
总安装量
4
周安装量
#34985
全站排名
安装命令
npx skills add https://github.com/7spade/black-tortoise --skill d3-visualization
Agent 安装分布
opencode
4
gemini-cli
4
replit
4
claude-code
4
codex
4
mcpjam
3
Skill 文档
SKILL: D3 Visualization & Diagram Design
Use when
- Implementing interactive visualizations using D3 (SVG/Canvas) in the Angular UI.
- You need to choose a diagram type and map it to a D3 layout/module.
Workflow
- Clarify purpose: compare / rank / part-to-whole / flow / hierarchy / network / geo / schedule.
- Choose the simplest representation that answers the question (avoid novelty charts).
- Define a chart view model (VM) at the Application boundary; UI receives it as Signals.
- Pick render tech:
- SVG for readability + a11y (small/medium)
- Canvas/hybrid for density/perf (large)
- Add interaction only if it reduces cognitive load (zoom/pan/hover/select/filter).
- Build in a11y: text summary + keyboard navigation + reduced motion.
Diagram â D3 mapping (quick guide)
- 森æå Forest Plot: scales/axes (
d3-scale,d3-axis) + points/CI lines (d3-shape) - å¾å樹 Radial Tree:
d3-hierarchy.tree()/cluster()+ radial links (d3-shape) - ææ¥å Sunburst:
d3-hierarchy.partition() - æ¡åºå Sankey:
d3-sankey - ç°ç樹/å形樹 Circular Tree:
- Circle Packing:
d3-hierarchy.pack() - Radial Dendrogram:
d3-hierarchy.cluster()+ radial links
- Circle Packing:
- 網絡å Network Graph:
d3-force(force simulation) - ç±åå Heatmap: band scales + rect grid (Canvas for dense grids)
- 樹çå Tree Diagram:
d3-hierarchy.tree() - çç¹å Gantt: time scale + band rows (compute schedule in Application)
- æéç· Timeline:
d3-scaletime + annotations (d3-shape) - æ¥æå Calendar Heatmap: time bucketing + grid layout (Canvas if needed)
- éç¨ç¢å Milestone Chart: timeline + point/label layout
- æåºå Sequence Diagram: prefer Mermaid for docs; D3 only if interactive editing is required
- ééµè·¯å¾å Critical Path: compute CPM in Application; render as highlighted Gantt/network
- çµç¹å Org Chart:
d3-hierarchy.tree()with compact node layout - å¿æºå Mind Map: tree/radial tree with collapsible nodes
- å æå Fishbone (Ishikawa): custom layout (bones as angled branches) + labels
- çå¼ç·å Contour Map:
d3-contour(grid â isolines/filled contours) - åç´èè² Choropleth:
d3-geo+ region fill scale - é»å¯åº¦ Dot Density:
d3-geo+ point placement (within polygons or sampled points)
Common D3 building blocks (preferred)
d3-selection,d3-scale,d3-axis,d3-shape,d3-zoom,d3-drag,d3-brushd3-hierarchy,d3-force,d3-sankey,d3-geo,d3-contour
References
.github/instructions/70-d3-data-visualization-copilot-instructions.md