一键导入
example-chartjs
Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Collection of agent skills for Helios video engine. Use when working with programmatic video creation, browser-native animations, or Helios compositions. Install individual skills by path for specific capabilities.
Core API for Helios video engine. Use when creating compositions, managing timeline state, controlling playback, or subscribing to frame updates. Covers Helios class instantiation, signals, animation helpers, and DOM synchronization.
Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.
Learn how to use D3.js with Helios for data visualization. Use when creating charts, graphs, or data-driven animations.
Patterns for using Helios with Framer Motion. Use when you want to use Framer Motion's physics and transitions but need frame-perfect synchronization with Helios.
Patterns for using Helios with GSAP (GreenSock). Use when integrating GSAP timelines with the Helios timeline for precise scrubbing and rendering.
基于 SOC 职业分类
| name | example-chartjs |
| description | Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js. |
Integrate Helios with Chart.js by disabling internal animations and manually driving data updates from the timeline.
import { Helios } from '@helios-project/core';
import Chart from 'chart.js/auto';
const helios = new Helios({ fps: 30, duration: 5 });
helios.bindToDocumentTimeline();
const ctx = document.getElementById('chart').getContext('2d');
const chart = new Chart(ctx, {
type: 'bar',
data: { /* ... */ },
options: {
// CRITICAL: Disable internal tweens
animation: false,
responsive: true
}
});
helios.subscribe((state) => {
const t = state.currentTime;
// 1. Calculate new data based on time
const newData = calculateData(t);
// 2. Update chart data
chart.data.datasets[0].data = newData;
// 3. Force immediate update without animation
chart.update('none');
});
Chart.js has a built-in animation engine that tweens values when data changes. This conflicts with frame-by-frame rendering. You must disable it:
options: {
animation: false
}
When updating the chart in the subscribe loop, use mode 'none' to tell Chart.js to re-render immediately without trying to animate the transition.
chart.update('none');
examples/chartjs-animation/