Before / after dumbbell
Dumbbell styletype: "dumbbell"Render before→after comparison images as dumbbell range plots with a named legend and gain/loss coloring, set per API call. Create before/after charts free.
Design JSON — “Before / after” variant
{
"title": "Dumbbell sample",
"description": "Region revenue, Q1 → Q2",
"dimensions": {
"width": 800,
"height": 420
},
"background": {
"color": "#ffffff"
},
"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": "#94a3b8",
"toColor": "#2563eb",
"colorByDirection": true,
"showValues": true,
"fromLabel": "Before",
"toLabel": "After",
"showLegend": true,
"valueFormat": "compact",
"showAxis": true,
"showGrid": true,
"opacity": 1
}
}
]
}Dumbbell examples
Real renders of the before / after dumbbell — each one is the same component with different property values, and the API payload below each preview reproduces it exactly.
Conversion lift after redesign
Three funnel steps improving after a redesign, in percent.
API overrides for this example
{
"change.colorByDirection": true,
"change.showValues": true,
"change.fromLabel": "Before",
"change.toLabel": "After",
"change.showLegend": true,
"change.data": [
{
"label": "Signup",
"from": 42,
"to": 58
},
{
"label": "Activate",
"from": 25,
"to": 39
},
{
"label": "Paid",
"from": 8,
"to": 14
}
],
"change.valueFormat": "percent"
}Load time before/after
Page load times dropping after optimization (lower is better).
API overrides for this example
{
"change.colorByDirection": false,
"change.showValues": true,
"change.fromLabel": "Before",
"change.toLabel": "After",
"change.showLegend": true,
"change.data": [
{
"label": "Home",
"from": 3.4,
"to": 1.2
},
{
"label": "Product",
"from": 4.1,
"to": 1.8
},
{
"label": "Checkout",
"from": 5.2,
"to": 2.1
}
],
"change.toColor": "#16a34a",
"change.fromColor": "#dc2626"
}When to use the before / after style
- Campaign before/after metric cards
- A/B-test result graphics
- Program impact "before → after" visuals
Use it dynamically via the API
Push fresh rows per render with '<key>.data' (or just '<key>') as [{ label, from, to }]; colors, labels and format are overridable too.
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 '{
"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": "Before",
"change.toLabel": "After",
"change.showLegend": true,
"change.valueFormat": "compact",
"change.showAxis": true,
"change.showGrid": true,
"change.opacity": 1
}'Only send the properties you want to change — everything else keeps its design value. See the API documentation for all languages.
Other dumbbell styles
See the dumbbell component page for the full property reference and FAQs.