@ons/design-system 73.0.3 → 73.2.0
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/accordion/_macro.njk +2 -0
- package/components/accordion/_macro.spec.js +39 -0
- package/components/accordion/accordion.js +2 -0
- package/components/accordion/example-accordion.njk +6 -1
- package/components/back-to-top/example-full-page-back-to-top.njk +2 -2
- package/components/button/example-button-new-window.njk +1 -0
- package/components/chart/_chart.scss +2 -2
- package/components/chart/_macro.spec.js +32 -0
- package/components/chart/annotations-options.js +1 -0
- package/components/chart/area-chart.js +3 -0
- package/components/chart/bar-chart.js +1 -0
- package/components/chart/chart-constants.js +2 -1
- package/components/chart/chart.js +8 -4
- package/components/chart/column-chart.js +3 -0
- package/components/chart/example-area-chart-with-axis-min-and-max-values.njk +1 -1
- package/components/chart/example-area-chart.njk +2 -2
- package/components/chart/example-clustered-column-chart.njk +1 -1
- package/components/chart/example-line-chart-with-annotations.njk +1 -1
- package/components/chart/example-line-chart-with-axis-min-and-max-values.njk +1 -1
- package/components/chart/example-line-chart-with-custom-reference-line-value.njk +1 -1
- package/components/chart/example-line-chart-with-label-format.njk +89 -0
- package/components/chart/example-line-chart-with-markers.njk +1 -37
- package/components/chart/example-line-chart-with-range-annotations-inside.njk +1 -1
- package/components/chart/example-line-chart-with-range-annotations-outside-left-right.njk +1 -1
- package/components/chart/example-line-chart-with-range-annotations-outside-top-bottom.njk +1 -1
- package/components/chart/example-line-chart-with-reference-line-annotations.njk +1 -1
- package/components/chart/example-line-chart.njk +1 -1
- package/components/chart/example-scatter-chart-with-axis-min-and-max-values.njk +1 -1
- package/components/chart/example-scatter-chart.njk +1 -1
- package/components/chart/example-stacked-column-chart.njk +26 -37
- package/components/chart/reference-line-annotations-options.js +1 -0
- package/components/chart/specific-chart-options.js +23 -1
- package/components/cookies-banner/_macro.njk +1 -3
- package/components/details-panel/_macro.njk +6 -6
- package/components/featured-article/example-featured-article-with-chart.njk +1 -1
- package/components/header/_macro.njk +64 -31
- package/components/header/_macro.spec.js +223 -0
- package/components/header/example-header-basic-with-search-and-language-DEPRECATED.njk +207 -0
- package/components/header/example-header-basic-with-search-and-language.njk +36 -27
- package/components/header/example-header-basic-with-search-button.njk +35 -27
- package/components/hero/_macro.njk +4 -1
- package/components/hero/_macro.spec.js +26 -0
- package/components/icon/_macro.njk +2 -2
- package/components/icon/_macro.spec.js +2 -2
- package/components/list/_list.scss +0 -3
- package/components/list/example-inline-list-with-social-icon-prefix.njk +2 -2
- package/components/panel/_panel.scss +5 -0
- package/components/radios/_macro.njk +1 -1
- package/components/related-content/example-related-content-social-media.njk +2 -2
- package/components/share-page/_macro.njk +6 -6
- package/components/share-page/_macro.spec.js +9 -9
- package/components/share-page/example-share-page.njk +1 -1
- package/components/skip-to-content/_macro.njk +1 -1
- package/components/skip-to-content/_skip.scss +0 -2
- package/components/table-of-contents/example-table-of-contents-grouped-with-single-list-item.njk +34 -0
- package/css/main.css +1 -1
- package/js/cookies-settings.js +5 -5
- package/layout/_template.njk +5 -5
- package/package.json +18 -12
- package/scripts/main.es5.js +5 -3
- package/scripts/main.js +2 -2
- package/scss/utilities/_highlight.scss +2 -1
- /package/favicons/{twitter.png → x.png} +0 -0
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
{%
|
|
9
9
|
set attributes = attributes | setAttributes({
|
|
10
10
|
"data-close-all": params.allButton.close,
|
|
11
|
+
"data-open-aria-label": params.allButton.openAriaLabel | default("Show all buttons"),
|
|
12
|
+
"data-close-aria-label": params.allButton.closeAriaLabel | default("Hide all buttons"),
|
|
11
13
|
"data-group": params.id
|
|
12
14
|
})
|
|
13
15
|
%}
|
|
@@ -202,7 +202,46 @@ describe('FOR: Macro: Accordion', () => {
|
|
|
202
202
|
expect($('button.ons-accordion__toggle-all').attr('b')).toBe('456');
|
|
203
203
|
});
|
|
204
204
|
});
|
|
205
|
+
|
|
206
|
+
describe('WHEN: openAriaLabel and closeAriaLabel are provided', () => {
|
|
207
|
+
const $ = cheerio.load(
|
|
208
|
+
renderComponent('accordion', {
|
|
209
|
+
...EXAMPLE_ACCORDION,
|
|
210
|
+
allButton: {
|
|
211
|
+
open: 'Open label',
|
|
212
|
+
close: 'Close label',
|
|
213
|
+
openAriaLabel: 'Open all sections',
|
|
214
|
+
closeAriaLabel: 'Close all sections',
|
|
215
|
+
},
|
|
216
|
+
}),
|
|
217
|
+
);
|
|
218
|
+
test('THEN: renders toggle all button with provided openAriaLabel', () => {
|
|
219
|
+
expect($('button.ons-accordion__toggle-all').attr('data-open-aria-label')).toBe('Open all sections');
|
|
220
|
+
});
|
|
221
|
+
test('THEN: renders toggle all button with provided closeAriaLabel', () => {
|
|
222
|
+
expect($('button.ons-accordion__toggle-all').attr('data-close-aria-label')).toBe('Close all sections');
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
describe('WHEN: openAriaLabel and closeAriaLabel are NOT provided', () => {
|
|
227
|
+
const $ = cheerio.load(
|
|
228
|
+
renderComponent('accordion', {
|
|
229
|
+
...EXAMPLE_ACCORDION,
|
|
230
|
+
allButton: {
|
|
231
|
+
open: 'Open label',
|
|
232
|
+
close: 'Close label',
|
|
233
|
+
},
|
|
234
|
+
}),
|
|
235
|
+
);
|
|
236
|
+
test('THEN: renders toggle all button with default openAriaLabel', () => {
|
|
237
|
+
expect($('button.ons-accordion__toggle-all').attr('data-open-aria-label')).toBe('Show all buttons');
|
|
238
|
+
});
|
|
239
|
+
test('THEN: renders toggle all button with default closeAriaLabel', () => {
|
|
240
|
+
expect($('button.ons-accordion__toggle-all').attr('data-close-aria-label')).toBe('Hide all buttons');
|
|
241
|
+
});
|
|
242
|
+
});
|
|
205
243
|
});
|
|
244
|
+
|
|
206
245
|
describe('GIVEN: Params: saveState', () => {
|
|
207
246
|
describe('WHEN: saveState param is not provided', () => {
|
|
208
247
|
const $ = cheerio.load(
|
|
@@ -55,9 +55,11 @@ export default class Accordion {
|
|
|
55
55
|
if (this.canClose()) {
|
|
56
56
|
this.buttonInner.innerHTML = DOMPurify.sanitize(this.closeButton);
|
|
57
57
|
this.button.setAttribute('data-ga-label', this.buttonOpen);
|
|
58
|
+
this.button.setAttribute('aria-label', this.button.getAttribute('data-close-aria-label'));
|
|
58
59
|
this.button.setAttribute('aria-expanded', 'true');
|
|
59
60
|
} else {
|
|
60
61
|
this.buttonInner.innerHTML = DOMPurify.sanitize(this.buttonOpen);
|
|
62
|
+
this.button.setAttribute('aria-label', this.button.getAttribute('data-open-aria-label'));
|
|
61
63
|
this.button.setAttribute('data-ga-label', this.closeButton);
|
|
62
64
|
this.button.setAttribute('aria-expanded', 'false');
|
|
63
65
|
}
|
|
@@ -5,7 +5,12 @@
|
|
|
5
5
|
"id": "accordion-example",
|
|
6
6
|
"allButton": {
|
|
7
7
|
"open": "Show all",
|
|
8
|
-
"close": "Hide all"
|
|
8
|
+
"close": "Hide all",
|
|
9
|
+
"openAriaLabel": "Show all sections",
|
|
10
|
+
"closeAriaLabel": "Hide all sections",
|
|
11
|
+
"attributes": {
|
|
12
|
+
"data-toggle-button": "accordion-toggle-all"
|
|
13
|
+
}
|
|
9
14
|
},
|
|
10
15
|
"itemsList": [
|
|
11
16
|
{
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
fill: var(--ons-color-grey-75); /* Forces the color used for text in high contrast mode */
|
|
13
13
|
}
|
|
14
14
|
.highcharts-annotation-label text,
|
|
15
|
-
.highcharts-plot-
|
|
16
|
-
.highcharts-plot-
|
|
15
|
+
.highcharts-plot-band-label,
|
|
16
|
+
.highcharts-plot-line-label {
|
|
17
17
|
fill: CanvasText !important; /* Forces the color used for text in high contrast mode */
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -260,6 +260,38 @@ describe('Macro: Chart', () => {
|
|
|
260
260
|
expect(configScript).toContain('"startOnTick":false');
|
|
261
261
|
expect(configScript).toContain('"endOnTick":true');
|
|
262
262
|
});
|
|
263
|
+
|
|
264
|
+
test('THEN: yAxis min and max are included in config with the correct values', () => {
|
|
265
|
+
const params = {
|
|
266
|
+
id: 'test-chart',
|
|
267
|
+
title: 'Test Chart',
|
|
268
|
+
xAxis: {
|
|
269
|
+
title: 'X Axis Title',
|
|
270
|
+
categories: ['A', 'B', 'C'],
|
|
271
|
+
type: 'linear',
|
|
272
|
+
labelFormat: '{value}',
|
|
273
|
+
},
|
|
274
|
+
chartType: 'line',
|
|
275
|
+
yAxis: {
|
|
276
|
+
title: 'Y Axis Title',
|
|
277
|
+
labelFormat: '{value}',
|
|
278
|
+
min: 20.5,
|
|
279
|
+
max: 99.5,
|
|
280
|
+
tickIntervalDesktop: 0.5,
|
|
281
|
+
startOnTick: false,
|
|
282
|
+
endOnTick: true,
|
|
283
|
+
},
|
|
284
|
+
series: [],
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const $ = cheerio.load(renderComponent('chart', params));
|
|
288
|
+
const configScript = $(`script[data-highcharts-config--${params.id}]`).html();
|
|
289
|
+
|
|
290
|
+
expect(configScript).toContain('"min":20.5');
|
|
291
|
+
expect(configScript).toContain('"max":99.5');
|
|
292
|
+
expect(configScript).toContain('"startOnTick":false');
|
|
293
|
+
expect(configScript).toContain('"endOnTick":true');
|
|
294
|
+
});
|
|
263
295
|
});
|
|
264
296
|
|
|
265
297
|
describe('WHEN: yAxis min and max are not provided', () => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
class ChartConstants {
|
|
2
2
|
static constants() {
|
|
3
3
|
const constants = {
|
|
4
|
-
primaryTheme: ['#206095', '#
|
|
4
|
+
primaryTheme: ['#206095', '#a8bd3a', '#871a5b', '#f66068', '#05341a', '#27a0cc'],
|
|
5
|
+
linePrimaryTheme: ['#206095', '#a8bd3a', '#871a5b', '#f66068', '#27a0cc', '#05341a'],
|
|
5
6
|
// Alternate theme colours from https://service-manual.ons.gov.uk/data-visualisation/colours/using-colours-in-charts
|
|
6
7
|
alternateTheme: ['#206095', '#27A0CC', '#871A5B', '#A8BD3A', '#F66068'],
|
|
7
8
|
labelColor: '#414042',
|
|
@@ -56,16 +56,16 @@ class HighchartsBaseChart {
|
|
|
56
56
|
this.percentageHeightDesktop = this.node.dataset.highchartsPercentageHeightDesktop;
|
|
57
57
|
this.percentageHeightMobile = this.node.dataset.highchartsPercentageHeightMobile;
|
|
58
58
|
this.xAxisTickIntervalMobile = this.node.dataset.highchartsXAxisTickIntervalMobile
|
|
59
|
-
?
|
|
59
|
+
? parseFloat(this.node.dataset.highchartsXAxisTickIntervalMobile)
|
|
60
60
|
: undefined;
|
|
61
61
|
this.xAxisTickIntervalDesktop = this.node.dataset.highchartsXAxisTickIntervalDesktop
|
|
62
|
-
?
|
|
62
|
+
? parseFloat(this.node.dataset.highchartsXAxisTickIntervalDesktop)
|
|
63
63
|
: undefined;
|
|
64
64
|
this.yAxisTickIntervalMobile = this.node.dataset.highchartsYAxisTickIntervalMobile
|
|
65
|
-
?
|
|
65
|
+
? parseFloat(this.node.dataset.highchartsYAxisTickIntervalMobile)
|
|
66
66
|
: undefined;
|
|
67
67
|
this.yAxisTickIntervalDesktop = this.node.dataset.highchartsYAxisTickIntervalDesktop
|
|
68
|
-
?
|
|
68
|
+
? parseFloat(this.node.dataset.highchartsYAxisTickIntervalDesktop)
|
|
69
69
|
: undefined;
|
|
70
70
|
this.commonChartOptions = new CommonChartOptions();
|
|
71
71
|
this.estimateLineLabel = this.node.dataset.highchartsEstimateLineLabel;
|
|
@@ -167,6 +167,7 @@ class HighchartsBaseChart {
|
|
|
167
167
|
if (this.chartType === 'scatter') {
|
|
168
168
|
// Merge the scatter chart options with the existing config
|
|
169
169
|
this.config = mergeConfigs(this.config, scatterChartOptions);
|
|
170
|
+
this.specificChartOptions.limitSeriesForScatterChart();
|
|
170
171
|
}
|
|
171
172
|
if (this.chartType === 'boxplot') {
|
|
172
173
|
// Merge the boxplot chart options with the existing config
|
|
@@ -187,6 +188,9 @@ class HighchartsBaseChart {
|
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
190
|
|
|
191
|
+
// Limit the number of series to the theme length
|
|
192
|
+
this.specificChartOptions.limitSeriesToThemeLength();
|
|
193
|
+
|
|
190
194
|
// Disable the legend for single series charts
|
|
191
195
|
this.specificChartOptions.disableLegendForSingleSeries(this.config);
|
|
192
196
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "area",
|
|
6
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": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
39.2, 47.1, 44.0, 46, 65.3, 53.2, 49.1, 49.3, 50.4, 48.1,
|
|
35
35
|
43.9, 41.8
|
|
36
36
|
],
|
|
37
|
-
"name": "Test series
|
|
37
|
+
"name": "Test series 1"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"data": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
37.8, 41.0, 43.0, 42.9, 41.8, 39.8, 37.9, 38.2, 37.6, 36.7,
|
|
49
49
|
33.9, 31.8
|
|
50
50
|
],
|
|
51
|
-
"name": "Test series
|
|
51
|
+
"name": "Test series 3"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"xAxis": {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "column",
|
|
6
6
|
"description": "Volume sales, monthly percentage change, seasonally adjusted, Great Britain, October 2024",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Clothing stores fell back, following three months of growth",
|
|
9
9
|
"subtitle": "Volume sales, monthly percentage change, seasonally adjusted, Great Britain, October 2024",
|
|
10
10
|
"id": "uuid",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{% from "components/chart/_macro.njk" import onsChart %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsChart({
|
|
5
|
+
"chartType": "line",
|
|
6
|
+
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
+
"theme": "primary",
|
|
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
|
+
"footnotes": {
|
|
31
|
+
"title": "Footnotes",
|
|
32
|
+
"content": "<ol><li>Non-store retailing refers to retailers that do not have a store presence. While the majority is made up of online retailers, it also includes other retailers, such as stalls and markets.</li><li>More data are available in our Retail Sales Index datasets.</li></ol>"
|
|
33
|
+
},
|
|
34
|
+
"legend": true,
|
|
35
|
+
"xAxis": {
|
|
36
|
+
"title": "Year",
|
|
37
|
+
"type": "linear",
|
|
38
|
+
"labelFormat": "{value:.2f}",
|
|
39
|
+
"categories": [
|
|
40
|
+
'Oct 2014',
|
|
41
|
+
'Nov 2014',
|
|
42
|
+
'Dec 2014',
|
|
43
|
+
'Jan 2015',
|
|
44
|
+
'Feb 2015',
|
|
45
|
+
'Mar 2015',
|
|
46
|
+
'Apr 2015',
|
|
47
|
+
'May 2015',
|
|
48
|
+
'Jun 2015',
|
|
49
|
+
'Jul 2015',
|
|
50
|
+
'Aug 2015',
|
|
51
|
+
'Sep 2015'
|
|
52
|
+
],
|
|
53
|
+
"tickIntervalMobile": 3
|
|
54
|
+
},
|
|
55
|
+
"yAxis": {
|
|
56
|
+
"title": "Sales",
|
|
57
|
+
"labelFormat": "{value:,.2f}"
|
|
58
|
+
},
|
|
59
|
+
"series": [
|
|
60
|
+
{
|
|
61
|
+
"name": 'CPIH',
|
|
62
|
+
"data": [
|
|
63
|
+
1.3, 1.1, 0.7, 0.5, 0.4, 0.3, 0.3, 0.4, 0.3, 0.5, 0.4, 0.2
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": 'Goods',
|
|
68
|
+
"data": [
|
|
69
|
+
0.3, 0.2, 1.0, 1.5, 2.0, 2.1, 1.9, 1.8, 2.0, 1.8, 2.0, 2.3
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": 'Services',
|
|
74
|
+
"data": [
|
|
75
|
+
2.2, 2.1, 2.1, 2.1, 2.2, 2.2, 2.0, 2.1, 2.1, 2.2, 2.2, 2.2
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": 'CPIH excl energy, food, alcohol & tobacco',
|
|
80
|
+
"data": [
|
|
81
|
+
1.5, 1.3, 1.4, 1.5, 1.4, 1.2, 1.1, 1.2, 1.0, 1.3, 1.2, 1.2
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"percentageHeightDesktop": 35,
|
|
86
|
+
"percentageHeightMobile": 90,
|
|
87
|
+
"fallbackImageUrl": '/img/small/line-chart-screenshot.png'
|
|
88
|
+
})
|
|
89
|
+
}}
|
|
@@ -38,11 +38,7 @@
|
|
|
38
38
|
'Dec 2014',
|
|
39
39
|
'Jan 2015',
|
|
40
40
|
'Feb 2015',
|
|
41
|
-
'Mar 2015'
|
|
42
|
-
'Apr 2015',
|
|
43
|
-
'May 2015',
|
|
44
|
-
'Jun 2015',
|
|
45
|
-
'Jul 2015'
|
|
41
|
+
'Mar 2015'
|
|
46
42
|
]
|
|
47
43
|
},
|
|
48
44
|
"yAxis": {
|
|
@@ -98,38 +94,6 @@
|
|
|
98
94
|
],
|
|
99
95
|
"marker": true,
|
|
100
96
|
"connectNulls": true
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"name": 'Extra test series 3',
|
|
104
|
-
"data": [
|
|
105
|
-
5.5, 5.3, 5.4, 5.5, 5.4, 5.2, 5.1, 5.2, 5.0, 5.3
|
|
106
|
-
],
|
|
107
|
-
"marker": true,
|
|
108
|
-
"connectNulls": true
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"name": 'Extra test series 4',
|
|
112
|
-
"data": [
|
|
113
|
-
-3.5, -3.3, -3.4, -3.5, -3.4, -3.2, -3.1, -3.2, -3.0, -3.3
|
|
114
|
-
],
|
|
115
|
-
"marker": true,
|
|
116
|
-
"connectNulls": true
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"name": 'Extra test series 5',
|
|
120
|
-
"data": [
|
|
121
|
-
-4.5, -4.3, -4.4, -4.5, -4.4, -4.2, -4.1, -4.2, -4.0, -4.3
|
|
122
|
-
],
|
|
123
|
-
"marker": true,
|
|
124
|
-
"connectNulls": true
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": 'Extra test series 6',
|
|
128
|
-
"data": [
|
|
129
|
-
-5.5, -5.3, -5.4, -5.5, -5.4, -5.2, -5.1, -5.2, -5.0, -5.3
|
|
130
|
-
],
|
|
131
|
-
"marker": true,
|
|
132
|
-
"connectNulls": true
|
|
133
97
|
}
|
|
134
98
|
],
|
|
135
99
|
"percentageHeightDesktop": 35,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
onsChart({
|
|
5
5
|
"chartType": "line",
|
|
6
6
|
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
7
|
-
"theme": "
|
|
7
|
+
"theme": "primary",
|
|
8
8
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
9
9
|
"subtitle": "Figure 6: Upward contribution from housing and household services (including energy) saw the annual CPIH inflation rate rise",
|
|
10
10
|
"id": "id",
|
|
@@ -2,66 +2,55 @@
|
|
|
2
2
|
{{
|
|
3
3
|
onsChart({
|
|
4
4
|
"chartType": "column",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Monthly percentage change in retail sales volume by store type, Great Britain, January to June 2025",
|
|
6
6
|
"theme": "primary",
|
|
7
7
|
"title": "Food stores showed a strong rise on the month, while non-food stores fell",
|
|
8
|
-
"subtitle": "Figure 6: Upward contribution
|
|
8
|
+
"subtitle": "Figure 6: Upward contribution to monthly percentage change in total retail sales",
|
|
9
9
|
"id": "uuid",
|
|
10
10
|
"useStackedLayout": true,
|
|
11
11
|
"caption": "Source: Monthly Business Survey, Retail Sales Inquiry from the Office for National Statistics",
|
|
12
12
|
"download": {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"text": "Simple text file (CSV format, 25KB)",
|
|
21
|
-
"url": "#"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"text": "Image (PNG format, 25KB)",
|
|
25
|
-
"url": "#"
|
|
26
|
-
}
|
|
13
|
+
"title": "Download Figure 6 data",
|
|
14
|
+
"itemsList": [
|
|
15
|
+
{ "text": "Excel spreadsheet (XLSX format, 22KB)", "url": "#" },
|
|
16
|
+
{ "text": "Simple text file (CSV format, 28KB)", "url": "#" },
|
|
17
|
+
{ "text": "Image (PNG format, 32KB)", "url": "#" }
|
|
27
18
|
]
|
|
28
19
|
},
|
|
29
20
|
"legend": true,
|
|
30
21
|
"series": [
|
|
31
22
|
{
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"name": "2022"
|
|
23
|
+
"name": "Food stores",
|
|
24
|
+
"data": [1.5, 0.8, 1.2, 0.9, 1.1, 1.4]
|
|
35
25
|
},
|
|
36
26
|
{
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"name": "2023"
|
|
27
|
+
"name": "Non-food stores",
|
|
28
|
+
"data": [0.5, -0.2, 0.6, 0.8, 0.3, 0.4]
|
|
40
29
|
},
|
|
41
30
|
{
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
31
|
+
"name": "Non-store retailing",
|
|
32
|
+
"data": [0.2, 0.1, 0.3, 0.2, 0.4, 0.3]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Automotive fuel",
|
|
36
|
+
"data": [0.3, 0.2, -0.1, 0.4, 0.2, 0.5]
|
|
45
37
|
}
|
|
46
38
|
],
|
|
47
39
|
"xAxis": {
|
|
48
40
|
"categories": [
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"Other stores",
|
|
56
|
-
"All retailing"
|
|
41
|
+
"Jan 2025",
|
|
42
|
+
"Feb 2025",
|
|
43
|
+
"Mar 2025",
|
|
44
|
+
"Apr 2025",
|
|
45
|
+
"May 2025",
|
|
46
|
+
"Jun 2025"
|
|
57
47
|
],
|
|
58
|
-
"title": "
|
|
59
|
-
"type": "linear"
|
|
48
|
+
"title": "Month"
|
|
60
49
|
},
|
|
61
50
|
"yAxis": {
|
|
62
|
-
"title": "
|
|
51
|
+
"title": "Monthly percentage change (%)"
|
|
63
52
|
},
|
|
64
|
-
"percentageHeightDesktop":
|
|
53
|
+
"percentageHeightDesktop": 40,
|
|
65
54
|
"percentageHeightMobile": 90
|
|
66
55
|
})
|
|
67
56
|
}}
|