@ons/design-system 72.10.4 → 72.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/button/_button.scss +8 -6
- package/components/chart/_chart.scss +2 -14
- package/components/chart/_macro.njk +15 -3
- package/components/chart/_macro.spec.js +163 -1
- package/components/chart/boxplot.js +3 -0
- package/components/chart/columnrange-chart.js +3 -0
- package/components/chart/example-area-chart-with-axis-min-and-max-values.njk +72 -0
- package/components/chart/example-bar-chart-with-axis-min-and-max-values.njk +59 -0
- package/components/chart/example-column-chart-with-axis-min-and-max-values.njk +59 -0
- package/components/chart/example-line-chart-with-axis-min-and-max-values.njk +227 -0
- package/components/chart/example-scatter-chart-with-axis-min-and-max-values.njk +98 -0
- package/components/chart/specific-chart-options.js +29 -6
- package/components/details-panel/_details-panel.scss +4 -0
- package/components/details-panel/_macro.njk +17 -13
- package/components/details-panel/_macro.spec.js +17 -0
- package/components/details-panel/example-details-panel-open.njk +2 -1
- package/components/details-panel/example-details-panel.njk +2 -1
- package/components/header/_header.scss +40 -24
- package/components/header/_macro.njk +103 -89
- package/components/header/_macro.spec.js +131 -3
- package/components/header/example-header-basic-with-search-and-language.njk +207 -0
- package/components/header/{example-header-with-search-button.njk → example-header-basic-with-search-button.njk} +1 -0
- package/components/header/example-header-basic.njk +1 -0
- package/components/hero/_macro.njk +9 -2
- package/components/hero/_macro.spec.js +22 -0
- package/components/hero/example-hero-grey.njk +2 -1
- package/components/language-selector/_macro.njk +1 -1
- package/components/language-selector/_macro.spec.js +49 -3
- package/components/navigation/navigation.js +24 -17
- package/components/pagination/_macro.njk +17 -7
- package/components/pagination/_macro.spec.js +191 -17
- package/components/table/_macro.njk +83 -44
- package/components/table/_macro.spec.js +90 -0
- package/components/table/_table.scss +15 -3
- package/components/table/example-table-merge-cells.njk +139 -0
- package/css/main.css +1 -1
- package/package.json +1 -1
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
|
@@ -610,9 +610,6 @@ $button-shadow-size: 3px;
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
&--menu {
|
|
613
|
-
align-items: center;
|
|
614
|
-
display: flex;
|
|
615
|
-
padding: 1rem;
|
|
616
613
|
border-bottom: 4px solid rgb(0 0 0 / 0%);
|
|
617
614
|
.ons-icon {
|
|
618
615
|
transform: rotate(90deg);
|
|
@@ -699,9 +696,14 @@ $button-shadow-size: 3px;
|
|
|
699
696
|
&--search-icon,
|
|
700
697
|
&--close {
|
|
701
698
|
border-bottom: 4px solid transparent;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
&--menu,
|
|
702
|
+
&--search-icon,
|
|
703
|
+
&--close {
|
|
702
704
|
align-items: center;
|
|
703
705
|
display: flex;
|
|
704
|
-
padding: 1rem;
|
|
706
|
+
padding: 1.25rem 1rem 1rem;
|
|
705
707
|
}
|
|
706
708
|
|
|
707
709
|
&--search-icon &,
|
|
@@ -768,8 +770,8 @@ $button-shadow-size: 3px;
|
|
|
768
770
|
}
|
|
769
771
|
|
|
770
772
|
&--search-icon:focus {
|
|
771
|
-
background-color: var(--ons-color-focus);
|
|
772
|
-
border-color: var(--ons-color-text-link-focus);
|
|
773
|
+
background-color: var(--ons-color-focus) !important;
|
|
774
|
+
border-color: var(--ons-color-text-link-focus) !important;
|
|
773
775
|
}
|
|
774
776
|
|
|
775
777
|
&--search-icon:focus &,
|
|
@@ -8,19 +8,7 @@
|
|
|
8
8
|
@extend .ons-u-fs-r--b;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
&__title {
|
|
12
|
-
font-size: 1.25rem;
|
|
13
|
-
line-height: 1.625rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&__subtitle {
|
|
17
|
-
font-size: 1rem;
|
|
18
|
-
line-height: 1.3rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
11
|
&__caption {
|
|
22
|
-
font-size: 1rem;
|
|
23
|
-
line-height: 1.2rem;
|
|
24
12
|
color: var(--ons-color-grey-75);
|
|
25
13
|
}
|
|
26
14
|
|
|
@@ -91,8 +79,8 @@
|
|
|
91
79
|
|
|
92
80
|
&-item {
|
|
93
81
|
&--uncertainty {
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
82
|
+
width: 12px;
|
|
83
|
+
height: 12px;
|
|
96
84
|
background-color: rgb(32 96 149 / 65%);
|
|
97
85
|
}
|
|
98
86
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
{% set supportedChartTypes = ['line', 'bar', 'column', 'scatter', 'area', 'columnrange', 'boxplot'] %}
|
|
5
5
|
{% set supportedChartTypesWithLine = ['column'] %}
|
|
6
6
|
{% set supportedChartTypesWithScatter = ['columnrange'] %}
|
|
7
|
+
{% set supportedChartTypesWithXAxisMinAndMax = ['scatter'] %}
|
|
8
|
+
{% set supportedChartTypesWithYAxisMinAndMax = ['line', 'bar', 'column', 'scatter', 'area', 'columnrange', 'boxplot'] %}
|
|
7
9
|
{% set headingLevel = params.headingLevel | default(2) %}
|
|
8
10
|
{% set openingTitleTag = "<h" ~ headingLevel %}
|
|
9
11
|
{% set closingTitleTag = "</h" ~ headingLevel ~ ">" %}
|
|
@@ -75,7 +77,9 @@
|
|
|
75
77
|
{% if params.chartType in supportedChartTypes %}
|
|
76
78
|
<div data-highcharts-chart></div>
|
|
77
79
|
{% else %}
|
|
78
|
-
<p data-invalid-chart-type
|
|
80
|
+
<p data-invalid-chart-type data-unsupported-chart-text>
|
|
81
|
+
<b>{{ '"' + params.chartType + '" - ' + (params.unsupportedChartText or 'chart type is not supported') }}</b>
|
|
82
|
+
</p>
|
|
79
83
|
{% endif %}
|
|
80
84
|
{#
|
|
81
85
|
Footnotes for the annotations at mobile
|
|
@@ -172,7 +176,11 @@
|
|
|
172
176
|
},
|
|
173
177
|
"labels": {
|
|
174
178
|
"format": params.yAxis.labelFormat
|
|
175
|
-
}
|
|
179
|
+
},
|
|
180
|
+
"min": params.yAxis.min if params.yAxis.min is defined and params.chartType in supportedChartTypesWithYAxisMinAndMax else undefined,
|
|
181
|
+
"max": params.yAxis.max if params.yAxis.max is defined and params.chartType in supportedChartTypesWithYAxisMinAndMax else undefined,
|
|
182
|
+
"startOnTick": params.yAxis.startOnTick if params.yAxis.startOnTick is defined and params.chartType in supportedChartTypesWithYAxisMinAndMax else undefined,
|
|
183
|
+
"endOnTick": params.yAxis.endOnTick if params.yAxis.endOnTick is defined and params.chartType in supportedChartTypesWithYAxisMinAndMax else undefined
|
|
176
184
|
},
|
|
177
185
|
"xAxis": {
|
|
178
186
|
"title": {
|
|
@@ -182,7 +190,11 @@
|
|
|
182
190
|
"type": params.xAxis.type,
|
|
183
191
|
"labels": {
|
|
184
192
|
"format": params.xAxis.labelFormat
|
|
185
|
-
}
|
|
193
|
+
},
|
|
194
|
+
"min": params.xAxis.min if params.xAxis.min is defined and params.chartType in supportedChartTypesWithXAxisMinAndMax else undefined,
|
|
195
|
+
"max": params.xAxis.max if params.xAxis.max is defined and params.chartType in supportedChartTypesWithXAxisMinAndMax else undefined,
|
|
196
|
+
"startOnTick": params.xAxis.startOnTick if params.xAxis.startOnTick is defined and params.chartType in supportedChartTypesWithXAxisMinAndMax else undefined,
|
|
197
|
+
"endOnTick": params.xAxis.endOnTick if params.xAxis.endOnTick is defined and params.chartType in supportedChartTypesWithXAxisMinAndMax else undefined
|
|
186
198
|
},
|
|
187
199
|
"series": series
|
|
188
200
|
}
|
|
@@ -207,6 +207,30 @@ describe('Macro: Chart', () => {
|
|
|
207
207
|
});
|
|
208
208
|
});
|
|
209
209
|
|
|
210
|
+
describe('GIVEN: Params: unsupportedChartText', () => {
|
|
211
|
+
describe('WHEN: unsupportedChartText is provided', () => {
|
|
212
|
+
const params = { ...EXAMPLE_INVALID_CHART_PARAMS, unsupportedChartText: 'this chart type is not valid' };
|
|
213
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
214
|
+
|
|
215
|
+
test('THEN: it renders the unsupported chart text in the correct element', () => {
|
|
216
|
+
const invalid = $('[data-invalid-chart-type]');
|
|
217
|
+
expect(invalid.length).toBe(1);
|
|
218
|
+
expect(invalid.text().trim()).toContain('- this chart type is not valid');
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
describe('WHEN: unsupportedChartText is not provided', () => {
|
|
223
|
+
const params = { ...EXAMPLE_INVALID_CHART_PARAMS };
|
|
224
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
225
|
+
|
|
226
|
+
test('THEN: it renders the default unsupported chart text', () => {
|
|
227
|
+
const invalid = $('[data-invalid-chart-type]');
|
|
228
|
+
expect(invalid.length).toBe(1);
|
|
229
|
+
expect(invalid.text().trim()).toBe('"invalid" - chart type is not supported');
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
|
|
210
234
|
describe('GIVEN: Params: Description', () => {
|
|
211
235
|
describe('WHEN: description is provided', () => {
|
|
212
236
|
const $ = cheerio.load(
|
|
@@ -1146,7 +1170,7 @@ describe('Macro: Chart', () => {
|
|
|
1146
1170
|
});
|
|
1147
1171
|
|
|
1148
1172
|
test('THEN: it renders the error message', () => {
|
|
1149
|
-
expect($('[data-invalid-chart-type]').text()).toBe('
|
|
1173
|
+
expect($('[data-invalid-chart-type]').text().trim()).toBe('"invalid" - chart type is not supported');
|
|
1150
1174
|
});
|
|
1151
1175
|
|
|
1152
1176
|
test('THEN: it does not include the Highcharts JSON config', () => {
|
|
@@ -1294,4 +1318,142 @@ describe('Macro: Chart', () => {
|
|
|
1294
1318
|
});
|
|
1295
1319
|
});
|
|
1296
1320
|
});
|
|
1321
|
+
|
|
1322
|
+
describe('FOR: Axis Min, Max, startOnTick, endOnTick', () => {
|
|
1323
|
+
const BASE_PARAMS = {
|
|
1324
|
+
id: 'test-chart',
|
|
1325
|
+
title: 'Test Chart',
|
|
1326
|
+
xAxis: {
|
|
1327
|
+
title: 'X Axis Title',
|
|
1328
|
+
categories: ['A', 'B', 'C'],
|
|
1329
|
+
type: 'linear',
|
|
1330
|
+
labelFormat: '{value}',
|
|
1331
|
+
},
|
|
1332
|
+
yAxis: {
|
|
1333
|
+
title: 'Y Axis Title',
|
|
1334
|
+
labelFormat: '{value}',
|
|
1335
|
+
},
|
|
1336
|
+
series: [],
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
describe('GIVEN: chartType supports xAxis min/max (bar, scatter)', () => {
|
|
1340
|
+
test('THEN: xAxis min and max are included in config when provided', () => {
|
|
1341
|
+
const params = {
|
|
1342
|
+
...BASE_PARAMS,
|
|
1343
|
+
chartType: 'scatter',
|
|
1344
|
+
xAxis: {
|
|
1345
|
+
...BASE_PARAMS.xAxis,
|
|
1346
|
+
min: 1,
|
|
1347
|
+
max: 10,
|
|
1348
|
+
startOnTick: true,
|
|
1349
|
+
endOnTick: false,
|
|
1350
|
+
},
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
1354
|
+
const configScript = $(`script[data-highcharts-config--${params.id}]`).html();
|
|
1355
|
+
|
|
1356
|
+
expect(configScript).toContain('"min":1');
|
|
1357
|
+
expect(configScript).toContain('"max":10');
|
|
1358
|
+
expect(configScript).toContain('"startOnTick":true');
|
|
1359
|
+
expect(configScript).toContain('"endOnTick":false');
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
test('THEN: xAxis min and max are NOT included if not defined', () => {
|
|
1363
|
+
const params = {
|
|
1364
|
+
...BASE_PARAMS,
|
|
1365
|
+
chartType: 'scatter',
|
|
1366
|
+
xAxis: {
|
|
1367
|
+
...BASE_PARAMS.xAxis,
|
|
1368
|
+
min: undefined,
|
|
1369
|
+
max: undefined,
|
|
1370
|
+
startOnTick: undefined,
|
|
1371
|
+
endOnTick: undefined,
|
|
1372
|
+
},
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
1376
|
+
const configScript = $(`script[data-highcharts-config--${params.id}]`).html();
|
|
1377
|
+
|
|
1378
|
+
const config = JSON.parse(configScript);
|
|
1379
|
+
|
|
1380
|
+
expect(config.xAxis.min).toBeUndefined();
|
|
1381
|
+
expect(config.xAxis.max).toBeUndefined();
|
|
1382
|
+
expect(config.xAxis.startOnTick).toBeUndefined();
|
|
1383
|
+
expect(config.xAxis.endOnTick).toBeUndefined();
|
|
1384
|
+
});
|
|
1385
|
+
});
|
|
1386
|
+
|
|
1387
|
+
describe('GIVEN: chartType supports yAxis min/max (line, bar, column, scatter, area, columnrange, boxplot)', () => {
|
|
1388
|
+
test('THEN: yAxis min and max are included in config when provided', () => {
|
|
1389
|
+
const params = {
|
|
1390
|
+
...BASE_PARAMS,
|
|
1391
|
+
chartType: 'line',
|
|
1392
|
+
yAxis: {
|
|
1393
|
+
...BASE_PARAMS.yAxis,
|
|
1394
|
+
min: 0,
|
|
1395
|
+
max: 100,
|
|
1396
|
+
startOnTick: false,
|
|
1397
|
+
endOnTick: true,
|
|
1398
|
+
},
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
1402
|
+
const configScript = $(`script[data-highcharts-config--${params.id}]`).html();
|
|
1403
|
+
|
|
1404
|
+
expect(configScript).toContain('"min":0');
|
|
1405
|
+
expect(configScript).toContain('"max":100');
|
|
1406
|
+
expect(configScript).toContain('"startOnTick":false');
|
|
1407
|
+
expect(configScript).toContain('"endOnTick":true');
|
|
1408
|
+
});
|
|
1409
|
+
|
|
1410
|
+
test('THEN: yAxis min and max are NOT included if not defined', () => {
|
|
1411
|
+
const params = {
|
|
1412
|
+
...BASE_PARAMS,
|
|
1413
|
+
chartType: 'line',
|
|
1414
|
+
yAxis: {
|
|
1415
|
+
...BASE_PARAMS.yAxis,
|
|
1416
|
+
min: undefined,
|
|
1417
|
+
max: undefined,
|
|
1418
|
+
startOnTick: undefined,
|
|
1419
|
+
endOnTick: undefined,
|
|
1420
|
+
},
|
|
1421
|
+
};
|
|
1422
|
+
|
|
1423
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
1424
|
+
const configScript = $(`script[data-highcharts-config--${params.id}]`).html();
|
|
1425
|
+
|
|
1426
|
+
const config = JSON.parse(configScript);
|
|
1427
|
+
|
|
1428
|
+
expect(config.yAxis.min).toBeUndefined();
|
|
1429
|
+
expect(config.yAxis.max).toBeUndefined();
|
|
1430
|
+
expect(config.yAxis.startOnTick).toBeUndefined();
|
|
1431
|
+
expect(config.yAxis.endOnTick).toBeUndefined();
|
|
1432
|
+
});
|
|
1433
|
+
});
|
|
1434
|
+
|
|
1435
|
+
describe('GIVEN: chartType does NOT support axis min/max', () => {
|
|
1436
|
+
test('THEN: xAxis min and max are ignored', () => {
|
|
1437
|
+
const params = {
|
|
1438
|
+
...BASE_PARAMS,
|
|
1439
|
+
chartType: 'line',
|
|
1440
|
+
xAxis: {
|
|
1441
|
+
...BASE_PARAMS.xAxis,
|
|
1442
|
+
min: 1,
|
|
1443
|
+
max: 10,
|
|
1444
|
+
startOnTick: true,
|
|
1445
|
+
endOnTick: true,
|
|
1446
|
+
},
|
|
1447
|
+
};
|
|
1448
|
+
|
|
1449
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
1450
|
+
const configScript = $(`script[data-highcharts-config--${params.id}]`).html();
|
|
1451
|
+
|
|
1452
|
+
expect(configScript).not.toContain('"min":1');
|
|
1453
|
+
expect(configScript).not.toContain('"max":10');
|
|
1454
|
+
expect(configScript).not.toContain('"startOnTick":true');
|
|
1455
|
+
expect(configScript).not.toContain('"endOnTick":true');
|
|
1456
|
+
});
|
|
1457
|
+
});
|
|
1458
|
+
});
|
|
1297
1459
|
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{% from "components/chart/_macro.njk" import onsChart %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsChart({
|
|
5
|
+
"chartType": "area",
|
|
6
|
+
"description": "Area chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
+
"theme": "alternate",
|
|
8
|
+
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
|
+
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
|
+
"id": "id",
|
|
11
|
+
"headingLevel": 4,
|
|
12
|
+
"caption": "Source: Monthly Business Survey, Retails Sales Inquiry from the Office for National Statistics",
|
|
13
|
+
"download": {
|
|
14
|
+
'title': 'Download Figure 1 data',
|
|
15
|
+
'itemsList': [
|
|
16
|
+
{
|
|
17
|
+
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
+
"url": "#"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
+
"url": "#"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
|
|
26
|
+
"text": "Image (PNG format, 25KB)",
|
|
27
|
+
"url": "#"
|
|
28
|
+
}
|
|
29
|
+
]},
|
|
30
|
+
"legend": "true",
|
|
31
|
+
"series": [
|
|
32
|
+
{
|
|
33
|
+
"data": [
|
|
34
|
+
39.2, 47.1, 44.0, 46, 65.3, 53.2, 49.1, 49.3, 50.4, 48.1,
|
|
35
|
+
43.9, 41.8
|
|
36
|
+
],
|
|
37
|
+
"name": "Test series 3"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"data": [
|
|
41
|
+
28.8, 23.2, 33.0, 25.8, 20.8, 39.8, 37.9, 28.2, 37.6, 46.7,
|
|
42
|
+
43.9, 41.8
|
|
43
|
+
],
|
|
44
|
+
"name": "Test series 2"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"data": [
|
|
48
|
+
37.8, 41.0, 43.0, 42.9, 41.8, 39.8, 37.9, 38.2, 37.6, 36.7,
|
|
49
|
+
33.9, 31.8
|
|
50
|
+
],
|
|
51
|
+
"name": "Test series 1"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"xAxis": {
|
|
55
|
+
"categories": [
|
|
56
|
+
"Mar 1901", "Mar 1902", "Mar 1903", "Mar 1904", "Mar 1905", "Mar 1906", "Mar 1907", "Mar 1908", "Mar 1909", "Mar 1910",
|
|
57
|
+
"Mar 1911", "Mar 1912"
|
|
58
|
+
],
|
|
59
|
+
"title": "Years",
|
|
60
|
+
"type": "linear"
|
|
61
|
+
},
|
|
62
|
+
"yAxis": {
|
|
63
|
+
"title": "Y axis title",
|
|
64
|
+
"min": -25,
|
|
65
|
+
"max": 150,
|
|
66
|
+
"startOnTick": true,
|
|
67
|
+
"endOnTick": false
|
|
68
|
+
},
|
|
69
|
+
"percentageHeightDesktop": 50,
|
|
70
|
+
"percentageHeightMobile": 120
|
|
71
|
+
})
|
|
72
|
+
}}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{% from "components/chart/_macro.njk" import onsChart %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsChart({
|
|
5
|
+
"chartType": "bar",
|
|
6
|
+
"description": "Volume sales, seasonally adjusted, Great Britain, January 2022 to January 2025",
|
|
7
|
+
"theme": "primary",
|
|
8
|
+
"title": "Food stores showed a strong rise on the month, while non-food stores fell",
|
|
9
|
+
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
|
+
"id": "uuid",
|
|
11
|
+
"caption": "Source: Monthly Business Survey, Retail Sales Inquiry from the Office for National Statistics",
|
|
12
|
+
"download": {
|
|
13
|
+
'title': 'Download Figure 1 data',
|
|
14
|
+
'itemsList': [
|
|
15
|
+
{
|
|
16
|
+
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
17
|
+
"url": "#"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"text": "Simple text file (CSV format, 25KB)",
|
|
21
|
+
"url": "#"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"text": "Image (PNG format, 25KB)",
|
|
25
|
+
"url": "#"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"xAxis": {
|
|
30
|
+
"categories": [
|
|
31
|
+
"All retailing",
|
|
32
|
+
"All retailing excluding Automotive fuel",
|
|
33
|
+
"Food stores",
|
|
34
|
+
"Department stores",
|
|
35
|
+
"Other non-food stores",
|
|
36
|
+
"Textile clothing \u0026 footwear stores",
|
|
37
|
+
"Household goods stores",
|
|
38
|
+
"Non-store retailing",
|
|
39
|
+
"Automotive fuel"
|
|
40
|
+
],
|
|
41
|
+
"title": "Retailing",
|
|
42
|
+
"type": "linear"
|
|
43
|
+
},
|
|
44
|
+
"yAxis": {
|
|
45
|
+
"title": "Percent (%)",
|
|
46
|
+
"min": -5,
|
|
47
|
+
"max": 10,
|
|
48
|
+
"startOnTick": true,
|
|
49
|
+
"endOnTick": false
|
|
50
|
+
},
|
|
51
|
+
"series": [
|
|
52
|
+
{
|
|
53
|
+
"data": [1.7, 2.1, 5.6, 0, -0.6, -2.7, -1.7, 2.4, -1.2],
|
|
54
|
+
"dataLabels": true,
|
|
55
|
+
"name": "Jan-25"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
}}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{% from "components/chart/_macro.njk" import onsChart %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsChart({
|
|
5
|
+
"chartType": "column",
|
|
6
|
+
"description": "Public sector net debt excluding public sector banks, percentage of gross domestic product (GDP), UK, financial year ending (FYE) 1901 to October 2024",
|
|
7
|
+
"theme": "primary",
|
|
8
|
+
"title": "Figure 6: Net debt as a percentage of GDP remains at levels last seen in the early 1960s",
|
|
9
|
+
"subtitle": "Public sector net debt excluding public sector banks, percentage of gross domestic product (GDP), UK, financial year ending (FYE) 1901 to October 2024",
|
|
10
|
+
"id": "uuid",
|
|
11
|
+
"caption": "Source: Public sector finances from the Office for Budget Responsibility (OBR) and the Office for National Statistics",
|
|
12
|
+
"download": {
|
|
13
|
+
'title': 'Download Figure 1 data',
|
|
14
|
+
'itemsList': [
|
|
15
|
+
{
|
|
16
|
+
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
17
|
+
"url": "#"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"text": "Simple text file (CSV format, 25KB)",
|
|
21
|
+
"url": "#"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"text": "Image (PNG format, 25KB)",
|
|
25
|
+
"url": "#"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"legend": false,
|
|
30
|
+
"series": [
|
|
31
|
+
{
|
|
32
|
+
"data": [
|
|
33
|
+
37.8, 41.0, 43.0, 42.9, 41.8, 39.8, 37.9, 38.2, 37.6, 36.7,
|
|
34
|
+
33.9, 31.8
|
|
35
|
+
],
|
|
36
|
+
"dataLabels": false,
|
|
37
|
+
"name": "Public sector net debt as a % of GDP (PSND)"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"xAxis": {
|
|
41
|
+
"categories": [
|
|
42
|
+
"Mar 1901", "Mar 1902", "Mar 1903", "Mar 1904", "Mar 1905", "Mar 1906", "Mar 1907", "Mar 1908", "Mar 1909", "Mar 1910",
|
|
43
|
+
"Mar 1911", "Mar 1912"
|
|
44
|
+
],
|
|
45
|
+
"title": "Years",
|
|
46
|
+
"type": "linear",
|
|
47
|
+
"tickIntervalMobile": 5
|
|
48
|
+
},
|
|
49
|
+
"yAxis": {
|
|
50
|
+
"title": "Percentage of GDP",
|
|
51
|
+
"min": -10,
|
|
52
|
+
"max": 50,
|
|
53
|
+
"startOnTick": true,
|
|
54
|
+
"endOnTick": false
|
|
55
|
+
},
|
|
56
|
+
"percentageHeightDesktop": 35,
|
|
57
|
+
"percentageHeightMobile": 90
|
|
58
|
+
})
|
|
59
|
+
}}
|