Skip to content

Commit

Permalink
Include padding on charts
Browse files Browse the repository at this point in the history
- bring the text around charts in a bit, as they're currently colliding with the edge of their containing element when shown inside a card block
- this option at time of writing isn't available, will be added in alphagov/govuk_publishing_components#4342
  • Loading branch information
andysellick authored and leenagupte committed Oct 25, 2024
1 parent 9fade3e commit 00704ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/landing_page/blocks/_statistics.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
margin_bottom: margin_bottom,
minimal: block.data["minimal"],
height: height,
padding: block.data["padding"],
} %>
2 changes: 2 additions & 0 deletions lib/data/landing_page_content_items/landing_page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: card
href: http://gov.uk
content: Title 2 heading title goes here
Expand All @@ -179,6 +180,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: statistics
title: "Chart to visually represent some data"
x_axis_label: "X Axis"
Expand Down
5 changes: 5 additions & 0 deletions lib/data/landing_page_content_items/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: card
href: /landing-page/be-kinder
content: Exercise more
Expand All @@ -69,6 +70,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: card
href: /landing-page/donate-to-charity
content: Donate to charity
Expand All @@ -79,6 +81,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: card
href: /landing-page/learn-something-new
content: Learn something new
Expand All @@ -89,6 +92,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: card
href: /landing-page/be-thankful
content: Be thankful
Expand All @@ -99,6 +103,7 @@ blocks:
y_axis_label: "Y Axis"
csv_file: "data_one.csv"
data_source_link: https://www.ons.gov.uk/economy/grossdomesticproductgdp/timeseries/ihyq/qna
padding: true
- type: share_links
links:
- href: /twitter-profile
Expand Down

0 comments on commit 00704ea

Please sign in to comment.