Example Chartjs
by BintzGavin
Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.
Skill Details
Repository Files
1 file in this skill directory
name: example-chartjs description: Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.
Chart.js + Helios
Integrate Helios with Chart.js by disabling internal animations and manually driving data updates from the timeline.
Quick Start
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');
});
Key Patterns
Disable Animations
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
}
Immediate Updates
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');
Source Files
- Example:
examples/chartjs-animation/
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Team Composition Analysis
This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.
Startup Financial Modeling
This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Startup Metrics Framework
This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.
