Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions projects/js-packages/charts/TOKENS.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ The palette is resolved per provider, so one `ColorCache` and one group-to-color
| `--a8c-charts-border-radius-leaderboard-bar` | _(none — pill shape, no WPDS radius fits)_ | `9999px` |
| `--a8c-charts-dimension-leaderboard-row-gap` | `--wpds-dimension-gap-md` | `12px` |
| `--a8c-charts-dimension-leaderboard-column-gap` | `--wpds-dimension-gap-xs` | `4px` |
| `--a8c-charts-dimension-leaderboard-label-inset` | `--wpds-dimension-padding-sm` | `8px` |
| `--a8c-charts-dimension-legend-column-gap` | `--wpds-dimension-gap-lg` | `16px` |
| `--a8c-charts-dimension-legend-row-gap` | `--wpds-dimension-gap-sm` | `8px` |
| `--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` |
Expand All @@ -161,6 +162,8 @@ The motion pair carries the one-shot reveal a data mark plays on first paint, ac

`--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.

`--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.

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.

The elevation fallbacks hold the values their removed `--wpds-elevation-*` tokens used to resolve to, until a replacement exists.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fixed

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.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

.label {
padding-left: var(--wpds-dimension-padding-sm);
padding-inline-start: var(--a8c-charts-dimension-leaderboard-label-inset);
}

// The bar's 100% height needs a track that fills the row,
Expand Down
1 change: 1 addition & 0 deletions projects/js-packages/charts/src/styles/chart-scope.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@

--a8c-charts-dimension-leaderboard-row-gap: var(--wpds-dimension-gap-md);
--a8c-charts-dimension-leaderboard-column-gap: var(--wpds-dimension-gap-xs);
--a8c-charts-dimension-leaderboard-label-inset: var(--wpds-dimension-padding-sm);
--a8c-charts-dimension-legend-column-gap: var(--wpds-dimension-gap-lg);
--a8c-charts-dimension-legend-row-gap: var(--wpds-dimension-gap-sm);
}
Expand Down
Loading