@ids-group-ltd/ids-design-system 0.13.2 → 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 (54) hide show
  1. package/CHANGELOG.md +265 -0
  2. package/components.md +12 -16
  3. package/docs/agent/INDEX.md +1 -2
  4. package/docs/agent/charts/ds-column-chart.md +3 -2
  5. package/docs/agent/feedback/ds-bar.md +13 -0
  6. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +9 -10
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +70 -41
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +141 -120
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +42 -11
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +16 -7
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +14 -83
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +163 -21
  25. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -2
  29. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  30. package/migrations/0.13.3.json +211 -0
  31. package/package.json +17 -17
  32. package/styles/_chart-frame.scss +16 -6
  33. package/styles/_tokens-charts.scss +29 -5
  34. package/styles/_tokens.scss +1 -1
  35. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +2 -1
  36. package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
  37. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  38. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +7 -4
  39. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
  40. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +95 -38
  41. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +15 -2
  42. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +6 -1
  43. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +8 -18
  44. package/types/ids-group-ltd-ids-design-system-components.d.ts +58 -9
  45. package/types/ids-group-ltd-ids-design-system-core.d.ts +55 -4
  46. package/types/ids-group-ltd-ids-design-system.d.ts +4 -4
  47. package/docs/agent/feedback/ds-meter.md +0 -11
  48. package/docs/agent/feedback/ds-progress.md +0 -10
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs +0 -61
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs.map +0 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -65
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
  53. package/types/ids-group-ltd-ids-design-system-components-meter.d.ts +0 -36
  54. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -40
@@ -1,34 +1,66 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, numberAttribute, output, contentChild, computed, signal, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { formatValue, staggerDelay, nextRovingIndex, focusMark, describeShare, niceMax, tickValues, tickStep, formatTick, CHART_SERIES_COLORS, shareOfTotal, 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
- import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
6
5
  import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
7
- 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';
8
9
 
9
- /** Largest finite value in the series — the domain the value axis is niced from.
10
- * A non-finite point is skipped rather than compared: one `Infinity` point
11
- * would otherwise become the domain and flatten every other column to nothing. */
12
- function resolveDomainMax(values) {
13
- const finite = values.filter((value) => Number.isFinite(value));
14
- return finite.length ? Math.max(...finite) : 0;
10
+ function isSeriesList(data) {
11
+ return data.length > 0 && 'data' in data[0];
15
12
  }
16
- /** Share of the plot area, in percent. Drives both a column's height and a
17
- * gridline's offset, so a tick and the column beside it cannot drift apart. */
18
- function heightPercent(value, axisMax) {
19
- // Math.max(NaN, 0) is NaN, so the lower clamp cannot stand in for this test —
20
- // and the result is written into a style attribute, where `height: NaN%` is
21
- // dropped silently.
22
- if (!Number.isFinite(value) || !Number.isFinite(axisMax) || axisMax <= 0) {
23
- return 0;
24
- }
25
- 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
+ };
26
44
  }
27
-
28
- const defaultValueFormat = (value) => formatValue(value);
29
45
  class ColumnChartComponent {
30
- /** 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. */
31
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 */ []));
32
64
  /** Prints each column's value above the column. */
33
65
  showValues = input(true, { ...(ngDevMode ? { debugName: "showValues" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
34
66
  /** How many value-axis ticks to aim for. A hint, not a count: ticks are
@@ -84,7 +116,7 @@ class ColumnChartComponent {
84
116
  dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'none');
85
117
  emptyTextResolved = resolveWithConfig(this.emptyText, (config) => config.chart?.emptyText, 'No data');
86
118
  errorTextResolved = resolveWithConfig(this.errorText, (config) => config.chart?.errorText, 'Could not load the data');
87
- valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultValueFormat);
119
+ valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat);
88
120
  /** Turns on the click affordance — the pointer cursor and any hover tint.
89
121
  * The click output fires whether or not this is set, so a consumer that
90
122
  * binds the output and forgets the flag still receives every click. */
@@ -107,9 +139,6 @@ class ColumnChartComponent {
107
139
  * all; `40` is the documented non-zero step. The total is capped, so a long series does not
108
140
  * crawl in. */
109
141
  staggerMs = input(0, { ...(ngDevMode ? { debugName: "staggerMs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
110
- markStagger(index) {
111
- return `${staggerDelay(index, this.staggerMs())}ms`;
112
- }
113
142
  /** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a
114
143
  * column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */
115
144
  tooltip = input('item', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
@@ -122,111 +151,103 @@ class ColumnChartComponent {
122
151
  * of that number. One text line of clearance puts it above both. */
123
152
  valueClearance = computed(() => this.showValues() ? 18 : 0, ...(ngDevMode ? [{ debugName: "valueClearance" }] : /* istanbul ignore next */ []));
124
153
  tooltipLingerResolved = resolveWithConfig(this.tooltipLingerMs, (config) => config.chart?.tooltipLingerMs, 0);
125
- activeMark = chartActiveMark(() => this.tooltipLingerResolved());
126
- onMarkClick(payload, index, event) {
127
- this.pointClicked.emit(payload);
128
- if (this.pinOnClick()) {
129
- this.activeMark.pin(index, event, this.tooltipAnchor() === 'mark' ? '.bar' : undefined);
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
+ ];
130
167
  }
131
- }
132
- onMarkEnter(index, event) {
133
- this.activeMark.enter(index, event, this.tooltipAnchor() === 'mark' ? '.bar' : undefined);
134
- }
135
- /** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not
136
- * every mouse-operable control has to be separately focusable, and that is what keeps a
137
- * twenty-five mark chart from being twenty-five stops in the page's tab order. */
138
- rovingIndex = signal(0, ...(ngDevMode ? [{ debugName: "rovingIndex" }] : /* istanbul ignore next */ []));
139
- tabStopIndex = computed(() => Math.min(this.rovingIndex(), Math.max(0, this.columns().length - 1)), ...(ngDevMode ? [{ debugName: "tabStopIndex" }] : /* istanbul ignore next */ []));
140
- onMarkFocus(index, event) {
141
- this.rovingIndex.set(index);
142
- this.onMarkEnter(index, event);
143
- }
144
- onMarkNavigation(event, index) {
145
- const next = nextRovingIndex(event.key, index, this.columns().length);
146
- if (next === null) {
147
- return;
148
- }
149
- event.preventDefault();
150
- this.rovingIndex.set(next);
151
- focusMark(event.currentTarget.closest('.columns'), next);
152
- }
153
- tooltipContext = computed(() => {
154
- const entry = this.columns()[this.activeMark.index()];
155
- if (this.tooltip() === 'none' || !entry) {
156
- return null;
157
- }
158
- return {
159
- category: '',
160
- entries: [
161
- {
162
- label: entry.point.label,
163
- value: entry.point.value,
164
- formatted: entry.formattedValue,
165
- color: entry.color,
166
- detail: this.partOfWhole()
167
- ? describeShare(this.data().map((point) => point.value), this.activeMark.index())
168
- : undefined,
169
- },
170
- ],
171
- };
172
- }, ...(ngDevMode ? [{ debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
173
- domainMax = computed(() => resolveDomainMax(this.data().map((point) => point.value)), ...(ngDevMode ? [{ debugName: "domainMax" }] : /* istanbul ignore next */ []));
174
- /** Top of the value axis: the domain rounded up to a whole tick, so the
175
- * tallest column ends on a gridline rather than between two. */
176
- axisMax = computed(() => niceMax(this.domainMax(), this.tickCount()), ...(ngDevMode ? [{ debugName: "axisMax" }] : /* istanbul ignore next */ []));
177
- ticks = computed(() => {
178
- const axisMax = this.axisMax();
179
- // Niced from the same domain as `axisMax`, which is what makes the top tick
180
- // and the top of the axis the same number.
181
- const values = tickValues(this.domainMax(), this.tickCount());
182
- const step = tickStep(values);
183
- const format = this.valueFormatResolved();
184
- return values.map((value) => ({
185
- label: format === defaultValueFormat ? formatTick(value, step) : format(value),
186
- 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,
187
175
  }));
188
- }, ...(ngDevMode ? [{ debugName: "ticks" }] : /* istanbul ignore next */ []));
189
- columns = computed(() => {
190
- 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(() => {
191
204
  const format = this.valueFormatResolved();
192
- const values = this.data().map((point) => point.value);
193
- return this.data().map((point, index) => ({
194
- key: point.id ?? String(index),
195
- point,
196
- heightPercent: heightPercent(point.value, axisMax),
197
- formattedValue: format(point.value),
198
- share: this.partOfWhole() ? shareOfTotal(values, index) : '',
199
- color: point.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],
200
- }));
201
- }, ...(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 */ []));
202
216
  accessibleName = computed(() => this.summary() ??
203
- 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) => ({
204
219
  label: point.label,
205
220
  value: point.value,
206
- })), this.valueFormatResolved(), this.dataTableResolved() !== 'none'), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
207
- entryLabel(entry) {
208
- return `${entry.point.label}, ${entry.formattedValue}`;
209
- }
210
- onPointKey(point, event) {
211
- // Only the column's own key opens it: a key pressed on a control inside belongs to that
212
- // control.
213
- if (!this.interactive() || event.target !== event.currentTarget) {
214
- return;
215
- }
216
- event.preventDefault();
217
- this.pointClicked.emit(point);
218
- }
219
- 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 */ []));
220
226
  /** Placeholder columns while loading. Follows the real point count so the chart does not resize
221
227
  * when the data lands; falls back to three when `data` is still empty. */
222
- 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
+ }
223
233
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColumnChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
224
- 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 }, 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'" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"column-chart\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"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=\"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 [dsChartTooltipExtraGap]=\"valueClearance()\"\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 [class.is-pinned]=\"activeMark.pinned() && activeMark.index() === index\"\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)=\"onMarkClick(entry.point, index, $event)\"\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 @if (activeMark.pinned() && activeMark.index() === index) {\n <ds-icon\n class=\"pin-marker\"\n name=\"pin\"\n [size]=\"14\" />\n }\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\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\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\n @if (partOfWhole()) {\n <td>\n {{ entry.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)}}@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;-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)}.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:not(:has(.column.is-pinned)):has(.column.interactive:hover) .column.interactive:not(:hover),.columns.dims-others:not(:has(.column.is-pinned)):has(.column.interactive:focus-visible) .column.interactive:not(:focus-visible),.columns.dims-others:has(.column.is-pinned) .column:not(.is-pinned){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{position:relative;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}}: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)}.pin-marker{display:grid;place-items:center;inline-size:var(--ds-chart-pin-size, 22px);block-size:var(--ds-chart-pin-size, 22px);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-primary);box-shadow:var(--shadow-1);pointer-events: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", "dsChartTooltipExtraGap"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }], 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 });
225
235
  }
226
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColumnChartComponent, decorators: [{
227
237
  type: Component,
228
- args: [{ selector: 'ds-column-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective, IconComponent], host: { '[class.framed]': "frameResolved() === 'auto'" }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"column-chart\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"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=\"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 [dsChartTooltipExtraGap]=\"valueClearance()\"\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 [class.is-pinned]=\"activeMark.pinned() && activeMark.index() === index\"\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)=\"onMarkClick(entry.point, index, $event)\"\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 @if (activeMark.pinned() && activeMark.index() === index) {\n <ds-icon\n class=\"pin-marker\"\n name=\"pin\"\n [size]=\"14\" />\n }\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\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\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\n @if (partOfWhole()) {\n <td>\n {{ entry.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)}}@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;-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)}.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:not(:has(.column.is-pinned)):has(.column.interactive:hover) .column.interactive:not(:hover),.columns.dims-others:not(:has(.column.is-pinned)):has(.column.interactive:focus-visible) .column.interactive:not(:focus-visible),.columns.dims-others:has(.column.is-pinned) .column:not(.is-pinned){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{position:relative;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}}: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)}.pin-marker{display:grid;place-items:center;inline-size:var(--ds-chart-pin-size, 22px);block-size:var(--ds-chart-pin-size, 22px);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-primary);box-shadow:var(--shadow-1);pointer-events:none}\n"] }]
229
- }], 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 }] }], 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 }] }] } });
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 }] }] } });
230
251
 
231
252
  /**
232
253
  * Generated bundle index. Do not edit.