example-d3-animation
Skill130 starsChanged 38 days agoApache-2.0View on GitHub
Learn how to use D3.js with Helios for data visualization. Use when creating charts, graphs, or data-driven animations.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- skill-creatorSkill
- helios-coreSkill
- animated-video-philosophySkill
- cinematic-product-promo-planSkill
- motion-stylesSkill
- example-canvasSkill
- example-chartjsSkill
- example-framer-motionSkill
- example-gsapSkill
- example-lottieSkill
- example-p5-animationSkill
- example-pixiSkill
- example-podcast-visualizerSkill
- example-reactSkill
- example-signals-animationSkill
- example-solidSkill
- example-svelteSkill
- example-tailwind-animationSkill
- example-threejsSkill
- example-vanillaSkill
- example-vueSkill
- helios-getting-startedSkill
- guided-brand-videoSkill
- guided-cartoon-shortSkill
- motion-design-rulesSkill
- guided-music-videoSkill
- guided-video-recipesSkill
- helios-playerSkill
- helios-rendererSkill
- helios-skillsSkill
- helios-studioSkill
- archive-brollSkill
- create-compositionSkill
- render-videoSkill
- workflow-visualize-dataSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Instead of using d3.transition(), use helios.subscribe() to update attributes on every frame.
- Very specific: line 56
d3.transition(): Do NOT use d3.transition().
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
D3.js Animation
Integrate D3.js with Helios by driving D3 scales and attributes using the Helios frame/time state.
Quick Start
import { Helios } from '@helios-project/core';
import * as d3 from 'd3';
const helios = new Helios({ duration: 5, fps: 60 });
const svg = d3.select('#chart');
// Data
const data = [10, 20, 30, 40, 50];
// Setup D3
const x = d3.scaleLinear().domain([0, 50]).range([0, 500]);
const bars = svg.selectAll('rect').data(data).enter().append('rect')
.attr('height', 20)
.attr('y', (d, i) => i * 25);
// Animate
helios.subscribe(({ currentFrame, fps }) => {
const time = currentFrame / fps;
// Update D3 attributes based on time
bars.attr('width', d => x(d) * Math.min(1, time));
});Key Patterns
Frame-Driven Scales
Instead of using d3.transition(), use helios.subscribe() to update attributes on every frame. This ensures frame-perfect rendering and seeking.
helios.subscribe((state) => {
const t = state.currentFrame / (state.duration * state.fps); // 0 to 1
// Interpolate data
const interpolatedData = data.map(d => d * t);
// Re-bind and render
path.datum(interpolatedData).attr('d', lineGenerator);
});Common Issues
- d3.transition(): Do NOT use
d3.transition(). It relies on internal timers that won't sync with Helios's seek/render cycle. Always set attributes directly in the subscription callback. - Performance: For large datasets, consider using Canvas with D3 (
d3-force+ Canvas API) instead of SVG for better performance.
Source
- Example:
examples/d3-animation/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

