Skip to content
Styleof the Chart component

Slope Chart

Generate slope chart images comparing two points in time — before vs after, this year vs last — one labeled line per series. Fresh data per API call, free.

Updated

Slope 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": "slope",
  "sales.data": [],
  "sales.series": [
    {
      "name": "North",
      "data": [42, 61],
      "color": "#4F46E5"
    },
    {
      "name": "South",
      "data": [58, 49],
      "color": "#0EA5E9"
    },
    {
      "name": "West",
      "data": [33, 52],
      "color": "#10B981"
    }
  ],
  "sales.labels": ["2024", "2025"],
  "sales.showLegend": false
}

Good for

  • Before/after metric comparisons for social
  • Year-over-year change across segments
  • Survey shift between two waves

Try your own data

Change the slope 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 slope chart with different values. The JSON is what you send.

Regional revenue YoY

Revenue by region from last year to this year, each region a labeled line.

{
  "sales.chartType": "slope",
  "sales.data": [],
  "sales.series": [
    {
      "name": "EMEA",
      "data": [120, 168],
      "color": "#6366F1"
    },
    {
      "name": "APAC",
      "data": [90, 142],
      "color": "#F59E0B"
    },
    {
      "name": "AMER",
      "data": [210, 198],
      "color": "#EF4444"
    }
  ],
  "sales.labels": ["FY24", "FY25"],
  "sales.showLegend": false,
  "sales.valueFormat": "compact"
}

Satisfaction before vs after

CSAT per team across a redesign — up-and-to-the-right at a glance.

{
  "sales.chartType": "slope",
  "sales.data": [],
  "sales.series": [
    {
      "name": "Support",
      "data": [71, 88],
      "color": "#10B981"
    },
    {
      "name": "Sales",
      "data": [64, 69],
      "color": "#3B82F6"
    }
  ],
  "sales.labels": ["Before", "After"],
  "sales.showLegend": false
}

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 Slope 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": "slope",
    "sales.data": [],
    "sales.series": [
      {
        "name": "North",
        "data": [42, 61],
        "color": "#4F46E5"
      },
      {
        "name": "South",
        "data": [58, 49],
        "color": "#0EA5E9"
      },
      {
        "name": "West",
        "data": [33, 52],
        "color": "#10B981"
      }
    ],
    "sales.labels": ["2024", "2025"],
    "sales.showLegend": false
  }' \
  -o image.png

Other chart styles

Slope Chart questions

What does the Slope style change on the chart component?

A two-point comparison — one line per series from a start value to an end value. It sets 5 properties on the chart component: chartType, data, series, labels, showLegend. Everything else keeps the component's defaults, so your data and layout carry over.

How do I render the slope 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.data) in the render request. Each render can carry different data while keeping the Slope 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.