Xpersona
C

Chartjs

CLAWHUB · Unverified

Chart.js charting skill. Used to generate visual charts such as line charts, bar charts, pie charts, radar charts, scatter plots, etc. Skill: Chartjs Owner: openlark Summary: Chart.js charting skill. Used to generate visual charts such as line charts, bar charts, pie charts, radar charts, scatter plots, etc. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-11T02:13:14.298Z | user Initial release of the chartjs skill. - Provides Chart.js integration for generating visual charts (line, bar, pie, radar, scatter, etc.). - Details installation method

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1727wv2g20pc729snzcm4nf8183hy72:chartjs
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-openlark-chartjs/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

13,329 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: chartjs
description: Chart.js charting skill. Used to generate visual charts such as line charts, bar charts, pie charts, radar charts, scatter plots, etc.
---

# Chart.js

Chart.js is a popular open-source charting library supporting 8 chart types, rendered via Canvas with responsive design.

## Trigger Scenarios

- User requests to create/generate/draw a chart
- User mentions Chart.js or data visualization
- User requests to visualize data with a chart
- User uploads data and requests visualization

## Installation

**npm:**
```bash
npm install chart.js
```

**CDN (Script Tag):**
```html
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
```

**Webpack/Rollup (recommended for tree-shaking):**
```javascript
import Chart from 'chart.js/auto';  // Full features, no manual registration needed
```

## Chart Types and Required Components

Each chart type has minimal dependencies; importing on demand optimizes bundle size:

| Chart Type | Controller | Element | Default Scale |
|---------|-----------|---------|-----------|
| Bar | BarController | BarElement | CategoryScale(x) + LinearScale(y) |
| Line | LineController | LineElement + PointElement | CategoryScale(x) + LinearScale(y) |
| Pie | PieController | ArcElement | — |
| Doughnut | DoughnutController | ArcElement | — |
| PolarArea | PolarAreaController | ArcElement | RadialLinearScale |
| Radar | RadarController | LineElement + PointElement | RadialLinearScale |
| Scatter | ScatterController | PointElement | LinearScale(x/y) |
| Bubble | BubbleController | PointElement | LinearScale(x/y) |

## Basic Usage

**HTML:**
```html
<div style="max-width: 600px">
  <canvas id="myChart"></canvas>
</div>
```

**JavaScript:**
```javascript
const ctx = document.getElementById('myChart');
new Chart(ctx, {
  type: 'bar',  // Chart type
  data: {
    labels: ['January', 'February', 'March'],
    datasets: [{
      label: 'Sales (10k)',
      data: [12, 19, 3],
      borderWidth: 1
    }]
  },
  options: {
    responsive: true,
    scales: {
      y: { beginAtZero: true }
    }
  }
});
```

## Common Configurations

### Responsive (auto-adapts to container width)
```javascript
options: {
  responsive: true,
  maintainAspectRatio: false
}
```

### Fill Line Chart (Area)
```javascript
datasets: [{
  fill: true,        // or 'origin'/'start'/'end'
  tension: 0.4       // Curve smoothness 0-1
}]
```

### Multiple Datasets
```javascript
datasets: [
  { label: '2023', data: [1, 2, 3], borderColor: 'red' },
  { label: '2024', data: [3, 2, 1], borderColor: 'blue' }
]
```

### Quick Color Settings
```javascript
backgroundColor: [
  'rgba(255, 99, 132, 0.5)',
  'rgba(54, 162, 235, 0.5)',
]
```

## Interaction Events

Click to get data point values (requires helpers import):
```javascript
import Chart from 'chart.js/auto';
import { getRelativePosition } from 'chart.js/helpers';

options: {
  onClick: (e) => {
    const pos = getRelativePosition(e, chart);
    const x = chart.scales.x.getValueForPixel(pos

_meta.json

{
  "ownerId": "kn75qrtb885pznwsjwsh18dvf1813bv0",
  "slug": "chartjs",
  "version": "1.0.0",
  "publishedAt": 1775873594298
}

references/api.md

# Chart.js API Reference

## Table of Contents

- [Data Structure](#data-structure)
- [Axes](#axes)
- [Colors & Styling](#colors--styling)
- [Animation](#animation)
- [Plugins](#plugins)

---

## Data Structure

### Basic Structure
```javascript
{
  type: 'bar',           // Chart type
  data: {
    labels: [],          // X-axis labels
    datasets: [{
      label: '',         // Dataset name
      data: [],          // Data array
      // ...style properties
    }]
  },
  options: {}            // Configuration
}
```

### Data Formats

**Line/Bar Charts:**
```javascript
data: [12, 19, 3, 5, 2, 3]  // Numeric array
```

**Scatter Chart (x, y):**
```javascript
data: [{ x: 10, y: 20 }, { x: 15, y: 10 }]
```

**Bubble Chart (x, y, r):**
```javascript
data: [{ x: 10, y: 20, r: 5 }]
```

---

## Axes

### Cartesian Scales (x/y)

**CategoryScale (default x-axis):**
```javascript
scales: {
  x: { type: 'category', labels: ['January','February','March'] }
}
```

**LinearScale (default y-axis):**
```javascript
scales: {
  y: {
    type: 'linear',
    beginAtZero: true,
    min: 0,
    max: 100,
    ticks: { stepSize: 10 }
  }
}
```

**LogarithmicScale:**
```javascript
scales: {
  y: { type: 'logarithmic' }
}
```

**TimeScale:**
```javascript
scales: {
  x: {
    type: 'time',
    time: { unit: 'day', displayFormat: 'MMM D' }
  }
}
```

### Radial Scales (Radar/Polar Area)

**RadialLinearScale:**
```javascript
scales: {
  r: {
    angleLines: { display: true },
    ticks: { display: false },
    pointLabels: { font: { size: 14 } }
  }
}
```

### Tick Configuration
```javascript
ticks: {
  color: '#666',
  font: { size: 12, family: 'Arial' },
  callback: (value) => value + 'k',  // Format display value
  maxTicksLimit: 10
}
```

### Axis Titles
```javascript
scales: {
  x: {
    title: { display: true, text: 'Month', color: '#333' }
  },
  y: {
    title: { display: true, text: 'Sales (10k)', color: '#333' }
  }
}
```

---

## Colors & Styling

### Dataset Styles
```javascript
datasets: [{
  // Fill color
  backgroundColor: 'rgba(54, 162, 235, 0.5)',
  // Border color
  borderColor: 'rgb(54, 162, 235)',
  // Border width
  borderWidth: 2,
  // Hover color
  hoverBackgroundColor: 'rgba(54, 162, 235, 1)',
  // Hover border color
  hoverBorderColor: '#fff',
  // Point radius (line chart)
  pointRadius: 4,
  // Point hover radius
  pointHoverRadius: 6,
  // Point style: 'circle','rect','rectRot','cross','crossRot','star','line','dash'
  pointStyle: 'circle',
}]
```

### Gradients
```javascript
const gradient = ctx.createLinearGradient(0, 0, 0, 400);
gradient.addColorStop(0, 'rgba(255, 99, 132, 0.5)');
gradient.addColorStop(1, 'rgba(255, 99, 132, 0)');
data: { datasets: [{ backgroundColor: gradient }] }
```

### Border Radius (Bar)
```javascript
datasets: [{
  borderRadius: 5,           // All corners
  borderSkipped: false,      // or 'left'/'right'/'top'/'bottom'
}]
```

### Grid Background
```javascript
options: {
  scales: {
    x: { grid: { display: false 

skill-card.md

## Description:

Chart.js charting skill. Used to generate visual charts such as line charts, bar charts, pie charts, radar charts, scatter plots, etc.

This skill is ready for commercial/non-commercial use.

## Publisher:

[openlark](https://clawhub.ai/user/openlark)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agents use this skill to create Chart.js visualizations from provided data, including line, bar, pie, radar, scatter, bubble, doughnut, and polar area charts. It supports generating chart code, HTML rendering guidance, and screenshot or image export workflows.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Unpinned npm or CDN dependencies can change behavior over time or introduce supply-chain exposure.

Mitigation: Use pinned Chart.js package versions, lockfiles, and versioned CDN URLs with integrity hashes.

Risk: Generated HTML, image, or PDF files may be written to an unexpected location.

Mitigation: Confirm output paths before writing or exporting generated chart artifacts.

## Reference(s):

- [Chart.js API Reference](references/api.md)
- [ClawHub skill page](https://clawhub.ai/openlark/skills/chartjs)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline HTML, JavaScript, and shell code blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May produce complete HTML files for browser rendering or guidance for screenshot, image, and PDF export.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Chartjs and adjacent AI workflows.