Title, subtitle and source
The text around a chart: a headline that states the finding, a subtitle with measure and unit, the source and byline.
chrome holds the text around a chart. These two figures draw the same columns; only the title differs.
{
"mark": "bar",
"data": [
{
"year": "1900",
"anomaly": -0.08,
"trend": "Cooler"
},
{
"year": "1910",
"anomaly": -0.43,
"trend": "Cooler"
},
{
"year": "1920",
"anomaly": -0.27,
"trend": "Cooler"
},
{
"year": "1930",
"anomaly": -0.16,
"trend": "Cooler"
},
{
"year": "1940",
"anomaly": 0.12,
"trend": "Warmer"
},
{
"year": "1950",
"anomaly": -0.17,
"trend": "Cooler"
},
// … 8 more rows; Copy includes them
],
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Global temperature anomaly, 1900–2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
}import { Chart } from "@opendata-ai/openchart-react";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Global temperature anomaly, 1900–2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
export function Example() {
return <Chart spec={spec} />;
}
<script setup lang="ts">
import { Chart } from "@opendata-ai/openchart-vue";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Global temperature anomaly, 1900–2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<template>
<Chart :spec="spec" />
</template>
<script lang="ts">
import { Chart } from "@opendata-ai/openchart-svelte";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Global temperature anomaly, 1900–2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<Chart {spec} />
import { createChart } from "@opendata-ai/openchart-vanilla";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Global temperature anomaly, 1900–2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createChart(container, spec);
{
"mark": "bar",
"data": [
{
"year": "1900",
"anomaly": -0.08,
"trend": "Cooler"
},
{
"year": "1910",
"anomaly": -0.43,
"trend": "Cooler"
},
{
"year": "1920",
"anomaly": -0.27,
"trend": "Cooler"
},
{
"year": "1930",
"anomaly": -0.16,
"trend": "Cooler"
},
{
"year": "1940",
"anomaly": 0.12,
"trend": "Warmer"
},
{
"year": "1950",
"anomaly": -0.17,
"trend": "Cooler"
},
// … 8 more rows; Copy includes them
],
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
}import { Chart } from "@opendata-ai/openchart-react";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
export function Example() {
return <Chart spec={spec} />;
}
<script setup lang="ts">
import { Chart } from "@opendata-ai/openchart-vue";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<template>
<Chart :spec="spec" />
</template>
<script lang="ts">
import { Chart } from "@opendata-ai/openchart-svelte";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<Chart {spec} />
import { createChart } from "@opendata-ai/openchart-vanilla";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createChart(container, spec);
A title that states the finding
The first title names the topic, and the reader has to work out the point from the columns. The second states what the columns show in a sentence anyone can check: every reading from 1970 on is above zero. Write the title as that sentence, with a number when one carries the point, and keep it to what the data on screen supports.
A subtitle with the unit
The subtitle says what is measured, in what unit and over what span: degrees Celsius against the 1951–1980 average, one reading per decade. Here it also names the shorter last step, 2020 to 2025, which the time axis draws half as wide as a decade. Put methodology that takes more than a clause in the footer.
Byline, footer and source
{
"mark": "bar",
"data": [
{
"year": "1900",
"anomaly": -0.08,
"trend": "Cooler"
},
{
"year": "1910",
"anomaly": -0.43,
"trend": "Cooler"
},
{
"year": "1920",
"anomaly": -0.27,
"trend": "Cooler"
},
{
"year": "1930",
"anomaly": -0.16,
"trend": "Cooler"
},
{
"year": "1940",
"anomaly": 0.12,
"trend": "Warmer"
},
{
"year": "1950",
"anomaly": -0.17,
"trend": "Cooler"
},
// … 8 more rows; Copy includes them
],
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025",
"byline": "Chart: OpenChart",
"footer": "Note: Each column is the January–December mean for that year, not an average over the decade."
}
}import { Chart } from "@opendata-ai/openchart-react";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025",
"byline": "Chart: OpenChart",
"footer": "Note: Each column is the January–December mean for that year, not an average over the decade."
}
};
export function Example() {
return <Chart spec={spec} />;
}
<script setup lang="ts">
import { Chart } from "@opendata-ai/openchart-vue";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025",
"byline": "Chart: OpenChart",
"footer": "Note: Each column is the January–December mean for that year, not an average over the decade."
}
};
</script>
<template>
<Chart :spec="spec" />
</template>
<script lang="ts">
import { Chart } from "@opendata-ai/openchart-svelte";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025",
"byline": "Chart: OpenChart",
"footer": "Note: Each column is the January–December mean for that year, not an average over the decade."
}
};
</script>
<Chart {spec} />
import { createChart } from "@opendata-ai/openchart-vanilla";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": "bar",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from average",
"format": "+.1f",
"labelSuffix": "°C"
}
},
"color": {
"field": "trend",
"type": "nominal",
"scale": {
"domain": [
"Cooler",
"Warmer"
],
"range": [
"#2b6cb0",
"#c2410c"
]
}
}
},
"legend": {
"show": false
},
"labels": false,
"chrome": {
"title": "Every reading since 1970 has been warmer than the 1951–1980 average",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025",
"byline": "Chart: OpenChart",
"footer": "Note: Each column is the January–December mean for that year, not an average over the decade."
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createChart(container, spec);
byline credits the person or desk that made the chart. footer sits at the very bottom and suits notes on method, such as how each column was measured here. source names where the data came from; on this site the caption under each figure prints it, so the specs leave chrome.source out. In your own charts, set it on every one.
eyebrow adds a short label above the title, the kicker some publications use for a section or series name. This site uses none. Each field takes a string, or { text, style } to change its size, weight, color or maxLines.
Fields that matter
| Field | What it does |
|---|---|
chrome.title |
The headline above the chart. |
chrome.subtitle |
What is measured, the unit and the span. |
chrome.source |
Data attribution, under the chart. |
chrome.byline |
Who made the chart. |
chrome.footer |
Notes, at the very bottom. |
chrome.eyebrow |
A short label above the title. |
chromeLayout |
"grow" keeps the plot height fixed and lets a long title make the figure taller. |
Related
- Column shows more column charts with finding titles.
- Annotations puts text inside the plot.
- Chrome reference lists every chrome field and its default style.