@automattic/charts 1.10.0 → 1.10.2

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/index.cjs +5917 -5783
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.css +44 -3
  5. package/dist/index.d.cts +66 -13
  6. package/dist/index.d.ts +67 -14
  7. package/dist/index.js +1159 -1015
  8. package/dist/index.js.map +1 -1
  9. package/package.json +7 -7
  10. package/src/charts/heatmap-chart/heatmap-chart.module.scss +27 -4
  11. package/src/charts/heatmap-chart/heatmap-chart.tsx +115 -49
  12. package/src/charts/heatmap-chart/private/build-calendar-data.ts +39 -4
  13. package/src/charts/heatmap-chart/private/heatmap-context.ts +10 -0
  14. package/src/charts/heatmap-chart/private/heatmap-legend.tsx +3 -2
  15. package/src/charts/heatmap-chart/private/index.ts +2 -0
  16. package/src/charts/heatmap-chart/private/use-heatmap-colors.ts +6 -2
  17. package/src/charts/heatmap-chart/test/build-calendar-data.test.ts +57 -1
  18. package/src/charts/heatmap-chart/test/heatmap-chart.test.tsx +91 -3
  19. package/src/charts/heatmap-chart/test/use-heatmap-colors.test.ts +4 -0
  20. package/src/charts/heatmap-chart/types.ts +28 -0
  21. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +12 -0
  22. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +65 -37
  23. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +46 -6
  24. package/src/charts/pie-semi-circle-chart/test/pie-semi-circle-chart.test.tsx +0 -6
  25. package/src/charts/private/with-responsive/test/with-responsive.test.tsx +229 -18
  26. package/src/charts/private/with-responsive/with-responsive.module.scss +20 -1
  27. package/src/charts/private/with-responsive/with-responsive.tsx +114 -65
  28. package/src/hooks/test/use-chart-margin.test.tsx +8 -5
  29. package/src/hooks/use-chart-margin.tsx +11 -1
  30. package/src/providers/chart-context/global-charts-provider.tsx +7 -0
  31. package/src/providers/chart-context/test/chart-context.test.tsx +40 -0
  32. package/src/providers/chart-context/types.ts +3 -0
  33. package/src/types.ts +9 -6
  34. package/src/utils/color-utils.ts +28 -0
  35. package/src/utils/test/color-utils.test.ts +29 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.10.2] - 2026-07-20
9
+ ### Added
10
+ - Add HeatmapChart min/max cell size bounds and floor an all-zero heatmap at the scale bottom instead of full intensity. [#50517]
11
+
12
+ ### Changed
13
+ - Make calendar heatmaps render ragged edges by default, with out-of-range days skipped by hover and keyboard navigation. [#50520]
14
+ - Update package dependencies. [#50510] [#50529]
15
+
16
+ ### Fixed
17
+ - Keep aspectRatio charts within their parent on both axes so a height-constrained container no longer overflows vertically. [#50468]
18
+
19
+ ## [1.10.1] - 2026-07-13
20
+ ### Changed
21
+ - HeatmapChart: Fix the grid's ARIA structure, shrink to fit short containers instead of scrolling, hide the colliding partial first-month calendar label, and keep in-cell text legible on themed and dark backgrounds. [#50136]
22
+ - Reserve the y-axis tick label dx offset in the auto margin so the widest label no longer clips at the chart edge. [#50366]
23
+
24
+ ### Fixed
25
+ - Leaderboard Chart: Avoid fabricated deltas for rows without matching comparison data. [#50196]
26
+
8
27
  ## [1.10.0] - 2026-07-09
9
28
  ### Added
10
29
  - Add GeoChart error reporting. [#50251]
@@ -912,6 +931,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
912
931
  - Fixed lints following ESLint rule changes for TS [#40584]
913
932
  - Fixing a bug in Chart storybook data. [#40640]
914
933
 
934
+ [1.10.2]: https://github.com/Automattic/charts/compare/v1.10.1...v1.10.2
935
+ [1.10.1]: https://github.com/Automattic/charts/compare/v1.10.0...v1.10.1
915
936
  [1.10.0]: https://github.com/Automattic/charts/compare/v1.9.0...v1.10.0
916
937
  [1.9.0]: https://github.com/Automattic/charts/compare/v1.8.1...v1.9.0
917
938
  [1.8.1]: https://github.com/Automattic/charts/compare/v1.8.0...v1.8.1