@automattic/charts 4.13.0 → 4.14.0

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ 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
+ ## [4.14.0] - 2026-11-02
9
+ ### Added
10
+ - Leaderboard chart: Derive bar shares and percentage change from the values when an entry omits them, and add a `negativeBars` option to draw negative values as empty bars. [#54250]
11
+ - Legend: Let an interactive legend item own its pressed state and toggle handler. [#54328]
12
+
13
+ ### Changed
14
+ - Update package dependencies. [#53869]
15
+
16
+ ### Fixed
17
+ - Leaderboard chart: Inset overlay labels from the inline start, so they keep their padding in right-to-left languages, and expose the label inset as a CSS custom property. [#54192]
18
+
8
19
  ## [4.13.0] - 2026-10-28
9
20
  ### Added
10
21
  - Conversion funnel chart: Add `getTooltipContent` to set what each step's tooltip shows, which screen readers also read, and show the default tooltip's count and conversion rate as labeled lines. [#53637]
@@ -37,9 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
48
  - Heatmap chart: Lighten the color scale to 2.5:1 contrast at the lowest step and 6:1 at the highest, and keep the two ends apart when the empty-cell color sits far from the background. [#53450]
38
49
  - Heatmap chart: Offset the grid's focus ring by the design system focus width. [#53522]
39
50
  - Legend: Set wrapped rows of a horizontal legend closer together than items on one row, and expose both gaps as CSS variables. [#53704]
40
- - Update package dependencies. [#53004]
41
- - Update package dependencies. [#53678]
42
- - Update package dependencies. [#53806]
51
+ - Update package dependencies. [#53004] [#53678] [#53806]
43
52
 
44
53
  ### Fixed
45
54
  - Conversion funnel chart: Show a focus ring on the focused step bar. [#53522]
@@ -151,8 +160,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
151
160
  - Heatmap chart: Add `tooltipVariant="dark"`, which draws the tooltip on the package's dark tooltip surface, `tooltipStyle` for inline box overrides, and a `variant="bar"` legend that joins the scale steps into one continuous band. [#52368]
152
161
 
153
162
  ### Changed
154
- - Update package dependencies. [#52187]
155
- - Update package dependencies. [#52401]
163
+ - Update package dependencies. [#52187] [#52401]
156
164
 
157
165
  ### Fixed
158
166
  - Bar chart: Align grid lines with axis ticks (explicit or derived). [#52234]
@@ -391,12 +399,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
391
399
 
392
400
  ## [1.4.3] - 2026-05-25
393
401
  ### Changed
394
- - Update dependencies. [#43811]
402
+ - Update dependencies.
395
403
 
396
404
  ## [1.4.2] - 2026-05-21
397
405
  ### Changed
398
- - Update package dependencies. [#48405]
399
- - Update package dependencies. [#49012]
406
+ - Update package dependencies. [#48405] [#49012]
400
407
 
401
408
  ## [1.4.1] - 2026-05-19
402
409
  ### Changed
@@ -413,7 +420,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
413
420
 
414
421
  ## [1.3.1] - 2026-05-11
415
422
  ### Changed
416
- - Update dependencies. [#43811]
423
+ - Update dependencies.
417
424
 
418
425
  ## [1.3.0] - 2026-05-04
419
426
  ### Added
@@ -593,7 +600,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
593
600
 
594
601
  ## [0.54.1] - 2026-01-26
595
602
  ### Changed
596
- - Update dependencies. [#43811]
603
+ - Update dependencies.
597
604
 
598
605
  ## [0.54.0] - 2026-01-21
599
606
  ### Added
@@ -624,8 +631,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
624
631
 
625
632
  ### Changed
626
633
  - Change Geo Chart data format to handle all Google Charts data [#46330]
627
- - Update package dependencies. [#46362]
628
- - Update package dependencies. [#46363]
634
+ - Update package dependencies. [#46362] [#46363]
629
635
 
630
636
  ### Fixed
631
637
  - Charts: Add documentation and API references of animation feature. [#46326]
@@ -758,7 +764,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
758
764
 
759
765
  ## [0.38.2] - 2025-09-22
760
766
  ### Changed
761
- - Update dependencies. [#43811]
767
+ - Update dependencies.
762
768
 
763
769
  ## [0.38.1] - 2025-09-19
764
770
  ### Changed
@@ -1031,16 +1037,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1031
1037
  - Add dynamic chart margin calculation and improve Y-axis tick formatting [#43679]
1032
1038
  - Refactor BarChart to use @visx/xychart [#43677]
1033
1039
  - Update dependencies. [#43068]
1034
- - Update package dependencies. [#43326]
1035
- - Update package dependencies. [#43354]
1036
- - Update package dependencies. [#43398]
1037
- - Update package dependencies. [#43399]
1038
- - Update package dependencies. [#43400]
1039
- - Update package dependencies. [#43516]
1040
- - Update package dependencies. [#43578]
1041
- - Update package dependencies. [#43718]
1042
- - Update package dependencies. [#43734]
1043
- - Update package dependencies. [#43766]
1040
+ - Update package dependencies. [#43326] [#43354] [#43398] [#43399] [#43400] [#43516] [#43578] [#43718] [#43734] [#43766]
1044
1041
 
1045
1042
  ### Removed
1046
1043
  - Removed animation for line and bar charts [#43809]
@@ -1070,8 +1067,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1070
1067
 
1071
1068
  ### Changed
1072
1069
  - Code: First pass of style coding standards. [#42734]
1073
- - Update package dependencies. [#42762]
1074
- - Update package dependencies. [#42809]
1070
+ - Update package dependencies. [#42762] [#42809]
1075
1071
 
1076
1072
  ### Fixed
1077
1073
  - Code: Update stylesheets to use hex instead of named colors. [#42920]
@@ -1087,8 +1083,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1087
1083
  - Introduce Theme seriesLineStyles property [#42530]
1088
1084
 
1089
1085
  ### Changed
1090
- - Update package dependencies. [#42509]
1091
- - Update package dependencies. [#42511]
1086
+ - Update package dependencies. [#42509] [#42511]
1092
1087
 
1093
1088
  ### Fixed
1094
1089
  - Bar chart: fix tickFormat not working issue [#42524]
@@ -1096,8 +1091,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1096
1091
  ## [0.10.0] - 2025-03-17
1097
1092
  ### Changed
1098
1093
  - Bar chart: align options with line chart [#42448]
1099
- - Update package dependencies. [#42163]
1100
- - Update package dependencies. [#42384]
1094
+ - Update package dependencies. [#42163] [#42384]
1101
1095
 
1102
1096
  ## [0.9.0] - 2025-03-02
1103
1097
  ### Added
@@ -1226,6 +1220,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1226
1220
  - Fixed lints following ESLint rule changes for TS [#40584]
1227
1221
  - Fixing a bug in Chart storybook data. [#40640]
1228
1222
 
1223
+ [4.14.0]: https://github.com/Automattic/charts/compare/v4.13.0...v4.14.0
1229
1224
  [4.13.0]: https://github.com/Automattic/charts/compare/v4.12.0...v4.13.0
1230
1225
  [4.12.0]: https://github.com/Automattic/charts/compare/v4.11.1...v4.12.0
1231
1226
  [4.11.1]: https://github.com/Automattic/charts/compare/v4.11.0...v4.11.1
package/TOKENS.md CHANGED
@@ -152,6 +152,7 @@ The palette is resolved per provider, so one `ColorCache` and one group-to-color
152
152
  | `--a8c-charts-border-radius-leaderboard-bar` | _(none — pill shape, no WPDS radius fits)_ | `9999px` |
153
153
  | `--a8c-charts-dimension-leaderboard-row-gap` | `--wpds-dimension-gap-md` | `12px` |
154
154
  | `--a8c-charts-dimension-leaderboard-column-gap` | `--wpds-dimension-gap-xs` | `4px` |
155
+ | `--a8c-charts-dimension-leaderboard-label-inset` | `--wpds-dimension-padding-sm` | `8px` |
155
156
  | `--a8c-charts-dimension-legend-column-gap` | `--wpds-dimension-gap-lg` | `16px` |
156
157
  | `--a8c-charts-dimension-legend-row-gap` | `--wpds-dimension-gap-sm` | `8px` |
157
158
  | `--a8c-charts-elevation-xs` | _(none — `--wpds-elevation-*` removed in theme 1.0.0)_ | `0 1px 1px 0 #00000008, 0 1px 2px 0 #00000005, 0 3px 3px 0 #00000005, 0 4px 4px 0 #00000003` |
@@ -161,6 +162,8 @@ The motion pair carries the one-shot reveal a data mark plays on first paint, ac
161
162
 
162
163
  `--a8c-charts-border-radius-bar` rounds the conversion funnel's bars. `--a8c-charts-border-radius-bar-chart` rounds the bars of the bar chart and bar list chart; set it to a radius such as `var(--wpds-border-radius-sm)` to opt in. Bar charts apply it as the CSS `rx` property, so it rounds all four corners of a bar. It resolves in CSS at the bar, so an override set anywhere inside the provider tree applies, the chart's own class included; see [Precedence](#precedence) for overrides above the provider.
163
164
 
165
+ `--a8c-charts-dimension-leaderboard-label-inset` pads an overlay label at its inline start, inside the `--wpds-border-width-focus` every row reserves for its focus ring. Read both to line up content outside the chart, such as a column header, with the row text.
166
+
164
167
  The legend pair spaces the items of a horizontal legend: the column gap between items on one line, and the smaller row gap between lines once the legend wraps.
165
168
 
166
169
  The elevation fallbacks hold the values their removed `--wpds-elevation-*` tokens used to resolve to, until a replacement exists.