@ids-group-ltd/ids-design-system 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +656 -3
  2. package/components.md +32 -11
  3. package/docs/agent/INDEX.md +2 -0
  4. package/docs/agent/charts/ds-bar-chart.md +1 -1
  5. package/docs/agent/charts/ds-column-chart.md +1 -1
  6. package/docs/agent/charts/ds-config.md +12 -0
  7. package/docs/agent/charts/ds-donut-chart.md +2 -2
  8. package/docs/agent/charts/ds-funnel-chart.md +1 -1
  9. package/docs/agent/charts/ds-line-chart.md +3 -2
  10. package/docs/agent/feedback/ds-meter.md +11 -0
  11. package/docs/agent/feedback/ds-progress.md +4 -1
  12. package/docs/agent/forms/ds-button.md +1 -1
  13. package/docs/agent/forms/ds-icon-button.md +1 -1
  14. package/docs/agent/surfaces/ds-card.md +1 -1
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +9 -4
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +100 -15
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +2 -2
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +155 -21
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +9 -4
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +81 -18
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -4
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +75 -23
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +107 -19
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +236 -31
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs +61 -0
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs.map +1 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +9 -4
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +34 -10
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -1
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -4
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +9 -4
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +2 -2
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +119 -13
  72. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
  75. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  76. package/migrations/0.13.1.json +236 -0
  77. package/migrations/0.13.2.json +269 -0
  78. package/package.json +9 -1
  79. package/styles/_chart-frame.scss +116 -4
  80. package/styles/_chart-interactive.scss +27 -7
  81. package/styles/_chart-motion.scss +61 -18
  82. package/styles/_dropdown-overlay.scss +9 -3
  83. package/styles/_focus.scss +10 -1
  84. package/styles/_overlay-motion.scss +11 -1
  85. package/styles/_tokens-charts.scss +5 -0
  86. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +6 -1
  87. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +87 -10
  88. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +1 -0
  89. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
  90. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +23 -3
  91. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +6 -1
  92. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +60 -9
  93. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +6 -1
  94. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +53 -13
  95. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +73 -11
  96. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +116 -12
  97. package/types/ids-group-ltd-ids-design-system-components-meter.d.ts +36 -0
  98. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +6 -1
  99. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +21 -3
  100. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +6 -1
  101. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +6 -1
  102. package/types/ids-group-ltd-ids-design-system-components.d.ts +47 -5
  103. package/types/ids-group-ltd-ids-design-system-core.d.ts +40 -1
  104. package/types/ids-group-ltd-ids-design-system.d.ts +6 -5
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, numberAttribute, computed, model, signal, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { tickValues, niceMax, bandScale, linearScale, formatValue, CHART_SERIES_COLORS, staggerDelay, nextRovingIndex, focusMark, describeSeries, tickStep, formatTick } from '@ids-group-ltd/ids-design-system/components';
2
+ import { input, booleanAttribute, output, signal, numberAttribute, computed, model, inject, ElementRef, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { tickValues, niceMax, pointScale, linearScale, formatValue, CHART_SERIES_COLORS, staggerDelay, nextRovingIndex, focusMark, describeSeries, tickStep, formatTick } from '@ids-group-ltd/ids-design-system/components';
4
4
  import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
5
+ import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
5
6
  import { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
6
7
  import { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';
7
8
 
@@ -164,10 +165,10 @@ function chartLayout(mode, hasSecondaryAxis) {
164
165
  }
165
166
  function categoryCenters(count, plot) {
166
167
  const total = Number.isFinite(count) && count > 0 ? Math.floor(count) : 0;
167
- const band = bandScale(total, plot.width, 0);
168
+ const scale = pointScale(total, plot.width);
168
169
  const centers = [];
169
170
  for (let index = 0; index < total; index++) {
170
- centers.push(plot.left + band.position(index) + band.bandWidth / 2);
171
+ centers.push(plot.left + scale.position(index));
171
172
  }
172
173
  return centers;
173
174
  }
@@ -256,6 +257,11 @@ function paletteIndexFor(slot, index, paletteSize) {
256
257
  }
257
258
 
258
259
  const defaultValueFormat = (value) => formatValue(value);
260
+ // Long enough to cross the gap between the plot and its panel at an ordinary pointer speed.
261
+ // View units between a reading and the label above it, and the margin inside which a label
262
+ // anchors to its own edge instead of centring. Both in the 640x320 viewBox.
263
+ const ANNOTATION_GAP = 12;
264
+ const ANNOTATION_EDGE_GUARD = 48;
259
265
  // One dash per palette slot, in the same order the colours are. Slot 1 stays solid so a
260
266
  // single-series chart is unchanged by turning patterns on.
261
267
  const SERIES_DASH_ARRAYS = [
@@ -281,6 +287,10 @@ class LineChartComponent {
281
287
  yAxisMode = input('rounded', ...(ngDevMode ? [{ debugName: "yAxisMode" }] : /* istanbul ignore next */ []));
282
288
  /** Draws a dot at every reading. Off, the dots appear on hover and on focus only. */
283
289
  showMarkers = input(true, { ...(ngDevMode ? { debugName: "showMarkers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
290
+ /** Labels pinned over their readings, for the points that have to read without a pointer. They
291
+ * are drawn, not announced: the data table already carries every reading, and repeating one in
292
+ * the plot makes a screen reader say it twice. */
293
+ annotations = input([], ...(ngDevMode ? [{ debugName: "annotations" }] : /* istanbul ignore next */ []));
284
294
  /** Makes every reading focusable and clickable. A series drawn without markers grows invisible
285
295
  * ones so there is something to land on; they appear on hover and on focus.
286
296
  *
@@ -290,12 +300,38 @@ class LineChartComponent {
290
300
  /** The point that was clicked, or activated with Enter or Space. Fires whether or not
291
301
  * `interactive` is set. */
292
302
  pointClicked = output();
303
+ /** Holds the crosshair and its tooltip on the category that was clicked, until Escape or a
304
+ * press outside releases it. Off by default: a click is already the drill-down hook, and a
305
+ * crosshair left standing after the pointer has gone needs a reader who knows why. `pointClicked`
306
+ * fires either way — pinning is a state, not a handler. */
307
+ pinOnClick = input(false, { ...(ngDevMode ? { debugName: "pinOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
308
+ pinnedCategory = signal(false, ...(ngDevMode ? [{ debugName: "pinnedCategory" }] : /* istanbul ignore next */ []));
309
+ /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
310
+ * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
311
+ * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
312
+ * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark
313
+ * and pays for it with the rest of the chart. */
314
+ dimOthers = input(false, { ...(ngDevMode ? { debugName: "dimOthers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
293
315
  /** What a `null` reading draws. The default refuses to assert that a missing
294
316
  * reading is a zero. */
295
317
  gaps = input('break', ...(ngDevMode ? [{ debugName: "gaps" }] : /* istanbul ignore next */ []));
296
318
  /** How many value-axis ticks to aim for. A hint, not a count: ticks snap to a round step, so
297
319
  * the axis may carry one more or one fewer. */
298
320
  tickCount = input(LINE_CHART_DEFAULT_TICK_COUNT, { ...(ngDevMode ? { debugName: "tickCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
321
+ /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;
322
+ * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.
323
+ * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards
324
+ * is one decision per app rather than per plot. */
325
+ frame = input(null, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
326
+ /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the
327
+ * default, takes it away at once: a panel that outlives the pointer sits over the plot the
328
+ * reader has moved on to.
329
+ *
330
+ * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything
331
+ * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so
332
+ * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to
333
+ * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */
334
+ tooltipLingerMs = input(null, { ...(ngDevMode ? { debugName: "tooltipLingerMs" } : /* istanbul ignore next */ {}), transform: (raw) => (raw == null ? null : numberAttribute(raw)) });
299
335
  /** Printed above the plot as the chart's visible title, and reused as the annex table's
300
336
  * caption. */
301
337
  caption = input(null, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
@@ -303,22 +339,43 @@ class LineChartComponent {
303
339
  summary = input(null, ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
304
340
  /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
305
341
  * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
306
- * `'none'` belongs only where the same data is already in a table on the page. */
307
- dataTable = input('toggle', ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
342
+ * `'none'` belongs only where the same data is already in a table on the page.
343
+ * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */
344
+ dataTable = input(null, ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
345
+ /** Pins the value axis instead of deriving it from the data. A panel opened one subject at a
346
+ * time — one agent, one microsite — derives a different axis for each of them, so two plots with
347
+ * the same gentle wiggle can be four times apart in value and nothing on screen says so. A fixed
348
+ * maximum is what makes two renders comparable.
349
+ *
350
+ * Null, the default, keeps the derived axis. Applies to the primary axis; `maxSecondary` pins
351
+ * the second one where a series sets `axis: 'secondary'`. A maximum below the data does not clip
352
+ * it — the larger of the two wins, because silently hiding a reading is worse than a taller axis
353
+ * than you asked for. */
354
+ max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
355
+ /** Pins the secondary value axis. See `max`. */
356
+ maxSecondary = input(null, ...(ngDevMode ? [{ debugName: "maxSecondary" }] : /* istanbul ignore next */ []));
308
357
  /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
309
358
  * when the data lands. */
310
359
  loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
311
- /** Shown in place of the plot when `data` is empty. */
312
- emptyText = input('No data', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
360
+ /** Shown in place of the plot when `data` is empty. Unset falls back to
361
+ * `DS_CONFIG.chart.emptyText`, then `'No data'`. */
362
+ emptyText = input(null, ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
313
363
  /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,
314
364
  * because "the request failed" and "there is nothing to show" read the same to a reader and
315
365
  * mean opposite things. */
316
366
  error = input(false, { ...(ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
317
- /** The message the error state prints. */
318
- errorText = input('Could not load the data', ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
367
+ /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then
368
+ * `'Could not load the data'`. */
369
+ errorText = input(null, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
319
370
  /** Formats every value the chart prints, the annex table and the generated description
320
- * included. Defaults to the browser's locale grouping with a K/M/B suffix past four digits. */
321
- valueFormat = input(defaultValueFormat, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
371
+ * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
372
+ * grouping with a K/M/B suffix past four digits. */
373
+ valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
374
+ frameResolved = resolveWithConfig(this.frame, (config) => config.chart?.frame, 'auto');
375
+ dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'none');
376
+ emptyTextResolved = resolveWithConfig(this.emptyText, (config) => config.chart?.emptyText, 'No data');
377
+ errorTextResolved = resolveWithConfig(this.errorText, (config) => config.chart?.errorText, 'Could not load the data');
378
+ valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultValueFormat);
322
379
  viewBox = `0 0 ${LINE_CHART_VIEW_WIDTH} ${LINE_CHART_VIEW_HEIGHT}`;
323
380
  resolvedSeries = computed(() => {
324
381
  const categoryCount = this.categories().length;
@@ -344,6 +401,12 @@ class LineChartComponent {
344
401
  rescaleOnHide = input(false, { ...(ngDevMode ? { debugName: "rescaleOnHide" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
345
402
  /** Whether the legend switches series off. Off leaves it a plain key. */
346
403
  legendFilters = input(false, { ...(ngDevMode ? { debugName: "legendFilters" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
404
+ /** What a legend control does. `'isolate'` shows one series and hides the rest — one action to
405
+ * answer "show me only this" rather than one per series. `'toggle'` hides one and leaves the
406
+ * rest, for taking a dominant series out so the others can be read at a usable scale.
407
+ * Forwarded to `ds-chart-legend`, which renders radios for the first and checkboxes for the
408
+ * second. */
409
+ legendMode = input('isolate', ...(ngDevMode ? [{ debugName: "legendMode" }] : /* istanbul ignore next */ []));
347
410
  /** Shown in place of the plot once the legend has switched every series off. Without it the
348
411
  * reader is left with an empty grid and nothing saying why. */
349
412
  noVisibleSeriesText = input('All series are hidden', ...(ngDevMode ? [{ debugName: "noVisibleSeriesText" }] : /* istanbul ignore next */ []));
@@ -371,7 +434,7 @@ class LineChartComponent {
371
434
  })), ...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
372
435
  isDimmed(seriesId) {
373
436
  const highlighted = this.highlightedSeries();
374
- return highlighted !== null && highlighted !== seriesId;
437
+ return this.dimOthers() && highlighted !== null && highlighted !== seriesId;
375
438
  }
376
439
  hasSecondaryAxis = computed(() => this.visibleSeries().some((entry) => entry.onSecondaryAxis), ...(ngDevMode ? [{ debugName: "hasSecondaryAxis" }] : /* istanbul ignore next */ []));
377
440
  layout = computed(() => chartLayout(this.yAxisMode(), this.hasSecondaryAxis()), ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
@@ -384,7 +447,14 @@ class LineChartComponent {
384
447
  const valuesOn = (secondary) => entries
385
448
  .filter((entry) => entry.onSecondaryAxis === secondary)
386
449
  .map((entry) => entry.values);
387
- return axisLayout(domainMaxOf(valuesOn(false)), this.hasSecondaryAxis() ? domainMaxOf(valuesOn(true)) : null, this.yAxisMode(), this.tickCount());
450
+ // The pin raises the axis, never lowers it: a maximum under the data would push readings off
451
+ // the top of the plot, and a chart that hides a value is worse than one with headroom.
452
+ const pinned = (asked, derived) => asked !== null && Number.isFinite(asked) && asked > derived
453
+ ? asked
454
+ : derived;
455
+ return axisLayout(pinned(this.max(), domainMaxOf(valuesOn(false))), this.hasSecondaryAxis()
456
+ ? pinned(this.maxSecondary(), domainMaxOf(valuesOn(true)))
457
+ : null, this.yAxisMode(), this.tickCount());
388
458
  }, ...(ngDevMode ? [{ debugName: "axes" }] : /* istanbul ignore next */ []));
389
459
  categoryPositions = computed(() => categoryCenters(this.categories().length, this.layout().primaryPlot), ...(ngDevMode ? [{ debugName: "categoryPositions" }] : /* istanbul ignore next */ []));
390
460
  plottedSeries = computed(() => {
@@ -411,6 +481,41 @@ class LineChartComponent {
411
481
  };
412
482
  });
413
483
  }, ...(ngDevMode ? [{ debugName: "plottedSeries" }] : /* istanbul ignore next */ []));
484
+ /** Annotations resolved onto the markers the plot already computed, so a label sits exactly on
485
+ * its reading and moves with it. One whose series is hidden or whose reading is missing has no
486
+ * marker and is dropped — a hidden series must not leave its label floating over the plot. */
487
+ placedAnnotations = computed(() => {
488
+ const plotted = this.plottedSeries();
489
+ return this.annotations().flatMap((annotation) => {
490
+ const entry = annotation.seriesId
491
+ ? plotted.find((candidate) => candidate.series.id === annotation.seriesId)
492
+ : plotted[0];
493
+ const marker = entry?.markers.find((candidate) => candidate.categoryIndex === annotation.categoryIndex);
494
+ if (!entry || !marker) {
495
+ return [];
496
+ }
497
+ // Anchored away from the plot edges, because a centred label at the first or last category
498
+ // hangs half outside the viewBox and is clipped rather than merely tight.
499
+ const anchor = marker.x < ANNOTATION_EDGE_GUARD
500
+ ? 'start'
501
+ : marker.x > LINE_CHART_VIEW_WIDTH - ANNOTATION_EDGE_GUARD
502
+ ? 'end'
503
+ : 'middle';
504
+ return [
505
+ {
506
+ key: `${entry.series.id}:${annotation.categoryIndex}`,
507
+ label: annotation.label,
508
+ x: marker.x,
509
+ // Above the reading, and below it where there is no room — a peak sits at the top of
510
+ // the plot, which is exactly where a label clamped upward lands on its own marker.
511
+ y: marker.y - ANNOTATION_GAP >= ANNOTATION_GAP
512
+ ? marker.y - ANNOTATION_GAP
513
+ : marker.y + ANNOTATION_GAP,
514
+ anchor,
515
+ },
516
+ ];
517
+ });
518
+ }, ...(ngDevMode ? [{ debugName: "placedAnnotations" }] : /* istanbul ignore next */ []));
414
519
  primaryTicks = computed(() => this.ticksFor(this.axes().primary.ticks, this.axes().primary.max, false), ...(ngDevMode ? [{ debugName: "primaryTicks" }] : /* istanbul ignore next */ []));
415
520
  secondaryTicks = computed(() => {
416
521
  const secondary = this.axes().secondary;
@@ -422,11 +527,26 @@ class LineChartComponent {
422
527
  stacked = computed(() => this.layout().stacked, ...(ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []));
423
528
  categoryLabelY = computed(() => this.layout().categoryLabelY, ...(ngDevMode ? [{ debugName: "categoryLabelY" }] : /* istanbul ignore next */ []));
424
529
  /** The category under the pointer, or -1. */
530
+ host = inject(ElementRef);
425
531
  activeCategory = signal(-1, ...(ngDevMode ? [{ debugName: "activeCategory" }] : /* istanbul ignore next */ []));
426
- categoryBands = computed(() => bandScale(this.categories().length, this.layout().primaryPlot.width, 0), ...(ngDevMode ? [{ debugName: "categoryBands" }] : /* istanbul ignore next */ []));
427
- activeBandX = computed(() => this.layout().primaryPlot.left +
428
- this.categoryBands().position(this.activeCategory()), ...(ngDevMode ? [{ debugName: "activeBandX" }] : /* istanbul ignore next */ []));
429
- activeBandWidth = computed(() => this.categoryBands().bandWidth, ...(ngDevMode ? [{ debugName: "activeBandWidth" }] : /* istanbul ignore next */ []));
532
+ categoryBands = computed(() => pointScale(this.categories().length, this.layout().primaryPlot.width), ...(ngDevMode ? [{ debugName: "categoryBands" }] : /* istanbul ignore next */ []));
533
+ // The band is a slot CENTRED on its reading, so it starts half a step before it. At the two ends
534
+ // half of that slot is outside the plot, and clamping is what keeps the band off the axis labels
535
+ // rather than letting it hang past them.
536
+ activeBandX = computed(() => {
537
+ const plot = this.layout().primaryPlot;
538
+ const scale = this.categoryBands();
539
+ const center = plot.left + scale.position(this.activeCategory());
540
+ return Math.max(center - scale.step / 2, plot.left);
541
+ }, ...(ngDevMode ? [{ debugName: "activeBandX" }] : /* istanbul ignore next */ []));
542
+ activeBandWidth = computed(() => {
543
+ const plot = this.layout().primaryPlot;
544
+ const scale = this.categoryBands();
545
+ const center = plot.left + scale.position(this.activeCategory());
546
+ const start = Math.max(center - scale.step / 2, plot.left);
547
+ const end = Math.min(center + scale.step / 2, plot.left + plot.width);
548
+ return Math.max(end - start, 0);
549
+ }, ...(ngDevMode ? [{ debugName: "activeBandWidth" }] : /* istanbul ignore next */ []));
430
550
  activeCategoryX = computed(() => this.activeBandX() + this.activeBandWidth() / 2, ...(ngDevMode ? [{ debugName: "activeCategoryX" }] : /* istanbul ignore next */ []));
431
551
  onPlotPointer(event) {
432
552
  const canvas = event.currentTarget;
@@ -437,10 +557,68 @@ class LineChartComponent {
437
557
  // Client pixels are not viewBox units — the plot scales to the card's width.
438
558
  const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(screen.inverse());
439
559
  const plot = this.layout().primaryPlot;
440
- this.activeCategory.set(this.categoryBands().indexAt(point.x - plot.left));
441
- this.tooltipOrigin.set({ x: event.clientX, y: event.clientY });
560
+ if (this.pinnedCategory()) {
561
+ return;
562
+ }
563
+ this.cancelCategoryClear();
564
+ const category = this.categoryBands().indexAt(point.x - plot.left);
565
+ this.activeCategory.set(category);
566
+ this.tooltipOrigin.set(this.tooltipAnchor() === 'pointer'
567
+ ? { x: event.clientX, y: event.clientY }
568
+ : this.readingAnchor(screen, category));
569
+ }
570
+ /** The highest reading in the category, mapped back into client pixels. Anchoring there rather
571
+ * than at the cursor keeps the panel still while the pointer travels within one band, and puts
572
+ * it over the readings it names instead of over the finger. */
573
+ readingAnchor(screen, category) {
574
+ const tops = this.plottedSeries().flatMap((entry) => entry.markers
575
+ .filter((marker) => marker.categoryIndex === category)
576
+ .map((marker) => marker.y));
577
+ const y = tops.length ? Math.min(...tops) : this.layout().primaryPlot.top;
578
+ const point = new DOMPoint(this.plotLeft() + this.categoryBands().position(category), y).matrixTransform(screen);
579
+ return { x: point.x, y: point.y };
442
580
  }
443
581
  clearActiveCategory() {
582
+ if (this.pinnedCategory()) {
583
+ return;
584
+ }
585
+ // Same grace the element-mark charts get from `chartActiveMark`: the panel is portaled out of
586
+ // the plot, so leaving the plot fires before the pointer can reach it. Clearing at once made
587
+ // the panel unreachable, and — because the pane takes pointer events now — put the plot and the
588
+ // panel in a loop where each closed the other.
589
+ this.cancelCategoryClear();
590
+ this.pendingCategoryClear = setTimeout(() => {
591
+ this.pendingCategoryClear = null;
592
+ this.activeCategory.set(-1);
593
+ this.tooltipOrigin.set(null);
594
+ }, Math.max(this.tooltipLingerResolved(), 0));
595
+ }
596
+ /** The panel is portaled to the body, so the plot never sees the pointer arrive on it. This is
597
+ * the other half of the grace period: reaching the panel keeps it open, and leaving the panel for
598
+ * anything that is not the plot starts the clear the plot can no longer start itself. */
599
+ onPointerAnywhere(event) {
600
+ if (!(event.target instanceof Element) || this.pinnedCategory()) {
601
+ return;
602
+ }
603
+ if (event.target.closest('.ds-chart-tooltip-pane')) {
604
+ this.cancelCategoryClear();
605
+ return;
606
+ }
607
+ if (this.activeCategory() !== -1 &&
608
+ !this.host.nativeElement.contains(event.target)) {
609
+ this.clearActiveCategory();
610
+ }
611
+ }
612
+ cancelCategoryClear() {
613
+ if (this.pendingCategoryClear !== null) {
614
+ clearTimeout(this.pendingCategoryClear);
615
+ this.pendingCategoryClear = null;
616
+ }
617
+ }
618
+ tooltipLingerResolved = resolveWithConfig(this.tooltipLingerMs, (config) => config.chart?.tooltipLingerMs, 0);
619
+ pendingCategoryClear = null;
620
+ releaseCategoryPin() {
621
+ this.pinnedCategory.set(false);
444
622
  this.activeCategory.set(-1);
445
623
  this.tooltipOrigin.set(null);
446
624
  }
@@ -449,6 +627,10 @@ class LineChartComponent {
449
627
  * `'item'` names only the marker itself. */
450
628
  tooltip = input('axis', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
451
629
  tooltipTemplate = contentChild('dsChartTooltip', ...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
630
+ /** Where the tooltip is pinned. `'point'`, the default, is the highest reading in the category,
631
+ * so the panel stays put while the pointer moves within one band. `'pointer'` follows the
632
+ * cursor. */
633
+ tooltipAnchor = input('point', ...(ngDevMode ? [{ debugName: "tooltipAnchor" }] : /* istanbul ignore next */ []));
452
634
  tooltipOrigin = signal(null, ...(ngDevMode ? [{ debugName: "tooltipOrigin" }] : /* istanbul ignore next */ []));
453
635
  /** The series focus is on, or -1 for the whole category. A pointer answers for every
454
636
  * series at once; a focused marker answers for its own. */
@@ -503,7 +685,7 @@ class LineChartComponent {
503
685
  categoryIndex >= categories.length) {
504
686
  return null;
505
687
  }
506
- const format = this.valueFormat();
688
+ const format = this.valueFormatResolved();
507
689
  const focusedSeries = this.activeSeries();
508
690
  const perSeries = this.tooltip() === 'item' || focusedSeries >= 0
509
691
  ? this.visibleSeries().slice(Math.max(focusedSeries, 0), Math.max(focusedSeries, 0) + 1)
@@ -528,6 +710,10 @@ class LineChartComponent {
528
710
  secondaryTopY = computed(() => this.layout().secondaryPlot.top, ...(ngDevMode ? [{ debugName: "secondaryTopY" }] : /* istanbul ignore next */ []));
529
711
  primaryBaselineY = computed(() => baselineOf(this.layout().primaryPlot), ...(ngDevMode ? [{ debugName: "primaryBaselineY" }] : /* istanbul ignore next */ []));
530
712
  secondaryBaselineY = computed(() => baselineOf(this.layout().secondaryPlot), ...(ngDevMode ? [{ debugName: "secondaryBaselineY" }] : /* istanbul ignore next */ []));
713
+ /** Where the crosshair stops. Under `'stacked'` the two plots sit one above the other over one
714
+ * category axis, so a crosshair that ends at the upper plot's baseline leaves the lower plot —
715
+ * the same category, the same pointer — with nothing marked at all. */
716
+ cursorBottomY = computed(() => this.stacked() ? this.secondaryBaselineY() : this.primaryBaselineY(), ...(ngDevMode ? [{ debugName: "cursorBottomY" }] : /* istanbul ignore next */ []));
531
717
  primaryLabelX = computed(() => this.layout().primaryPlot.left - LINE_CHART_AXIS_LABEL_GAP, ...(ngDevMode ? [{ debugName: "primaryLabelX" }] : /* istanbul ignore next */ []));
532
718
  secondaryLabelX = computed(() => {
533
719
  const layout = this.layout();
@@ -549,7 +735,7 @@ class LineChartComponent {
549
735
  return labels;
550
736
  }, ...(ngDevMode ? [{ debugName: "categoryLabels" }] : /* istanbul ignore next */ []));
551
737
  tableRows = computed(() => {
552
- const format = this.valueFormat();
738
+ const format = this.valueFormatResolved();
553
739
  return this.categories().map((category, index) => ({
554
740
  category,
555
741
  cells: this.resolvedSeries().map((entry) => {
@@ -564,15 +750,21 @@ class LineChartComponent {
564
750
  return summary;
565
751
  }
566
752
  const title = this.caption() ?? 'Chart';
567
- const format = this.valueFormat();
753
+ const format = this.valueFormatResolved();
568
754
  const categories = this.categories();
569
755
  // The pointer belongs to the WHOLE chart, not to each series, or a two-series plot promises
570
756
  // the table twice.
571
757
  const sentences = this.resolvedSeries().map((entry) => describeSeries(entry.series.label, entry.values.flatMap((value, index) => value === null ? [] : [{ label: categories[index] ?? '', value }]), format, false));
572
- const pointer = this.dataTable() === 'none' ? '' : ' Full values in the table below.';
758
+ const pointer = this.dataTableResolved() === 'none'
759
+ ? ''
760
+ : ' Full values in the table below.';
761
+ // The plot's own text is inside an `aria-hidden` svg, so an annotation a sighted reader takes
762
+ // as the point of the chart would otherwise reach nobody else.
763
+ const notes = this.placedAnnotations().map((note) => note.label);
764
+ const noted = notes.length ? ` Noted: ${notes.join('; ')}.` : '';
573
765
  return sentences.length === 0
574
- ? describeSeries(title, [], format, this.dataTable() !== 'none')
575
- : `${title}. ${sentences.join(' ')}${pointer}`;
766
+ ? describeSeries(title, [], format, this.dataTableResolved() !== 'none')
767
+ : `${title}. ${sentences.join(' ')}${noted}${pointer}`;
576
768
  }, ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
577
769
  pointOf(entry, marker) {
578
770
  return {
@@ -584,14 +776,23 @@ class LineChartComponent {
584
776
  }
585
777
  markerLabel(entry, marker) {
586
778
  const point = this.pointOf(entry, marker);
587
- return `${entry.series.label}, ${point.category}, ${this.valueFormat()(marker.value)}`;
779
+ return `${entry.series.label}, ${point.category}, ${this.valueFormatResolved()(marker.value)}`;
588
780
  }
589
781
  onMarkerKey(entry, marker, event) {
590
782
  if (!this.interactive() || event.target !== event.currentTarget) {
591
783
  return;
592
784
  }
593
785
  event.preventDefault();
786
+ this.onMarkerClick(entry, marker);
787
+ }
788
+ /** The pin hangs off the MARKER, not off the plot: the marker is already focusable and already
789
+ * answers Enter and Space, so the keyboard gets the pin for free. A click handler on the plot
790
+ * would have no keyboard route at all. A second activation of the pinned category releases it. */
791
+ onMarkerClick(entry, marker) {
594
792
  this.pointClicked.emit(this.pointOf(entry, marker));
793
+ if (this.pinOnClick()) {
794
+ this.pinnedCategory.set(!this.pinnedCategory());
795
+ }
595
796
  }
596
797
  isEmpty = computed(() => this.series().length === 0 || this.categories().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
597
798
  showLegend = computed(() => this.series().length > 1, ...(ngDevMode ? [{ debugName: "showLegend" }] : /* istanbul ignore next */ []));
@@ -609,19 +810,23 @@ class LineChartComponent {
609
810
  ticksFor(ticks, axisMax, onSecondaryAxis) {
610
811
  const plot = this.plotFor(onSecondaryAxis);
611
812
  const step = tickStep(ticks);
612
- const format = this.valueFormat();
813
+ const format = this.valueFormatResolved();
613
814
  return ticks.map((value) => ({
614
815
  y: valueY(value, axisMax, plot),
615
816
  label: format === defaultValueFormat ? formatTick(value, step) : format(value),
616
817
  }));
617
818
  }
618
819
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: LineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
619
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: LineChartComponent, isStandalone: true, selector: "ds-line-chart", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, yAxisMode: { classPropertyName: "yAxisMode", publicName: "yAxisMode", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, gaps: { classPropertyName: "gaps", publicName: "gaps", 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 }, hiddenSeries: { classPropertyName: "hiddenSeries", publicName: "hiddenSeries", isSignal: true, isRequired: false, transformFunction: null }, rescaleOnHide: { classPropertyName: "rescaleOnHide", publicName: "rescaleOnHide", isSignal: true, isRequired: false, transformFunction: null }, legendFilters: { classPropertyName: "legendFilters", publicName: "legendFilters", isSignal: true, isRequired: false, transformFunction: null }, noVisibleSeriesText: { classPropertyName: "noVisibleSeriesText", publicName: "noVisibleSeriesText", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", 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 } }, outputs: { pointClicked: "pointClicked", hiddenSeries: "hiddenSeriesChange" }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"line-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 {{ errorText() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_line-chart-plot-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyText() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n (pointermove)=\"onPlotPointer($event)\"\n (pointerdown)=\"onPlotPointer($event)\"\n (pointerleave)=\"clearActiveCategory()\">\n @if (activeCategory() >= 0) {\n <rect\n class=\"category-band\"\n aria-hidden=\"true\"\n [attr.x]=\"activeBandX()\"\n [attr.y]=\"primaryTopY()\"\n [attr.width]=\"activeBandWidth()\"\n [attr.height]=\"primaryBaselineY() - primaryTopY()\" />\n\n <line\n class=\"cursor-line\"\n aria-hidden=\"true\"\n [attr.x1]=\"activeCategoryX()\"\n [attr.x2]=\"activeCategoryX()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n }\n\n @for (tick of primaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n [class.secondary]=\"!stacked()\" />\n }\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"primaryBaselineY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryBaselineY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"secondaryTopY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (path of entry.areaPaths; track $index) {\n <path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (points of entry.polylines; track $index) {\n <polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n [attr.stroke-dasharray]=\"entry.dash\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (marker of entry.markers; track marker.categoryIndex) {\n <circle\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.categoryIndex === activeCategory()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.data-series-index]=\"seriesIndex\"\n [attr.data-mark-index]=\"marker.categoryIndex\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.categoryIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"\n interactive() ? markerLabel(entry, marker) : null\n \"\n (focus)=\"\n onMarkerFocus(seriesIndex, marker.categoryIndex, $event)\n \"\n (blur)=\"onMarkerBlur()\"\n (keydown)=\"\n onMarkerNavigation($event, seriesIndex, marker.categoryIndex)\n \"\n (click)=\"pointClicked.emit(pointOf(entry, marker))\"\n (keydown.enter)=\"onMarkerKey(entry, marker, $event)\"\n (keydown.space)=\"onMarkerKey(entry, marker, $event)\" />\n }\n }\n }\n\n @for (tick of primaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"primaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n </svg>\n </div>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTable() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTable() === '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 Category\n </th>\n\n @for (entry of resolvedSeries(); track entry.series.id) {\n <th scope=\"col\">\n {{ entry.series.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track $index) {\n <tr>\n <th scope=\"row\">\n {{ row.category }}\n </th>\n\n @for (cell of row.cells; track $index) {\n <td>\n {{ cell }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: [":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-enter{0%{opacity:0;transform:scale(.94)}}@keyframes ds-chart-mark-exit{to{opacity:0;transform:scale(.94)}}.series-line{transform-box:fill-box;transform-origin:center}.series-line.mark-enter{animation:ds-chart-mark-enter 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}.series-line.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-area{transform-box:fill-box;transform-origin:center}.series-area.mark-enter{animation:ds-chart-mark-enter 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}.series-area.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-marker{transform-box:fill-box;transform-origin:center}.series-marker.mark-enter{animation:ds-chart-mark-enter 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}.series-marker.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)}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{margin:0;color:var(--text-secondary)}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_line-chart-grid-line-color);stroke-width:1}.grid-line.secondary{stroke-dasharray:4 4}.axis-line{stroke:var(--_line-chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_line-chart-axis-label-color);font-size:var(--_line-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.series-area{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-area.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-line{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-line.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-marker{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-area{fill-opacity:var(--_line-chart-area-opacity);stroke:none}.series-line{fill:none;stroke-width:var(--_line-chart-line-width);stroke-linecap:round;stroke-linejoin:round;transition:stroke-width var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.plot:has(.series-line.is-dimmed) .series-line:not(.is-dimmed){stroke-width:var(--_line-chart-line-width-bold)}.series-marker{r:var(--_line-chart-dot-radius)}.category-band{fill:var(--_line-chart-hover-bg-color)}.cursor-line{stroke:var(--_line-chart-cursor-line-color);stroke-width:1}.series-marker{transition:r var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-active{r:var(--_line-chart-dot-radius-active)}.series-marker.ghost.is-active{fill-opacity:1}.series-marker.interactive{cursor:pointer;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke}@media(hover:none)and (pointer:coarse){.series-marker.interactive{stroke-width:44px}}.series-marker.ghost{fill-opacity:0}.series-marker.ghost:hover,.series-marker.ghost:focus-visible{fill-opacity:1}@media not (forced-colors:active){.series-marker.interactive:focus-visible{outline:none}}.series-marker.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color));r:var(--_line-chart-dot-radius-active)}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-swatch{flex:none;inline-size:var(--_line-chart-swatch-size);block-size:var(--_line-chart-swatch-size);border-radius:var(--radius-pill)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}.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"] }, { kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
820
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: LineChartComponent, isStandalone: true, selector: "ds-line-chart", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, yAxisMode: { classPropertyName: "yAxisMode", publicName: "yAxisMode", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, annotations: { classPropertyName: "annotations", publicName: "annotations", 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 }, gaps: { classPropertyName: "gaps", publicName: "gaps", 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 }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, maxSecondary: { classPropertyName: "maxSecondary", publicName: "maxSecondary", 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 }, hiddenSeries: { classPropertyName: "hiddenSeries", publicName: "hiddenSeries", isSignal: true, isRequired: false, transformFunction: null }, rescaleOnHide: { classPropertyName: "rescaleOnHide", publicName: "rescaleOnHide", isSignal: true, isRequired: false, transformFunction: null }, legendFilters: { classPropertyName: "legendFilters", publicName: "legendFilters", isSignal: true, isRequired: false, transformFunction: null }, legendMode: { classPropertyName: "legendMode", publicName: "legendMode", isSignal: true, isRequired: false, transformFunction: null }, noVisibleSeriesText: { classPropertyName: "noVisibleSeriesText", publicName: "noVisibleSeriesText", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", 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", hiddenSeries: "hiddenSeriesChange" }, host: { listeners: { "document:keydown.escape": "releaseCategoryPin()", "document:pointerover": "onPointerAnywhere($event)" }, properties: { "class.framed": "frameResolved() === 'auto'" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"line-chart\">\n @if (pinnedCategory()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"releaseCategoryPin()\">\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 <ds-skeleton height=\"var(--_line-chart-plot-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n (pointermove)=\"onPlotPointer($event)\"\n (pointerdown)=\"onPlotPointer($event)\"\n (pointerleave)=\"clearActiveCategory()\">\n @if (activeCategory() >= 0) {\n <g\n class=\"cursor\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\"\n [style.transform]=\"'translateX(' + activeBandX() + 'px)'\">\n <rect\n class=\"category-band\"\n aria-hidden=\"true\"\n x=\"0\"\n [attr.y]=\"primaryTopY()\"\n [attr.width]=\"activeBandWidth()\"\n [attr.height]=\"cursorBottomY() - primaryTopY()\" />\n\n <line\n class=\"cursor-line\"\n aria-hidden=\"true\"\n [attr.x1]=\"activeBandWidth() / 2\"\n [attr.x2]=\"activeBandWidth() / 2\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"cursorBottomY()\" />\n </g>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n [class.secondary]=\"!stacked()\" />\n }\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"primaryBaselineY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryBaselineY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"secondaryTopY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (path of entry.areaPaths; track $index) {\n <path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (points of entry.polylines; track $index) {\n <polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-dasharray]=\"entry.dash\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (marker of entry.markers; track marker.categoryIndex) {\n <circle\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.categoryIndex === activeCategory()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.data-series-index]=\"seriesIndex\"\n [attr.data-mark-index]=\"marker.categoryIndex\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.categoryIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"\n interactive() ? markerLabel(entry, marker) : null\n \"\n (focus)=\"\n onMarkerFocus(seriesIndex, marker.categoryIndex, $event)\n \"\n (blur)=\"onMarkerBlur()\"\n (keydown)=\"\n onMarkerNavigation($event, seriesIndex, marker.categoryIndex)\n \"\n (click)=\"onMarkerClick(entry, marker)\"\n (keydown.enter)=\"onMarkerKey(entry, marker, $event)\"\n (keydown.space)=\"onMarkerKey(entry, marker, $event)\" />\n }\n }\n }\n\n @for (note of placedAnnotations(); track note.key) {\n <text\n class=\"annotation\"\n aria-hidden=\"true\"\n [attr.x]=\"note.x\"\n [attr.y]=\"note.y\"\n [attr.text-anchor]=\"note.anchor\">\n {{ note.label }}\n </text>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"primaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n </svg>\n </div>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\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 <th scope=\"col\">\n Category\n </th>\n\n @for (entry of resolvedSeries(); track entry.series.id) {\n <th scope=\"col\">\n {{ entry.series.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track $index) {\n <tr>\n <th scope=\"row\">\n {{ row.category }}\n </th>\n\n @for (cell of row.cells; track $index) {\n <td>\n {{ cell }}\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}}.series-line.mark-enter{animation:ds-chart-mark-fade-in 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}.series-line.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-area.mark-enter{animation:ds-chart-mark-fade-in 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}.series-area.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-marker.mark-enter{animation:ds-chart-mark-fade-in 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}.series-marker.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}@media not (forced-colors:active){.series-marker:focus{outline:none}}.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)}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-color: var(--ds-line-chart-annotation-color, var(--text-primary));--_line-chart-annotation-font-size: var(--ds-line-chart-annotation-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-weight: var(--ds-line-chart-annotation-weight, var(--font-weight-bold));--_line-chart-annotation-halo-color: var(--ds-line-chart-annotation-halo-color, var(--surface-default));--_line-chart-annotation-halo-width: var(--ds-line-chart-annotation-halo-width, 3px);--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);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(--_line-chart-plot-height);margin:0;color:var(--text-secondary);text-align:center}.empty{aspect-ratio:640/320;inline-size:100%}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_line-chart-grid-line-color);stroke-width:1}.grid-line.secondary{stroke-dasharray:4 4}.axis-line{stroke:var(--_line-chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_line-chart-axis-label-color);font-size:var(--_line-chart-axis-font-size)}.annotation{fill:var(--_line-chart-annotation-color);font-size:var(--_line-chart-annotation-font-size);font-weight:var(--_line-chart-annotation-weight);paint-order:stroke;stroke:var(--_line-chart-annotation-halo-color);stroke-width:var(--_line-chart-annotation-halo-width);stroke-linejoin:round}.axis-label{dominant-baseline:middle}.series-area{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.series-area.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-line{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),stroke var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),stroke-width var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-line.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-marker{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),r var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-area{fill-opacity:var(--_line-chart-area-opacity);stroke:none}.series-line{fill:none;stroke-width:var(--_line-chart-line-width);stroke-linecap:round;stroke-linejoin:round}.plot:has(.series-line.is-dimmed) .series-line:not(.is-dimmed){stroke-width:var(--_line-chart-line-width-bold)}.series-marker{r:var(--_line-chart-dot-radius)}.cursor.cursor-in{animation:ds-chart-mark-fade-in var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.cursor.cursor-out{animation:ds-chart-mark-exit var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.category-band{fill:var(--_line-chart-hover-bg-color)}.cursor-line{stroke:var(--_line-chart-cursor-line-color);stroke-width:1}.series-marker.is-active{r:var(--_line-chart-dot-radius-active)}.series-marker.ghost.is-active{fill-opacity:1}.series-marker.interactive{cursor:pointer;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke}@media(hover:none)and (pointer:coarse){.series-marker.interactive{stroke-width:44px}}.series-marker.ghost{fill-opacity:0}.series-marker.ghost:hover,.series-marker.ghost:focus-visible{fill-opacity:1}@media not (forced-colors:active){.series-marker.interactive:focus-visible{outline:none}}.series-marker.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color));r:var(--_line-chart-dot-radius-active)}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-swatch{flex:none;inline-size:var(--_line-chart-swatch-size);block-size:var(--_line-chart-swatch-size);border-radius:var(--radius-pill)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}.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)}\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: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
620
821
  }
621
822
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: LineChartComponent, decorators: [{
622
823
  type: Component,
623
- args: [{ selector: 'ds-line-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective, ChartLegendComponent], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"line-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 {{ errorText() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_line-chart-plot-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyText() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n (pointermove)=\"onPlotPointer($event)\"\n (pointerdown)=\"onPlotPointer($event)\"\n (pointerleave)=\"clearActiveCategory()\">\n @if (activeCategory() >= 0) {\n <rect\n class=\"category-band\"\n aria-hidden=\"true\"\n [attr.x]=\"activeBandX()\"\n [attr.y]=\"primaryTopY()\"\n [attr.width]=\"activeBandWidth()\"\n [attr.height]=\"primaryBaselineY() - primaryTopY()\" />\n\n <line\n class=\"cursor-line\"\n aria-hidden=\"true\"\n [attr.x1]=\"activeCategoryX()\"\n [attr.x2]=\"activeCategoryX()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n }\n\n @for (tick of primaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n [class.secondary]=\"!stacked()\" />\n }\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"primaryBaselineY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryBaselineY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"secondaryTopY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (path of entry.areaPaths; track $index) {\n <path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (points of entry.polylines; track $index) {\n <polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n [attr.stroke-dasharray]=\"entry.dash\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (marker of entry.markers; track marker.categoryIndex) {\n <circle\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.categoryIndex === activeCategory()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.data-series-index]=\"seriesIndex\"\n [attr.data-mark-index]=\"marker.categoryIndex\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.categoryIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"\n interactive() ? markerLabel(entry, marker) : null\n \"\n (focus)=\"\n onMarkerFocus(seriesIndex, marker.categoryIndex, $event)\n \"\n (blur)=\"onMarkerBlur()\"\n (keydown)=\"\n onMarkerNavigation($event, seriesIndex, marker.categoryIndex)\n \"\n (click)=\"pointClicked.emit(pointOf(entry, marker))\"\n (keydown.enter)=\"onMarkerKey(entry, marker, $event)\"\n (keydown.space)=\"onMarkerKey(entry, marker, $event)\" />\n }\n }\n }\n\n @for (tick of primaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"primaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n </svg>\n </div>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTable() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTable() === '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 Category\n </th>\n\n @for (entry of resolvedSeries(); track entry.series.id) {\n <th scope=\"col\">\n {{ entry.series.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track $index) {\n <tr>\n <th scope=\"row\">\n {{ row.category }}\n </th>\n\n @for (cell of row.cells; track $index) {\n <td>\n {{ cell }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: [":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-enter{0%{opacity:0;transform:scale(.94)}}@keyframes ds-chart-mark-exit{to{opacity:0;transform:scale(.94)}}.series-line{transform-box:fill-box;transform-origin:center}.series-line.mark-enter{animation:ds-chart-mark-enter 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}.series-line.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-area{transform-box:fill-box;transform-origin:center}.series-area.mark-enter{animation:ds-chart-mark-enter 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}.series-area.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-marker{transform-box:fill-box;transform-origin:center}.series-marker.mark-enter{animation:ds-chart-mark-enter 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}.series-marker.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)}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{margin:0;color:var(--text-secondary)}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_line-chart-grid-line-color);stroke-width:1}.grid-line.secondary{stroke-dasharray:4 4}.axis-line{stroke:var(--_line-chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_line-chart-axis-label-color);font-size:var(--_line-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.series-area{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-area.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-line{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-line.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-marker{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-area{fill-opacity:var(--_line-chart-area-opacity);stroke:none}.series-line{fill:none;stroke-width:var(--_line-chart-line-width);stroke-linecap:round;stroke-linejoin:round;transition:stroke-width var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.plot:has(.series-line.is-dimmed) .series-line:not(.is-dimmed){stroke-width:var(--_line-chart-line-width-bold)}.series-marker{r:var(--_line-chart-dot-radius)}.category-band{fill:var(--_line-chart-hover-bg-color)}.cursor-line{stroke:var(--_line-chart-cursor-line-color);stroke-width:1}.series-marker{transition:r var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-active{r:var(--_line-chart-dot-radius-active)}.series-marker.ghost.is-active{fill-opacity:1}.series-marker.interactive{cursor:pointer;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke}@media(hover:none)and (pointer:coarse){.series-marker.interactive{stroke-width:44px}}.series-marker.ghost{fill-opacity:0}.series-marker.ghost:hover,.series-marker.ghost:focus-visible{fill-opacity:1}@media not (forced-colors:active){.series-marker.interactive:focus-visible{outline:none}}.series-marker.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color));r:var(--_line-chart-dot-radius-active)}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-swatch{flex:none;inline-size:var(--_line-chart-swatch-size);block-size:var(--_line-chart-swatch-size);border-radius:var(--radius-pill)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}.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"] }]
624
- }], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], yAxisMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisMode", required: false }] }], showMarkers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkers", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }], gaps: [{ type: i0.Input, args: [{ isSignal: true, alias: "gaps", 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 }] }], hiddenSeries: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenSeries", required: false }] }, { type: i0.Output, args: ["hiddenSeriesChange"] }], rescaleOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "rescaleOnHide", required: false }] }], legendFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendFilters", required: false }] }], noVisibleSeriesText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noVisibleSeriesText", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", 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 }] }] } });
824
+ args: [{ selector: 'ds-line-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective, ChartLegendComponent], host: {
825
+ '[class.framed]': "frameResolved() === 'auto'",
826
+ '(document:keydown.escape)': 'releaseCategoryPin()',
827
+ '(document:pointerover)': 'onPointerAnywhere($event)',
828
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"line-chart\">\n @if (pinnedCategory()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"releaseCategoryPin()\">\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 <ds-skeleton height=\"var(--_line-chart-plot-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n (pointermove)=\"onPlotPointer($event)\"\n (pointerdown)=\"onPlotPointer($event)\"\n (pointerleave)=\"clearActiveCategory()\">\n @if (activeCategory() >= 0) {\n <g\n class=\"cursor\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\"\n [style.transform]=\"'translateX(' + activeBandX() + 'px)'\">\n <rect\n class=\"category-band\"\n aria-hidden=\"true\"\n x=\"0\"\n [attr.y]=\"primaryTopY()\"\n [attr.width]=\"activeBandWidth()\"\n [attr.height]=\"cursorBottomY() - primaryTopY()\" />\n\n <line\n class=\"cursor-line\"\n aria-hidden=\"true\"\n [attr.x1]=\"activeBandWidth() / 2\"\n [attr.x2]=\"activeBandWidth() / 2\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"cursorBottomY()\" />\n </g>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n [class.secondary]=\"!stacked()\" />\n }\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"primaryBaselineY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryBaselineY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"secondaryTopY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (path of entry.areaPaths; track $index) {\n <path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (points of entry.polylines; track $index) {\n <polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-dasharray]=\"entry.dash\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (marker of entry.markers; track marker.categoryIndex) {\n <circle\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.categoryIndex === activeCategory()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.data-series-index]=\"seriesIndex\"\n [attr.data-mark-index]=\"marker.categoryIndex\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.categoryIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"\n interactive() ? markerLabel(entry, marker) : null\n \"\n (focus)=\"\n onMarkerFocus(seriesIndex, marker.categoryIndex, $event)\n \"\n (blur)=\"onMarkerBlur()\"\n (keydown)=\"\n onMarkerNavigation($event, seriesIndex, marker.categoryIndex)\n \"\n (click)=\"onMarkerClick(entry, marker)\"\n (keydown.enter)=\"onMarkerKey(entry, marker, $event)\"\n (keydown.space)=\"onMarkerKey(entry, marker, $event)\" />\n }\n }\n }\n\n @for (note of placedAnnotations(); track note.key) {\n <text\n class=\"annotation\"\n aria-hidden=\"true\"\n [attr.x]=\"note.x\"\n [attr.y]=\"note.y\"\n [attr.text-anchor]=\"note.anchor\">\n {{ note.label }}\n </text>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"primaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n </svg>\n </div>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\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 <th scope=\"col\">\n Category\n </th>\n\n @for (entry of resolvedSeries(); track entry.series.id) {\n <th scope=\"col\">\n {{ entry.series.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track $index) {\n <tr>\n <th scope=\"row\">\n {{ row.category }}\n </th>\n\n @for (cell of row.cells; track $index) {\n <td>\n {{ cell }}\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}}.series-line.mark-enter{animation:ds-chart-mark-fade-in 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}.series-line.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-area.mark-enter{animation:ds-chart-mark-fade-in 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}.series-area.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-marker.mark-enter{animation:ds-chart-mark-fade-in 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}.series-marker.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}@media not (forced-colors:active){.series-marker:focus{outline:none}}.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)}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-color: var(--ds-line-chart-annotation-color, var(--text-primary));--_line-chart-annotation-font-size: var(--ds-line-chart-annotation-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-weight: var(--ds-line-chart-annotation-weight, var(--font-weight-bold));--_line-chart-annotation-halo-color: var(--ds-line-chart-annotation-halo-color, var(--surface-default));--_line-chart-annotation-halo-width: var(--ds-line-chart-annotation-halo-width, 3px);--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);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(--_line-chart-plot-height);margin:0;color:var(--text-secondary);text-align:center}.empty{aspect-ratio:640/320;inline-size:100%}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_line-chart-grid-line-color);stroke-width:1}.grid-line.secondary{stroke-dasharray:4 4}.axis-line{stroke:var(--_line-chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_line-chart-axis-label-color);font-size:var(--_line-chart-axis-font-size)}.annotation{fill:var(--_line-chart-annotation-color);font-size:var(--_line-chart-annotation-font-size);font-weight:var(--_line-chart-annotation-weight);paint-order:stroke;stroke:var(--_line-chart-annotation-halo-color);stroke-width:var(--_line-chart-annotation-halo-width);stroke-linejoin:round}.axis-label{dominant-baseline:middle}.series-area{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.series-area.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-line{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),stroke var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),stroke-width var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-line.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-marker{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),r var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-area{fill-opacity:var(--_line-chart-area-opacity);stroke:none}.series-line{fill:none;stroke-width:var(--_line-chart-line-width);stroke-linecap:round;stroke-linejoin:round}.plot:has(.series-line.is-dimmed) .series-line:not(.is-dimmed){stroke-width:var(--_line-chart-line-width-bold)}.series-marker{r:var(--_line-chart-dot-radius)}.cursor.cursor-in{animation:ds-chart-mark-fade-in var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.cursor.cursor-out{animation:ds-chart-mark-exit var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.category-band{fill:var(--_line-chart-hover-bg-color)}.cursor-line{stroke:var(--_line-chart-cursor-line-color);stroke-width:1}.series-marker.is-active{r:var(--_line-chart-dot-radius-active)}.series-marker.ghost.is-active{fill-opacity:1}.series-marker.interactive{cursor:pointer;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke}@media(hover:none)and (pointer:coarse){.series-marker.interactive{stroke-width:44px}}.series-marker.ghost{fill-opacity:0}.series-marker.ghost:hover,.series-marker.ghost:focus-visible{fill-opacity:1}@media not (forced-colors:active){.series-marker.interactive:focus-visible{outline:none}}.series-marker.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color));r:var(--_line-chart-dot-radius-active)}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-swatch{flex:none;inline-size:var(--_line-chart-swatch-size);block-size:var(--_line-chart-swatch-size);border-radius:var(--radius-pill)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}.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)}\n"] }]
829
+ }], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], yAxisMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisMode", required: false }] }], showMarkers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkers", required: false }] }], annotations: [{ type: i0.Input, args: [{ isSignal: true, alias: "annotations", 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 }] }], gaps: [{ type: i0.Input, args: [{ isSignal: true, alias: "gaps", 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 }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], maxSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSecondary", 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 }] }], hiddenSeries: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenSeries", required: false }] }, { type: i0.Output, args: ["hiddenSeriesChange"] }], rescaleOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "rescaleOnHide", required: false }] }], legendFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendFilters", required: false }] }], legendMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendMode", required: false }] }], noVisibleSeriesText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noVisibleSeriesText", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", 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 }] }] } });
625
830
 
626
831
  /**
627
832
  * Generated bundle index. Do not edit.