Skip to content

Commit

Permalink
Merge pull request #4094 from alphagov/adjust-govspeak-charts
Browse files Browse the repository at this point in the history
Adjust govspeak chart label positioning
  • Loading branch information
andysellick authored Jul 5, 2024
2 parents 8fab8ad + ff0093a commit eb66a18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
useful summary for people upgrading their application, not a replication
of the commit log.

## Unreleased

* Adjust govspeak chart label positioning ([PR #4094](https://github.com/alphagov/govuk_publishing_components/pull/4094))

## 39.2.1

* Update to LUX 4.0.20 ([PR #4089](https://github.com/alphagov/govuk_publishing_components/pull/4089))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
var $cell = cells[i]
var cellVal = parseFloat(this.utils.stripValue($cell.innerText), 10)
var $cellSpan = $cell.querySelector('span')
var spanWidth = $cell.querySelector('span').offsetWidth + 5 // +5 just for extra padding
var spanWidth = $cell.querySelector('span').offsetWidth + 10 // +10 just for extra padding
var cellWidth = $cell.offsetWidth

if (!this.options.stacked) {
Expand Down

0 comments on commit eb66a18

Please sign in to comment.