---
title: "Dark Dumbbell Chart API — Range plots on dark | Imejis"
description: "Generate dark-mode dumbbell / range-plot images — bright dots on a dark canvas for social. Fresh before→after data per API call. Try Imejis free."
url: "https://www.imejis.io/components/dumbbell/dark"
---

# Dark Dumbbell Chart API — Range plots on dark | Imejis

Light dots on a dark canvas for social cards.

## Use cases

- Dark-theme year-over-year cards
- Night-mode change graphics
- Dashboard exports on dark backgrounds

## Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `data` | `object[]` | `[]` | Rows: array of { label, from, to } — one dumbbell per row. |
| `min` | `number` | — | Value-axis minimum (auto-fits when omitted). |
| `max` | `number` | — | Value-axis maximum (auto-fits when omitted). |
| `fromColor` | `color` | `"#94a3b8"` | Color of the "from" dot. |
| `toColor` | `color` | `"#2563eb"` | Color of the "to" dot. |
| `lineColor` | `color` | `"#cbd5e1"` | Connecting bar color. |
| `colorByDirection` | `boolean` | `false` | Tint the connecting bar green/red by direction (to ≥ from). |
| `showValues` | `boolean` | `false` | Print the endpoint values. |
| `valueFormat` | `'number' \| 'compact' \| 'percent' \| 'currency'` | `"number"` | How values are formatted (1,200 / 1.2K / 12% / $1,200). |
| `currencySymbol` | `string` | `"$"` | Symbol used with the 'currency' format. |
| `dotRadius` | `number` (min 0) | `6` | Endpoint dot radius in px. |
| `lineWidth` | `number` (min 0) | `3` | Connecting bar thickness in px. |
| `showAxis` | `boolean` | `true` | Show the value axis. |
| `showGrid` | `boolean` | `true` | Show vertical gridlines. |
| `gridColor` | `color` | `"#e6e6e3"` | Gridline color. |
| `textColor` | `color` | `"#52514e"` | Label and axis text color. |
| `fromLabel` | `string` | — | Legend name for the "from" series (e.g. "2020"). |
| `toLabel` | `string` | — | Legend name for the "to" series (e.g. "2024"). |
| `showLegend` | `boolean` | `false` | Show the from/to legend. |
| `opacity` | `number` | `1` | Overall component opacity from 0 (transparent) to 1 (opaque). |
| `borderWidth` | `number` | `0` | Border thickness in pixels around the component. |
| `borderColor` | `color` | `"transparent"` | Border color (any CSS color). |
| `borderStyle` | `'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'none'` | `"solid"` | Border line style. |
| `borderRadius` | `number` | `0` | Corner radius in pixels. |
| `boxShadow` | `string` | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |

## Design JSON (this variant)

```json
{
  "title": "Dumbbell sample",
  "description": "Region revenue, Q1 → Q2",
  "dimensions": {
    "width": 800,
    "height": 420
  },
  "background": {
    "color": "#0f172a"
  },
  "components": [
    {
      "id": "sample-dumbbell",
      "key": "change",
      "type": "dumbbell",
      "position": {
        "x": 120,
        "y": 60
      },
      "rotation": 0,
      "size": {
        "width": 560,
        "height": 300
      },
      "dynamic": true,
      "properties": {
        "data": [
          {
            "label": "North",
            "from": 120,
            "to": 180
          },
          {
            "label": "South",
            "from": 90,
            "to": 140
          },
          {
            "label": "East",
            "from": 160,
            "to": 150
          },
          {
            "label": "West",
            "from": 70,
            "to": 130
          }
        ],
        "fromColor": "#64748b",
        "toColor": "#38bdf8",
        "colorByDirection": true,
        "showValues": true,
        "fromLabel": "Q1",
        "toLabel": "Q2",
        "showLegend": true,
        "valueFormat": "compact",
        "showAxis": true,
        "showGrid": true,
        "opacity": 1,
        "lineColor": "#334155",
        "gridColor": "#1e293b",
        "textColor": "#e2e8f0"
      }
    }
  ]
}
```

## Examples

### Dark YoY revenue

Year-over-year revenue change on slate, compact-formatted.

API overrides that reproduce this example:

```json
{
  "change.fromColor": "#64748b",
  "change.toColor": "#38bdf8",
  "change.lineColor": "#334155",
  "change.gridColor": "#1e293b",
  "change.textColor": "#e2e8f0",
  "change.data": [
    {
      "label": "US",
      "from": 3.2,
      "to": 4.6
    },
    {
      "label": "EU",
      "from": 2.1,
      "to": 2.9
    },
    {
      "label": "APAC",
      "from": 1.4,
      "to": 2.3
    }
  ],
  "change.valueFormat": "compact",
  "change.fromLabel": "2023",
  "change.toLabel": "2024",
  "change.showLegend": true,
  "change.colorByDirection": false
}
```

### Dark price bands

Product price ranges as bright dumbbells on a near-black card.

API overrides that reproduce this example:

```json
{
  "change.fromColor": "#94a3b8",
  "change.toColor": "#f472b6",
  "change.lineColor": "#334155",
  "change.gridColor": "#1f2937",
  "change.textColor": "#e2e8f0",
  "change.data": [
    {
      "label": "Basic",
      "from": 9,
      "to": 19
    },
    {
      "label": "Pro",
      "from": 29,
      "to": 49
    },
    {
      "label": "Team",
      "from": 79,
      "to": 149
    }
  ],
  "change.valueFormat": "currency"
}
```

## API overrides

Push fresh rows per render with '<key>.data' (or just '<key>') as [{ label, from, to }]; colors, labels and format are overridable too.

Flat override payload (`key.property` addressing) with the sample design's current values — send only the keys you want to change:

```json
{
  "change.data": [
    {
      "label": "North",
      "from": 120,
      "to": 180
    },
    {
      "label": "South",
      "from": 90,
      "to": 140
    },
    {
      "label": "East",
      "from": 160,
      "to": 150
    },
    {
      "label": "West",
      "from": 70,
      "to": 130
    }
  ],
  "change.fromColor": "#94a3b8",
  "change.toColor": "#2563eb",
  "change.colorByDirection": true,
  "change.showValues": true,
  "change.fromLabel": "Q1",
  "change.toLabel": "Q2",
  "change.showLegend": true,
  "change.valueFormat": "compact",
  "change.showAxis": true,
  "change.showGrid": true,
  "change.opacity": 1
}
```

```bash
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "change.data": [
        {
            "label": "North",
            "from": 120,
            "to": 180
        },
        {
            "label": "South",
            "from": 90,
            "to": 140
        },
        {
            "label": "East",
            "from": 160,
            "to": 150
        },
        {
            "label": "West",
            "from": 70,
            "to": 130
        }
    ],
    "change.fromColor": "#94a3b8",
    "change.toColor": "#2563eb",
    "change.colorByDirection": true,
    "change.showValues": true,
    "change.fromLabel": "Q1",
    "change.toLabel": "Q2",
    "change.showLegend": true,
    "change.valueFormat": "compact",
    "change.showAxis": true,
    "change.showGrid": true,
    "change.opacity": 1
}'
```

`{{YOUR_DESIGN_ID}}` and `{{YOUR_API_KEY}}` are placeholders: first create
the design in your account (paste the sample design JSON above into the
editor at https://app.imejis.io, or create it programmatically via the
imejis MCP server's `create_design` + `update_design` tools), then render
it with the design's id and one of your API keys.

Agents: the MCP server at https://api.imejis.io/api/mcp exposes this same
catalog as structured data via the `list_component_types` tool (property
kinds, allowed values, bounds, ready-to-use sample designs).

## Related

- [Dumbbell component](https://www.imejis.io/components/dumbbell.md) — full reference and FAQs
- [Before / after](https://www.imejis.io/components/dumbbell/before-after.md) — A two-point before→after comparison with a named legend and gain/loss tint.
