d3
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "d3" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-eb317eb1c19dd63a717137d570af38a9f14140caea6d51995c31d654a38169f8. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Assist in building custom interactive data visualizations with D3.js. Appropriate for cases that require fine-grained control or capabilities beyond standard chart libraries, such as creating charts, plots, maps, force-directed graphs, tree diagrams, or hierarchical statistics visualizations.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: d3
description: >-
Assists with building custom interactive data visualizations using D3.js. Use when creating
charts, graphs, maps, force layouts, or hierarchical diagrams that require fine-grained
control beyond what charting libraries provide. Trigger words: d3, data visualization,
chart, svg, scales, force graph, treemap, choropleth.
license: Apache-2.0
compatibility: "No special requirements"
metadata:
author: terminal-skills
version: "1.0.0"
category: design
tags: ["d3", "data-visualization", "charts", "svg", "interactive"]D3.js
Overview
D3.js is a low-level JavaScript library for building custom, interactive data visualizations by binding data to DOM elements. It provides scales, axes, shape generators, geographic projections, force simulations, and hierarchical layouts, giving developers full control over the visual output while integrating with React through computed scales and layouts.
Instructions
- When binding data, use
.data(dataset).join("element")(D3 v6+) for the enter/update/exit pattern, setting attributes and styles from bound data via accessor functions. - When creating scales, choose the appropriate type (
scaleLinearfor continuous,scaleBandfor categorical bars,scaleTimefor dates,scaleOrdinalfor color mapping) and always set domain from the data usingd3.extent(). - When building axes, create them with
d3.axisBottom(scale)ord3.axisLeft(scale), configure ticks and format labels withd3.format(), and regenerate on resize. - When creating chart types, use shape generators (
d3.line(),d3.area(),d3.arc(),d3.pie(),d3.stack()) and layout functions (d3.treemap(),d3.forceSimulation(),d3.geoPath()) for complex visualizations. - When adding interactivity, use transitions (
.transition().duration(750)) for smooth data updates, tooltips on hover, and brushing/zooming for exploration. - When integrating with React, use D3 for math (scales, layouts, data transforms) and React for DOM rendering, computing values in
useMemoand usinguseEffectwith refs for D3-driven animations.
Examples
Example 1: Build a real-time dashboard with multiple chart types
User request: "Create a dashboard with line charts, bar charts, and a pie chart from API data"
Actions:
- Set up shared scales with
d3.scaleTime()for the x-axis andd3.scaleLinear()for the y-axis - Build a line chart using
d3.line()with smooth curve interpolation and area fill - Build a grouped bar chart using
d3.scaleBand()with staggered enter transitions - Build a donut chart using
d3.pie()andd3.arc()with hover tooltips
Output: A responsive dashboard with animated charts that update smoothly when data changes.
Example 2: Create a force-directed network graph
User request: "Visualize relationships between entities as an interactive network graph"
Actions:
- Set up
d3.forceSimulation()withforceManyBody,forceLink, andforceCenter - Render nodes as circles with
d3.scaleOrdinal()coloring by category - Add drag interaction with
d3.drag()to reposition nodes - Implement zoom and pan with
d3.zoom()and tooltips on hover
Output: An interactive force-directed graph with draggable nodes, color-coded categories, and zoom navigation.
Guidelines
- Use D3 for scales, layouts, and data processing; let React handle DOM rendering in React apps.
- Use
.join()instead of manual enter/update/exit for simpler, cleaner data binding. - Always set scale domains from data (
d3.extent()) rather than hardcoding ranges. - Use
d3.format()for axis labels and tooltips:",.0f"for thousands,"$.2f"for currency. - Add transitions of 750ms with
easeCubicInOutfor smooth data update animations. - Make visualizations responsive by recalculating scales on
ResizeObservercallbacks. - Add
aria-labelto SVG elements and meaningful<title>tags for accessibility.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 D3.js 高级数据可视化构建能力,覆盖图表、地图、力导向图等多种复杂场景
- 适用于前端开发者和数据分析师,具有明确的技术实用价值
Highlights
- 触发词完整覆盖中英文关键词,边界清晰,变体覆盖良好
Highlights
- 结构完整,含四大核心模块,步骤清晰,有端到端示例,frontmatter 完整
Highlights
- 工具来源明确,参数使用规范,覆盖响应式处理和无障碍等关键异常场景
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.