claude-d3js-skill
Build interactive D3.js data visualisations
Create custom, publication-quality data visualisations without the complexity. This skill provides expert D3.js guidance with ready-to-use templates for charts, graphs, and interactive graphics that work across any JavaScript framework.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "claude-d3js-skill". Create a line chart showing monthly temperature trends
Expected outcome:
A complete D3.js React component with SVG line chart, including x-axis (months), y-axis (temperature), smooth curve interpolation, gradient fill area under the line, and tooltip showing exact values on hover.
Using "claude-d3js-skill". Build a pie chart for market share comparison
Expected outcome:
An interactive D3.js pie chart with animated entry transitions, separated slices on hover, percentage labels, external legend with colour coding, and click-to-explode selected slice animation.
Security Audit
SafeAll 392 static analyzer findings were evaluated and dismissed as false positives. The pattern detections for 'external_commands', 'weak cryptographic algorithm', 'C2 keywords', 'network', and 'filesystem' operations were triggered by markdown documentation code blocks, D3.js API method names (schemeCategory10, nodes, desc), hex color codes in colour scheme documentation, and standard CDN import examples. This is a legitimate D3.js data visualization skill containing only documentation and code templates with no executable security risks.
Quality Score
What You Can Build
Business Dashboard Developer
Create executive dashboards with KPI charts, trend visualisations, and interactive filters for business analytics platforms.
Data Journalist
Build engaging, interactive stories with custom charts and maps that help readers explore data-driven narratives.
Research Analyst
Generate publication-quality scientific visualisations with precise control over scales, axes, and statistical representations.
Try These Prompts
Create a responsive bar chart using D3.js that displays quarterly revenue data. Include proper axis labels, tooltips on hover, and use a colour-blind accessible palette. Provide the complete React component code.
Build an interactive scatter plot with D3.js where each point represents a product. Add zoom and pan functionality, click-to-highlight individual points, and a legend that updates dynamically when data filters change.
Create a force-directed network diagram showing relationships between entities. Implement node dragging, collision detection, custom link styling based on relationship type, and animated transitions when nodes are added or removed.
Build a geographic choropleth map using D3.js geo projections. Display regional data with colour encoding, add zoom transitions between country and state levels, and show tooltips with detailed statistics on hover.
Best Practices
- Always clear previous SVG content with selectAll('*').remove() before re-rendering to prevent duplicate elements
- Use margin convention for proper axis spacing and accommodate label overflow in chart dimensions
- Implement responsive sizing with ResizeObserver or window resize listeners for adaptive layouts
Avoid
- Do not hardcode dimensions - always use responsive containers that adapt to parent element size
- Avoid creating scales inside loops or transitions - define them once and reuse for performance
- Never use D3 for simple static charts - prefer CSS or lightweight libraries for basic visualisations