create_sparkline
Generate compact ASCII sparklines for numeric data, ideal for inline terminal visualizations. Customize width, add titles, and apply ANSI colors to highlight trends or metrics directly in text-based environments.
Instructions
Generate compact ASCII sparklines for inline charts
Input Schema
Name | Required | Description | Default |
---|---|---|---|
color | No | ANSI color name | |
data | Yes | Array of numeric values to plot | |
title | No | Optional sparkline title | |
width | No | Sparkline width (10-100, default: 40) |
Input Schema (JSON Schema)
{
"examples": {
"compact": {
"data": [
1,
3,
2,
5,
4,
7,
6,
8
],
"title": "Quick Trend"
},
"inline": {
"data": [
100,
102,
98,
105,
110,
108,
112
],
"width": 25
},
"metrics": {
"color": "red",
"data": [
23,
25,
22,
28,
30,
27,
31,
29,
33
],
"title": "System Load",
"width": 30
}
},
"properties": {
"color": {
"description": "ANSI color name",
"optional": true,
"type": "string"
},
"data": {
"description": "Array of numeric values to plot",
"items": {
"type": "number"
},
"type": "array"
},
"title": {
"description": "Optional sparkline title",
"optional": true,
"type": "string"
},
"width": {
"description": "Sparkline width (10-100, default: 40)",
"maximum": 100,
"minimum": 10,
"optional": true,
"type": "number"
}
},
"required": [
"data"
],
"type": "object"
}