govuk_publishing_components 44.10.0 → 44.11.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f4db62d52d8c311f54f21051c42fc89884500067e38c2811bac64a7ab8bf084
|
|
4
|
+
data.tar.gz: 96a578c2b154bd53f006a527ec1a075949f636162e999edcf9499cfb6b29705d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c64c3dacd3f123635c3d3de5fd7a43522541480171c3c643ee94e83d9bd974ed0c7368621943b8e0cef7052f3f3ea1a65acf6f1483982b505747c09ae0f82caa
|
|
7
|
+
data.tar.gz: 953bffaefdd0ca1141e5a5ba4fd37f7af96fa3b96f25879eb1e3167656945848d6db077954a11b89daa435218a9426fdb1eb151f4f123f21616dece1a65567c5
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
keys ||= []
|
|
15
15
|
chart_overview ||= nil
|
|
16
16
|
minimal ||= false
|
|
17
|
+
hide_heading ||= minimal
|
|
17
18
|
hide_legend ||= minimal
|
|
18
19
|
link ||= false
|
|
19
20
|
height ||= 400
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
<% if rows.length > 0 && keys.length > 0 %>
|
|
88
89
|
<%= javascript_include_tag "https://www.gstatic.com/charts/loader.js" if @external_script[:loaded] == 1 %>
|
|
89
90
|
<%= tag.div(**component_helper.all_attributes) do %>
|
|
90
|
-
<% if chart_heading && !
|
|
91
|
+
<% if chart_heading && !hide_heading %>
|
|
91
92
|
<div class="gem-c-chart__header">
|
|
92
93
|
<%= render "govuk_publishing_components/components/heading", {
|
|
93
94
|
text: chart_heading,
|
|
@@ -362,4 +362,40 @@ examples:
|
|
|
362
362
|
- 118
|
|
363
363
|
- 85
|
|
364
364
|
- 80
|
|
365
|
+
with_hidden_heading:
|
|
366
|
+
description: |
|
|
367
|
+
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.
|
|
368
|
+
data:
|
|
369
|
+
chart_heading: Page views
|
|
370
|
+
hide_heading: true
|
|
371
|
+
h_axis_title: Day
|
|
372
|
+
v_axis_title: Views
|
|
373
|
+
chart_overview: This is a graph of views per day
|
|
374
|
+
keys:
|
|
375
|
+
- 1st
|
|
376
|
+
- 2nd
|
|
377
|
+
- 3rd
|
|
378
|
+
- 4th
|
|
379
|
+
- 5th
|
|
380
|
+
- 6th
|
|
381
|
+
- 7th
|
|
382
|
+
rows:
|
|
383
|
+
- label: January 2015
|
|
384
|
+
values:
|
|
385
|
+
- 5
|
|
386
|
+
- 119
|
|
387
|
+
- 74
|
|
388
|
+
- 117
|
|
389
|
+
- 33
|
|
390
|
+
- 89
|
|
391
|
+
- 79
|
|
392
|
+
- label: January 2016
|
|
393
|
+
values:
|
|
394
|
+
- 3
|
|
395
|
+
- 8
|
|
396
|
+
- 37
|
|
397
|
+
- 82
|
|
398
|
+
- 118
|
|
399
|
+
- 85
|
|
400
|
+
- 80
|
|
365
401
|
|