Skip to content
Styleof the Chart component

Sparkline 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.

Updated

Sparkline Chart style, sample render

What this style sets

A style is the chart component with a few properties set. Send these, or start from the style in the editor.

{
  "sales.chartType": "line",
  "sales.sparkline": true,
  "sales.lineWidth": 3
}

Good for

  • Trend hints inside KPI stat tiles
  • Compact email dashboard rows
  • OG images with a subtle metric trend

Try your own data

Change the sparkline chart here with the same controls the editor shows. The preview updates as you type, and you get the API request for your changes.

Examples

Each example is the same sparkline chart with different values. The JSON is what you send.

Upward trend hint

A green mini line for a KPI tile that is moving the right way.

{
  "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.

{
  "sales.chartType": "line",
  "sales.sparkline": true,
  "sales.lineWidth": 3,
  "sales.data": [31, 28, 29, 24, 22, 18],
  "sales.colors": ["#EF4444"]
}

New values, every render

Feed fresh numbers via '<key>.data' (or '<key>.series' for multi-series), and swap '<key>.labels' or '<key>.chartType' per render. Send only the properties you want to change; everything else keeps its design value. The API guides cover every language.

Or ask your AI agent“Using imejis, make a 1200 × 630 image with the Sparkline style of the Chart component (type "chart") filled with my data, then give me a render link I can call with new values.”
curl -X POST "https://render.imejis.io/v1/$IMEJIS_DESIGN_ID" \
  -H "dma-api-key: $IMEJIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sales.chartType": "line",
    "sales.data": [8, 22, 17, 30, 26],
    "sales.sparkline": true,
    "sales.lineWidth": 3
  }' \
  -o image.png

Other chart styles

Sparkline Chart questions

What does the Sparkline style change on the chart component?

Axis-free mini line — inline trend indicators and stat tiles. It sets 3 properties on the chart component: chartType, sparkline, lineWidth. Everything else keeps the component's defaults, so your data and layout carry over.

How do I render the sparkline chart through the API?

Add a chart component to a design, then send its data together with the style's properties as flat overrides (for example sales.chartType and sales.sparkline) in the render request. Each render can carry different data while keeping the Sparkline look.

Can I change the chart data per API call?

Yes — send '<key>.data' for a single series or '<key>.series' for multi-series, plus '<key>.labels'; even chartType can switch per render.

Which chart types are supported?

Bar (vertical or horizontal), line and area — with stacking for multiple series and a sparkline mode that hides axes, grid and labels.

Free tools built on it, guides that use it, and the components that sit beside it.