Sparkline chart
Chart styletype: "chart"Axis-free mini line charts for stat tiles and inline trend hints — data refreshed on every API call. Generate sparkline images free with Imejis today.
Design JSON — “Sparkline” variant
{
"title": "Chart sample",
"description": "A dynamic bar chart",
"dimensions": {
"width": 800,
"height": 420
},
"background": {
"color": "#ffffff"
},
"components": [
{
"id": "sample-chart",
"key": "sales",
"type": "chart",
"position": {
"x": 240,
"y": 150
},
"rotation": 0,
"size": {
"width": 320,
"height": 120
},
"dynamic": true,
"properties": {
"chartType": "line",
"data": [
12,
28,
20,
34,
26
],
"labels": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"colors": [],
"orientation": "vertical",
"showAxis": true,
"showGrid": true,
"showValues": false,
"valueFormat": "number",
"opacity": 1,
"sparkline": true,
"lineWidth": 3
}
}
]
}Chart examples
Real renders of the sparkline chart — each one is the same component with different property values, and the API payload below each preview reproduces it exactly.
Upward trend hint
A green mini line for a KPI tile that is moving the right way.
API overrides for this example
{
"sales.chartType": "line",
"sales.sparkline": true,
"sales.lineWidth": 3,
"sales.data": [
12,
14,
13,
17,
19,
24
],
"sales.colors": [
"#10B981"
]
}Downward pressure indicator
A red sparkline flagging a declining metric at a glance.
API overrides for this example
{
"sales.chartType": "line",
"sales.sparkline": true,
"sales.lineWidth": 3,
"sales.data": [
31,
28,
29,
24,
22,
18
],
"sales.colors": [
"#EF4444"
]
}When to use the sparkline style
- Trend hints inside KPI stat tiles
- Compact email dashboard rows
- OG images with a subtle metric trend
Use it dynamically via the API
Feed fresh numbers via '<key>.data' (or '<key>.series' for multi-series), and swap '<key>.labels' or '<key>.chartType' per render.
Full API request with this variant's current values — the playground above sends only the properties you change
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"sales.chartType": "line",
"sales.data": [
12,
28,
20,
34,
26
],
"sales.labels": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"sales.colors": [],
"sales.orientation": "vertical",
"sales.showAxis": true,
"sales.showGrid": true,
"sales.showValues": false,
"sales.valueFormat": "number",
"sales.opacity": 1,
"sales.sparkline": true,
"sales.lineWidth": 3
}'Only send the properties you want to change — everything else keeps its design value. See the API documentation for all languages.
Other chart styles
See the chart component page for the full property reference and FAQs.