← The United Kingdomchartlink · choropleth
The United Kingdom by: constituencies · local authorities · nations · regions
Map of the United Kingdom by parliamentary constituency, one number per seat, with the nation borders
Also: UK constituency map · Westminster constituencies choropleth · map of the 650 seats · general election results map · map of Britain by constituency

Example: How safe every seat was at the 2024 general election — The winner's majority as a share of votes cast in each constituency at the general election of 4 July 2024: the deepest shade is 50 points or more, the palest a seat won by a whisker.
About this template
Data: one row per Westminster constituency (the 650 seats on the July 2024 boundaries) with its ONS code (E14001063 for Aldershot) or its name, and a number. A seat with no row stays grey. The nation borders are drawn on top; Orkney and Shetland are drawn east of the mainland, at their own scale. Same design as the nation, region and local authority maps.
A choropleth map of the regions of the "uk-constituencies" geography, each region filled by one number from your data (the "margin" column). The borders of the "uk-nations" regions are drawn on top of the regions in dark navy blue, 0.5 units wide, so the finer regions read inside their larger units.
A sequential colour scale from pale blue for the smallest values to deep navy blue for the largest; pinned to 0 to 50, so values beyond the ends take the end colour and the colour bar says ≤ and ≥; a gradient colour bar below the map, with its labels underneath; values formatted 0 decimals, a "pts" suffix; on a white canvas (#ffffff) with near-black text — a light theme; 0.25-unit hairline outlines between regions.
The title and description are left-aligned above the chart. Font: Inter (the default); a source line with a link sits at the bottom, with the chartlink badge in the corner.
Data: 2 columns — constituency (string, "Constituency (ONS code or name)"), margin (number, "Winner's majority, % of votes cast") — and 650 rows in the example "How safe every seat was at the 2024 general election". Regions are named by ISO 3166-2 region codes or region names; a region with no row stays unfilled in grey, and an unknown code fails loudly with the nearest matches. Your data keeps the same column ids and every other setting comes from the template; an agent can change any of them.
Other looks of this template — dark (on a dark canvas): ast_czZZWMAjhRJYXa0YnWrWd; buckets (with the values in classes and a swatch legend): ast_rNTsrfqdpOuR9v8DWVvuv; editorial (in the editorial house style — serif type on paper, a green ramp): ast_cgy9yW677J6JORcfrvdr8; categories (with a text category per region and a swatch legend): ast_szPBSQx9Ql1tPlYnpR92w; buckets-dark (with the values in classes and a swatch legend, on a dark canvas): ast_HUC4GpFRIzFox9SDH4RVv; surroundings (with the land around the place drawn in grey): ast_yB3f9xaiGb4Q0uX1P9v7Q; categories-dark (with a text category per region and a swatch legend, on a dark canvas): ast_lD4wmMQIwZUcg4ErXW0EM; buckets-editorial (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_oM4Rvu6n7NtigtsGaP8q9; dark-surroundings (on a dark canvas, with the land around the place drawn in grey): ast_QKrLNp7d399yiJoapXYq5; buckets-surroundings (with the values in classes and a swatch legend, with the land around the place drawn in grey): ast_HudUjbZXJPswYYFGvNvIy; categories-editorial (with a text category per region and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_7W7oDlXtO7IE2FYaExuK7; editorial-surroundings (in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_fQtVGksPcQLN5oFhpkpJD; categories-surroundings (with a text category per region and a swatch legend, with the land around the place drawn in grey): ast_44miiEMgAwT4scltRLc4A; buckets-dark-surroundings (with the values in classes and a swatch legend, on a dark canvas, with the land around the place drawn in grey): ast_3CN7XIveOnQVxLJtVCmZt; categories-dark-surroundings (with a text category per region and a swatch legend, on a dark canvas, with the land around the place drawn in grey): ast_AnUtztXv0mIv7pwOklPEJ; buckets-editorial-surroundings (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_vF5W2Ql4Hsvy199ObpWaI; categories-editorial-surroundings (with a text category per region and a swatch legend, in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_kEInL6yYqbNsvjDBPfVtd. On the page, switch with the toggles; an agent passes that id as the template instead.
Use it with your agent
Copy the prompt, paste it into Claude, ChatGPT, Cursor or any agent with the chartlink MCP server or API, and give it your numbers. It rebuilds this exact design with your data and hands back an embed, a PNG and a page.
The prompt in full
Data this template expects
| column id | type | in the example |
|---|---|---|
| constituency | string | Constituency (ONS code or name) |
| margin | number | Winner's majority, % of votes cast |
650 rows in the example. Your data keeps these column ids; everything else about the chart comes from the template.
For agents: the API call
POST https://chartlink.app/api/assets
{
"template": "ast_m3gLMStUX5moFYW6RP8Gr",
"knobs": {
"theme": "light",
"dataType": "gradient",
"title": {
"text": "Your title"
},
"source": {
"text": "Where the numbers come from"
}
},
"data": {
"columns": [
{
"id": "constituency",
"type": "string"
},
{
"id": "margin",
"type": "number"
}
],
"rows": [
[
"…"
]
]
},
"publish": true
}The recipe (the template's settings)
{
"chart": {
"domain": [
0,
50
],
"format": {
"kind": "number",
"suffix": " pts",
"decimals": 0
},
"borders": {
"color": "#1f2937",
"width": 0.5,
"geography": "uk-nations"
},
"outline": {
"width": 0.25
},
"geography": "uk-constituencies"
},
"title": {
"text": "How safe every seat was at the 2024 general election"
},
"preset": "map-light",
"source": {
"url": "https://members-api.parliament.uk/index.html",
"text": "UK Parliament, 2024 general election results by constituency"
},
"encoding": {
"value": {
"column": "margin"
},
"region": {
"column": "constituency"
}
},
"description": {
"text": "The winner's majority as a share of votes cast in each constituency at the general election of 4 July 2024: the deepest shade is 50 points or more, the palest a seat won by a whisker."
}
}map · choropleth · united-kingdom · constituencies · election · uk-set
Similar templates
- Map of the United Kingdom by local authority, one number per council area, with the region borders
- Map of the United Kingdom by region, one number per region
- Map of the United Kingdom by nation, one number per nation
- Map of the United States by congressional district, one number per district, with the state borders
- Map of Europe by NUTS 3 region, one number per region
- Map of Europe by NUTS 2 region, one number per region
- Map of Europe by NUTS 1 region, one number per region
- Map of Europe by country, one number per country
- All templates →