← ClaudeAtlas

chartjs-configurationlisted

This skill should be used when the user asks "Chart.js options", "Chart.js animations", "Chart.js legend", "Chart.js tooltip", "Chart.js title", "disable Chart.js animation", "customize Chart.js tooltip", "Chart.js responsive", "Chart.js aspect ratio", "Chart.js interactions", "Chart.js hover", "Chart.js click events", "Chart.js layout", "Chart.js padding", "Chart.js font", "Chart.js colors", "Chart.js external tooltip", "Chart.js custom legend", "Chart.js transitions", or needs help configuring Chart.js v4.5.1 options, plugins, and styling.
Riltonbn/chartjs-expert · ★ 0 · Web & Frontend · score 72
Install: claude install-skill Riltonbn/chartjs-expert
# Chart.js Configuration (v4.5.1) Comprehensive guide to configuring Chart.js options, animations, legends, tooltips, and interactions. ## Configuration Structure ```javascript const config = { type: 'line', data: { /* datasets, labels */ }, options: { responsive: true, maintainAspectRatio: true, aspectRatio: 2, events: ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'], onClick: (event, elements, chart) => { /* handle click */ }, onHover: (event, elements, chart) => { /* handle hover */ }, plugins: { legend: { /* legend options */ }, tooltip: { /* tooltip options */ }, title: { /* title options */ } }, scales: { /* axis options */ }, animation: { /* animation options */ }, interaction: { /* interaction options */ }, layout: { /* layout options */ } }, plugins: [] // Inline plugins }; ``` ## Responsive Configuration Namespace: `options` | Option | Type | Default | Description | |--------|------|---------|-------------| | `responsive` | `boolean` | `true` | Resize with container | | `maintainAspectRatio` | `boolean` | `true` | Keep aspect ratio | | `aspectRatio` | `number` | `2` (radial: `1`) | Width/height ratio | | `resizeDelay` | `number` | `0` | Debounce resize (ms) | | `onResize` | `function` | `null` | Callback on resize | ### Container Requirements Chart.js requires the container to be **relatively positioned** and **dedicated to the chart canvas only**: ```html <div class="