@ids-group-ltd/ids-design-system 0.13.1 → 0.13.3

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 (62) hide show
  1. package/CHANGELOG.md +626 -0
  2. package/components.md +17 -9
  3. package/docs/agent/INDEX.md +1 -1
  4. package/docs/agent/charts/ds-column-chart.md +3 -2
  5. package/docs/agent/charts/ds-line-chart.md +2 -1
  6. package/docs/agent/feedback/ds-bar.md +13 -0
  7. package/docs/agent/forms/ds-button.md +1 -1
  8. package/docs/agent/forms/ds-icon-button.md +1 -1
  9. package/docs/agent/surfaces/ds-card.md +1 -1
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +81 -13
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +198 -50
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +172 -111
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +86 -15
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +87 -12
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +193 -98
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +233 -33
  33. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  38. package/migrations/0.13.2.json +269 -0
  39. package/migrations/0.13.3.json +211 -0
  40. package/package.json +17 -9
  41. package/styles/_chart-frame.scss +117 -10
  42. package/styles/_chart-interactive.scss +12 -3
  43. package/styles/_overlay-motion.scss +7 -6
  44. package/styles/_tokens-charts.scss +29 -5
  45. package/styles/_tokens.scss +1 -1
  46. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +68 -5
  47. package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
  48. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +3 -2
  49. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
  50. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +21 -4
  51. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
  52. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +125 -37
  53. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +43 -4
  54. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +52 -4
  55. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +90 -23
  56. package/types/ids-group-ltd-ids-design-system-components.d.ts +91 -16
  57. package/types/ids-group-ltd-ids-design-system-core.d.ts +73 -6
  58. package/types/ids-group-ltd-ids-design-system.d.ts +7 -6
  59. package/docs/agent/feedback/ds-progress.md +0 -7
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -41
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
  62. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -22
@@ -1,38 +1,85 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, numberAttribute, output, contentChild, signal, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { formatValue, staggerDelay, nextRovingIndex, focusMark, describeShare, niceMax, tickValues, tickStep, formatTick, CHART_SERIES_COLORS, describeSeries } from '@ids-group-ltd/ids-design-system/components';
2
+ import { input, booleanAttribute, numberAttribute, output, contentChild, computed, signal, viewChildren, inject, ElementRef, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { defaultChartFormat, CHART_SERIES_COLORS, formatPercent, shareOfTotal, describeSeries } from '@ids-group-ltd/ids-design-system/components';
4
4
  import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
5
5
  import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
6
- import { chartActiveMark, ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
6
+ import { chartViewHeight, ColumnSeriesComponent, stackOffsets, ChartComponent, ReferenceLabelComponent, ReferenceLineComponent } from '@ids-group-ltd/ids-design-system/components/chart';
7
+ import { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';
8
+ import { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
7
9
 
8
- /** Largest finite value in the series — the domain the value axis is niced from.
9
- * A non-finite point is skipped rather than compared: one `Infinity` point
10
- * would otherwise become the domain and flatten every other column to nothing. */
11
- function resolveDomainMax(values) {
12
- const finite = values.filter((value) => Number.isFinite(value));
13
- return finite.length ? Math.max(...finite) : 0;
10
+ function isSeriesList(data) {
11
+ return data.length > 0 && 'data' in data[0];
14
12
  }
15
- /** Share of the plot area, in percent. Drives both a column's height and a
16
- * gridline's offset, so a tick and the column beside it cannot drift apart. */
17
- function heightPercent(value, axisMax) {
18
- // Math.max(NaN, 0) is NaN, so the lower clamp cannot stand in for this test —
19
- // and the result is written into a style attribute, where `height: NaN%` is
20
- // dropped silently.
21
- if (!Number.isFinite(value) || !Number.isFinite(axisMax) || axisMax <= 0) {
22
- return 0;
23
- }
24
- return Math.max((value / axisMax) * 100, 0);
13
+ /** What the four geometry tokens resolve to when nothing has been set and while the host is not yet
14
+ * in a document — under SSR, and for the frame before the first read. */
15
+ const COLUMN_GEOMETRY = {
16
+ plotHeight: 200,
17
+ axisGutter: 40,
18
+ valueSpace: 20,
19
+ columnWidthRatio: 0.8,
20
+ };
21
+ /** The plot is an SVG coordinate space, so `--ds-column-chart-plot-height` and its three siblings
22
+ * cannot reach it as CSS: a length written into a `viewBox` is a number the component computes.
23
+ * They are read back once, from the private resolvers on the host, which is what keeps them real
24
+ * public hooks rather than names that parse and change nothing.
25
+ *
26
+ * Read once, on the first pass: a token re-pointed at a breakpoint is NOT picked up, because
27
+ * `ds-chart`'s `ResizeObserver` answers the plot's width rather than a token's value. Set these
28
+ * from a stylesheet, not from a media query. */
29
+ function readColumnGeometry(host) {
30
+ const style = getComputedStyle(host);
31
+ const length = (token, fallback) => {
32
+ const parsed = Number.parseFloat(style.getPropertyValue(token));
33
+ // `>= 0`, so a token deliberately set to zero - no tick gutter, no label headroom - is kept
34
+ // rather than silently replaced by the default.
35
+ return Number.isFinite(parsed) && parsed >= 0 ? parsed : fallback;
36
+ };
37
+ return {
38
+ plotHeight: length('--_column-chart-plot-height', COLUMN_GEOMETRY.plotHeight),
39
+ axisGutter: length('--_column-chart-axis-width', COLUMN_GEOMETRY.axisGutter),
40
+ valueSpace: length('--_column-chart-value-space', COLUMN_GEOMETRY.valueSpace),
41
+ // A share of the category's own slot, written as a percentage and used as a ratio.
42
+ columnWidthRatio: length('--_column-chart-column-width', COLUMN_GEOMETRY.columnWidthRatio * 100) / 100,
43
+ };
25
44
  }
26
-
27
- const defaultValueFormat = (value) => formatValue(value);
28
45
  class ColumnChartComponent {
29
- /** One column per point, drawn in the order given. */
46
+ /** One column per point, drawn in the order given - or one NAMED SERIES per entry, where every
47
+ * category carries a column from each. The two forms are told apart by their shape, so a chart
48
+ * handed a flat list behaves exactly as it always has. */
30
49
  data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
50
+ /** How several series share one category's band. `'none'`, the default, and `'grouped'` draw
51
+ * them side by side - a chart of one series takes the whole band either way, so the two differ
52
+ * only in spelling. `'stacked'` puts each series on top of the one before it, and
53
+ * `'normalized'` stacks then divides by the category's total, so every band is full and the
54
+ * axis reads in shares.
55
+ *
56
+ * Unrelated to `ds-line-chart`'s `axisMode="stacked"`, which is two PLOTS one above the
57
+ * other. */
58
+ stack = input('none', ...(ngDevMode ? [{ debugName: "stack" }] : /* istanbul ignore next */ []));
59
+ /** Reference lines and bands drawn across the plot, behind the columns: a target, a budget, an
60
+ * SLA. Each one opens the value axis far enough to hold it, so a target above every column is
61
+ * still on the plot, and each is named in the generated description - a line only the sighted
62
+ * reader gets is an annotation half the audience never receives. */
63
+ thresholds = input([], ...(ngDevMode ? [{ debugName: "thresholds" }] : /* istanbul ignore next */ []));
31
64
  /** Prints each column's value above the column. */
32
65
  showValues = input(true, { ...(ngDevMode ? { debugName: "showValues" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
33
66
  /** How many value-axis ticks to aim for. A hint, not a count: ticks are
34
67
  * snapped to a round step, so the axis may carry one more or one fewer. */
35
68
  tickCount = input(5, { ...(ngDevMode ? { debugName: "tickCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
69
+ /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;
70
+ * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.
71
+ * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards
72
+ * is one decision per app rather than per plot. */
73
+ frame = input(null, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
74
+ /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the
75
+ * default, takes it away at once: a panel that outlives the pointer sits over the plot the
76
+ * reader has moved on to.
77
+ *
78
+ * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything
79
+ * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so
80
+ * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to
81
+ * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */
82
+ tooltipLingerMs = input(null, { ...(ngDevMode ? { debugName: "tooltipLingerMs" } : /* istanbul ignore next */ {}), transform: (raw) => (raw == null ? null : numberAttribute(raw)) });
36
83
  /** Printed above the plot as the chart's visible title, and reused as the annex table's
37
84
  * caption. */
38
85
  caption = input(null, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
@@ -41,8 +88,13 @@ class ColumnChartComponent {
41
88
  /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
42
89
  * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
43
90
  * `'none'` belongs only where the same data is already in a table on the page.
44
- * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'toggle'`. */
91
+ * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */
45
92
  dataTable = input(null, ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
93
+ /** Declares that the marks are parts of one whole, which is what makes a share of their total a
94
+ * real quantity. Off by default: a chart of visitors per stage or revenue per month sums to a
95
+ * number nobody can point at, and "18.6% of total" against it is arithmetic dressed as a fact.
96
+ * On, each mark's share appears on the tooltip's second line and in the data table. */
97
+ partOfWhole = input(false, { ...(ngDevMode ? { debugName: "partOfWhole" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
46
98
  /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
47
99
  * when the data lands. */
48
100
  loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
@@ -60,10 +112,11 @@ class ColumnChartComponent {
60
112
  * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
61
113
  * grouping with a K/M/B suffix past four digits. */
62
114
  valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
63
- dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'toggle');
115
+ frameResolved = resolveWithConfig(this.frame, (config) => config.chart?.frame, 'auto');
116
+ dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'none');
64
117
  emptyTextResolved = resolveWithConfig(this.emptyText, (config) => config.chart?.emptyText, 'No data');
65
118
  errorTextResolved = resolveWithConfig(this.errorText, (config) => config.chart?.errorText, 'Could not load the data');
66
- valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultValueFormat);
119
+ valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat);
67
120
  /** Turns on the click affordance — the pointer cursor and any hover tint.
68
121
  * The click output fires whether or not this is set, so a consumer that
69
122
  * binds the output and forgets the flag still receives every click. */
@@ -71,6 +124,11 @@ class ColumnChartComponent {
71
124
  /** The point that was clicked, or activated with Enter or Space. Fires whether or not
72
125
  * `interactive` is set. */
73
126
  pointClicked = output();
127
+ /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press
128
+ * outside releases it. Off by default: a click is already the drill-down hook, and a mark left
129
+ * lit after the pointer has gone needs a reader who knows why it is lit. `pointClicked` fires
130
+ * either way — pinning is a state, not a handler. */
131
+ pinOnClick = input(false, { ...(ngDevMode ? { debugName: "pinOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
74
132
  /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
75
133
  * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
76
134
  * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
@@ -81,9 +139,6 @@ class ColumnChartComponent {
81
139
  * all; `40` is the documented non-zero step. The total is capped, so a long series does not
82
140
  * crawl in. */
83
141
  staggerMs = input(0, { ...(ngDevMode ? { debugName: "staggerMs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
84
- markStagger(index) {
85
- return `${staggerDelay(index, this.staggerMs())}ms`;
86
- }
87
142
  /** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a
88
143
  * column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */
89
144
  tooltip = input('item', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
@@ -92,101 +147,107 @@ class ColumnChartComponent {
92
147
  * reading it describes. `'cell'` is the full-height category cell, which puts the panel at the
93
148
  * top of the plot whatever the column's value. */
94
149
  tooltipAnchor = input('mark', ...(ngDevMode ? [{ debugName: "tooltipAnchor" }] : /* istanbul ignore next */ []));
95
- activeMark = chartActiveMark();
96
- onMarkEnter(index, event) {
97
- this.activeMark.enter(index, event, this.tooltipAnchor() === 'mark' ? '.bar' : undefined);
98
- }
99
- /** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not
100
- * every mouse-operable control has to be separately focusable, and that is what keeps a
101
- * twenty-five mark chart from being twenty-five stops in the page's tab order. */
102
- rovingIndex = signal(0, ...(ngDevMode ? [{ debugName: "rovingIndex" }] : /* istanbul ignore next */ []));
103
- tabStopIndex = computed(() => Math.min(this.rovingIndex(), Math.max(0, this.columns().length - 1)), ...(ngDevMode ? [{ debugName: "tabStopIndex" }] : /* istanbul ignore next */ []));
104
- onMarkFocus(index, event) {
105
- this.rovingIndex.set(index);
106
- this.onMarkEnter(index, event);
107
- }
108
- onMarkNavigation(event, index) {
109
- const next = nextRovingIndex(event.key, index, this.columns().length);
110
- if (next === null) {
111
- return;
112
- }
113
- event.preventDefault();
114
- this.rovingIndex.set(next);
115
- focusMark(event.currentTarget.closest('.columns'), next);
116
- }
117
- tooltipContext = computed(() => {
118
- const entry = this.columns()[this.activeMark.index()];
119
- if (this.tooltip() === 'none' || !entry) {
120
- return null;
150
+ /** The value is printed ABOVE the column, so a panel anchored to the column alone opens on top
151
+ * of that number. One text line of clearance puts it above both. */
152
+ valueClearance = computed(() => this.showValues() ? 18 : 0, ...(ngDevMode ? [{ debugName: "valueClearance" }] : /* istanbul ignore next */ []));
153
+ tooltipLingerResolved = resolveWithConfig(this.tooltipLingerMs, (config) => config.chart?.tooltipLingerMs, 0);
154
+ geometry = signal(COLUMN_GEOMETRY, ...(ngDevMode ? [{ debugName: "geometry" }] : /* istanbul ignore next */ []));
155
+ /** Every state occupies the box the plot would have, so nothing on the page moves when the data
156
+ * lands or the request fails. */
157
+ viewHeightPx = computed(() => `${chartViewHeight(this.geometry().plotHeight, this.geometry().valueSpace)}px`, ...(ngDevMode ? [{ debugName: "viewHeightPx" }] : /* istanbul ignore next */ []));
158
+ skeletonHeightPx = computed(() => `${this.geometry().plotHeight}px`, ...(ngDevMode ? [{ debugName: "skeletonHeightPx" }] : /* istanbul ignore next */ []));
159
+ seriesRefs = viewChildren(ColumnSeriesComponent, ...(ngDevMode ? [{ debugName: "seriesRefs" }] : /* istanbul ignore next */ []));
160
+ pinnedSeries = computed(() => this.seriesRefs().find((series) => series.activeMark.pinned()) ?? null, ...(ngDevMode ? [{ debugName: "pinnedSeries" }] : /* istanbul ignore next */ []));
161
+ resolvedSeries = computed(() => {
162
+ const given = this.data();
163
+ if (!isSeriesList(given)) {
164
+ return [
165
+ { key: 'series', label: '', color: null, fill: null, points: given },
166
+ ];
121
167
  }
122
- return {
123
- category: '',
124
- entries: [
125
- {
126
- label: entry.point.label,
127
- value: entry.point.value,
128
- formatted: entry.formattedValue,
129
- color: entry.color,
130
- detail: describeShare(this.data().map((point) => point.value), this.activeMark.index()),
131
- },
132
- ],
133
- };
134
- }, ...(ngDevMode ? [{ debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
135
- domainMax = computed(() => resolveDomainMax(this.data().map((point) => point.value)), ...(ngDevMode ? [{ debugName: "domainMax" }] : /* istanbul ignore next */ []));
136
- /** Top of the value axis: the domain rounded up to a whole tick, so the
137
- * tallest column ends on a gridline rather than between two. */
138
- axisMax = computed(() => niceMax(this.domainMax(), this.tickCount()), ...(ngDevMode ? [{ debugName: "axisMax" }] : /* istanbul ignore next */ []));
139
- ticks = computed(() => {
140
- const axisMax = this.axisMax();
141
- // Niced from the same domain as `axisMax`, which is what makes the top tick
142
- // and the top of the axis the same number.
143
- const values = tickValues(this.domainMax(), this.tickCount());
144
- const step = tickStep(values);
145
- const format = this.valueFormatResolved();
146
- return values.map((value) => ({
147
- label: format === defaultValueFormat ? formatTick(value, step) : format(value),
148
- offsetPercent: heightPercent(value, axisMax),
168
+ return given.map((series, index) => ({
169
+ key: series.id,
170
+ label: series.label,
171
+ color: series.color ??
172
+ CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],
173
+ fill: series.fill ?? null,
174
+ points: series.data,
149
175
  }));
150
- }, ...(ngDevMode ? [{ debugName: "ticks" }] : /* istanbul ignore next */ []));
151
- columns = computed(() => {
152
- const axisMax = this.axisMax();
176
+ }, ...(ngDevMode ? [{ debugName: "resolvedSeries" }] : /* istanbul ignore next */ []));
177
+ /** Stacking collapses every series onto ONE slot, which is also why a stacked series is drawn
178
+ * at slot 0 rather than at its own index - its segments sit on top of each other, not beside
179
+ * them. */
180
+ slotCount = computed(() => this.stack() === 'stacked' || this.stack() === 'normalized'
181
+ ? 1
182
+ : this.resolvedSeries().length, ...(ngDevMode ? [{ debugName: "slotCount" }] : /* istanbul ignore next */ []));
183
+ offsets = computed(() => stackOffsets(this.resolvedSeries().map((series) => series.points.map((point) => point.value)), this.stack()), ...(ngDevMode ? [{ debugName: "offsets" }] : /* istanbul ignore next */ []));
184
+ offsetsFor(index) {
185
+ return this.offsets()[index] ?? [];
186
+ }
187
+ /** The categories come from the LONGEST series: a series that stops early leaves the bands past
188
+ * its end standing rather than taking them off the axis for every other series too. */
189
+ categories = computed(() => this.resolvedSeries()
190
+ .reduce((longest, series) => series.points.length > longest.length ? series.points : longest, [])
191
+ .map((point) => point.label), ...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
192
+ multiSeries = computed(() => this.resolvedSeries().length > 1, ...(ngDevMode ? [{ debugName: "multiSeries" }] : /* istanbul ignore next */ []));
193
+ legendItems = computed(() => this.resolvedSeries().map((series) => ({
194
+ id: series.key,
195
+ label: series.label,
196
+ color: series.color ?? '',
197
+ })), ...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
198
+ /** A normalized stack draws shares, not readings, so the axis has to say so - the value printed
199
+ * beside each mark stays the reading, which is what `valueFormat` goes on formatting. */
200
+ axisFormat = computed(() => this.stack() === 'normalized'
201
+ ? (value) => formatPercent(value, 1)
202
+ : this.valueFormat(), ...(ngDevMode ? [{ debugName: "axisFormat" }] : /* istanbul ignore next */ []));
203
+ tableRows = computed(() => {
153
204
  const format = this.valueFormatResolved();
154
- return this.data().map((point, index) => ({
155
- key: point.id ?? String(index),
156
- point,
157
- heightPercent: heightPercent(point.value, axisMax),
158
- formattedValue: format(point.value),
159
- color: point.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],
160
- }));
161
- }, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
205
+ return this.resolvedSeries().flatMap((series) => {
206
+ const values = series.points.map((point) => point.value);
207
+ return series.points.map((point, index) => ({
208
+ key: `${series.key}:${point.id ?? index}`,
209
+ series: series.label,
210
+ label: point.label,
211
+ formattedValue: format(point.value, 'tooltip'),
212
+ share: this.partOfWhole() ? shareOfTotal(values, index) : '',
213
+ }));
214
+ });
215
+ }, ...(ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []));
162
216
  accessibleName = computed(() => this.summary() ??
163
- describeSeries(this.caption() ?? 'Chart', this.data().map((point) => ({
217
+ this.resolvedSeries()
218
+ .map((series, index) => describeSeries(series.label || this.caption() || 'Chart', series.points.map((point) => ({
164
219
  label: point.label,
165
220
  value: point.value,
166
- })), this.valueFormatResolved(), this.dataTableResolved() !== 'none'), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
167
- entryLabel(entry) {
168
- return `${entry.point.label}, ${entry.formattedValue}`;
169
- }
170
- onPointKey(point, event) {
171
- // Only the column's own key opens it: a key pressed on a control inside belongs to that
172
- // control.
173
- if (!this.interactive() || event.target !== event.currentTarget) {
174
- return;
175
- }
176
- event.preventDefault();
177
- this.pointClicked.emit(point);
178
- }
179
- isEmpty = computed(() => this.data().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
221
+ })), (value) => this.valueFormatResolved()(value, 'tooltip'), this.dataTableResolved() !== 'none',
222
+ // The reference lines belong to the plot, not to a series, so they are named once.
223
+ index === 0 ? this.thresholds() : []))
224
+ .join(' '), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
225
+ isEmpty = computed(() => this.categories().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
180
226
  /** Placeholder columns while loading. Follows the real point count so the chart does not resize
181
227
  * when the data lands; falls back to three when `data` is still empty. */
182
- skeletonColumns = computed(() => Array.from({ length: Math.max(this.data().length, 3) }), ...(ngDevMode ? [{ debugName: "skeletonColumns" }] : /* istanbul ignore next */ []));
228
+ skeletonColumns = computed(() => Array.from({ length: Math.max(this.categories().length, 3) }), ...(ngDevMode ? [{ debugName: "skeletonColumns" }] : /* istanbul ignore next */ []));
229
+ constructor() {
230
+ const host = inject(ElementRef);
231
+ afterNextRender(() => this.geometry.set(readColumnGeometry(host.nativeElement)));
232
+ }
183
233
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColumnChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
184
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ColumnChartComponent, isStandalone: true, selector: "ds-column-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipAnchor: { classPropertyName: "tooltipAnchor", publicName: "tooltipAnchor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked" }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"column-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton height=\"var(--_column-chart-plot-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\">\n <div class=\"tick-labels\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"tick-label\"\n [style.bottom.%]=\"tick.offsetPercent\">\n {{ tick.label }}\n </span>\n }\n </div>\n\n <div class=\"canvas\">\n <div class=\"grid-lines\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"grid-line\"\n [style.bottom.%]=\"tick.offsetPercent\">\n </span>\n }\n </div>\n\n <div\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of columns(); track entry.key; let index = $index) {\n <div\n class=\"column\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onMarkEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"pointClicked.emit(entry.point)\"\n (keydown.enter)=\"onPointKey(entry.point, $event)\"\n (keydown.space)=\"onPointKey(entry.point, $event)\">\n <span class=\"plot-cell\">\n @if (showValues()) {\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n }\n\n <span\n class=\"bar\"\n animate.enter=\"mark-enter\"\n [style.height.%]=\"entry.heightPercent\"\n [style.background]=\"entry.color\">\n </span>\n </span>\n\n <span class=\"category-label\">\n {{ entry.point.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of columns(); track entry.key) {\n <tr>\n <td>\n {{ entry.point.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.column .bar{transform-origin:bottom}.bar.mark-enter{animation:ds-chart-mark-grow-y var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.column.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.column-chart{--_column-chart-plot-height: var(--ds-column-chart-plot-height, 200px);--_column-chart-column-gap: var(--ds-column-chart-column-gap, var(--ds-chart-bar-gap));--_column-chart-column-width: var(--ds-column-chart-column-width, 80%);--_column-chart-cap-radius: var( --ds-column-chart-cap-radius, var(--ds-chart-mark-cap-radius) );--_column-chart-column-max-width: var(--ds-column-chart-column-max-width, 48px);--_column-chart-grid-line-color: var(--ds-column-chart-grid-line-color, var(--ds-chart-grid-line-color));--_column-chart-value-space: var(--ds-column-chart-value-space, var(--space-5));--_column-chart-axis-width: var(--ds-column-chart-axis-width, 40px);margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:var(--_column-chart-plot-height);margin:0;color:var(--text-secondary);text-align:center}.chart{display:grid;grid-template-columns:auto 1fr;column-gap:var(--space-2);padding-block-start:var(--_column-chart-value-space)}.tick-labels{position:relative;inline-size:var(--_column-chart-axis-width);block-size:var(--_column-chart-plot-height)}.tick-label{position:absolute;inset-inline-end:0;transform:translateY(50%);color:var(--ds-chart-axis-label-color);font-size:var(--ds-chart-axis-font-size);white-space:nowrap}.canvas{position:relative}.grid-lines{position:absolute;inset-inline:0;inset-block-start:0;block-size:var(--_column-chart-plot-height)}.grid-line{position:absolute;inset-inline:0;border-block-start:1px solid var(--_column-chart-grid-line-color)}.columns .column{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.columns .column.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.columns.dims-others:has(.column.interactive:hover) .column.interactive:not(:hover),.columns.dims-others:has(.column.interactive:focus-visible) .column.interactive:not(:focus-visible){opacity:var(--ds-chart-dim-opacity)}.columns .column.interactive{cursor:pointer}.columns{position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;column-gap:var(--_column-chart-column-gap)}.column{position:relative;display:grid;row-gap:var(--space-2);pointer-events:none}.column:after{content:\"\";position:absolute;inset:0;margin-inline:auto;inline-size:min(100%,var(--_column-chart-column-max-width) + var(--_column-chart-column-gap));pointer-events:auto}.plot-cell{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;block-size:var(--_column-chart-plot-height)}.value{font-size:var(--font-size-xs);font-weight:700;white-space:nowrap}.bar{inline-size:var(--_column-chart-column-width);max-inline-size:var(--_column-chart-column-max-width);border-start-start-radius:var(--_column-chart-cap-radius);border-start-end-radius:var(--_column-chart-cap-radius);transition:block-size var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),background-color var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.category-label{color:var(--text-secondary);font-size:var(--ds-chart-axis-font-size);text-align:center;pointer-events:auto}.skeleton{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;column-gap:var(--_column-chart-column-gap)}.empty.is-error{color:var(--error)}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
234
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ColumnChartComponent, isStandalone: true, selector: "ds-column-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, stack: { classPropertyName: "stack", publicName: "stack", isSignal: true, isRequired: false, transformFunction: null }, thresholds: { classPropertyName: "thresholds", publicName: "thresholds", isSignal: true, isRequired: false, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, tooltipLingerMs: { classPropertyName: "tooltipLingerMs", publicName: "tooltipLingerMs", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, partOfWhole: { classPropertyName: "partOfWhole", publicName: "partOfWhole", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipAnchor: { classPropertyName: "tooltipAnchor", publicName: "tooltipAnchor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'", "style.--_column-chart-view-height": "viewHeightPx()" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "seriesRefs", predicate: ColumnSeriesComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"column-chart\">\n @if (pinnedSeries()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"pinnedSeries()?.activeMark?.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton [height]=\"skeletonHeightPx()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"axisFormat()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\"\n [plotHeight]=\"geometry().plotHeight\"\n [axisGutter]=\"geometry().axisGutter\"\n [valueSpace]=\"geometry().valueSpace\">\n <svg:g\n dsReferenceLine\n [thresholds]=\"thresholds()\" />\n\n @for (\n series of resolvedSeries();\n track series.key;\n let seriesIndex = $index\n ) {\n <svg:g\n #mark=\"dsColumnSeries\"\n dsColumnSeries\n [data]=\"series.points\"\n [slot]=\"slotCount() > 1 ? seriesIndex : 0\"\n [slotCount]=\"slotCount()\"\n [offsets]=\"offsetsFor(seriesIndex)\"\n [seriesColor]=\"series.color\"\n [seriesFill]=\"series.fill\"\n [seriesLabel]=\"multiSeries() ? series.label : null\"\n [columnWidthRatio]=\"geometry().columnWidthRatio\"\n [showValues]=\"showValues()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [dimOthers]=\"dimOthers()\"\n [staggerMs]=\"staggerMs()\"\n [partOfWhole]=\"partOfWhole()\"\n [tooltip]=\"tooltip()\"\n [tooltipAnchor]=\"tooltipAnchor()\"\n [tooltipLingerMs]=\"tooltipLingerResolved()\"\n [valueFormat]=\"valueFormatResolved()\"\n [dsChartTooltip]=\"mark.tooltipContext()\"\n [dsChartTooltipExtraGap]=\"valueClearance()\"\n [dsChartTooltipPreferBelow]=\"mark.activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"mark.activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\"\n (pointClicked)=\"pointClicked.emit($event)\" />\n }\n\n <svg:g\n dsReferenceLabel\n [thresholds]=\"thresholds()\" />\n </ds-chart>\n\n @if (multiSeries()) {\n <ds-chart-legend [items]=\"legendItems()\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n @if (multiSeries()) {\n <th scope=\"col\">\n Series\n </th>\n }\n\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track row.key) {\n <tr>\n @if (multiSeries()) {\n <td>\n {{ row.series }}\n </td>\n }\n\n <td>\n {{ row.label }}\n </td>\n\n <td>\n {{ row.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ row.share }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table,figcaption{-webkit-user-select:text;user-select:text}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}:host{--_column-chart-plot-height: var(--ds-column-chart-plot-height, 200px);--_column-chart-axis-width: var(--ds-column-chart-axis-width, 40px);--_column-chart-value-space: var(--ds-column-chart-value-space, var(--space-5));--_column-chart-column-width: var(--ds-column-chart-column-width, 80%)}.column-chart{--_column-chart-grid-line-color: var(--ds-column-chart-grid-line-color, var(--ds-chart-grid-line-color, var(--chart-grid-line-color)));--_column-chart-column-gap: var(--ds-column-chart-column-gap, var(--ds-chart-bar-gap));margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}ds-chart{--ds-chart-grid-line-color: var(--_column-chart-grid-line-color)}.empty{display:grid;place-items:center;min-block-size:var(--_column-chart-view-height);margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.skeleton{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;column-gap:var(--_column-chart-column-gap)}.empty.is-error{color:var(--error)}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: ChartComponent, selector: "ds-chart", inputs: ["categories", "tickCount", "min", "max", "plotHeight", "axisGutter", "valueSpace", "caption", "interactive", "summary", "frame", "loading", "emptyText", "error", "errorText", "valueFormat", "secondaryAxisMode", "axisColor", "secondaryAxisColor"] }, { kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }, { kind: "component", type: ColumnSeriesComponent, selector: "g[dsColumnSeries]", inputs: ["data", "showValues", "interactive", "pinOnClick", "dimOthers", "staggerMs", "partOfWhole", "tooltip", "tooltipAnchor", "tooltipLingerMs", "valueFormat", "columnWidthRatio", "slot", "slotCount", "offsets", "seriesColor", "seriesFill", "seriesLabel"], outputs: ["pointClicked"], exportAs: ["dsColumnSeries"] }, { kind: "component", type: ReferenceLabelComponent, selector: "g[dsReferenceLabel]", inputs: ["thresholds"] }, { kind: "component", type: ReferenceLineComponent, selector: "g[dsReferenceLine]", inputs: ["thresholds"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPreferBelow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
185
235
  }
186
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColumnChartComponent, decorators: [{
187
237
  type: Component,
188
- args: [{ selector: 'ds-column-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"column-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton height=\"var(--_column-chart-plot-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\">\n <div class=\"tick-labels\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"tick-label\"\n [style.bottom.%]=\"tick.offsetPercent\">\n {{ tick.label }}\n </span>\n }\n </div>\n\n <div class=\"canvas\">\n <div class=\"grid-lines\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"grid-line\"\n [style.bottom.%]=\"tick.offsetPercent\">\n </span>\n }\n </div>\n\n <div\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of columns(); track entry.key; let index = $index) {\n <div\n class=\"column\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onMarkEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"pointClicked.emit(entry.point)\"\n (keydown.enter)=\"onPointKey(entry.point, $event)\"\n (keydown.space)=\"onPointKey(entry.point, $event)\">\n <span class=\"plot-cell\">\n @if (showValues()) {\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n }\n\n <span\n class=\"bar\"\n animate.enter=\"mark-enter\"\n [style.height.%]=\"entry.heightPercent\"\n [style.background]=\"entry.color\">\n </span>\n </span>\n\n <span class=\"category-label\">\n {{ entry.point.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of columns(); track entry.key) {\n <tr>\n <td>\n {{ entry.point.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.column .bar{transform-origin:bottom}.bar.mark-enter{animation:ds-chart-mark-grow-y var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.column.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.column-chart{--_column-chart-plot-height: var(--ds-column-chart-plot-height, 200px);--_column-chart-column-gap: var(--ds-column-chart-column-gap, var(--ds-chart-bar-gap));--_column-chart-column-width: var(--ds-column-chart-column-width, 80%);--_column-chart-cap-radius: var( --ds-column-chart-cap-radius, var(--ds-chart-mark-cap-radius) );--_column-chart-column-max-width: var(--ds-column-chart-column-max-width, 48px);--_column-chart-grid-line-color: var(--ds-column-chart-grid-line-color, var(--ds-chart-grid-line-color));--_column-chart-value-space: var(--ds-column-chart-value-space, var(--space-5));--_column-chart-axis-width: var(--ds-column-chart-axis-width, 40px);margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:var(--_column-chart-plot-height);margin:0;color:var(--text-secondary);text-align:center}.chart{display:grid;grid-template-columns:auto 1fr;column-gap:var(--space-2);padding-block-start:var(--_column-chart-value-space)}.tick-labels{position:relative;inline-size:var(--_column-chart-axis-width);block-size:var(--_column-chart-plot-height)}.tick-label{position:absolute;inset-inline-end:0;transform:translateY(50%);color:var(--ds-chart-axis-label-color);font-size:var(--ds-chart-axis-font-size);white-space:nowrap}.canvas{position:relative}.grid-lines{position:absolute;inset-inline:0;inset-block-start:0;block-size:var(--_column-chart-plot-height)}.grid-line{position:absolute;inset-inline:0;border-block-start:1px solid var(--_column-chart-grid-line-color)}.columns .column{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.columns .column.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.columns.dims-others:has(.column.interactive:hover) .column.interactive:not(:hover),.columns.dims-others:has(.column.interactive:focus-visible) .column.interactive:not(:focus-visible){opacity:var(--ds-chart-dim-opacity)}.columns .column.interactive{cursor:pointer}.columns{position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;column-gap:var(--_column-chart-column-gap)}.column{position:relative;display:grid;row-gap:var(--space-2);pointer-events:none}.column:after{content:\"\";position:absolute;inset:0;margin-inline:auto;inline-size:min(100%,var(--_column-chart-column-max-width) + var(--_column-chart-column-gap));pointer-events:auto}.plot-cell{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;block-size:var(--_column-chart-plot-height)}.value{font-size:var(--font-size-xs);font-weight:700;white-space:nowrap}.bar{inline-size:var(--_column-chart-column-width);max-inline-size:var(--_column-chart-column-max-width);border-start-start-radius:var(--_column-chart-cap-radius);border-start-end-radius:var(--_column-chart-cap-radius);transition:block-size var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),background-color var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.category-label{color:var(--text-secondary);font-size:var(--ds-chart-axis-font-size);text-align:center;pointer-events:auto}.skeleton{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;column-gap:var(--_column-chart-column-gap)}.empty.is-error{color:var(--error)}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}\n"] }]
189
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], showValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValues", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }], tooltipAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipAnchor", required: false }] }] } });
238
+ args: [{ selector: 'ds-column-chart', standalone: true, imports: [
239
+ SkeletonComponent,
240
+ ChartComponent,
241
+ ChartLegendComponent,
242
+ ColumnSeriesComponent,
243
+ ReferenceLabelComponent,
244
+ ReferenceLineComponent,
245
+ ChartTooltipDirective,
246
+ ], host: {
247
+ '[class.framed]': "frameResolved() === 'auto'",
248
+ '[style.--_column-chart-view-height]': 'viewHeightPx()',
249
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"column-chart\">\n @if (pinnedSeries()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"pinnedSeries()?.activeMark?.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton [height]=\"skeletonHeightPx()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"axisFormat()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\"\n [plotHeight]=\"geometry().plotHeight\"\n [axisGutter]=\"geometry().axisGutter\"\n [valueSpace]=\"geometry().valueSpace\">\n <svg:g\n dsReferenceLine\n [thresholds]=\"thresholds()\" />\n\n @for (\n series of resolvedSeries();\n track series.key;\n let seriesIndex = $index\n ) {\n <svg:g\n #mark=\"dsColumnSeries\"\n dsColumnSeries\n [data]=\"series.points\"\n [slot]=\"slotCount() > 1 ? seriesIndex : 0\"\n [slotCount]=\"slotCount()\"\n [offsets]=\"offsetsFor(seriesIndex)\"\n [seriesColor]=\"series.color\"\n [seriesFill]=\"series.fill\"\n [seriesLabel]=\"multiSeries() ? series.label : null\"\n [columnWidthRatio]=\"geometry().columnWidthRatio\"\n [showValues]=\"showValues()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [dimOthers]=\"dimOthers()\"\n [staggerMs]=\"staggerMs()\"\n [partOfWhole]=\"partOfWhole()\"\n [tooltip]=\"tooltip()\"\n [tooltipAnchor]=\"tooltipAnchor()\"\n [tooltipLingerMs]=\"tooltipLingerResolved()\"\n [valueFormat]=\"valueFormatResolved()\"\n [dsChartTooltip]=\"mark.tooltipContext()\"\n [dsChartTooltipExtraGap]=\"valueClearance()\"\n [dsChartTooltipPreferBelow]=\"mark.activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"mark.activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\"\n (pointClicked)=\"pointClicked.emit($event)\" />\n }\n\n <svg:g\n dsReferenceLabel\n [thresholds]=\"thresholds()\" />\n </ds-chart>\n\n @if (multiSeries()) {\n <ds-chart-legend [items]=\"legendItems()\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n @if (multiSeries()) {\n <th scope=\"col\">\n Series\n </th>\n }\n\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track row.key) {\n <tr>\n @if (multiSeries()) {\n <td>\n {{ row.series }}\n </td>\n }\n\n <td>\n {{ row.label }}\n </td>\n\n <td>\n {{ row.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ row.share }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table,figcaption{-webkit-user-select:text;user-select:text}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}:host{--_column-chart-plot-height: var(--ds-column-chart-plot-height, 200px);--_column-chart-axis-width: var(--ds-column-chart-axis-width, 40px);--_column-chart-value-space: var(--ds-column-chart-value-space, var(--space-5));--_column-chart-column-width: var(--ds-column-chart-column-width, 80%)}.column-chart{--_column-chart-grid-line-color: var(--ds-column-chart-grid-line-color, var(--ds-chart-grid-line-color, var(--chart-grid-line-color)));--_column-chart-column-gap: var(--ds-column-chart-column-gap, var(--ds-chart-bar-gap));margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}ds-chart{--ds-chart-grid-line-color: var(--_column-chart-grid-line-color)}.empty{display:grid;place-items:center;min-block-size:var(--_column-chart-view-height);margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.skeleton{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;column-gap:var(--_column-chart-column-gap)}.empty.is-error{color:var(--error)}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"] }]
250
+ }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], stack: [{ type: i0.Input, args: [{ isSignal: true, alias: "stack", required: false }] }], thresholds: [{ type: i0.Input, args: [{ isSignal: true, alias: "thresholds", required: false }] }], showValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValues", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], tooltipLingerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipLingerMs", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], partOfWhole: [{ type: i0.Input, args: [{ isSignal: true, alias: "partOfWhole", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }], tooltipAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipAnchor", required: false }] }], seriesRefs: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ColumnSeriesComponent), { isSignal: true }] }] } });
190
251
 
191
252
  /**
192
253
  * Generated bundle index. Do not edit.