Creator · calesthio
Last updated · Sep 2, 2026
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or i
Creator · calesthio
Last updated · Sep 2, 2026
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or i
Creator · calesthio
Last updated · Sep 2, 2026
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or i
Creator · calesthio
Last updated · Sep 2, 2026
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or i
Review then install
Install targets
Codex install prompt
Install the "d3-viz" agent skill from https://github.com/calesthio/OpenMontage/tree/main/.agents/skills/d3-viz. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"calesthio-d3-viz","task":"Install d3-viz","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add calesthio/OpenMontage --skill d3-viz
Maintenance
fresh
16d since push
Risk
Safe to try
No major risk signals from available metadata
GitHub quality
56K
94/100 Quality · 86/100 Trust
Coverage tags
Review notes
No major risk signals from available metadata
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
56K GitHub stars
Repo activity
56K stars, 6.9K forks
Maintenance
16d since push
License
AGPL-3.0
Install
npx skills add calesthio/OpenMontage --skill d3-viz
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add calesthio/OpenMontage --skill d3-vizDo not use when
Alternative
175.1K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
85.2K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
175.1K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/calesthio-d3-viz/install
Agent should check
Copy prompt
Task: Use d3-viz in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/calesthio-d3-viz/install
Install command: npx skills add calesthio/OpenMontage --skill d3-viz
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/calesthio-d3-viz/install
LLM text format
/api/skills/calesthio-d3-viz/install?format=text
Find alternatives
/api/skills/search?q=d3-viz&limit=3
Agent prompt
Use d3-viz for this task. Review https://www.openagentskill.com/api/skills/calesthio-d3-viz/install, then install with: npx skills add calesthio/OpenMontage --skill d3-vizRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/calesthio-d3-viz
LLM text
/api/registry/manifest/calesthio-d3-viz?format=text
Install alias
/api/registry/install/calesthio-d3-viz
Recommend
/api/registry/recommend?task=Use%20d3-viz%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS56K GitHub stars
Stars/forks activity
PASS56K stars, 6.9K forks; issue activity unavailable in current metadata
Recent maintenance
PASS16d since push
License clarity
PASSAGPL-3.0
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: d3-viz description: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. ---
# D3.js Visualisation
## Overview
This skill provides guidance for creating sophisticated, interactive data visualisations using d3.js. D3.js (Data-Driven Documents) excels at binding data to DOM elements and applying data-driven transformations to create custom, publication-quality visualisations with precise control over every visual element. The techniques work across any JavaScript environment, including vanilla JavaScript, React, Vue, Svelte, and other frameworks.
## When to use d3.js
**Use d3.js for:** - Custom visualisations requiring unique visual encodings or layouts - Interactive explorations with complex pan, zoom, or brush behaviours - Network/graph visualisations (force-directed layouts, tree diagrams, hierarchies, chord diagrams) - Geographic visualisations with custom projections - Visualisations requiring smooth, choreographed transitions - Publication-quality graphics with fine-grained styling control - Novel chart types not available in standard libraries
**Consider alternatives for:** - 3D visualisations - use Three.js instead
## Core workflow
### 1. Set up d3.js
Import d3 at the top of your script:
```javascript import * as d3 from 'd3'; ```
Or use the CDN version (7.x):
```html <script src="https://d3js.org/d3.v7.min.js"></script> ```
All modules (scales, axes, shapes, transitions, etc.) are accessible through the `d3` namespace.
### 2. Choose the integration pattern
**Pattern A: Direct DOM manipulation (recommended for most cases)** Use d3 to select DOM elements and manipulate them imperatively. This works in any JavaScript environment:
```javascript function drawChart(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Select by ID, class, or DOM element
// Clear previous content svg.selectAll("*").remove();
// Set up dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 };
// Create scales, axes, and draw visualisation // ... d3 code here ... }
// Call when data changes drawChart(myData); ```
**Pattern B: Declarative rendering (for frameworks with templating)** Use d3 for data calculations (scales, layouts) but render elements via your framework:
```javascript function getChartElements(data) { const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([0, 400]);
return data.map((d, i) => ({ x: 50, y: i * 30, width: xScale(d.value), height: 25 })); }
// In React: {getChartElements(data).map((d, i) => <rect key={i} {...d} fill="steelblue" />)} // In Vue: v-for directive over the returned array // In vanilla JS: Create elements manually from the returned data ```
Use Pattern A for complex visualisations with transitions, interactions, or when leveraging d3's full capabilities. Use Pattern B for simpler visualisations or when your framework prefers declarative rendering.
### 3. Structure the visualisation code
Follow this standard structure in your drawing function:
```javascript function drawVisualization(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Or pass a selector/element svg.selectAll("*").remove(); // Clear previous render
// 1. Define dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// 2. Create main group with margins const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// 3. Create scales const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.x)]) .range([0, innerWidth]);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.y)]) .range([innerHeight, 0]); // Note: inverted for SVG coordinates
// 4. Create and append axes const xAxis = d3.axisBottom(xScale); const yAxis = d3.axisLeft(yScale);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(xAxis);
g.append("g") .call(yAxis);
// 5. Bind data and create visual elements g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", 5) .attr("fill", "steelblue"); }
// Call when data changes drawVisualization(myData); ```
### 4. Implement responsive sizing
Make visualisations responsive to container size:
```javascript function setupResponsiveChart(containerId, data) { const container = document.getElementById(containerId); const svg = d3.select(`#${containerId}`).append('svg');
function updateChart() { const { width, height } = container.getBoundingClientRect(); svg.attr('width', width).attr('height', height);
// Redraw visualisation with new dimensions drawChart(data, svg, width, height); }
// Update on initial load updateChart();
// Update on window resize window.addEventListener('resize', updateChart);
// Return cleanup function return () => window.removeEventListener('resize', updateChart); }
// Usage: // const cleanup = setupResponsiveChart('chart-container', myData); // cleanup(); // Call when component unmounts or element removed ```
Or use ResizeObserver for more direct container monitoring:
```javascript function setupResponsiveChartWithObserver(svgElement, data) { const observer = new ResizeObserver(() => { const { width, height } = svgElement.getBoundingClientRect(); d3.select(svgElement) .attr('width', width) .attr('height', height);
// Redraw visualisation drawChart(data, d3.select(svgElement), width, height); });
observer.observe(svgElement.parentElement); return () => observer.disconnect(); } ```
## Common visualisation patterns
### Bar chart
```javascript function drawBarChart(data, svgElement) { if (!data || data.length === 0) return;
const svg = d3.select(svgElement); svg.selectAll("*").remove();
const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
const xScale = d3.scaleBand() .domain(data.map(d => d.category)) .range([0, innerWidth]) .padding(0.1);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([innerHeight, 0]);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(d3.axisBottom(xScale));
g.append("g") .call(d3.axisLeft(yScale));
g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.category)) .attr("y", d => yScale(d.value)) .attr("width", xScale.bandwidth()) .attr("height", d => innerHeight - yScale(d.value)) .attr("fill", "steelblue"); }
// Usage: // drawBarChart(myData, document.getElementById('chart')); ```
### Line chart
```javascript const line = d3.line() .x(d => xScale(d.date)) .y(d => yScale(d.value)) .curve(d3.curveMonotoneX); // Smooth curve
g.append("path") .datum(data) .attr("fill", "none") .attr("stroke", "steelblue") .attr("stroke-width", 2) .attr("d", line); ```
### Scatter plot
```javascript g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", d => sizeScale(d.size)) // Optional: size encoding .attr("fill", d => colourScale(d.category)) // Optional: colour encoding .attr("opacity", 0.7); ```
### Chord diagram
A chord diagram shows relationships between entities in a circular layout, with ribbons representing flows between them:
```javascript function drawChordDiagram(data) { // data format: array of objects with source, target, and value // Example: [{ source: 'A', target: 'B', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 600; const height = 600; const innerRadius = Math.min(width, height) * 0.3; const outerRadius = innerRadius + 30;
// Create matrix from data const nodes = Array.from(new Set(data.flatMap(d => [d.source, d.target]))); const matrix = Array.from({ length: nodes.length }, () => Array(nodes.length).fill(0));
data.forEach(d => { const i = nodes.indexOf(d.source); const j = nodes.indexOf(d.target); matrix[i][j] += d.value; matrix[j][i] += d.value; });
// Create chord layout const chord = d3.chord() .padAngle(0.05) .sortSubgroups(d3.descending);
const arc = d3.arc() .innerRadius(innerRadius) .outerRadius(outerRadius);
const ribbon = d3.ribbon() .source(d => d.source) .target(d => d.target);
const colourScale = d3.scaleOrdinal(d3.schemeCategory10) .domain(nodes);
const g = svg.append("g") .attr("transform", `translate(${width / 2},${height / 2})`);
const chords = chord(matrix);
// Draw ribbons g.append("g") .attr("fill-opacity", 0.67) .selectAll("path") .data(chords) .join("path") .attr("d", ribbon) .attr("fill", d => colourScale(nodes[d.source.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.source.index])).darker());
// Draw groups (arcs) const group = g.append("g") .selectAll("g") .data(chords.groups) .join("g");
group.append("path") .attr("d", arc) .attr("fill", d => colourScale(nodes[d.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.index])).darker());
// Add labels group.append("text") .each(d => { d.angle = (d.startAngle + d.endAngle) / 2; }) .attr("dy", "0.31em") .attr("transform", d => `rotate(${(d.angle * 180 / Math.PI) - 90})translate(${outerRadius + 30})${d.angle > Math.PI ? "rotate(180)" : ""}`) .attr("text-anchor", d => d.angle > Math.PI ? "end" : null) .text((d, i) => nodes[i]) .style("font-size", "12px"); } ```
### Heatmap
A heatmap uses colour to encode values in a two-dimensional grid, useful for showing patterns across categories:
```javascript function drawHeatmap(data) { // data format: array of objects with row, column, and value // Example: [{ row: 'A', column: 'X', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 800; const height = 600; const margin = { top: 100, right: 30, bottom: 30, left: 100 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// Get unique rows and columns const rows = Array.from(new Set(data.map(d => d.row))); const columns = Array.from(new Set(data.map(d => d.column)));
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// Create scales const xScale = d3.scaleBand() .domain(columns) .range([0, innerWidth]) .padding(0.01);
const yScale = d3.scaleBand() .domain(rows) .range([0, innerHeight]) .padding(0.01);
// Colour scale for values const colourScale = d3.scaleSequential(d3.interpolateYlOrRd) .domain([0, d3.max(data, d => d.value)]);
// Draw rectangles g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.column)) .attr("y", d => yScale(d.row)) .attr("width", xScale.bandwidth()) .attr("height", yScale.bandw
Source provenance
Decision snapshot
55,527 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for d3-viz, ready for a manual X post.
d3-viz: Creating interactive data visualisations using d3.js. This skill should be used when creating... 55.5K stars https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x
Listing + install path for d3-viz: https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x Install: npx skills add calesthio/OpenMontage --skill d3-viz
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to calesthio but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz/audit)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)calesthio
@calesthio
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
175.1K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
85.2K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
175.1K StarsReview then install
Install targets
Codex install prompt
Install the "d3-viz" agent skill from https://github.com/calesthio/OpenMontage/tree/main/.agents/skills/d3-viz. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"calesthio-d3-viz","task":"Install d3-viz","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add calesthio/OpenMontage --skill d3-viz
Maintenance
fresh
16d since push
Risk
Safe to try
No major risk signals from available metadata
GitHub quality
56K
94/100 Quality · 86/100 Trust
Coverage tags
Review notes
No major risk signals from available metadata
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
56K GitHub stars
Repo activity
56K stars, 6.9K forks
Maintenance
16d since push
License
AGPL-3.0
Install
npx skills add calesthio/OpenMontage --skill d3-viz
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add calesthio/OpenMontage --skill d3-vizDo not use when
Alternative
175.1K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
85.2K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
175.1K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/calesthio-d3-viz/install
Agent should check
Copy prompt
Task: Use d3-viz in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/calesthio-d3-viz/install
Install command: npx skills add calesthio/OpenMontage --skill d3-viz
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/calesthio-d3-viz/install
LLM text format
/api/skills/calesthio-d3-viz/install?format=text
Find alternatives
/api/skills/search?q=d3-viz&limit=3
Agent prompt
Use d3-viz for this task. Review https://www.openagentskill.com/api/skills/calesthio-d3-viz/install, then install with: npx skills add calesthio/OpenMontage --skill d3-vizRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/calesthio-d3-viz
LLM text
/api/registry/manifest/calesthio-d3-viz?format=text
Install alias
/api/registry/install/calesthio-d3-viz
Recommend
/api/registry/recommend?task=Use%20d3-viz%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS56K GitHub stars
Stars/forks activity
PASS56K stars, 6.9K forks; issue activity unavailable in current metadata
Recent maintenance
PASS16d since push
License clarity
PASSAGPL-3.0
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: d3-viz description: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. ---
# D3.js Visualisation
## Overview
This skill provides guidance for creating sophisticated, interactive data visualisations using d3.js. D3.js (Data-Driven Documents) excels at binding data to DOM elements and applying data-driven transformations to create custom, publication-quality visualisations with precise control over every visual element. The techniques work across any JavaScript environment, including vanilla JavaScript, React, Vue, Svelte, and other frameworks.
## When to use d3.js
**Use d3.js for:** - Custom visualisations requiring unique visual encodings or layouts - Interactive explorations with complex pan, zoom, or brush behaviours - Network/graph visualisations (force-directed layouts, tree diagrams, hierarchies, chord diagrams) - Geographic visualisations with custom projections - Visualisations requiring smooth, choreographed transitions - Publication-quality graphics with fine-grained styling control - Novel chart types not available in standard libraries
**Consider alternatives for:** - 3D visualisations - use Three.js instead
## Core workflow
### 1. Set up d3.js
Import d3 at the top of your script:
```javascript import * as d3 from 'd3'; ```
Or use the CDN version (7.x):
```html <script src="https://d3js.org/d3.v7.min.js"></script> ```
All modules (scales, axes, shapes, transitions, etc.) are accessible through the `d3` namespace.
### 2. Choose the integration pattern
**Pattern A: Direct DOM manipulation (recommended for most cases)** Use d3 to select DOM elements and manipulate them imperatively. This works in any JavaScript environment:
```javascript function drawChart(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Select by ID, class, or DOM element
// Clear previous content svg.selectAll("*").remove();
// Set up dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 };
// Create scales, axes, and draw visualisation // ... d3 code here ... }
// Call when data changes drawChart(myData); ```
**Pattern B: Declarative rendering (for frameworks with templating)** Use d3 for data calculations (scales, layouts) but render elements via your framework:
```javascript function getChartElements(data) { const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([0, 400]);
return data.map((d, i) => ({ x: 50, y: i * 30, width: xScale(d.value), height: 25 })); }
// In React: {getChartElements(data).map((d, i) => <rect key={i} {...d} fill="steelblue" />)} // In Vue: v-for directive over the returned array // In vanilla JS: Create elements manually from the returned data ```
Use Pattern A for complex visualisations with transitions, interactions, or when leveraging d3's full capabilities. Use Pattern B for simpler visualisations or when your framework prefers declarative rendering.
### 3. Structure the visualisation code
Follow this standard structure in your drawing function:
```javascript function drawVisualization(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Or pass a selector/element svg.selectAll("*").remove(); // Clear previous render
// 1. Define dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// 2. Create main group with margins const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// 3. Create scales const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.x)]) .range([0, innerWidth]);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.y)]) .range([innerHeight, 0]); // Note: inverted for SVG coordinates
// 4. Create and append axes const xAxis = d3.axisBottom(xScale); const yAxis = d3.axisLeft(yScale);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(xAxis);
g.append("g") .call(yAxis);
// 5. Bind data and create visual elements g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", 5) .attr("fill", "steelblue"); }
// Call when data changes drawVisualization(myData); ```
### 4. Implement responsive sizing
Make visualisations responsive to container size:
```javascript function setupResponsiveChart(containerId, data) { const container = document.getElementById(containerId); const svg = d3.select(`#${containerId}`).append('svg');
function updateChart() { const { width, height } = container.getBoundingClientRect(); svg.attr('width', width).attr('height', height);
// Redraw visualisation with new dimensions drawChart(data, svg, width, height); }
// Update on initial load updateChart();
// Update on window resize window.addEventListener('resize', updateChart);
// Return cleanup function return () => window.removeEventListener('resize', updateChart); }
// Usage: // const cleanup = setupResponsiveChart('chart-container', myData); // cleanup(); // Call when component unmounts or element removed ```
Or use ResizeObserver for more direct container monitoring:
```javascript function setupResponsiveChartWithObserver(svgElement, data) { const observer = new ResizeObserver(() => { const { width, height } = svgElement.getBoundingClientRect(); d3.select(svgElement) .attr('width', width) .attr('height', height);
// Redraw visualisation drawChart(data, d3.select(svgElement), width, height); });
observer.observe(svgElement.parentElement); return () => observer.disconnect(); } ```
## Common visualisation patterns
### Bar chart
```javascript function drawBarChart(data, svgElement) { if (!data || data.length === 0) return;
const svg = d3.select(svgElement); svg.selectAll("*").remove();
const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
const xScale = d3.scaleBand() .domain(data.map(d => d.category)) .range([0, innerWidth]) .padding(0.1);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([innerHeight, 0]);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(d3.axisBottom(xScale));
g.append("g") .call(d3.axisLeft(yScale));
g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.category)) .attr("y", d => yScale(d.value)) .attr("width", xScale.bandwidth()) .attr("height", d => innerHeight - yScale(d.value)) .attr("fill", "steelblue"); }
// Usage: // drawBarChart(myData, document.getElementById('chart')); ```
### Line chart
```javascript const line = d3.line() .x(d => xScale(d.date)) .y(d => yScale(d.value)) .curve(d3.curveMonotoneX); // Smooth curve
g.append("path") .datum(data) .attr("fill", "none") .attr("stroke", "steelblue") .attr("stroke-width", 2) .attr("d", line); ```
### Scatter plot
```javascript g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", d => sizeScale(d.size)) // Optional: size encoding .attr("fill", d => colourScale(d.category)) // Optional: colour encoding .attr("opacity", 0.7); ```
### Chord diagram
A chord diagram shows relationships between entities in a circular layout, with ribbons representing flows between them:
```javascript function drawChordDiagram(data) { // data format: array of objects with source, target, and value // Example: [{ source: 'A', target: 'B', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 600; const height = 600; const innerRadius = Math.min(width, height) * 0.3; const outerRadius = innerRadius + 30;
// Create matrix from data const nodes = Array.from(new Set(data.flatMap(d => [d.source, d.target]))); const matrix = Array.from({ length: nodes.length }, () => Array(nodes.length).fill(0));
data.forEach(d => { const i = nodes.indexOf(d.source); const j = nodes.indexOf(d.target); matrix[i][j] += d.value; matrix[j][i] += d.value; });
// Create chord layout const chord = d3.chord() .padAngle(0.05) .sortSubgroups(d3.descending);
const arc = d3.arc() .innerRadius(innerRadius) .outerRadius(outerRadius);
const ribbon = d3.ribbon() .source(d => d.source) .target(d => d.target);
const colourScale = d3.scaleOrdinal(d3.schemeCategory10) .domain(nodes);
const g = svg.append("g") .attr("transform", `translate(${width / 2},${height / 2})`);
const chords = chord(matrix);
// Draw ribbons g.append("g") .attr("fill-opacity", 0.67) .selectAll("path") .data(chords) .join("path") .attr("d", ribbon) .attr("fill", d => colourScale(nodes[d.source.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.source.index])).darker());
// Draw groups (arcs) const group = g.append("g") .selectAll("g") .data(chords.groups) .join("g");
group.append("path") .attr("d", arc) .attr("fill", d => colourScale(nodes[d.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.index])).darker());
// Add labels group.append("text") .each(d => { d.angle = (d.startAngle + d.endAngle) / 2; }) .attr("dy", "0.31em") .attr("transform", d => `rotate(${(d.angle * 180 / Math.PI) - 90})translate(${outerRadius + 30})${d.angle > Math.PI ? "rotate(180)" : ""}`) .attr("text-anchor", d => d.angle > Math.PI ? "end" : null) .text((d, i) => nodes[i]) .style("font-size", "12px"); } ```
### Heatmap
A heatmap uses colour to encode values in a two-dimensional grid, useful for showing patterns across categories:
```javascript function drawHeatmap(data) { // data format: array of objects with row, column, and value // Example: [{ row: 'A', column: 'X', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 800; const height = 600; const margin = { top: 100, right: 30, bottom: 30, left: 100 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// Get unique rows and columns const rows = Array.from(new Set(data.map(d => d.row))); const columns = Array.from(new Set(data.map(d => d.column)));
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// Create scales const xScale = d3.scaleBand() .domain(columns) .range([0, innerWidth]) .padding(0.01);
const yScale = d3.scaleBand() .domain(rows) .range([0, innerHeight]) .padding(0.01);
// Colour scale for values const colourScale = d3.scaleSequential(d3.interpolateYlOrRd) .domain([0, d3.max(data, d => d.value)]);
// Draw rectangles g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.column)) .attr("y", d => yScale(d.row)) .attr("width", xScale.bandwidth()) .attr("height", yScale.bandw
Source provenance
Decision snapshot
55,527 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for d3-viz, ready for a manual X post.
d3-viz: Creating interactive data visualisations using d3.js. This skill should be used when creating... 55.5K stars https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x
Listing + install path for d3-viz: https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x Install: npx skills add calesthio/OpenMontage --skill d3-viz
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to calesthio but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz/audit)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)calesthio
@calesthio
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
175.1K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
85.2K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
175.1K StarsReview then install
Install targets
Codex install prompt
Install the "d3-viz" agent skill from https://github.com/calesthio/OpenMontage/tree/main/.agents/skills/d3-viz. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"calesthio-d3-viz","task":"Install d3-viz","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add calesthio/OpenMontage --skill d3-viz
Maintenance
fresh
16d since push
Risk
Safe to try
No major risk signals from available metadata
GitHub quality
56K
94/100 Quality · 86/100 Trust
Coverage tags
Review notes
No major risk signals from available metadata
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
56K GitHub stars
Repo activity
56K stars, 6.9K forks
Maintenance
16d since push
License
AGPL-3.0
Install
npx skills add calesthio/OpenMontage --skill d3-viz
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add calesthio/OpenMontage --skill d3-vizDo not use when
Alternative
175.1K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
85.2K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
175.1K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/calesthio-d3-viz/install
Agent should check
Copy prompt
Task: Use d3-viz in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/calesthio-d3-viz/install
Install command: npx skills add calesthio/OpenMontage --skill d3-viz
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/calesthio-d3-viz/install
LLM text format
/api/skills/calesthio-d3-viz/install?format=text
Find alternatives
/api/skills/search?q=d3-viz&limit=3
Agent prompt
Use d3-viz for this task. Review https://www.openagentskill.com/api/skills/calesthio-d3-viz/install, then install with: npx skills add calesthio/OpenMontage --skill d3-vizRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/calesthio-d3-viz
LLM text
/api/registry/manifest/calesthio-d3-viz?format=text
Install alias
/api/registry/install/calesthio-d3-viz
Recommend
/api/registry/recommend?task=Use%20d3-viz%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS56K GitHub stars
Stars/forks activity
PASS56K stars, 6.9K forks; issue activity unavailable in current metadata
Recent maintenance
PASS16d since push
License clarity
PASSAGPL-3.0
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: d3-viz description: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. ---
# D3.js Visualisation
## Overview
This skill provides guidance for creating sophisticated, interactive data visualisations using d3.js. D3.js (Data-Driven Documents) excels at binding data to DOM elements and applying data-driven transformations to create custom, publication-quality visualisations with precise control over every visual element. The techniques work across any JavaScript environment, including vanilla JavaScript, React, Vue, Svelte, and other frameworks.
## When to use d3.js
**Use d3.js for:** - Custom visualisations requiring unique visual encodings or layouts - Interactive explorations with complex pan, zoom, or brush behaviours - Network/graph visualisations (force-directed layouts, tree diagrams, hierarchies, chord diagrams) - Geographic visualisations with custom projections - Visualisations requiring smooth, choreographed transitions - Publication-quality graphics with fine-grained styling control - Novel chart types not available in standard libraries
**Consider alternatives for:** - 3D visualisations - use Three.js instead
## Core workflow
### 1. Set up d3.js
Import d3 at the top of your script:
```javascript import * as d3 from 'd3'; ```
Or use the CDN version (7.x):
```html <script src="https://d3js.org/d3.v7.min.js"></script> ```
All modules (scales, axes, shapes, transitions, etc.) are accessible through the `d3` namespace.
### 2. Choose the integration pattern
**Pattern A: Direct DOM manipulation (recommended for most cases)** Use d3 to select DOM elements and manipulate them imperatively. This works in any JavaScript environment:
```javascript function drawChart(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Select by ID, class, or DOM element
// Clear previous content svg.selectAll("*").remove();
// Set up dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 };
// Create scales, axes, and draw visualisation // ... d3 code here ... }
// Call when data changes drawChart(myData); ```
**Pattern B: Declarative rendering (for frameworks with templating)** Use d3 for data calculations (scales, layouts) but render elements via your framework:
```javascript function getChartElements(data) { const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([0, 400]);
return data.map((d, i) => ({ x: 50, y: i * 30, width: xScale(d.value), height: 25 })); }
// In React: {getChartElements(data).map((d, i) => <rect key={i} {...d} fill="steelblue" />)} // In Vue: v-for directive over the returned array // In vanilla JS: Create elements manually from the returned data ```
Use Pattern A for complex visualisations with transitions, interactions, or when leveraging d3's full capabilities. Use Pattern B for simpler visualisations or when your framework prefers declarative rendering.
### 3. Structure the visualisation code
Follow this standard structure in your drawing function:
```javascript function drawVisualization(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Or pass a selector/element svg.selectAll("*").remove(); // Clear previous render
// 1. Define dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// 2. Create main group with margins const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// 3. Create scales const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.x)]) .range([0, innerWidth]);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.y)]) .range([innerHeight, 0]); // Note: inverted for SVG coordinates
// 4. Create and append axes const xAxis = d3.axisBottom(xScale); const yAxis = d3.axisLeft(yScale);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(xAxis);
g.append("g") .call(yAxis);
// 5. Bind data and create visual elements g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", 5) .attr("fill", "steelblue"); }
// Call when data changes drawVisualization(myData); ```
### 4. Implement responsive sizing
Make visualisations responsive to container size:
```javascript function setupResponsiveChart(containerId, data) { const container = document.getElementById(containerId); const svg = d3.select(`#${containerId}`).append('svg');
function updateChart() { const { width, height } = container.getBoundingClientRect(); svg.attr('width', width).attr('height', height);
// Redraw visualisation with new dimensions drawChart(data, svg, width, height); }
// Update on initial load updateChart();
// Update on window resize window.addEventListener('resize', updateChart);
// Return cleanup function return () => window.removeEventListener('resize', updateChart); }
// Usage: // const cleanup = setupResponsiveChart('chart-container', myData); // cleanup(); // Call when component unmounts or element removed ```
Or use ResizeObserver for more direct container monitoring:
```javascript function setupResponsiveChartWithObserver(svgElement, data) { const observer = new ResizeObserver(() => { const { width, height } = svgElement.getBoundingClientRect(); d3.select(svgElement) .attr('width', width) .attr('height', height);
// Redraw visualisation drawChart(data, d3.select(svgElement), width, height); });
observer.observe(svgElement.parentElement); return () => observer.disconnect(); } ```
## Common visualisation patterns
### Bar chart
```javascript function drawBarChart(data, svgElement) { if (!data || data.length === 0) return;
const svg = d3.select(svgElement); svg.selectAll("*").remove();
const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
const xScale = d3.scaleBand() .domain(data.map(d => d.category)) .range([0, innerWidth]) .padding(0.1);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([innerHeight, 0]);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(d3.axisBottom(xScale));
g.append("g") .call(d3.axisLeft(yScale));
g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.category)) .attr("y", d => yScale(d.value)) .attr("width", xScale.bandwidth()) .attr("height", d => innerHeight - yScale(d.value)) .attr("fill", "steelblue"); }
// Usage: // drawBarChart(myData, document.getElementById('chart')); ```
### Line chart
```javascript const line = d3.line() .x(d => xScale(d.date)) .y(d => yScale(d.value)) .curve(d3.curveMonotoneX); // Smooth curve
g.append("path") .datum(data) .attr("fill", "none") .attr("stroke", "steelblue") .attr("stroke-width", 2) .attr("d", line); ```
### Scatter plot
```javascript g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", d => sizeScale(d.size)) // Optional: size encoding .attr("fill", d => colourScale(d.category)) // Optional: colour encoding .attr("opacity", 0.7); ```
### Chord diagram
A chord diagram shows relationships between entities in a circular layout, with ribbons representing flows between them:
```javascript function drawChordDiagram(data) { // data format: array of objects with source, target, and value // Example: [{ source: 'A', target: 'B', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 600; const height = 600; const innerRadius = Math.min(width, height) * 0.3; const outerRadius = innerRadius + 30;
// Create matrix from data const nodes = Array.from(new Set(data.flatMap(d => [d.source, d.target]))); const matrix = Array.from({ length: nodes.length }, () => Array(nodes.length).fill(0));
data.forEach(d => { const i = nodes.indexOf(d.source); const j = nodes.indexOf(d.target); matrix[i][j] += d.value; matrix[j][i] += d.value; });
// Create chord layout const chord = d3.chord() .padAngle(0.05) .sortSubgroups(d3.descending);
const arc = d3.arc() .innerRadius(innerRadius) .outerRadius(outerRadius);
const ribbon = d3.ribbon() .source(d => d.source) .target(d => d.target);
const colourScale = d3.scaleOrdinal(d3.schemeCategory10) .domain(nodes);
const g = svg.append("g") .attr("transform", `translate(${width / 2},${height / 2})`);
const chords = chord(matrix);
// Draw ribbons g.append("g") .attr("fill-opacity", 0.67) .selectAll("path") .data(chords) .join("path") .attr("d", ribbon) .attr("fill", d => colourScale(nodes[d.source.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.source.index])).darker());
// Draw groups (arcs) const group = g.append("g") .selectAll("g") .data(chords.groups) .join("g");
group.append("path") .attr("d", arc) .attr("fill", d => colourScale(nodes[d.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.index])).darker());
// Add labels group.append("text") .each(d => { d.angle = (d.startAngle + d.endAngle) / 2; }) .attr("dy", "0.31em") .attr("transform", d => `rotate(${(d.angle * 180 / Math.PI) - 90})translate(${outerRadius + 30})${d.angle > Math.PI ? "rotate(180)" : ""}`) .attr("text-anchor", d => d.angle > Math.PI ? "end" : null) .text((d, i) => nodes[i]) .style("font-size", "12px"); } ```
### Heatmap
A heatmap uses colour to encode values in a two-dimensional grid, useful for showing patterns across categories:
```javascript function drawHeatmap(data) { // data format: array of objects with row, column, and value // Example: [{ row: 'A', column: 'X', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 800; const height = 600; const margin = { top: 100, right: 30, bottom: 30, left: 100 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// Get unique rows and columns const rows = Array.from(new Set(data.map(d => d.row))); const columns = Array.from(new Set(data.map(d => d.column)));
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// Create scales const xScale = d3.scaleBand() .domain(columns) .range([0, innerWidth]) .padding(0.01);
const yScale = d3.scaleBand() .domain(rows) .range([0, innerHeight]) .padding(0.01);
// Colour scale for values const colourScale = d3.scaleSequential(d3.interpolateYlOrRd) .domain([0, d3.max(data, d => d.value)]);
// Draw rectangles g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.column)) .attr("y", d => yScale(d.row)) .attr("width", xScale.bandwidth()) .attr("height", yScale.bandw
Source provenance
Decision snapshot
55,527 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for d3-viz, ready for a manual X post.
d3-viz: Creating interactive data visualisations using d3.js. This skill should be used when creating... 55.5K stars https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x
Listing + install path for d3-viz: https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x Install: npx skills add calesthio/OpenMontage --skill d3-viz
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to calesthio but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz/audit)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)calesthio
@calesthio
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
175.1K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
85.2K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
175.1K StarsReview then install
Install targets
Codex install prompt
Install the "d3-viz" agent skill from https://github.com/calesthio/OpenMontage/tree/main/.agents/skills/d3-viz. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"calesthio-d3-viz","task":"Install d3-viz","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add calesthio/OpenMontage --skill d3-viz
Maintenance
fresh
16d since push
Risk
Safe to try
No major risk signals from available metadata
GitHub quality
56K
94/100 Quality · 86/100 Trust
Coverage tags
Review notes
No major risk signals from available metadata
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
56K GitHub stars
Repo activity
56K stars, 6.9K forks
Maintenance
16d since push
License
AGPL-3.0
Install
npx skills add calesthio/OpenMontage --skill d3-viz
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add calesthio/OpenMontage --skill d3-vizDo not use when
Alternative
175.1K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
85.2K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
175.1K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/calesthio-d3-viz/install
Agent should check
Copy prompt
Task: Use d3-viz in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20d3-viz%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/calesthio-d3-viz/install
Install command: npx skills add calesthio/OpenMontage --skill d3-viz
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/calesthio-d3-viz/install
LLM text format
/api/skills/calesthio-d3-viz/install?format=text
Find alternatives
/api/skills/search?q=d3-viz&limit=3
Agent prompt
Use d3-viz for this task. Review https://www.openagentskill.com/api/skills/calesthio-d3-viz/install, then install with: npx skills add calesthio/OpenMontage --skill d3-vizRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/calesthio-d3-viz
LLM text
/api/registry/manifest/calesthio-d3-viz?format=text
Install alias
/api/registry/install/calesthio-d3-viz
Recommend
/api/registry/recommend?task=Use%20d3-viz%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS56K GitHub stars
Stars/forks activity
PASS56K stars, 6.9K forks; issue activity unavailable in current metadata
Recent maintenance
PASS16d since push
License clarity
PASSAGPL-3.0
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- name: d3-viz description: Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment. ---
# D3.js Visualisation
## Overview
This skill provides guidance for creating sophisticated, interactive data visualisations using d3.js. D3.js (Data-Driven Documents) excels at binding data to DOM elements and applying data-driven transformations to create custom, publication-quality visualisations with precise control over every visual element. The techniques work across any JavaScript environment, including vanilla JavaScript, React, Vue, Svelte, and other frameworks.
## When to use d3.js
**Use d3.js for:** - Custom visualisations requiring unique visual encodings or layouts - Interactive explorations with complex pan, zoom, or brush behaviours - Network/graph visualisations (force-directed layouts, tree diagrams, hierarchies, chord diagrams) - Geographic visualisations with custom projections - Visualisations requiring smooth, choreographed transitions - Publication-quality graphics with fine-grained styling control - Novel chart types not available in standard libraries
**Consider alternatives for:** - 3D visualisations - use Three.js instead
## Core workflow
### 1. Set up d3.js
Import d3 at the top of your script:
```javascript import * as d3 from 'd3'; ```
Or use the CDN version (7.x):
```html <script src="https://d3js.org/d3.v7.min.js"></script> ```
All modules (scales, axes, shapes, transitions, etc.) are accessible through the `d3` namespace.
### 2. Choose the integration pattern
**Pattern A: Direct DOM manipulation (recommended for most cases)** Use d3 to select DOM elements and manipulate them imperatively. This works in any JavaScript environment:
```javascript function drawChart(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Select by ID, class, or DOM element
// Clear previous content svg.selectAll("*").remove();
// Set up dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 };
// Create scales, axes, and draw visualisation // ... d3 code here ... }
// Call when data changes drawChart(myData); ```
**Pattern B: Declarative rendering (for frameworks with templating)** Use d3 for data calculations (scales, layouts) but render elements via your framework:
```javascript function getChartElements(data) { const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([0, 400]);
return data.map((d, i) => ({ x: 50, y: i * 30, width: xScale(d.value), height: 25 })); }
// In React: {getChartElements(data).map((d, i) => <rect key={i} {...d} fill="steelblue" />)} // In Vue: v-for directive over the returned array // In vanilla JS: Create elements manually from the returned data ```
Use Pattern A for complex visualisations with transitions, interactions, or when leveraging d3's full capabilities. Use Pattern B for simpler visualisations or when your framework prefers declarative rendering.
### 3. Structure the visualisation code
Follow this standard structure in your drawing function:
```javascript function drawVisualization(data) { if (!data || data.length === 0) return;
const svg = d3.select('#chart'); // Or pass a selector/element svg.selectAll("*").remove(); // Clear previous render
// 1. Define dimensions const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// 2. Create main group with margins const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// 3. Create scales const xScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.x)]) .range([0, innerWidth]);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.y)]) .range([innerHeight, 0]); // Note: inverted for SVG coordinates
// 4. Create and append axes const xAxis = d3.axisBottom(xScale); const yAxis = d3.axisLeft(yScale);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(xAxis);
g.append("g") .call(yAxis);
// 5. Bind data and create visual elements g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", 5) .attr("fill", "steelblue"); }
// Call when data changes drawVisualization(myData); ```
### 4. Implement responsive sizing
Make visualisations responsive to container size:
```javascript function setupResponsiveChart(containerId, data) { const container = document.getElementById(containerId); const svg = d3.select(`#${containerId}`).append('svg');
function updateChart() { const { width, height } = container.getBoundingClientRect(); svg.attr('width', width).attr('height', height);
// Redraw visualisation with new dimensions drawChart(data, svg, width, height); }
// Update on initial load updateChart();
// Update on window resize window.addEventListener('resize', updateChart);
// Return cleanup function return () => window.removeEventListener('resize', updateChart); }
// Usage: // const cleanup = setupResponsiveChart('chart-container', myData); // cleanup(); // Call when component unmounts or element removed ```
Or use ResizeObserver for more direct container monitoring:
```javascript function setupResponsiveChartWithObserver(svgElement, data) { const observer = new ResizeObserver(() => { const { width, height } = svgElement.getBoundingClientRect(); d3.select(svgElement) .attr('width', width) .attr('height', height);
// Redraw visualisation drawChart(data, d3.select(svgElement), width, height); });
observer.observe(svgElement.parentElement); return () => observer.disconnect(); } ```
## Common visualisation patterns
### Bar chart
```javascript function drawBarChart(data, svgElement) { if (!data || data.length === 0) return;
const svg = d3.select(svgElement); svg.selectAll("*").remove();
const width = 800; const height = 400; const margin = { top: 20, right: 30, bottom: 40, left: 50 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
const xScale = d3.scaleBand() .domain(data.map(d => d.category)) .range([0, innerWidth]) .padding(0.1);
const yScale = d3.scaleLinear() .domain([0, d3.max(data, d => d.value)]) .range([innerHeight, 0]);
g.append("g") .attr("transform", `translate(0,${innerHeight})`) .call(d3.axisBottom(xScale));
g.append("g") .call(d3.axisLeft(yScale));
g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.category)) .attr("y", d => yScale(d.value)) .attr("width", xScale.bandwidth()) .attr("height", d => innerHeight - yScale(d.value)) .attr("fill", "steelblue"); }
// Usage: // drawBarChart(myData, document.getElementById('chart')); ```
### Line chart
```javascript const line = d3.line() .x(d => xScale(d.date)) .y(d => yScale(d.value)) .curve(d3.curveMonotoneX); // Smooth curve
g.append("path") .datum(data) .attr("fill", "none") .attr("stroke", "steelblue") .attr("stroke-width", 2) .attr("d", line); ```
### Scatter plot
```javascript g.selectAll("circle") .data(data) .join("circle") .attr("cx", d => xScale(d.x)) .attr("cy", d => yScale(d.y)) .attr("r", d => sizeScale(d.size)) // Optional: size encoding .attr("fill", d => colourScale(d.category)) // Optional: colour encoding .attr("opacity", 0.7); ```
### Chord diagram
A chord diagram shows relationships between entities in a circular layout, with ribbons representing flows between them:
```javascript function drawChordDiagram(data) { // data format: array of objects with source, target, and value // Example: [{ source: 'A', target: 'B', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 600; const height = 600; const innerRadius = Math.min(width, height) * 0.3; const outerRadius = innerRadius + 30;
// Create matrix from data const nodes = Array.from(new Set(data.flatMap(d => [d.source, d.target]))); const matrix = Array.from({ length: nodes.length }, () => Array(nodes.length).fill(0));
data.forEach(d => { const i = nodes.indexOf(d.source); const j = nodes.indexOf(d.target); matrix[i][j] += d.value; matrix[j][i] += d.value; });
// Create chord layout const chord = d3.chord() .padAngle(0.05) .sortSubgroups(d3.descending);
const arc = d3.arc() .innerRadius(innerRadius) .outerRadius(outerRadius);
const ribbon = d3.ribbon() .source(d => d.source) .target(d => d.target);
const colourScale = d3.scaleOrdinal(d3.schemeCategory10) .domain(nodes);
const g = svg.append("g") .attr("transform", `translate(${width / 2},${height / 2})`);
const chords = chord(matrix);
// Draw ribbons g.append("g") .attr("fill-opacity", 0.67) .selectAll("path") .data(chords) .join("path") .attr("d", ribbon) .attr("fill", d => colourScale(nodes[d.source.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.source.index])).darker());
// Draw groups (arcs) const group = g.append("g") .selectAll("g") .data(chords.groups) .join("g");
group.append("path") .attr("d", arc) .attr("fill", d => colourScale(nodes[d.index])) .attr("stroke", d => d3.rgb(colourScale(nodes[d.index])).darker());
// Add labels group.append("text") .each(d => { d.angle = (d.startAngle + d.endAngle) / 2; }) .attr("dy", "0.31em") .attr("transform", d => `rotate(${(d.angle * 180 / Math.PI) - 90})translate(${outerRadius + 30})${d.angle > Math.PI ? "rotate(180)" : ""}`) .attr("text-anchor", d => d.angle > Math.PI ? "end" : null) .text((d, i) => nodes[i]) .style("font-size", "12px"); } ```
### Heatmap
A heatmap uses colour to encode values in a two-dimensional grid, useful for showing patterns across categories:
```javascript function drawHeatmap(data) { // data format: array of objects with row, column, and value // Example: [{ row: 'A', column: 'X', value: 10 }, ...]
if (!data || data.length === 0) return;
const svg = d3.select('#chart'); svg.selectAll("*").remove();
const width = 800; const height = 600; const margin = { top: 100, right: 30, bottom: 30, left: 100 }; const innerWidth = width - margin.left - margin.right; const innerHeight = height - margin.top - margin.bottom;
// Get unique rows and columns const rows = Array.from(new Set(data.map(d => d.row))); const columns = Array.from(new Set(data.map(d => d.column)));
const g = svg.append("g") .attr("transform", `translate(${margin.left},${margin.top})`);
// Create scales const xScale = d3.scaleBand() .domain(columns) .range([0, innerWidth]) .padding(0.01);
const yScale = d3.scaleBand() .domain(rows) .range([0, innerHeight]) .padding(0.01);
// Colour scale for values const colourScale = d3.scaleSequential(d3.interpolateYlOrRd) .domain([0, d3.max(data, d => d.value)]);
// Draw rectangles g.selectAll("rect") .data(data) .join("rect") .attr("x", d => xScale(d.column)) .attr("y", d => yScale(d.row)) .attr("width", xScale.bandwidth()) .attr("height", yScale.bandw
Source provenance
Decision snapshot
55,527 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for d3-viz, ready for a manual X post.
d3-viz: Creating interactive data visualisations using d3.js. This skill should be used when creating... 55.5K stars https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x
Listing + install path for d3-viz: https://www.openagentskill.com/skills/calesthio-d3-viz?ref=x Install: npx skills add calesthio/OpenMontage --skill d3-viz
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to calesthio but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/calesthio-d3-viz/audit)
[](https://www.openagentskill.com/skills/calesthio-d3-viz?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)calesthio
@calesthio
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
175.1K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
85.2K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
175.1K StarsPermission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness