govuk_publishing_components 46.4.0 → 47.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +6 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +4 -4
- data/app/models/govuk_publishing_components/component_doc.rb +1 -1
- data/app/views/govuk_publishing_components/components/_heading.html.erb +24 -9
- data/app/views/govuk_publishing_components/components/_skip_link.html.erb +6 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +4 -7
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +6 -5
- data/app/views/govuk_publishing_components/components/docs/heading.yml +34 -10
- data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +9 -0
- data/app/views/govuk_publishing_components/components/docs/skip_link.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml +1 -0
- data/config/locales/ar.yml +0 -8
- data/config/locales/az.yml +0 -8
- data/config/locales/be.yml +0 -8
- data/config/locales/bg.yml +0 -8
- data/config/locales/bn.yml +0 -8
- data/config/locales/cs.yml +0 -8
- data/config/locales/cy.yml +0 -8
- data/config/locales/da.yml +0 -8
- data/config/locales/de.yml +0 -8
- data/config/locales/dr.yml +0 -8
- data/config/locales/el.yml +0 -8
- data/config/locales/en.yml +0 -8
- data/config/locales/es-419.yml +0 -8
- data/config/locales/es.yml +0 -8
- data/config/locales/et.yml +0 -8
- data/config/locales/fa.yml +0 -8
- data/config/locales/fi.yml +0 -8
- data/config/locales/fr.yml +0 -8
- data/config/locales/gd.yml +0 -8
- data/config/locales/gu.yml +0 -8
- data/config/locales/he.yml +0 -8
- data/config/locales/hi.yml +0 -8
- data/config/locales/hr.yml +0 -8
- data/config/locales/hu.yml +0 -8
- data/config/locales/hy.yml +0 -8
- data/config/locales/id.yml +0 -8
- data/config/locales/is.yml +0 -8
- data/config/locales/it.yml +0 -8
- data/config/locales/ja.yml +0 -8
- data/config/locales/ka.yml +0 -8
- data/config/locales/kk.yml +0 -8
- data/config/locales/ko.yml +0 -8
- data/config/locales/lt.yml +0 -8
- data/config/locales/lv.yml +0 -8
- data/config/locales/ms.yml +0 -8
- data/config/locales/mt.yml +0 -8
- data/config/locales/nl.yml +0 -8
- data/config/locales/no.yml +0 -8
- data/config/locales/pa-pk.yml +0 -8
- data/config/locales/pa.yml +0 -8
- data/config/locales/pl.yml +0 -8
- data/config/locales/ps.yml +0 -8
- data/config/locales/pt.yml +0 -8
- data/config/locales/ro.yml +0 -8
- data/config/locales/ru.yml +0 -8
- data/config/locales/si.yml +0 -8
- data/config/locales/sk.yml +0 -8
- data/config/locales/sl.yml +0 -8
- data/config/locales/so.yml +0 -8
- data/config/locales/sq.yml +0 -8
- data/config/locales/sr.yml +0 -8
- data/config/locales/sv.yml +0 -8
- data/config/locales/sw.yml +0 -8
- data/config/locales/ta.yml +0 -8
- data/config/locales/th.yml +0 -8
- data/config/locales/tk.yml +0 -8
- data/config/locales/tr.yml +0 -8
- data/config/locales/uk.yml +0 -8
- data/config/locales/ur.yml +0 -8
- data/config/locales/uz.yml +0 -8
- data/config/locales/vi.yml +0 -8
- data/config/locales/zh-hk.yml +0 -8
- data/config/locales/zh-tw.yml +0 -8
- data/config/locales/zh.yml +0 -8
- data/lib/govuk_publishing_components/presenters/heading_helper.rb +3 -3
- data/lib/govuk_publishing_components/presenters/organisation_logo_helper.rb +3 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +0 -1
- metadata +3 -36
- data/app/assets/javascripts/govuk_publishing_components/components/chart.js +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_chart.scss +0 -57
- data/app/assets/stylesheets/govuk_publishing_components/components/_chat-entry.scss +0 -39
- data/app/views/govuk_publishing_components/components/_chart.html.erb +0 -146
- data/app/views/govuk_publishing_components/components/_chat_entry.html.erb +0 -55
- data/app/views/govuk_publishing_components/components/docs/chart.yml +0 -576
- data/app/views/govuk_publishing_components/components/docs/chat_entry.yml +0 -45
- data/lib/govuk_publishing_components/presenters/chart_helper.rb +0 -112
- data/node_modules/chartkick/LICENSE.txt +0 -22
- data/node_modules/chartkick/README.md +0 -593
- data/node_modules/chartkick/chart.js/chart.esm.js +0 -5
- data/node_modules/chartkick/chart.js/package.json +0 -6
- data/node_modules/chartkick/dist/chartkick.esm.js +0 -2562
- data/node_modules/chartkick/dist/chartkick.js +0 -2570
- data/node_modules/chartkick/dist/chartkick.min.js +0 -2
- data/node_modules/chartkick/highcharts/highcharts.esm.js +0 -4
- data/node_modules/chartkick/highcharts/package.json +0 -6
- data/node_modules/chartkick/package.json +0 -50
@@ -1,576 +0,0 @@
|
|
1
|
-
name: Chart (experimental)
|
2
|
-
description: The chart component presents a data chart and a tabular version of the same data
|
3
|
-
part_of_admin_layout: true
|
4
|
-
body: |
|
5
|
-
This component takes a set of data and presents it as a line graph and a table with one or more rows and lines.
|
6
|
-
The chart relies upon chartkick and renders using JavaScript, so the table is provided as a fallback for a lack of JavaScript,
|
7
|
-
an accessible view on the data for screenreaders, and a simple view of the raw data for all users.
|
8
|
-
|
9
|
-
The `chart_overview` option can be used to provide an explanation for screen reader users of what the chart shows.
|
10
|
-
accessibility_criteria: |
|
11
|
-
Charts must:
|
12
|
-
|
13
|
-
- use line colours with a contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
14
|
-
- contain a `chart_heading` option if `minimal` is not set to true, so that skip links and visually hidden headings are accurate
|
15
|
-
shared_accessibility_criteria:
|
16
|
-
- link
|
17
|
-
uses_component_wrapper_helper: true
|
18
|
-
examples:
|
19
|
-
default:
|
20
|
-
data:
|
21
|
-
chart_heading: Chart showing page views on the website in January 2015
|
22
|
-
h_axis_title: Day
|
23
|
-
v_axis_title: Views
|
24
|
-
chart_overview: This chart shows page views for January 2015.
|
25
|
-
keys:
|
26
|
-
- "2015-01-01"
|
27
|
-
- "2015-01-02"
|
28
|
-
- "2015-01-03"
|
29
|
-
- "2015-01-04"
|
30
|
-
- "2015-01-05"
|
31
|
-
- "2015-01-06"
|
32
|
-
- "2015-01-07"
|
33
|
-
- "2015-01-08"
|
34
|
-
- "2015-01-09"
|
35
|
-
- "2015-01-10"
|
36
|
-
rows:
|
37
|
-
- label: January 2015
|
38
|
-
values:
|
39
|
-
- 500
|
40
|
-
- 1190
|
41
|
-
- 740
|
42
|
-
- 820
|
43
|
-
- 270
|
44
|
-
- 450
|
45
|
-
- 110
|
46
|
-
- 210
|
47
|
-
- 670
|
48
|
-
- 430
|
49
|
-
multiple rows of data:
|
50
|
-
description: Where more than one series is shown on a chart, do not hide the legend.
|
51
|
-
data:
|
52
|
-
chart_heading: Page views chart
|
53
|
-
h_axis_title: Day
|
54
|
-
v_axis_title: Views
|
55
|
-
chart_overview: This chart shows page views for January in different years.
|
56
|
-
keys:
|
57
|
-
- 1st
|
58
|
-
- 2nd
|
59
|
-
- 3rd
|
60
|
-
- 4th
|
61
|
-
- 5th
|
62
|
-
- 6th
|
63
|
-
- 7th
|
64
|
-
- 8th
|
65
|
-
- 9th
|
66
|
-
- 10th
|
67
|
-
rows:
|
68
|
-
- label: January 2015
|
69
|
-
values:
|
70
|
-
- 5
|
71
|
-
- 119
|
72
|
-
- 74
|
73
|
-
- 82
|
74
|
-
- 27
|
75
|
-
- 45
|
76
|
-
- 11
|
77
|
-
- 21
|
78
|
-
- 67
|
79
|
-
- 43
|
80
|
-
- label: January 2016
|
81
|
-
values:
|
82
|
-
- 5
|
83
|
-
- 8
|
84
|
-
- 37
|
85
|
-
- 50
|
86
|
-
- 43
|
87
|
-
- 29
|
88
|
-
- 67
|
89
|
-
- 61
|
90
|
-
- 14
|
91
|
-
- 91
|
92
|
-
- label: January 2017
|
93
|
-
values:
|
94
|
-
- 31
|
95
|
-
- 81
|
96
|
-
- 12
|
97
|
-
- 15
|
98
|
-
- 52
|
99
|
-
- 61
|
100
|
-
- 143
|
101
|
-
- 27
|
102
|
-
- 18
|
103
|
-
- 34
|
104
|
-
hide_legend:
|
105
|
-
data:
|
106
|
-
chart_heading: Page views chart
|
107
|
-
h_axis_title: Day
|
108
|
-
v_axis_title: Views
|
109
|
-
chart_overview: This chart shows page views for January 2015.
|
110
|
-
hide_legend: true
|
111
|
-
keys:
|
112
|
-
- "2015-01-01"
|
113
|
-
- "2015-01-02"
|
114
|
-
- "2015-01-03"
|
115
|
-
- "2015-01-04"
|
116
|
-
- "2015-01-05"
|
117
|
-
- "2015-01-06"
|
118
|
-
- "2015-01-07"
|
119
|
-
- "2015-01-08"
|
120
|
-
- "2015-01-09"
|
121
|
-
- "2015-01-10"
|
122
|
-
rows:
|
123
|
-
- label: January 2015
|
124
|
-
values:
|
125
|
-
- 500
|
126
|
-
- 1190
|
127
|
-
- 740
|
128
|
-
- 820
|
129
|
-
- 270
|
130
|
-
- 450
|
131
|
-
- 110
|
132
|
-
- 210
|
133
|
-
- 670
|
134
|
-
- 430
|
135
|
-
with_line_colours_and_styles:
|
136
|
-
description: Note that line styles and colours currently only work on line charts.
|
137
|
-
data:
|
138
|
-
chart_heading: Page views chart
|
139
|
-
h_axis_title: Day
|
140
|
-
v_axis_title: Views
|
141
|
-
chart_overview: This chart shows page views for January in different years.
|
142
|
-
line_colours:
|
143
|
-
- orange
|
144
|
-
- blue
|
145
|
-
- "#88AA11"
|
146
|
-
line_styles:
|
147
|
-
- solid
|
148
|
-
- dotted
|
149
|
-
- solid
|
150
|
-
keys:
|
151
|
-
- 1st
|
152
|
-
- 2nd
|
153
|
-
- 3rd
|
154
|
-
rows:
|
155
|
-
- label: January 2015
|
156
|
-
values:
|
157
|
-
- 110
|
158
|
-
- 119
|
159
|
-
- 105
|
160
|
-
- label: January 2016
|
161
|
-
values:
|
162
|
-
- 71
|
163
|
-
- 68
|
164
|
-
- 75
|
165
|
-
- label: January 2017
|
166
|
-
values:
|
167
|
-
- 21
|
168
|
-
- 42
|
169
|
-
- 18
|
170
|
-
bar_chart:
|
171
|
-
data:
|
172
|
-
chart_heading: Hats owned
|
173
|
-
h_axis_title: Day
|
174
|
-
v_axis_title: Views
|
175
|
-
chart_overview: This chart shows page views for January 2015.
|
176
|
-
chart_type: "bar"
|
177
|
-
hide_legend: true
|
178
|
-
keys:
|
179
|
-
- Jon
|
180
|
-
- Ash
|
181
|
-
- James
|
182
|
-
- Phil
|
183
|
-
rows:
|
184
|
-
- label: Hats owned
|
185
|
-
values:
|
186
|
-
- 3
|
187
|
-
- 1
|
188
|
-
- 1
|
189
|
-
- 2
|
190
|
-
column_chart:
|
191
|
-
data:
|
192
|
-
chart_heading: Hats owned
|
193
|
-
h_axis_title: Day
|
194
|
-
v_axis_title: Views
|
195
|
-
chart_overview: This chart shows page views for January 2015.
|
196
|
-
chart_type: "column"
|
197
|
-
hide_legend: true
|
198
|
-
keys:
|
199
|
-
- Jon
|
200
|
-
- Ash
|
201
|
-
- James
|
202
|
-
- Phil
|
203
|
-
rows:
|
204
|
-
- label: Hats owned
|
205
|
-
values:
|
206
|
-
- 3
|
207
|
-
- 1
|
208
|
-
- 1
|
209
|
-
- 2
|
210
|
-
format_axis_labels:
|
211
|
-
description: |
|
212
|
-
Axis labels can be forced into date or currency format as shown.
|
213
|
-
|
214
|
-
'currency' will add a currency symbol (£) at the start of the labels.
|
215
|
-
|
216
|
-
'percent' will add a percent (%) to the end of the labels.
|
217
|
-
|
218
|
-
'date' will force a standard date format of `YYYY-MM-DD` to the labels, where they are in an undesirable date format. This can be useful if there are a lot of labels on the axes because the chart can do strange truncation sometimes.
|
219
|
-
data:
|
220
|
-
chart_heading: Cost per day
|
221
|
-
h_axis_title: Day
|
222
|
-
v_axis_title: Cost
|
223
|
-
chart_overview: This chart shows cost per day.
|
224
|
-
v_axis_format: currency
|
225
|
-
h_axis_format: date
|
226
|
-
keys:
|
227
|
-
- 2024 Jan 1
|
228
|
-
- 2024 Jan 2
|
229
|
-
- 2024 Jan 3
|
230
|
-
- 2024 Jan 4
|
231
|
-
- 2024 Jan 5
|
232
|
-
- 2024 Jan 6
|
233
|
-
rows:
|
234
|
-
- label: Cost
|
235
|
-
values:
|
236
|
-
- 14
|
237
|
-
- 29
|
238
|
-
- 45
|
239
|
-
- 63
|
240
|
-
- 54
|
241
|
-
- 22
|
242
|
-
vertical table:
|
243
|
-
description: Reorient the table to better suit the output of some data sets.
|
244
|
-
data:
|
245
|
-
chart_heading: Page views chart
|
246
|
-
table_direction: vertical
|
247
|
-
h_axis_title: Day
|
248
|
-
v_axis_title: Views
|
249
|
-
chart_overview: This chart shows page views for January in different years.
|
250
|
-
keys:
|
251
|
-
- 1st
|
252
|
-
- 2nd
|
253
|
-
- 3rd
|
254
|
-
- 4th
|
255
|
-
- 5th
|
256
|
-
- 6th
|
257
|
-
- 7th
|
258
|
-
rows:
|
259
|
-
- label: January 2015
|
260
|
-
values:
|
261
|
-
- 5
|
262
|
-
- 119
|
263
|
-
- 74
|
264
|
-
- 117
|
265
|
-
- 33
|
266
|
-
- 89
|
267
|
-
- 79
|
268
|
-
- label: January 2016
|
269
|
-
values:
|
270
|
-
- 3
|
271
|
-
- 8
|
272
|
-
- 37
|
273
|
-
- 82
|
274
|
-
- 118
|
275
|
-
- 85
|
276
|
-
- 80
|
277
|
-
with_a_different_point_size:
|
278
|
-
description: For some charts it may be better to reduce the point size so that the line is clearer. However it is recommended that the point size is larger to make it easier for users to move the mouse over them.
|
279
|
-
data:
|
280
|
-
chart_heading: Page views chart
|
281
|
-
h_axis_title: Day
|
282
|
-
v_axis_title: Views
|
283
|
-
chart_overview: This chart shows page views for January 2015.
|
284
|
-
point_size: 0
|
285
|
-
keys:
|
286
|
-
- "2015-01-01"
|
287
|
-
- "2015-01-02"
|
288
|
-
- "2015-01-03"
|
289
|
-
- "2015-01-04"
|
290
|
-
- "2015-01-05"
|
291
|
-
- "2015-01-06"
|
292
|
-
- "2015-01-07"
|
293
|
-
- "2015-01-08"
|
294
|
-
- "2015-01-09"
|
295
|
-
- "2015-01-10"
|
296
|
-
rows:
|
297
|
-
- label: January 2015
|
298
|
-
values:
|
299
|
-
- 600
|
300
|
-
- 690
|
301
|
-
- 740
|
302
|
-
- 820
|
303
|
-
- 570
|
304
|
-
- 950
|
305
|
-
- 810
|
306
|
-
- 610
|
307
|
-
- 770
|
308
|
-
- 530
|
309
|
-
scale_y_axis_based_on_data:
|
310
|
-
description: |
|
311
|
-
By default the Y-axis will always start at zero, but this may not always be required.
|
312
|
-
|
313
|
-
If there are empty items in the data the chart line will either discontinue or leave a gap, as shown.
|
314
|
-
data:
|
315
|
-
chart_heading: Page views chart
|
316
|
-
h_axis_title: Day
|
317
|
-
v_axis_title: Views
|
318
|
-
chart_overview: This chart shows page views for January 2015.
|
319
|
-
hide_legend: true
|
320
|
-
y_axis_auto_adjust: true
|
321
|
-
keys:
|
322
|
-
- "2015-01-01"
|
323
|
-
- "2015-01-02"
|
324
|
-
- "2015-01-03"
|
325
|
-
- "2015-01-04"
|
326
|
-
- "2015-01-05"
|
327
|
-
- "2015-01-06"
|
328
|
-
- "2015-01-07"
|
329
|
-
- "2015-01-08"
|
330
|
-
- "2015-01-09"
|
331
|
-
- "2015-01-10"
|
332
|
-
- "2015-01-11"
|
333
|
-
- "2015-01-12"
|
334
|
-
- "2015-01-13"
|
335
|
-
rows:
|
336
|
-
- label: January 2015
|
337
|
-
values:
|
338
|
-
- 1500
|
339
|
-
- 1190
|
340
|
-
- 1740
|
341
|
-
- 1820
|
342
|
-
- 1270
|
343
|
-
-
|
344
|
-
-
|
345
|
-
- 1450
|
346
|
-
- 1110
|
347
|
-
- 1210
|
348
|
-
- 1670
|
349
|
-
- 1430
|
350
|
-
- 1352
|
351
|
-
with_a_different_heading_level:
|
352
|
-
description: Use a different heading level for the chart heading. It defaults to a H2.
|
353
|
-
data:
|
354
|
-
chart_heading: Page views chart
|
355
|
-
chart_heading_level: 4
|
356
|
-
h_axis_title: Day
|
357
|
-
v_axis_title: Views
|
358
|
-
chart_overview: This chart shows page views for January in different years.
|
359
|
-
keys:
|
360
|
-
- 1st
|
361
|
-
- 2nd
|
362
|
-
- 3rd
|
363
|
-
- 4th
|
364
|
-
- 5th
|
365
|
-
- 6th
|
366
|
-
- 7th
|
367
|
-
rows:
|
368
|
-
- label: January 2015
|
369
|
-
values:
|
370
|
-
- 5
|
371
|
-
- 119
|
372
|
-
- 74
|
373
|
-
- 117
|
374
|
-
- 33
|
375
|
-
- 89
|
376
|
-
- 79
|
377
|
-
- label: January 2016
|
378
|
-
values:
|
379
|
-
- 3
|
380
|
-
- 8
|
381
|
-
- 37
|
382
|
-
- 82
|
383
|
-
- 118
|
384
|
-
- 85
|
385
|
-
- 80
|
386
|
-
with_a_download_link:
|
387
|
-
description: Add a download link to the original data. Doesn't do anything clever, just creates a link to the URL passed.
|
388
|
-
data:
|
389
|
-
chart_heading: Page views chart
|
390
|
-
h_axis_title: Day
|
391
|
-
v_axis_title: Views
|
392
|
-
link: 'https://www.gov.uk'
|
393
|
-
chart_overview: This chart shows page views for January in different years.
|
394
|
-
keys:
|
395
|
-
- 1st
|
396
|
-
- 2nd
|
397
|
-
- 3rd
|
398
|
-
- 4th
|
399
|
-
- 5th
|
400
|
-
- 6th
|
401
|
-
- 7th
|
402
|
-
rows:
|
403
|
-
- label: January 2015
|
404
|
-
values:
|
405
|
-
- 5
|
406
|
-
- 119
|
407
|
-
- 74
|
408
|
-
- 117
|
409
|
-
- 33
|
410
|
-
- 89
|
411
|
-
- 79
|
412
|
-
- label: January 2016
|
413
|
-
values:
|
414
|
-
- 3
|
415
|
-
- 8
|
416
|
-
- 37
|
417
|
-
- 82
|
418
|
-
- 118
|
419
|
-
- 85
|
420
|
-
- 80
|
421
|
-
with_margin_bottom:
|
422
|
-
description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a bottom margin of 15px.
|
423
|
-
data:
|
424
|
-
chart_heading: Page views chart
|
425
|
-
h_axis_title: Day
|
426
|
-
v_axis_title: Views
|
427
|
-
margin_bottom: 9
|
428
|
-
chart_overview: This chart shows page views for January in different years.
|
429
|
-
keys:
|
430
|
-
- 1st
|
431
|
-
- 2nd
|
432
|
-
- 3rd
|
433
|
-
- 4th
|
434
|
-
- 5th
|
435
|
-
- 6th
|
436
|
-
- 7th
|
437
|
-
rows:
|
438
|
-
- label: January 2015
|
439
|
-
values:
|
440
|
-
- 5
|
441
|
-
- 119
|
442
|
-
- 74
|
443
|
-
- 117
|
444
|
-
- 33
|
445
|
-
- 89
|
446
|
-
- 79
|
447
|
-
- label: January 2016
|
448
|
-
values:
|
449
|
-
- 3
|
450
|
-
- 8
|
451
|
-
- 37
|
452
|
-
- 82
|
453
|
-
- 118
|
454
|
-
- 85
|
455
|
-
- 80
|
456
|
-
minimal_version:
|
457
|
-
description: |
|
458
|
-
The minimal version presents a simplified version of the chart. This should only be used where there is not enough space to display a full chart, and the user is then given an option to see more information about the chart, for example by including a link next to the chart component. This must be part of the page, as this is not provided by the component itself.
|
459
|
-
|
460
|
-
Specifically, minimal mode:
|
461
|
-
|
462
|
-
- hides the chart heading
|
463
|
-
- removes the legend and X and Y axis values
|
464
|
-
- removes the data table and link to the data (if supplied) beneath the chart
|
465
|
-
- removes the part of the visually hidden accessibility message that links to the table
|
466
|
-
- removes the ability to interact with the chart (no hover popups or clicks)
|
467
|
-
- sets the size of the points on the chart to zero
|
468
|
-
data:
|
469
|
-
chart_heading: Page views
|
470
|
-
h_axis_title: Day
|
471
|
-
v_axis_title: Views
|
472
|
-
minimal: true
|
473
|
-
chart_overview: This is a graph of views per day
|
474
|
-
keys:
|
475
|
-
- 1st
|
476
|
-
- 2nd
|
477
|
-
- 3rd
|
478
|
-
- 4th
|
479
|
-
- 5th
|
480
|
-
- 6th
|
481
|
-
- 7th
|
482
|
-
rows:
|
483
|
-
- label: January 2015
|
484
|
-
values:
|
485
|
-
- 5
|
486
|
-
- 119
|
487
|
-
- 74
|
488
|
-
- 117
|
489
|
-
- 33
|
490
|
-
- 89
|
491
|
-
- 79
|
492
|
-
- label: January 2016
|
493
|
-
values:
|
494
|
-
- 3
|
495
|
-
- 8
|
496
|
-
- 37
|
497
|
-
- 82
|
498
|
-
- 118
|
499
|
-
- 85
|
500
|
-
- 80
|
501
|
-
with_a_different_height:
|
502
|
-
description: |
|
503
|
-
Sets a height in pixels for the chart, defaulting to `400`. This is useful where the chart might appear in a narrow column and the default height would be too tall.
|
504
|
-
|
505
|
-
The component is not currently responsive.
|
506
|
-
data:
|
507
|
-
chart_heading: Page views
|
508
|
-
h_axis_title: Day
|
509
|
-
v_axis_title: Views
|
510
|
-
minimal: true
|
511
|
-
chart_overview: This is a graph of views per day
|
512
|
-
height: 200
|
513
|
-
keys:
|
514
|
-
- 1st
|
515
|
-
- 2nd
|
516
|
-
- 3rd
|
517
|
-
- 4th
|
518
|
-
- 5th
|
519
|
-
- 6th
|
520
|
-
- 7th
|
521
|
-
rows:
|
522
|
-
- label: January 2015
|
523
|
-
values:
|
524
|
-
- 5
|
525
|
-
- 119
|
526
|
-
- 74
|
527
|
-
- 117
|
528
|
-
- 33
|
529
|
-
- 89
|
530
|
-
- 79
|
531
|
-
- label: January 2016
|
532
|
-
values:
|
533
|
-
- 3
|
534
|
-
- 8
|
535
|
-
- 37
|
536
|
-
- 82
|
537
|
-
- 118
|
538
|
-
- 85
|
539
|
-
- 80
|
540
|
-
with_hidden_heading:
|
541
|
-
description: |
|
542
|
-
The heading element is optional, allowing a heading to be set outside the component. Hiding the heading doesn't remove the need to populate `chart_heading` with text, as `chart_heading` is needed for accessibility.
|
543
|
-
data:
|
544
|
-
chart_heading: Page views
|
545
|
-
hide_heading: true
|
546
|
-
h_axis_title: Day
|
547
|
-
v_axis_title: Views
|
548
|
-
chart_overview: This is a graph of views per day
|
549
|
-
keys:
|
550
|
-
- 1st
|
551
|
-
- 2nd
|
552
|
-
- 3rd
|
553
|
-
- 4th
|
554
|
-
- 5th
|
555
|
-
- 6th
|
556
|
-
- 7th
|
557
|
-
rows:
|
558
|
-
- label: January 2015
|
559
|
-
values:
|
560
|
-
- 5
|
561
|
-
- 119
|
562
|
-
- 74
|
563
|
-
- 117
|
564
|
-
- 33
|
565
|
-
- 89
|
566
|
-
- 79
|
567
|
-
- label: January 2016
|
568
|
-
values:
|
569
|
-
- 3
|
570
|
-
- 8
|
571
|
-
- 37
|
572
|
-
- 82
|
573
|
-
- 118
|
574
|
-
- 85
|
575
|
-
- 80
|
576
|
-
|
@@ -1,45 +0,0 @@
|
|
1
|
-
name: Chat entry
|
2
|
-
description: Entry point for GOV.UK Chat
|
3
|
-
accessibility_criteria: |
|
4
|
-
The heading must:
|
5
|
-
|
6
|
-
- be part of a correct heading structure for a page
|
7
|
-
- be semantically represented as a heading
|
8
|
-
- convey the heading level
|
9
|
-
uses_component_wrapper_helper: true
|
10
|
-
shared_accessibility_criteria:
|
11
|
-
- link
|
12
|
-
examples:
|
13
|
-
default:
|
14
|
-
data:
|
15
|
-
with_custom_href,_heading_and_or_description:
|
16
|
-
data:
|
17
|
-
href: /chat
|
18
|
-
heading_text: Go to GOV.UK Chat
|
19
|
-
description_text: Get answers to your business questions
|
20
|
-
with_a_different_heading_level:
|
21
|
-
description: Chat entry has a `h2` by default, but this can be changed. The heading level does not change any styling.
|
22
|
-
data:
|
23
|
-
heading_level: 3
|
24
|
-
with_a_border_top:
|
25
|
-
data:
|
26
|
-
border_top: true
|
27
|
-
with_a_border_bottom:
|
28
|
-
data:
|
29
|
-
border_bottom: true
|
30
|
-
with_a_border_top_and_a_border_bottom:
|
31
|
-
data:
|
32
|
-
border_top: true
|
33
|
-
border_bottom: true
|
34
|
-
with_margin_bottom:
|
35
|
-
data:
|
36
|
-
margin_bottom: 3
|
37
|
-
with_margin_top_until_tablet:
|
38
|
-
description: Adds a `.gem-c-chat-entry--margin-top-until-tablet` class that applies `margin-top:35px` on smaller screen sizes (i.e. tablets and below)
|
39
|
-
data:
|
40
|
-
margin_top_until_tablet: true
|
41
|
-
without_ga4_tracking:
|
42
|
-
description: |
|
43
|
-
Disables GA4 tracking on the component. Tracking is enabled by default. This adds a data module and data-attributes with JSON data. See the [ga4-link-tracker documentation](https://github.com/alphagov/govuk_publishing_components/blob/main/docs/analytics-ga4/ga4-link-tracker.md) for more information.
|
44
|
-
data:
|
45
|
-
disable_ga4: true
|