govuk_publishing_components 44.10.0 → 44.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2969bc9c245ca82ad65122c89ba86180242c253448759078c253874a97255ddc
4
- data.tar.gz: 282f3aa5d64dd2aa69d3523419affa8a1bc81a770a78c3a8c8c6873d616109e0
3
+ metadata.gz: 6f4db62d52d8c311f54f21051c42fc89884500067e38c2811bac64a7ab8bf084
4
+ data.tar.gz: 96a578c2b154bd53f006a527ec1a075949f636162e999edcf9499cfb6b29705d
5
5
  SHA512:
6
- metadata.gz: d86fad3ae81196d495d5b09454f4a1577b96020b97eda59283a7a052cd0c97152574b7c41fb80844c3bd8543d6074a3d67cfd3efd84f6f6de71921757f308c38
7
- data.tar.gz: 199cec0448a12f946ad21baba218e341f139da3e94add2d64ad2d9b0de5b1d07861d0d96e6dadc76315cd070c654fe0cec7427109a237d997153cbefbe5ed6f4
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 && !minimal %>
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
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "44.10.0".freeze
2
+ VERSION = "44.11.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 44.10.0
4
+ version: 44.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev