chore: bump chart.js and fix font weight type #5789
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Dependabot tried to update the Chart.js dependency in GA4 and the update failed: #5663
Approach
Chart.js version 4.4.1 changes the type of font weight from string to number (see this PR). This PR bumps the package and then changes the font weight for the line chart from a string to a number.
Note: I did change the tooltip font weight from
700
to thefontWeightDemiBold
token (which equates to600
), and I still think it looks ok, see screenshot.Testing steps
I verified that the line chart still renders correctly in the GA4 app sidebar.
Breaking Changes
Dependencies and/or References
https://github.com/chartjs/Chart.js/releases/tag/v4.4.1
chartjs/Chart.js#11605
#5663
Deployment