d3-viz

Create custom interactive data visualisations using d3.js scales, layouts, and SVG rendering.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill d3-viz-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: d3-viz
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/d3-viz
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill d3-viz-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires d3, and includes references (resource) and assets (resource) components.

What problem does it solve? Building bespoke charts, network diagrams, and geographic visualisations requires precise control over SVG elements, scales, and transitions that standard charting libraries cannot provide. ## Core Features & Use Cases - Custom Chart Patterns: Implement bar, line, scatter, pie, chord, heatmap, treemap, and force-directed network visualisations with full control over every visual element. - Interactivity & Animation: Add tooltips, zoom, pan, brush selection, drag behaviour, and choreographed transitions to any visualisation. - Framework-Agnostic Integration: Works in vanilla JavaScript, React, Vue, or Svelte using either direct DOM manipulation or declarative rendering patterns. - Use Case: A developer needs a force-directed network graph with draggable nodes and hover tooltips for a dashboard; this Skill provides the complete d3.js implementation pattern including simulation setup and event handlers. ## Quick Start Create an interactive bar chart with tooltips and responsive sizing using d3.js for my sales data.

Frequently Asked Questions about d3-viz

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a bar chart with d3.js?

Create a band scale for categories on the x-axis and a linear scale for values on the y-axis, then bind data to rect elements using the join pattern. Set each rect's x position from the band scale, width from bandwidth(), and height from the inverted y-scale.

How do I use d3.js with React?

Use d3 for calculations like scales and layouts while letting React render the elements, or use a ref with direct DOM manipulation inside an effect. The declarative pattern returns computed attributes that React maps to SVG elements.

What d3.js scale should I use for my data?

Use scaleLinear for continuous numeric data, scaleBand for categorical bar charts, scaleTime for dates, scaleLog for data spanning orders of magnitude, and scaleOrdinal for category colours. Use scaleSqrt when encoding values as circle radii for accurate area perception.

Why are my d3.js transitions not working?

Transitions fail when .transition() is called after attribute changes instead of before, or when data binding lacks a key function for object constancy. Ensure elements have stable keys and call .transition() before modifying attributes.

When should I not use d3.js for visualisation?

Avoid d3.js for 3D visualisations, where Three.js is the appropriate tool. For simple standard charts with no custom interactions, a higher-level charting library may require less code than d3's low-level API.

How do I make a d3.js chart responsive?

Use a ResizeObserver or window resize listener to detect container size changes, then update the SVG width and height attributes and redraw the visualisation. Return a cleanup function that removes the listener when the component unmounts.