@ids-group-ltd/ids-design-system 0.14.6 → 0.14.7

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 (63) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/components.md +5 -4
  3. package/docs/agent/forms/ds-button.md +2 -2
  4. package/docs/agent/overlays/ds-drawer.md +1 -1
  5. package/docs/agent/overlays/ds-modal-card.md +1 -1
  6. package/docs/agent/overlays/ds-modal.md +1 -1
  7. package/docs/agent/platform/toast-service.md +1 -0
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +4 -4
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +16 -9
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +16 -8
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -3
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +68 -10
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +15 -5
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +63 -11
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +96 -5
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +4 -4
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +14 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +18 -10
  39. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +126 -9
  41. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +17 -6
  43. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +5 -2
  45. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  48. package/migrations/0.14.7.json +140 -0
  49. package/migrations/0.4.0.json +3 -1
  50. package/package.json +1 -1
  51. package/schematics/check-overrides/surface.json +9 -10
  52. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +4 -2
  53. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +4 -3
  54. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +1 -1
  55. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +19 -4
  56. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -1
  57. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +21 -4
  58. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +22 -3
  59. package/types/ids-group-ltd-ids-design-system-components.d.ts +7 -2
  60. package/types/ids-group-ltd-ids-design-system-core.d.ts +33 -3
  61. package/types/ids-group-ltd-ids-design-system-icons.d.ts +3 -1
  62. package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -2
  63. package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-tooltip.mjs","sources":["../../../src/lib/components/chart-tooltip/swatch-contrast.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.html","../../../src/lib/components/chart-tooltip/chart-tooltip.directive.ts","../../../src/lib/components/chart-tooltip/chart-active-mark.ts","../../../src/lib/components/chart-tooltip/chart-pin-marker.component.ts","../../../src/lib/components/chart-tooltip/chart-unpin.component.ts","../../../src/lib/components/chart-tooltip/chart-states.component.ts","../../../src/lib/components/chart-tooltip/ids-group-ltd-ids-design-system-components-chart-tooltip.ts"],"sourcesContent":["// Below this the dot reads as the panel itself, as the palest heat step does on a light panel (1.14:1).\n// A merely low-contrast hue still reads as a colour next to its label and takes no ring.\nconst SAME_AS_GROUND = 1.5;\n\nlet probe: CanvasRenderingContext2D | null = null;\nconst blendsByPair = new Map<string, boolean>();\n\n// Painting and reading the pixel back resolves any CSS colour syntax (`oklch()`, `color-mix()`) to sRGB.\nfunction srgbOf(color: string): readonly [number, number, number] {\n if (!probe) {\n const canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n probe = canvas.getContext('2d', { willReadFrequently: true });\n }\n if (!probe) {\n return [0, 0, 0];\n }\n probe.clearRect(0, 0, 1, 1);\n probe.fillStyle = color;\n probe.fillRect(0, 0, 1, 1);\n const [red, green, blue] = probe.getImageData(0, 0, 1, 1).data;\n\n return [red, green, blue];\n}\n\nfunction relativeLuminance([red, green, blue]: readonly [\n number,\n number,\n number,\n]): number {\n const linear = (channel: number): number => {\n const value = channel / 255;\n\n return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;\n };\n\n return 0.2126 * linear(red) + 0.7152 * linear(green) + 0.0722 * linear(blue);\n}\n\n/** Whether `color` is close enough to `ground` to vanish into it and needs a ring. Both are computed CSS colours. */\nexport function swatchBlendsInto(color: string, ground: string): boolean {\n const pair = `${color}|${ground}`;\n const known = blendsByPair.get(pair);\n if (known !== undefined) {\n return known;\n }\n const swatchLuminance = relativeLuminance(srgbOf(color));\n const groundLuminance = relativeLuminance(srgbOf(ground));\n const ratio =\n (Math.max(swatchLuminance, groundLuminance) + 0.05) /\n (Math.min(swatchLuminance, groundLuminance) + 0.05);\n const blends = ratio < SAME_AS_GROUND;\n blendsByPair.set(pair, blends);\n\n return blends;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ChartTooltipContext } from './chart-tooltip.types';\nimport { swatchBlendsInto } from './swatch-contrast';\n\nconst AUTO_SWATCH_MIN = 2;\nconst AUTO_SWATCH_MAX = 4;\n\n@Component({\n selector: 'ds-chart-tooltip-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './chart-tooltip-panel.component.html',\n styleUrl: './chart-tooltip-panel.component.scss',\n host: {\n // Hidden from AT: every interactive mark's `aria-label` already carries the reading.\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartTooltipPanelComponent {\n /** The category and the readings the panel prints. */\n readonly context = input.required<ChartTooltipContext>();\n /** The chart's projected `#dsChartTooltip` template. Null renders the built-in rows. */\n readonly template = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n readonly swatches = input<boolean | 'auto'>('auto');\n\n protected readonly showsSwatches = computed(() => {\n const swatches = this.swatches();\n\n const count = this.context().entries.length;\n\n return swatches === 'auto'\n ? count >= AUTO_SWATCH_MIN && count <= AUTO_SWATCH_MAX\n : swatches;\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n afterRenderEffect({\n earlyRead: () => {\n this.context();\n const host = this.host.nativeElement;\n const ground = getComputedStyle(host).backgroundColor;\n\n return [...host.querySelectorAll<HTMLElement>('.swatch')].map(\n (swatch) =>\n [\n swatch,\n swatchBlendsInto(\n getComputedStyle(swatch).backgroundColor,\n ground,\n ),\n ] as const,\n );\n },\n write: (swatches) => {\n for (const [swatch, blends] of swatches()) {\n swatch.classList.toggle('ringed', blends);\n }\n },\n });\n }\n}\n","@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul\n class=\"entries\"\n [class.no-swatches]=\"!showsSwatches()\">\n @for (entry of context().entries; track $index) {\n <li class=\"entry\">\n @if (showsSwatches()) {\n <span\n class=\"swatch\"\n [class.hatched]=\"entry.hatched\"\n [style.background-color]=\"entry.color\">\n </span>\n }\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n\n @if (entry.detail) {\n <span class=\"detail\">\n {{ entry.detail }}\n </span>\n }\n </li>\n }\n </ul>\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n type FlexibleConnectedPositionStrategyOrigin,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n closeOnScroll,\n disposeWithLeave,\n forwardOverlayTokens,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { ChartTooltipPanelComponent } from './chart-tooltip-panel.component';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from './chart-tooltip.types';\n\nconst POINTER_GAP_PX = 10;\n// Portaled to the body, so a chart's own values reach the panel only by being copied.\nconst CHART_TOOLTIP_TOKENS = [\n '--ds-chart-tooltip-bg-color',\n '--ds-chart-tooltip-text-color',\n '--ds-chart-tooltip-border-color',\n] as const;\n// A fingertip covers roughly 40 CSS px, so a touch-opened panel clears the tap point further.\nconst TOUCH_GAP_PX = 48;\n\n// Must equal the `--space-3` in the panel's `max-height`.\nconst VIEWPORT_MARGIN_PX = 12;\n\n// Four fallbacks let the panel flip out of a small card instead of being clipped. Above first.\nfunction positionsFor(gap: number): ConnectedPosition[] {\n return [\n {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -gap,\n },\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: gap,\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: gap,\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -gap,\n },\n ];\n}\n\n/** The chart tooltip: a non-null context opens the panel, null closes it. @internal */\n@Directive({\n selector: '[dsChartTooltip]',\n standalone: true,\n})\nexport class ChartTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly dsChartTooltip = input<ChartTooltipContext | null>(null);\n readonly dsChartTooltipOrigin = input<ChartTooltipOrigin | null>(null);\n readonly dsChartTooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n /** Extra clearance between the mark and the panel, for text printed above the mark. Ignored for touch. */\n readonly dsChartTooltipExtraGap = input(0);\n\n /** A held panel takes the pointer so its text can be selected; a following one stays inert or\n * the mark under it never sees the pointer. */\n readonly dsChartTooltipPinned = input(false);\n\n /** Whether each reading carries its colour dot. `'auto'` draws them for two to four readings. */\n readonly dsChartTooltipSwatches = input<boolean | 'auto'>('auto');\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<ChartTooltipPanelComponent> | null = null;\n private detachScrollReposition: (() => void) | null = null;\n private detachEscape: (() => void) | null = null;\n private detachOffscreen: (() => void) | null = null;\n private glide: Animation | null = null;\n\n constructor() {\n effect(() => {\n const context = this.dsChartTooltip();\n const origin = this.dsChartTooltipOrigin();\n if (!context?.entries.length || !origin) {\n this.close();\n\n return;\n }\n this.open(context, origin);\n });\n inject(DestroyRef).onDestroy(() => this.close());\n }\n\n private open(context: ChartTooltipContext, origin: ChartTooltipOrigin): void {\n // Measured before the in-flight glide is dropped, so a mid-glide re-aim starts from the visible position.\n const from =\n this.overlayRef?.overlayElement.getBoundingClientRect() ?? null;\n this.glide?.cancel();\n this.glide = null;\n // Reposition, not re-create: a fresh OverlayRef restarts the enter transition.\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.strategyFor(origin),\n panelClass: ['ds-overlay-pane', 'ds-chart-tooltip-pane'],\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n this.panelRef = this.overlayRef.attach(\n new ComponentPortal(ChartTooltipPanelComponent, this.viewContainerRef),\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n CHART_TOOLTIP_TOKENS,\n );\n // CDK's reposition strategy misses an app's own `overflow: auto` container. A following panel\n // closes; a pinned one moves, or a close would strand the pin glyph and Unpin.\n this.detachScrollReposition = closeOnScroll(this.overlayRef, () =>\n this.dsChartTooltipPinned()\n ? this.overlayRef?.updatePosition()\n : this.close(),\n );\n this.detachEscape = this.closeOnEscape();\n this.detachOffscreen = hideWhileOffscreen(\n this.overlayRef.overlayElement,\n this.host.nativeElement,\n );\n } else {\n this.overlayRef.updatePositionStrategy(this.strategyFor(origin));\n }\n this.overlayRef.overlayElement.classList.toggle(\n 'is-pinned',\n this.dsChartTooltipPinned(),\n );\n this.panelRef?.setInput('context', context);\n this.panelRef?.setInput('template', this.dsChartTooltipTemplate());\n this.panelRef?.setInput('swatches', this.dsChartTooltipSwatches());\n if (from) {\n // Render the new reading first, or a resized panel lands where the old one would.\n this.panelRef?.changeDetectorRef.detectChanges();\n this.overlayRef.updatePosition();\n this.glideFrom(from, this.overlayRef.overlayElement);\n }\n }\n\n // `translate`, not `transform`: the pane's enter and leave animate `transform`.\n private glideFrom(from: DOMRect, pane: HTMLElement): void {\n const to = pane.getBoundingClientRect();\n const deltaX = from.left - to.left;\n const deltaY = from.top - to.top;\n if ((deltaX === 0 && deltaY === 0) || typeof pane.animate !== 'function') {\n return;\n }\n const style = getComputedStyle(pane);\n const duration = milliseconds(\n style.getPropertyValue('--ds-motion-chart-tooltip-move-duration'),\n );\n if (duration <= 0) {\n return;\n }\n this.glide = pane.animate(\n [{ translate: `${deltaX}px ${deltaY}px` }, { translate: '0 0' }],\n {\n duration,\n easing:\n style\n .getPropertyValue('--ds-motion-chart-tooltip-move-easing')\n .trim() || 'ease',\n },\n );\n }\n\n private strategyFor(origin: ChartTooltipOrigin) {\n const gap = coarsePointer()\n ? TOUCH_GAP_PX\n : POINTER_GAP_PX + this.dsChartTooltipExtraGap();\n\n return this.overlay\n .position()\n .flexibleConnectedTo(origin as FlexibleConnectedPositionStrategyOrigin)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withViewportMargin(VIEWPORT_MARGIN_PX)\n .withPositions(positionsFor(gap));\n }\n\n // WCAG 1.4.13: dismissable without moving pointer or focus. Stays closed until the context or origin changes.\n private closeOnEscape(): () => void {\n if (typeof document === 'undefined') {\n return () => undefined;\n }\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n this.close();\n }\n };\n document.addEventListener('keydown', onKeydown, true);\n\n return () => document.removeEventListener('keydown', onKeydown, true);\n }\n\n private close(): void {\n this.detachEscape?.();\n this.detachEscape = null;\n this.detachScrollReposition?.();\n this.detachScrollReposition = null;\n this.detachOffscreen?.();\n this.detachOffscreen = null;\n disposeWithLeave(this.overlayRef, 'dismiss');\n this.glide = null;\n this.overlayRef = null;\n this.panelRef = null;\n }\n}\n\n// A pinned panel survives a scroll, and the position strategy's push would hold it inside the\n// viewport after its chart has gone; it hides while the chart is out of sight instead.\nfunction hideWhileOffscreen(pane: HTMLElement, chart: HTMLElement): () => void {\n if (typeof IntersectionObserver === 'undefined') {\n return () => undefined;\n }\n const observer = new IntersectionObserver(([entry]) => {\n pane.style.visibility = entry?.isIntersecting ? '' : 'hidden';\n });\n observer.observe(chart);\n\n return () => observer.disconnect();\n}\n\nfunction milliseconds(duration: string): number {\n const value = parseFloat(duration);\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return duration.trim().endsWith('ms') ? value : value * 1000;\n}\n\nfunction coarsePointer(): boolean {\n return (\n typeof window !== 'undefined' &&\n window.matchMedia('(pointer: coarse)').matches\n );\n}\n","import { DestroyRef, Signal, inject, signal } from '@angular/core';\nimport { chartDwell } from '@ids-group-ltd/ids-design-system/components';\n\n/** @internal */\nexport interface ChartActiveMark {\n /** Index of the mark under the pointer or holding focus; `-1` when none is. */\n readonly index: Signal<number>;\n /** The element the tooltip anchors to. */\n readonly origin: Signal<Element | null>;\n /** Whether the active mark is held rather than followed: a tap, or a click under `pinOnClick`. */\n readonly pinned: Signal<boolean>;\n /** `mark` is the hovered element, for a listener delegated to the marks' parent; it defaults to\n * the event's `currentTarget`. */\n enter(\n index: number,\n event: Event,\n anchor?: string | Element | null,\n mark?: Element,\n ): void;\n /** Moves the active index with no pointer (keyboard, category handover); leaves the anchor alone, and a pin holds. */\n setIndex(index: number): void;\n leave(): void;\n /** Holds the activated mark, for any pointer type. Activating the already-pinned mark releases it. */\n pin(\n index: number,\n event: Event,\n anchor?: string | Element | null,\n mark?: Element,\n ): void;\n release(): void;\n}\n\n/**\n * The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.\n * Pointer and keyboard write the same pair: wire `pointerenter` and `focus` to `enter`.\n *\n * A pointer is answered after resting `hoverDelayMs` on a mark (at once while the chart has\n * already answered); focus, a tap and a pin are answered at once.\n *\n * A tap latches: touch fires `pointerleave` on lift, so the panel stays until the next tap\n * outside the mark. Call from an injection context.\n *\n * @internal\n */\nexport function chartActiveMark(\n lingerMs: () => number = () => 0,\n hoverDelayMs: () => number = () => 0,\n): ChartActiveMark {\n const index = signal(-1);\n const origin = signal<Element | null>(null);\n const pinned = signal(false);\n // The click after a latching tap belongs to the tap, not to a press that lets go.\n let tapLatched = false;\n let pendingClear: ReturnType<typeof setTimeout> | null = null;\n // Owns the handlers (a column anchors to the bar, the whole cell takes the pointer). A press is\n // outside only when it misses this, or a click beside the bar releases and re-takes the pin.\n let host: Element | null = null;\n const dwell = chartDwell(hoverDelayMs);\n\n const clear = (): void => {\n pinned.set(false);\n tapLatched = false;\n host = null;\n cancelPendingClear();\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerdown', release, true);\n document.removeEventListener('keydown', releaseOnEscape, true);\n document.removeEventListener('pointerover', trackPointer, true);\n };\n\n // Anchors to the mark, not the pointer-catching box (a column cell spans the plot height). A\n // selector resolves inside the box; a legend item's mark is outside it, so its caller passes the element.\n const aim = (\n at: number,\n event: Event,\n anchor?: string | Element | null,\n mark: EventTarget | null = event.currentTarget,\n ): void => {\n const target = mark;\n if (target instanceof Element) {\n host = target;\n const mark =\n typeof anchor === 'string' ? target.querySelector(anchor) : anchor;\n // A zero-value mark has no height or width and would anchor to an edge.\n const box = mark?.getBoundingClientRect();\n const aimable = box && box.width > 0 && box.height > 0;\n origin.set(aimable ? (mark ?? target) : target);\n }\n index.set(at);\n };\n\n const hold = (): void => {\n pinned.set(true);\n cancelPendingClear();\n document.addEventListener('pointerdown', release, true);\n document.addEventListener('keydown', releaseOnEscape, true);\n };\n\n const releaseOnEscape = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n clear();\n }\n };\n\n const cancelPendingClear = (): void => {\n if (pendingClear !== null) {\n clearTimeout(pendingClear);\n pendingClear = null;\n }\n };\n\n const scheduleClear = (): void => {\n cancelPendingClear();\n pendingClear = setTimeout(\n () => {\n pendingClear = null;\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerover', trackPointer, true);\n },\n Math.max(lingerMs(), 0),\n );\n };\n\n // `pointerover` fires per element crossed: the panel cancels the clear, anything else but the mark\n // schedules one. Without that a panel the pointer once touched never closes.\n const trackPointer = (event: PointerEvent): void => {\n if (!(event.target instanceof Element)) {\n return;\n }\n if (pinned() || event.target.closest('.ds-chart-tooltip-pane')) {\n cancelPendingClear();\n\n return;\n }\n // Host, not anchor: a legend item and the arc its panel points at are disjoint.\n if (!host || !host.contains(event.target)) {\n scheduleClear();\n }\n };\n\n const chartOf = (element: Element | null): Element | null =>\n element ? element.closest('figure') : null;\n\n const release = (event: PointerEvent): void => {\n if (!(event.target instanceof Element)) {\n clear();\n\n return;\n }\n if (host && host.contains(event.target)) {\n return;\n }\n // Runs on `pointerdown`; the re-aim comes on `click`, so clearing here flickers the Unpin control.\n const pressedMark = event.target.closest('[data-mark-index]');\n if (pressedMark && chartOf(pressedMark) === chartOf(host)) {\n return;\n }\n clear();\n };\n\n if (typeof document !== 'undefined') {\n inject(DestroyRef).onDestroy(() => {\n dwell.cancel();\n cancelPendingClear();\n document.removeEventListener('pointerdown', release, true);\n document.removeEventListener('keydown', releaseOnEscape, true);\n document.removeEventListener('pointerover', trackPointer, true);\n });\n }\n\n return {\n index: index.asReadonly(),\n origin: origin.asReadonly(),\n pinned: pinned.asReadonly(),\n enter(at, event, anchor, mark) {\n if (pinned()) {\n return;\n }\n // `currentTarget` is gone by the time a delayed answer runs.\n const target = mark ?? event.currentTarget;\n dwell.schedule(at, () => answer(at, event, anchor, target), event);\n },\n setIndex(at) {\n if (pinned()) {\n return;\n }\n dwell.cancel();\n cancelPendingClear();\n index.set(at);\n },\n leave() {\n dwell.cancel();\n if (pinned()) {\n return;\n }\n scheduleClear();\n },\n release() {\n dwell.cancel();\n if (typeof document !== 'undefined') {\n clear();\n }\n },\n pin(at, event, anchor, mark) {\n dwell.cancel();\n if (typeof document === 'undefined') {\n return;\n }\n if (pinned() && index() === at) {\n if (tapLatched) {\n tapLatched = false;\n\n return;\n }\n clear();\n\n return;\n }\n tapLatched = false;\n // Keeps `pinned` true so the Unpin control stays mounted.\n aim(at, event, anchor, mark);\n if (!pinned()) {\n hold();\n }\n },\n };\n\n function answer(\n at: number,\n event: Event,\n anchor: string | Element | null | undefined,\n target: EventTarget | null,\n ): void {\n if (pinned()) {\n return;\n }\n aim(at, event, anchor, target);\n cancelPendingClear();\n if (typeof document !== 'undefined') {\n document.addEventListener('pointerover', trackPointer, true);\n }\n if (\n typeof document !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType === 'touch'\n ) {\n hold();\n tapLatched = true;\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport { ICONS } from '@ids-group-ltd/ids-design-system/core';\n\n/** Radius of the pin disc, in plot pixels.\n *\n * @internal */\nexport const CHART_PIN_RADIUS = 11;\n\n/** Gap between a disc and the top edge of what it holds.\n *\n * @internal */\nexport const CHART_PIN_GAP = 4;\n\nconst GLYPH_SIZE = 14;\n\n/**\n * The disc an SVG chart draws on the mark or category it holds. Drawn, not composed:\n * `ds-icon`'s host is an element SVG does not know, which renders nothing inside a canvas.\n * Centred on the host's origin; place it with a `transform`.\n *\n * @internal\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsChartPinMarker]',\n standalone: true,\n template: `\n <svg:circle class=\"pin-disc\" [attr.r]=\"radius\" />\n\n <svg:svg\n class=\"pin-glyph\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.x]=\"glyphOffset\"\n [attr.y]=\"glyphOffset\"\n [attr.width]=\"glyphSize\"\n [attr.height]=\"glyphSize\"\n [innerHTML]=\"glyph\" />\n `,\n styles: `\n :host {\n pointer-events: none;\n }\n\n .pin-disc {\n fill: var(--surface-default);\n stroke: var(--border-divider);\n stroke-width: var(--border-width-default);\n }\n\n .pin-glyph {\n color: var(--text-primary);\n }\n `,\n host: {\n class: 'pin-marker',\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartPinMarkerComponent {\n protected readonly radius = CHART_PIN_RADIUS;\n protected readonly glyphSize = GLYPH_SIZE;\n protected readonly glyphOffset = -GLYPH_SIZE / 2;\n protected readonly glyph: SafeHtml = inject(\n DomSanitizer,\n ).bypassSecurityTrustHtml(ICONS.pin);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n InjectionToken,\n ViewEncapsulation,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Provided by a chart that wraps `ds-chart` and draws the Unpin control for its cursor itself,\n * on its own caption line; the wrapped `ds-chart` then draws none.\n *\n * @internal\n */\nexport const CHART_UNPIN_DRAWN_BY_HOST = new InjectionToken<true>(\n 'CHART_UNPIN_DRAWN_BY_HOST',\n);\n\n/**\n * The control that releases a held mark or category, at the top end of the chart. Every chart\n * draws this one; the chart's own stylesheet makes room for it through `chart-frame.pin-reset`.\n *\n * @internal\n */\n@Component({\n selector: 'ds-chart-unpin',\n standalone: true,\n template: `\n @if (pinned()) {\n <button class=\"pin-reset\" type=\"button\" (click)=\"release.emit()\">\n {{ intl().chart.unpin }}\n </button>\n }\n `,\n styleUrl: './chart-unpin.component.scss',\n host: {\n '[class.is-pinned]': 'pinned()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartUnpinComponent {\n readonly pinned = input.required<boolean>();\n\n readonly release = output();\n\n protected readonly intl = inject(DS_INTL);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n input,\n output,\n} from '@angular/core';\nimport { ChartUnpinComponent } from './chart-unpin.component';\n\n/**\n * Context of a chart's own `message` template: the text, and whether it reports an error.\n *\n * @internal\n */\nexport interface ChartStatesMessageContext {\n readonly $implicit: string;\n readonly error: boolean;\n}\n\n/**\n * The Unpin control, caption and error / loading / empty states every chart draws, then `body`.\n * It sits on the chart's own `<figure>` so the caption stays the figure's direct child, which is\n * what names the figure. `skeleton`, `body` and `message` are declared in the chart's template\n * and keep its styles; the message box takes its height from an inherited\n * `--_chart-message-height`.\n *\n * @internal\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'figure[dsChartStates]',\n standalone: true,\n imports: [ChartUnpinComponent, NgTemplateOutlet],\n template: `\n @if (unpin()) {\n <ds-chart-unpin [pinned]=\"pinned()\" (release)=\"release.emit()\" />\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n @if (message(); as messageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"messageTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: errorText(), error: true }\" />\n } @else {\n <p class=\"empty is-error\" role=\"status\">\n {{ errorText() }}\n </p>\n }\n } @else if (pending()) {\n <ng-container [ngTemplateOutlet]=\"skeleton()\" />\n } @else if (empty()) {\n @if (message(); as messageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"messageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: emptyText(),\n error: false,\n }\" />\n } @else {\n <p class=\"empty\">\n {{ emptyText() }}\n </p>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"body()\" />\n }\n `,\n styleUrl: './chart-states.component.scss',\n host: { '[class.message-axes]': 'messageAxes()' },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartStatesComponent {\n readonly unpin = input(true, { transform: booleanAttribute });\n readonly pinned = input(false);\n readonly release = output();\n\n readonly caption = input<string | null>(null);\n readonly error = input(false);\n readonly errorText = input('');\n readonly pending = input(false);\n readonly empty = input(false);\n readonly emptyText = input('');\n\n /** Draws the axis L along the message box's start and bottom edges. */\n readonly messageAxes = input(false, { transform: booleanAttribute });\n\n readonly skeleton = input.required<TemplateRef<unknown>>();\n readonly body = input.required<TemplateRef<unknown>>();\n /** Replaces the default error and empty paragraph. */\n readonly message = input<TemplateRef<ChartStatesMessageContext> | null>(null);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA,MAAM,cAAc,GAAG,GAAG;AAE1B,IAAI,KAAK,GAAoC,IAAI;AACjD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAmB;AAE/C;AACA,SAAS,MAAM,CAAC,KAAa,EAAA;IAC3B,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,QAAA,MAAM,CAAC,KAAK,GAAG,CAAC;AAChB,QAAA,MAAM,CAAC,MAAM,GAAG,CAAC;AACjB,QAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;IAC/D;IACA,IAAI,CA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AA,4jBAAA,CAAA,EAAA;;;AC/EjD;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-tooltip.mjs","sources":["../../../src/lib/components/chart-tooltip/swatch-contrast.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.html","../../../src/lib/components/chart-tooltip/chart-tooltip.directive.ts","../../../src/lib/components/chart-tooltip/chart-active-mark.ts","../../../src/lib/components/chart-tooltip/chart-pin-marker.component.ts","../../../src/lib/components/chart-tooltip/chart-unpin.component.ts","../../../src/lib/components/chart-tooltip/chart-states.component.ts","../../../src/lib/components/chart-tooltip/ids-group-ltd-ids-design-system-components-chart-tooltip.ts"],"sourcesContent":["// Below this the dot reads as the panel itself, as the palest heat step does on a light panel (1.14:1).\n// A merely low-contrast hue still reads as a colour next to its label and takes no ring.\nconst SAME_AS_GROUND = 1.5;\n\nlet probe: CanvasRenderingContext2D | null = null;\nconst blendsByPair = new Map<string, boolean>();\n\n// Painting and reading the pixel back resolves any CSS colour syntax (`oklch()`, `color-mix()`) to sRGB.\nfunction srgbOf(color: string): readonly [number, number, number] {\n if (!probe) {\n const canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n probe = canvas.getContext('2d', { willReadFrequently: true });\n }\n if (!probe) {\n return [0, 0, 0];\n }\n probe.clearRect(0, 0, 1, 1);\n probe.fillStyle = color;\n probe.fillRect(0, 0, 1, 1);\n const [red, green, blue] = probe.getImageData(0, 0, 1, 1).data;\n\n return [red, green, blue];\n}\n\nfunction relativeLuminance([red, green, blue]: readonly [\n number,\n number,\n number,\n]): number {\n const linear = (channel: number): number => {\n const value = channel / 255;\n\n return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;\n };\n\n return 0.2126 * linear(red) + 0.7152 * linear(green) + 0.0722 * linear(blue);\n}\n\n/** Whether `color` is close enough to `ground` to vanish into it and needs a ring. Both are computed CSS colours. */\nexport function swatchBlendsInto(color: string, ground: string): boolean {\n const pair = `${color}|${ground}`;\n const known = blendsByPair.get(pair);\n if (known !== undefined) {\n return known;\n }\n const swatchLuminance = relativeLuminance(srgbOf(color));\n const groundLuminance = relativeLuminance(srgbOf(ground));\n const ratio =\n (Math.max(swatchLuminance, groundLuminance) + 0.05) /\n (Math.min(swatchLuminance, groundLuminance) + 0.05);\n const blends = ratio < SAME_AS_GROUND;\n blendsByPair.set(pair, blends);\n\n return blends;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ChartTooltipContext } from './chart-tooltip.types';\nimport { swatchBlendsInto } from './swatch-contrast';\n\nconst AUTO_SWATCH_MIN = 2;\nconst AUTO_SWATCH_MAX = 4;\n\n@Component({\n selector: 'ds-chart-tooltip-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './chart-tooltip-panel.component.html',\n styleUrl: './chart-tooltip-panel.component.scss',\n host: {\n // Hidden from AT: every interactive mark's `aria-label` already carries the reading.\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartTooltipPanelComponent {\n /** The category and the readings the panel prints. */\n readonly context = input.required<ChartTooltipContext>();\n /** The chart's projected `#dsChartTooltip` template. Null renders the built-in rows. */\n readonly template = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n readonly swatches = input<boolean | 'auto'>('auto');\n\n protected readonly showsSwatches = computed(() => {\n const swatches = this.swatches();\n\n const count = this.context().entries.length;\n\n return swatches === 'auto'\n ? count >= AUTO_SWATCH_MIN && count <= AUTO_SWATCH_MAX\n : swatches;\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n afterRenderEffect({\n earlyRead: () => {\n this.context();\n const host = this.host.nativeElement;\n const ground = getComputedStyle(host).backgroundColor;\n\n return [...host.querySelectorAll<HTMLElement>('.swatch')].map(\n (swatch) =>\n [\n swatch,\n swatchBlendsInto(\n getComputedStyle(swatch).backgroundColor,\n ground,\n ),\n ] as const,\n );\n },\n write: (swatches) => {\n for (const [swatch, blends] of swatches()) {\n swatch.classList.toggle('ringed', blends);\n }\n },\n });\n }\n}\n","@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul\n class=\"entries\"\n [class.no-swatches]=\"!showsSwatches()\">\n @for (entry of context().entries; track $index) {\n <li class=\"entry\">\n @if (showsSwatches()) {\n <span\n class=\"swatch\"\n [class.hatched]=\"entry.hatched\"\n [style.background-color]=\"entry.color\">\n </span>\n }\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n\n @if (entry.detail) {\n <span class=\"detail\">\n {{ entry.detail }}\n </span>\n }\n </li>\n }\n </ul>\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n type FlexibleConnectedPositionStrategyOrigin,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n closeOnScroll,\n disposeWithLeave,\n forwardOverlayTokens,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { ChartTooltipPanelComponent } from './chart-tooltip-panel.component';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from './chart-tooltip.types';\n\nconst POINTER_GAP_PX = 10;\n// Portaled to the body, so a chart's own values reach the panel only by being copied.\nconst CHART_TOOLTIP_TOKENS = [\n '--ds-chart-tooltip-bg-color',\n '--ds-chart-tooltip-text-color',\n '--ds-chart-tooltip-border-color',\n] as const;\n// A fingertip covers roughly 40 CSS px, so a touch-opened panel clears the tap point further.\nconst TOUCH_GAP_PX = 48;\n\n// Must equal the `--space-3` in the panel's `max-height`.\nconst VIEWPORT_MARGIN_PX = 12;\n\n// Four fallbacks let the panel flip out of a small card instead of being clipped. Above first.\nfunction positionsFor(gap: number): ConnectedPosition[] {\n return [\n {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -gap,\n },\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: gap,\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: gap,\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -gap,\n },\n ];\n}\n\n/** The chart tooltip: a non-null context opens the panel, null closes it. @internal */\n@Directive({\n selector: '[dsChartTooltip]',\n standalone: true,\n})\nexport class ChartTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly dsChartTooltip = input<ChartTooltipContext | null>(null);\n readonly dsChartTooltipOrigin = input<ChartTooltipOrigin | null>(null);\n readonly dsChartTooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n /** Extra clearance between the mark and the panel, for text printed above the mark. Ignored for touch. */\n readonly dsChartTooltipExtraGap = input(0);\n\n /** A held panel takes the pointer so its text can be selected; a following one stays inert or\n * the mark under it never sees the pointer. */\n readonly dsChartTooltipPinned = input(false);\n\n /** Whether each reading carries its colour dot. `'auto'` draws them for two to four readings. */\n readonly dsChartTooltipSwatches = input<boolean | 'auto'>('auto');\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<ChartTooltipPanelComponent> | null = null;\n private detachScrollReposition: (() => void) | null = null;\n private detachEscape: (() => void) | null = null;\n private detachOffscreen: (() => void) | null = null;\n private glide: Animation | null = null;\n\n constructor() {\n effect(() => {\n const context = this.dsChartTooltip();\n const origin = this.dsChartTooltipOrigin();\n if (!context?.entries.length || !origin) {\n this.close();\n\n return;\n }\n this.open(context, origin);\n });\n inject(DestroyRef).onDestroy(() => this.close());\n }\n\n private open(context: ChartTooltipContext, origin: ChartTooltipOrigin): void {\n // Measured before the in-flight glide is dropped, so a mid-glide re-aim starts from the visible position.\n const from =\n this.overlayRef?.overlayElement.getBoundingClientRect() ?? null;\n this.glide?.cancel();\n this.glide = null;\n // Reposition, not re-create: a fresh OverlayRef restarts the enter transition.\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.strategyFor(origin),\n panelClass: ['ds-overlay-pane', 'ds-chart-tooltip-pane'],\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n this.panelRef = this.overlayRef.attach(\n new ComponentPortal(ChartTooltipPanelComponent, this.viewContainerRef),\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n CHART_TOOLTIP_TOKENS,\n );\n // CDK's reposition strategy misses an app's own `overflow: auto` container. A following panel\n // closes; a pinned one moves, or a close would strand the pin glyph and Unpin.\n this.detachScrollReposition = closeOnScroll(this.overlayRef, () =>\n this.dsChartTooltipPinned()\n ? this.overlayRef?.updatePosition()\n : this.close(),\n );\n this.detachEscape = this.closeOnEscape();\n this.detachOffscreen = hideWhileOffscreen(\n this.overlayRef.overlayElement,\n this.host.nativeElement,\n );\n } else {\n this.overlayRef.updatePositionStrategy(this.strategyFor(origin));\n }\n this.overlayRef.overlayElement.classList.toggle(\n 'is-pinned',\n this.dsChartTooltipPinned(),\n );\n this.panelRef?.setInput('context', context);\n this.panelRef?.setInput('template', this.dsChartTooltipTemplate());\n this.panelRef?.setInput('swatches', this.dsChartTooltipSwatches());\n if (from) {\n // Render the new reading first, or a resized panel lands where the old one would.\n this.panelRef?.changeDetectorRef.detectChanges();\n this.overlayRef.updatePosition();\n this.glideFrom(from, this.overlayRef.overlayElement);\n }\n }\n\n // `translate`, not `transform`: the pane's enter and leave animate `transform`.\n private glideFrom(from: DOMRect, pane: HTMLElement): void {\n const to = pane.getBoundingClientRect();\n const deltaX = from.left - to.left;\n const deltaY = from.top - to.top;\n if ((deltaX === 0 && deltaY === 0) || typeof pane.animate !== 'function') {\n return;\n }\n const style = getComputedStyle(pane);\n const duration = milliseconds(\n style.getPropertyValue('--ds-motion-chart-tooltip-move-duration'),\n );\n if (duration <= 0) {\n return;\n }\n this.glide = pane.animate(\n [{ translate: `${deltaX}px ${deltaY}px` }, { translate: '0 0' }],\n {\n duration,\n easing:\n style\n .getPropertyValue('--ds-motion-chart-tooltip-move-easing')\n .trim() || 'ease',\n },\n );\n }\n\n private strategyFor(origin: ChartTooltipOrigin) {\n const gap = coarsePointer()\n ? TOUCH_GAP_PX\n : POINTER_GAP_PX + this.dsChartTooltipExtraGap();\n\n return this.overlay\n .position()\n .flexibleConnectedTo(origin as FlexibleConnectedPositionStrategyOrigin)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withViewportMargin(VIEWPORT_MARGIN_PX)\n .withPositions(positionsFor(gap));\n }\n\n // WCAG 1.4.13: dismissable without moving pointer or focus. Stays closed until the context or origin changes.\n private closeOnEscape(): () => void {\n if (typeof document === 'undefined') {\n return () => undefined;\n }\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n this.close();\n }\n };\n document.addEventListener('keydown', onKeydown, true);\n\n return () => document.removeEventListener('keydown', onKeydown, true);\n }\n\n private close(): void {\n this.detachEscape?.();\n this.detachEscape = null;\n this.detachScrollReposition?.();\n this.detachScrollReposition = null;\n this.detachOffscreen?.();\n this.detachOffscreen = null;\n disposeWithLeave(this.overlayRef, 'dismiss');\n this.glide = null;\n this.overlayRef = null;\n this.panelRef = null;\n }\n}\n\n// A pinned panel survives a scroll, and the position strategy's push would hold it inside the\n// viewport after its chart has gone; it hides while the chart is out of sight instead.\nfunction hideWhileOffscreen(pane: HTMLElement, chart: HTMLElement): () => void {\n if (typeof IntersectionObserver === 'undefined') {\n return () => undefined;\n }\n const observer = new IntersectionObserver(([entry]) => {\n pane.style.visibility = entry?.isIntersecting ? '' : 'hidden';\n });\n observer.observe(chart);\n\n return () => observer.disconnect();\n}\n\nfunction milliseconds(duration: string): number {\n const value = parseFloat(duration);\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return duration.trim().endsWith('ms') ? value : value * 1000;\n}\n\nfunction coarsePointer(): boolean {\n return (\n typeof window !== 'undefined' &&\n window.matchMedia('(pointer: coarse)').matches\n );\n}\n","import { DestroyRef, Signal, inject, signal } from '@angular/core';\nimport { chartDwell } from '@ids-group-ltd/ids-design-system/components';\n\n/** @internal */\nexport interface ChartActiveMark {\n /** Index of the mark under the pointer or holding focus; `-1` when none is. */\n readonly index: Signal<number>;\n /** The element the tooltip anchors to. */\n readonly origin: Signal<Element | null>;\n /** Whether the active mark is held rather than followed: a tap, or a click under `pinOnClick`. */\n readonly pinned: Signal<boolean>;\n /** `mark` is the hovered element, for a listener delegated to the marks' parent; it defaults to\n * the event's `currentTarget`. */\n enter(\n index: number,\n event: Event,\n anchor?: string | Element | null,\n mark?: Element,\n ): void;\n /** Moves the active index with no pointer (keyboard, category handover); leaves the anchor alone, and a pin holds. */\n setIndex(index: number): void;\n leave(): void;\n /** Holds the activated mark, for any pointer type. Activating the already-pinned mark releases it. */\n pin(\n index: number,\n event: Event,\n anchor?: string | Element | null,\n mark?: Element,\n ): void;\n release(): void;\n}\n\n/**\n * The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.\n * Pointer and keyboard write the same pair: wire `pointerenter` and `focus` to `enter`.\n *\n * A pointer is answered after resting `hoverDelayMs` on a mark (at once while the chart has\n * already answered); focus, a tap and a pin are answered at once.\n *\n * A tap latches: touch fires `pointerleave` on lift, so the panel stays until the next tap\n * outside the mark. Call from an injection context.\n *\n * @internal\n */\nexport function chartActiveMark(\n lingerMs: () => number = () => 0,\n hoverDelayMs: () => number = () => 0,\n): ChartActiveMark {\n const index = signal(-1);\n const origin = signal<Element | null>(null);\n const pinned = signal(false);\n // The click after a latching tap belongs to the tap, not to a press that lets go.\n let tapLatched = false;\n let pendingClear: ReturnType<typeof setTimeout> | null = null;\n // Owns the handlers (a column anchors to the bar, the whole cell takes the pointer). A press is\n // outside only when it misses this, or a click beside the bar releases and re-takes the pin.\n let host: Element | null = null;\n const dwell = chartDwell(hoverDelayMs);\n\n const clear = (): void => {\n pinned.set(false);\n tapLatched = false;\n host = null;\n cancelPendingClear();\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerdown', release, true);\n document.removeEventListener('keydown', releaseOnEscape, true);\n document.removeEventListener('pointerover', trackPointer, true);\n };\n\n // Anchors to the mark, not the pointer-catching box (a column cell spans the plot height). A\n // selector resolves inside the box; a legend item's mark is outside it, so its caller passes the element.\n const aim = (\n at: number,\n event: Event,\n anchor?: string | Element | null,\n mark: EventTarget | null = event.currentTarget,\n ): void => {\n const target = mark;\n if (target instanceof Element) {\n host = target;\n const mark =\n typeof anchor === 'string' ? target.querySelector(anchor) : anchor;\n // A zero-value mark has no height or width and would anchor to an edge.\n const box = mark?.getBoundingClientRect();\n const aimable = box && box.width > 0 && box.height > 0;\n origin.set(aimable ? (mark ?? target) : target);\n }\n index.set(at);\n };\n\n const hold = (): void => {\n pinned.set(true);\n cancelPendingClear();\n document.addEventListener('pointerdown', release, true);\n document.addEventListener('keydown', releaseOnEscape, true);\n };\n\n const releaseOnEscape = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n clear();\n }\n };\n\n const cancelPendingClear = (): void => {\n if (pendingClear !== null) {\n clearTimeout(pendingClear);\n pendingClear = null;\n }\n };\n\n const scheduleClear = (): void => {\n cancelPendingClear();\n pendingClear = setTimeout(\n () => {\n pendingClear = null;\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerover', trackPointer, true);\n },\n Math.max(lingerMs(), 0),\n );\n };\n\n // `pointerover` fires per element crossed: the panel cancels the clear, anything else but the mark\n // schedules one. Without that a panel the pointer once touched never closes.\n const trackPointer = (event: PointerEvent): void => {\n if (!(event.target instanceof Element)) {\n return;\n }\n if (pinned() || event.target.closest('.ds-chart-tooltip-pane')) {\n cancelPendingClear();\n\n return;\n }\n // Host, not anchor: a legend item and the arc its panel points at are disjoint.\n if (!host || !host.contains(event.target)) {\n scheduleClear();\n }\n };\n\n const chartOf = (element: Element | null): Element | null =>\n element ? element.closest('figure') : null;\n\n const release = (event: PointerEvent): void => {\n if (!(event.target instanceof Element)) {\n clear();\n\n return;\n }\n if (host && host.contains(event.target)) {\n return;\n }\n // Runs on `pointerdown`; the re-aim comes on `click`, so clearing here flickers the Unpin control.\n const pressedMark = event.target.closest('[data-mark-index]');\n if (pressedMark && chartOf(pressedMark) === chartOf(host)) {\n return;\n }\n clear();\n };\n\n if (typeof document !== 'undefined') {\n inject(DestroyRef).onDestroy(() => {\n dwell.cancel();\n cancelPendingClear();\n document.removeEventListener('pointerdown', release, true);\n document.removeEventListener('keydown', releaseOnEscape, true);\n document.removeEventListener('pointerover', trackPointer, true);\n });\n }\n\n return {\n index: index.asReadonly(),\n origin: origin.asReadonly(),\n pinned: pinned.asReadonly(),\n enter(at, event, anchor, mark) {\n if (pinned()) {\n return;\n }\n // `currentTarget` is gone by the time a delayed answer runs.\n const target = mark ?? event.currentTarget;\n dwell.schedule(at, () => answer(at, event, anchor, target), event);\n },\n setIndex(at) {\n if (pinned()) {\n return;\n }\n dwell.cancel();\n cancelPendingClear();\n index.set(at);\n },\n leave() {\n dwell.cancel();\n if (pinned()) {\n return;\n }\n scheduleClear();\n },\n release() {\n dwell.cancel();\n if (typeof document !== 'undefined') {\n clear();\n }\n },\n pin(at, event, anchor, mark) {\n dwell.cancel();\n if (typeof document === 'undefined') {\n return;\n }\n if (pinned() && index() === at) {\n if (tapLatched) {\n tapLatched = false;\n\n return;\n }\n clear();\n\n return;\n }\n tapLatched = false;\n // Keeps `pinned` true so the Unpin control stays mounted.\n aim(at, event, anchor, mark);\n if (!pinned()) {\n hold();\n }\n },\n };\n\n function answer(\n at: number,\n event: Event,\n anchor: string | Element | null | undefined,\n target: EventTarget | null,\n ): void {\n if (pinned()) {\n return;\n }\n aim(at, event, anchor, target);\n cancelPendingClear();\n if (typeof document !== 'undefined') {\n document.addEventListener('pointerover', trackPointer, true);\n }\n if (\n typeof document !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType === 'touch'\n ) {\n hold();\n tapLatched = true;\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport { ICONS } from '@ids-group-ltd/ids-design-system/core';\n\n/** Radius of the pin disc, in plot pixels.\n *\n * @internal */\nexport const CHART_PIN_RADIUS = 11;\n\n/** Gap between a disc and the top edge of what it holds.\n *\n * @internal */\nexport const CHART_PIN_GAP = 8;\n\nconst GLYPH_SIZE = 14;\n\n/**\n * The disc an SVG chart draws on the mark or category it holds. Drawn, not composed:\n * `ds-icon`'s host is an element SVG does not know, which renders nothing inside a canvas.\n * Centred on the host's origin; place it with a `transform`.\n *\n * @internal\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsChartPinMarker]',\n standalone: true,\n template: `\n <svg:circle class=\"pin-disc\" [attr.r]=\"radius\" />\n\n <svg:svg\n class=\"pin-glyph\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.x]=\"glyphOffset\"\n [attr.y]=\"glyphOffset\"\n [attr.width]=\"glyphSize\"\n [attr.height]=\"glyphSize\"\n [innerHTML]=\"glyph\" />\n `,\n styles: `\n :host {\n pointer-events: none;\n }\n\n .pin-disc {\n fill: var(--surface-default);\n stroke: var(--border-divider);\n stroke-width: var(--border-width-default);\n }\n\n .pin-glyph {\n color: var(--text-primary);\n }\n `,\n host: {\n class: 'pin-marker',\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartPinMarkerComponent {\n protected readonly radius = CHART_PIN_RADIUS;\n protected readonly glyphSize = GLYPH_SIZE;\n protected readonly glyphOffset = -GLYPH_SIZE / 2;\n protected readonly glyph: SafeHtml = inject(\n DomSanitizer,\n ).bypassSecurityTrustHtml(ICONS.pin);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n InjectionToken,\n ViewEncapsulation,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Provided by a chart that wraps `ds-chart` and draws the Unpin control for its cursor itself,\n * on its own caption line; the wrapped `ds-chart` then draws none.\n *\n * @internal\n */\nexport const CHART_UNPIN_DRAWN_BY_HOST = new InjectionToken<true>(\n 'CHART_UNPIN_DRAWN_BY_HOST',\n);\n\n/**\n * The control that releases a held mark or category, at the top end of the chart. Every chart\n * draws this one; the chart's own stylesheet makes room for it through `chart-frame.pin-reset`.\n *\n * @internal\n */\n@Component({\n selector: 'ds-chart-unpin',\n standalone: true,\n template: `\n @if (pinned()) {\n <button class=\"pin-reset\" type=\"button\" (click)=\"release.emit()\">\n {{ intl().chart.unpin }}\n </button>\n }\n `,\n styleUrl: './chart-unpin.component.scss',\n host: {\n '[class.is-pinned]': 'pinned()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartUnpinComponent {\n readonly pinned = input.required<boolean>();\n\n readonly release = output();\n\n protected readonly intl = inject(DS_INTL);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n input,\n output,\n} from '@angular/core';\nimport { ChartUnpinComponent } from './chart-unpin.component';\n\n/**\n * Context of a chart's own `message` template: the text, and whether it reports an error.\n *\n * @internal\n */\nexport interface ChartStatesMessageContext {\n readonly $implicit: string;\n readonly error: boolean;\n}\n\n/**\n * The Unpin control, caption and error / loading / empty states every chart draws, then `body`.\n * It sits on the chart's own `<figure>` so the caption stays the figure's direct child, which is\n * what names the figure. `skeleton`, `body` and `message` are declared in the chart's template\n * and keep its styles; the message box takes its height from an inherited\n * `--_chart-message-height`.\n *\n * @internal\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'figure[dsChartStates]',\n standalone: true,\n imports: [ChartUnpinComponent, NgTemplateOutlet],\n template: `\n @if (unpin()) {\n <ds-chart-unpin [pinned]=\"pinned()\" (release)=\"release.emit()\" />\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n @if (message(); as messageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"messageTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: errorText(), error: true }\" />\n } @else {\n <p class=\"empty is-error\" role=\"status\">\n {{ errorText() }}\n </p>\n }\n } @else if (pending()) {\n <ng-container [ngTemplateOutlet]=\"skeleton()\" />\n } @else if (empty()) {\n @if (message(); as messageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"messageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: emptyText(),\n error: false,\n }\" />\n } @else {\n <p class=\"empty\">\n {{ emptyText() }}\n </p>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"body()\" />\n }\n `,\n styleUrl: './chart-states.component.scss',\n host: { '[class.message-axes]': 'messageAxes()' },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartStatesComponent {\n readonly unpin = input(true, { transform: booleanAttribute });\n readonly pinned = input(false);\n readonly release = output();\n\n readonly caption = input<string | null>(null);\n readonly error = input(false);\n readonly errorText = input('');\n readonly pending = input(false);\n readonly empty = input(false);\n readonly emptyText = input('');\n\n /** Draws the axis L along the message box's start and bottom edges. */\n readonly messageAxes = input(false, { transform: booleanAttribute });\n\n readonly skeleton = input.required<TemplateRef<unknown>>();\n readonly body = input.required<TemplateRef<unknown>>();\n /** Replaces the default error and empty paragraph. */\n readonly message = input<TemplateRef<ChartStatesMessageContext> | null>(null);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA,MAAM,cAAc,GAAG,GAAG;AAE1B,IAAI,KAAK,GAAoC,IAAI;AACjD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAmB;AAE/C;AACA,SAAS,MAAM,CAAC,KAAa,EAAA;IAC3B,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,QAAA,MAAM,CAAC,KAAK,GAAG,CAAC;AAChB,QAAA,MAAM,CAAC,MAAM,GAAG,CAAC;AACjB,QAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;IAC/D;IACA,IAAI,CAAC,KAAK,EAAE;AACV,QAAA,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAClB;IACA,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3B,IAAA,KAAK,CAAC,SAAS,GAAG,KAAK;IACvB,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1B,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;AAE9D,IAAA,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC;AAC3B;AAEA,SAAS,iBAAiB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;;;;;;;;;;GAuCT,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,4jBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAxCS,mBAAmB,qGAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FA8CpC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAlDhC,SAAS;+BAEE,uBAAuB,EAAA,UAAA,EACrB,IAAI,EAAA,OAAA,EACP,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCT,EAAA,CAAA,EAAA,IAAA,EAEK,EAAE,sBAAsB,EAAE,eAAe,EAAE,EAAA,aAAA,EAClC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,4jBAAA,CAAA,EAAA;;;AC/EjD;;AAEG;;;;"}
@@ -375,6 +375,19 @@ class ChartComponent extends DsChartBase {
375
375
  this.measuredCategoryLabelWidth.set(this.widestLabel('.category-label'));
376
376
  },
377
377
  });
378
+ afterRenderEffect({
379
+ read: () => {
380
+ const origin = this.tooltipOrigin();
381
+ const pin = this.tooltipPinned()
382
+ ? this.host.nativeElement.querySelector('[dschartpinmarker]')
383
+ : null;
384
+ const rise = origin instanceof Element && pin
385
+ ? origin.getBoundingClientRect().top -
386
+ pin.getBoundingClientRect().top
387
+ : 0;
388
+ this.pinRise.set(Math.max(0, Math.round(rise)));
389
+ },
390
+ });
378
391
  }
379
392
  widestLabel(selector) {
380
393
  const labels = this.host.nativeElement.querySelectorAll(selector);
@@ -582,8 +595,7 @@ class ChartComponent extends DsChartBase {
582
595
  return valueScale(this.domain(), plot.top, plot.height);
583
596
  }, ...(ngDevMode ? [{ debugName: "yPosition" }] : /* istanbul ignore next */ []));
584
597
  zeroOffset = computed(() => this.yPosition()(0), ...(ngDevMode ? [{ debugName: "zeroOffset" }] : /* istanbul ignore next */ []));
585
- cursorBand = computed(() => {
586
- const index = this.activeIndex();
598
+ bandAt(index) {
587
599
  if (this.cursorResolved() !== 'category' || index < 0) {
588
600
  return null;
589
601
  }
@@ -595,17 +607,48 @@ class ChartComponent extends DsChartBase {
595
607
  top: plot.top,
596
608
  bottom: plot.top + plot.height,
597
609
  };
598
- }, ...(ngDevMode ? [{ debugName: "cursorBand" }] : /* istanbul ignore next */ []));
610
+ }
611
+ /** The band the panel reads from, drawn invisible as its fallback anchor. */
612
+ cursorBand = computed(() => this.bandAt(this.activeIndex()), ...(ngDevMode ? [{ debugName: "cursorBand" }] : /* istanbul ignore next */ []));
613
+ // A held band is not highlighted: under a pin the highlight follows the pointer alone.
614
+ highlightBand = computed(() => this.bandAt(this.tooltipPinned() ? this.hoveredCategory() : this.activeIndex()), ...(ngDevMode ? [{ debugName: "highlightBand" }] : /* istanbul ignore next */ []));
599
615
  /** The same state machine the element marks run on; here the index counts categories. */
600
616
  cursorState = chartActiveMark(() => this.defaults.tooltipLingerMs(), () => this.hoverDelayMs());
601
617
  activeIndex = this.cursorState.index;
602
618
  pointerAt = signal(null, ...(ngDevMode ? [{ debugName: "pointerAt" }] : /* istanbul ignore next */ []));
603
619
  // Set at once, not after the hover delay.
604
620
  pointerInBand = signal(false, ...(ngDevMode ? [{ debugName: "pointerInBand" }] : /* istanbul ignore next */ []));
605
- // At the band's foot: its head is where the panel opens, over the tallest reading.
606
- bandPinY(band) {
607
- return band.bottom - CHART_PIN_RADIUS - CHART_PIN_GAP;
608
- }
621
+ hoveredCategory = signal(-1, ...(ngDevMode ? [{ debugName: "hoveredCategory" }] : /* istanbul ignore next */ []));
622
+ /** Under the panel: it opens over the tallest reading, so the disc sits at that reading's head -
623
+ * inside a column, below a marker, and over a column too short to hold it. */
624
+ bandPinY = computed(() => {
625
+ const band = this.cursorBand();
626
+ const inset = CHART_PIN_RADIUS + CHART_PIN_GAP;
627
+ const origin = this.tooltipOrigin();
628
+ const canvas = this.canvasElement()?.nativeElement;
629
+ if (!band || !canvas || !(origin instanceof Element)) {
630
+ return (band?.top ?? 0) + inset;
631
+ }
632
+ const frame = canvas.getBoundingClientRect();
633
+ const scale = frame.height > 0 ? this.viewHeight() / frame.height : 1;
634
+ const head = origin.getBoundingClientRect();
635
+ const top = (head.top - frame.top) * scale;
636
+ const height = head.height * scale;
637
+ if (height >= 2 * inset) {
638
+ return top + inset;
639
+ }
640
+ if (!origin.matches('.bar')) {
641
+ return top + height + inset;
642
+ }
643
+ const value = origin.parentElement?.querySelector(':scope > .value');
644
+ const valueTop = value
645
+ ? (value.getBoundingClientRect().top - frame.top) * scale
646
+ : top;
647
+ return Math.min(top, valueTop) - inset;
648
+ }, ...(ngDevMode ? [{ debugName: "bandPinY" }] : /* istanbul ignore next */ []));
649
+ /** How far a held pin sits above the panel's anchor; the panel rises by as much to stay over it. */
650
+ pinRise = signal(0, ...(ngDevMode ? [{ debugName: "pinRise" }] : /* istanbul ignore next */ []));
651
+ tooltipGap = computed(() => Math.max(this.tooltipExtraGap(), this.pinRise()), ...(ngDevMode ? [{ debugName: "tooltipGap" }] : /* istanbul ignore next */ []));
609
652
  bandPins = computed(() => this.pinOnClickResolved() && this.pointerInBand(), ...(ngDevMode ? [{ debugName: "bandPins" }] : /* istanbul ignore next */ []));
610
653
  cursorPointer = computed(() => this.activeIndex() < 0 ? null : this.pointerAt(), ...(ngDevMode ? [{ debugName: "cursorPointer" }] : /* istanbul ignore next */ []));
611
654
  /** Whether the cursor is held. */
@@ -629,6 +672,7 @@ class ChartComponent extends DsChartBase {
629
672
  const index = this.clampIndex(categoryAt(viewX, plot.left, plot.width, this.categories().length));
630
673
  this.pointerAt.set({ x: event.clientX, y: event.clientY });
631
674
  this.pointerInBand.set(index >= 0);
675
+ this.hoveredCategory.set(index);
632
676
  if (index < 0) {
633
677
  if (event.type === 'pointerdown' && this.cursorPinned()) {
634
678
  this.cursorState.release();
@@ -658,6 +702,7 @@ class ChartComponent extends DsChartBase {
658
702
  window.removeEventListener('scroll', forgetRect, { capture: true });
659
703
  forgetRect();
660
704
  this.pointerInBand.set(false);
705
+ this.hoveredCategory.set(-1);
661
706
  // The panel goes back to the band the keyboard holds, which keeps it open while focus stays.
662
707
  if (this.keyboardFocusInside()) {
663
708
  this.cursorState.setIndex(this.focusedCategory());
@@ -917,7 +962,7 @@ class ChartComponent extends DsChartBase {
917
962
  provide: CHART_SCALES,
918
963
  useExisting: forwardRef(() => ChartComponent),
919
964
  },
920
- ], viewQueries: [{ propertyName: "canvasElement", first: true, predicate: ["canvasEl"], descendants: true, isSignal: true }, { propertyName: "bandElement", first: true, predicate: ["cursorBandEl"], descendants: true, isSignal: true }], exportAs: ["dsChart"], usesInheritance: true, ngImport: i0, template: "<figure\n class=\"chart\"\n dsChartStates\n messageAxes\n [unpin]=\"drawsUnpin\"\n [pinned]=\"cursorPinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"loading() || !renderReady()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"releaseCursor()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton\n height=\"var(--_chart-view-height)\"\n [shimmer]=\"loading()\" />\n </div>\n</ng-template>\n\n<ng-template #body>\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"tooltipSwatchesResolved()\"\n [dsChartTooltipExtraGap]=\"tooltipExtraGap()\"\n [dsChartTooltipPinned]=\"tooltipPinned()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate()\">\n <svg\n #canvasEl\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [class.pins]=\"bandPins()\"\n [style.block-size.px]=\"viewHeight()\"\n [attr.viewBox]=\"viewBox()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot().left\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"plot().width\"\n [attr.height]=\"plot().height\" />\n\n @if (secondaryPlot().top !== plot().top) {\n <rect\n class=\"plot-bg\"\n [attr.x]=\"secondaryPlot().left\"\n [attr.y]=\"secondaryPlot().top\"\n [attr.width]=\"secondaryPlot().width\"\n [attr.height]=\"secondaryPlot().height\" />\n }\n\n @if (cursorBand(); as band) {\n <g\n class=\"cursor\"\n aria-hidden=\"true\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\">\n <rect\n #cursorBandEl\n class=\"category-band\"\n [attr.x]=\"band.x\"\n [attr.y]=\"band.top\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - band.top\" />\n\n <line\n class=\"cursor-line\"\n [attr.x1]=\"band.x + band.width / 2\"\n [attr.x2]=\"band.x + band.width / 2\"\n [attr.y1]=\"band.top\"\n [attr.y2]=\"band.bottom\" />\n </g>\n }\n\n <!-- Not on the svg: an aria-hidden ancestor leaves a focusable projected mark\n reachable by Tab yet invisible to a reader. -->\n <g\n class=\"axes\"\n aria-hidden=\"true\">\n @for (tick of ticks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"plotBottom()\"\n [attr.y2]=\"plotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"plot().top\"\n [attr.y2]=\"plotBottom()\" />\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track tick.value) {\n <line\n class=\"grid-line is-secondary\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n }\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryPlotBottom()\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"secondaryPlot().top\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n }\n\n @if (reachesBelowZero()) {\n <line\n class=\"zero-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"zeroOffset()\"\n [attr.y2]=\"zeroOffset()\" />\n }\n </g>\n\n <!-- Two slots so a reference line paints under the marks in any source order. Both stay\n inside `.marks`, which the boot transition guard is keyed on. -->\n <g class=\"marks\">\n <ng-content select=\"[dsReferenceLine]\" />\n\n <ng-content />\n </g>\n\n <!-- After the marks, so a stop's ring paints over them. -->\n @if (keyboardStops()) {\n <g\n class=\"category-stops\"\n (keydown)=\"onStopKey($event)\">\n @for (stop of categoryStops(); track stop.index) {\n <rect\n class=\"category-stop\"\n [attr.data-category-index]=\"stop.index\"\n [attr.x]=\"stop.x\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"stop.width\"\n [attr.height]=\"plot().height\"\n [attr.tabindex]=\"stop.index === focusedCategory() ? 0 : -1\"\n [attr.aria-label]=\"stopLabel(stop.index)\"\n (focus)=\"onStopFocus(stop.index, $event)\"\n (blur)=\"onStopBlur($event)\" />\n }\n </g>\n }\n\n <g\n class=\"labels\"\n aria-hidden=\"true\">\n @if (axisLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"axisLabelFill()\"\n [attr.transform]=\"\n 'rotate(-90 ' +\n axisTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"axisTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ axisLabel() }}\n </text>\n }\n\n @if (secondaryAxisLabel() && hasSecondaryAxis()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"secondaryAxisLabelFill()\"\n [attr.transform]=\"\n 'rotate(90 ' +\n secondaryTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"secondaryTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ secondaryAxisLabel() }}\n </text>\n }\n\n @for (tick of ticks(); track tick.value) {\n <text\n class=\"axis-label is-primary\"\n text-anchor=\"end\"\n [style.fill]=\"axisLabelFill()\"\n [attr.x]=\"axisLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track tick.value) {\n <text\n class=\"axis-label is-secondary\"\n [style.fill]=\"secondaryAxisLabelFill()\"\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 label.index) {\n <text\n class=\"category-label\"\n [class.is-rotated]=\"categoryLabelsRotated()\"\n [attr.text-anchor]=\"categoryLabelsRotated() ? 'end' : 'middle'\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\"\n [attr.transform]=\"\n categoryLabelsRotated()\n ? 'rotate(-45 ' + label.x + ' ' + categoryLabelY() + ')'\n : null\n \"\n (pointerenter)=\"onCategoryLabelEnter(label.index, $event)\"\n (pointerleave)=\"onCategoryLabelLeave()\">\n {{ label.text }}\n </text>\n }\n\n <!-- Over the marks so an annotation's name survives a column drawn through it. -->\n <ng-content select=\"[dsReferenceLabel], [dsSeriesAnnotation]\" />\n </g>\n\n @if (cursorPinned() && cursorBand(); as band) {\n <g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' +\n (band.x + band.width / 2) +\n ',' +\n bandPinY(band) +\n ')'\n \">\n </g>\n }\n </svg>\n </div>\n</ng-template>\n", styles: [":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, var(--ds-chart-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{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}.chart{--_chart-grid-line-color: var(--ds-chart-grid-line-color, var(--chart-grid-line-color));--_chart-axis-line-color: var(--ds-chart-axis-line-color, var(--chart-axis-line-color));--_chart-axis-label-color: var(--ds-chart-axis-label-color, var(--chart-axis-label-color));--_chart-axis-font-size: var(--ds-chart-axis-font-size, var(--chart-axis-font-size));margin:0}:host{--_chart-message-height: var(--_chart-view-height)}.canvas{display:block;inline-size:100%}.canvas.pins{cursor:pointer}:host(.measuring) .marks ::ng-deep *{transition-duration:0ms!important}.grid-line{stroke:var(--_chart-grid-line-color);stroke-width:1}.axis-line,.zero-line{stroke:var(--_chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size)}.category-label.is-rotated{dominant-baseline:middle}.axis-title{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size);font-weight:var(--font-weight-bold)}.axis-label{dominant-baseline:middle}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}.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(--ds-chart-hover-bg-color)}.category-stop{fill:transparent;pointer-events:none}@media not (forced-colors:active){.category-stop:focus{outline:none}}@media not (forced-colors:active){.category-stop:focus-visible{outline:none}}.category-stop:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.cursor-line{stroke:var(--ds-chart-cursor-line-color);stroke-width:1}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }, { kind: "component", type: ChartPinMarkerComponent, selector: "g[dsChartPinMarker]" }, { kind: "component", type: ChartStatesComponent, selector: "figure[dsChartStates]", inputs: ["unpin", "pinned", "caption", "error", "errorText", "pending", "empty", "emptyText", "messageAxes", "skeleton", "body", "message"], outputs: ["release"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
965
+ ], viewQueries: [{ propertyName: "canvasElement", first: true, predicate: ["canvasEl"], descendants: true, isSignal: true }, { propertyName: "bandElement", first: true, predicate: ["cursorBandEl"], descendants: true, isSignal: true }], exportAs: ["dsChart"], usesInheritance: true, ngImport: i0, template: "<figure\n class=\"chart\"\n dsChartStates\n messageAxes\n [unpin]=\"drawsUnpin\"\n [pinned]=\"cursorPinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"loading() || !renderReady()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"releaseCursor()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton\n height=\"var(--_chart-view-height)\"\n [shimmer]=\"loading()\" />\n </div>\n</ng-template>\n\n<ng-template #body>\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"tooltipSwatchesResolved()\"\n [dsChartTooltipExtraGap]=\"tooltipGap()\"\n [dsChartTooltipPinned]=\"tooltipPinned()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate()\">\n <svg\n #canvasEl\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [class.pins]=\"bandPins()\"\n [style.block-size.px]=\"viewHeight()\"\n [attr.viewBox]=\"viewBox()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot().left\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"plot().width\"\n [attr.height]=\"plot().height\" />\n\n @if (secondaryPlot().top !== plot().top) {\n <rect\n class=\"plot-bg\"\n [attr.x]=\"secondaryPlot().left\"\n [attr.y]=\"secondaryPlot().top\"\n [attr.width]=\"secondaryPlot().width\"\n [attr.height]=\"secondaryPlot().height\" />\n }\n\n @if (cursorBand(); as band) {\n <rect\n #cursorBandEl\n class=\"cursor-anchor\"\n aria-hidden=\"true\"\n [attr.x]=\"band.x\"\n [attr.y]=\"band.top\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - band.top\" />\n }\n\n @if (highlightBand(); as band) {\n <g\n class=\"cursor\"\n aria-hidden=\"true\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\">\n <rect\n class=\"category-band\"\n [attr.x]=\"band.x\"\n [attr.y]=\"band.top\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - band.top\" />\n\n <line\n class=\"cursor-line\"\n [attr.x1]=\"band.x + band.width / 2\"\n [attr.x2]=\"band.x + band.width / 2\"\n [attr.y1]=\"band.top\"\n [attr.y2]=\"band.bottom\" />\n </g>\n }\n\n <!-- Not on the svg: an aria-hidden ancestor leaves a focusable projected mark\n reachable by Tab yet invisible to a reader. -->\n <g\n class=\"axes\"\n aria-hidden=\"true\">\n @for (tick of ticks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"plotBottom()\"\n [attr.y2]=\"plotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"plot().top\"\n [attr.y2]=\"plotBottom()\" />\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track tick.value) {\n <line\n class=\"grid-line is-secondary\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n }\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryPlotBottom()\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"secondaryPlot().top\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n }\n\n @if (reachesBelowZero()) {\n <line\n class=\"zero-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"zeroOffset()\"\n [attr.y2]=\"zeroOffset()\" />\n }\n </g>\n\n <!-- Two slots so a reference line paints under the marks in any source order. Both stay\n inside `.marks`, which the boot transition guard is keyed on. -->\n <g class=\"marks\">\n <ng-content select=\"[dsReferenceLine]\" />\n\n <ng-content />\n </g>\n\n <!-- After the marks, so a stop's ring paints over them. -->\n @if (keyboardStops()) {\n <g\n class=\"category-stops\"\n (keydown)=\"onStopKey($event)\">\n @for (stop of categoryStops(); track stop.index) {\n <rect\n class=\"category-stop\"\n [attr.data-category-index]=\"stop.index\"\n [attr.x]=\"stop.x\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"stop.width\"\n [attr.height]=\"plot().height\"\n [attr.tabindex]=\"stop.index === focusedCategory() ? 0 : -1\"\n [attr.aria-label]=\"stopLabel(stop.index)\"\n (focus)=\"onStopFocus(stop.index, $event)\"\n (blur)=\"onStopBlur($event)\" />\n }\n </g>\n }\n\n <g\n class=\"labels\"\n aria-hidden=\"true\">\n @if (axisLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"axisLabelFill()\"\n [attr.transform]=\"\n 'rotate(-90 ' +\n axisTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"axisTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ axisLabel() }}\n </text>\n }\n\n @if (secondaryAxisLabel() && hasSecondaryAxis()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"secondaryAxisLabelFill()\"\n [attr.transform]=\"\n 'rotate(90 ' +\n secondaryTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"secondaryTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ secondaryAxisLabel() }}\n </text>\n }\n\n @for (tick of ticks(); track tick.value) {\n <text\n class=\"axis-label is-primary\"\n text-anchor=\"end\"\n [style.fill]=\"axisLabelFill()\"\n [attr.x]=\"axisLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track tick.value) {\n <text\n class=\"axis-label is-secondary\"\n [style.fill]=\"secondaryAxisLabelFill()\"\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 label.index) {\n <text\n class=\"category-label\"\n [class.is-rotated]=\"categoryLabelsRotated()\"\n [attr.text-anchor]=\"categoryLabelsRotated() ? 'end' : 'middle'\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\"\n [attr.transform]=\"\n categoryLabelsRotated()\n ? 'rotate(-45 ' + label.x + ' ' + categoryLabelY() + ')'\n : null\n \"\n (pointerenter)=\"onCategoryLabelEnter(label.index, $event)\"\n (pointerleave)=\"onCategoryLabelLeave()\">\n {{ label.text }}\n </text>\n }\n\n <!-- Over the marks so an annotation's name survives a column drawn through it. -->\n <ng-content select=\"[dsReferenceLabel], [dsSeriesAnnotation]\" />\n </g>\n\n @if (cursorPinned() && cursorBand(); as band) {\n <g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' +\n (band.x + band.width / 2) +\n ',' +\n bandPinY() +\n ')'\n \">\n </g>\n }\n </svg>\n </div>\n</ng-template>\n", styles: [":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, var(--ds-chart-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{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}.chart{--_chart-grid-line-color: var(--ds-chart-grid-line-color, var(--chart-grid-line-color));--_chart-axis-line-color: var(--ds-chart-axis-line-color, var(--chart-axis-line-color));--_chart-axis-label-color: var(--ds-chart-axis-label-color, var(--chart-axis-label-color));--_chart-axis-font-size: var(--ds-chart-axis-font-size, var(--chart-axis-font-size));margin:0}:host{--_chart-message-height: var(--_chart-view-height)}.canvas{display:block;inline-size:100%}.canvas.pins{cursor:pointer}:host(.measuring) .marks ::ng-deep *{transition-duration:0ms!important}.grid-line{stroke:var(--_chart-grid-line-color);stroke-width:1}.axis-line,.zero-line{stroke:var(--_chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size)}.category-label.is-rotated{dominant-baseline:middle}.axis-title{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size);font-weight:var(--font-weight-bold)}.axis-label{dominant-baseline:middle}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}.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(--ds-chart-hover-bg-color)}.cursor-anchor{fill:none;pointer-events:none}.category-stop{fill:transparent;pointer-events:none}@media not (forced-colors:active){.category-stop:focus{outline:none}}@media not (forced-colors:active){.category-stop:focus-visible{outline:none}}.category-stop:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.cursor-line{stroke:var(--ds-chart-cursor-line-color);stroke-width:1}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }, { kind: "component", type: ChartPinMarkerComponent, selector: "g[dsChartPinMarker]" }, { kind: "component", type: ChartStatesComponent, selector: "figure[dsChartStates]", inputs: ["unpin", "pinned", "caption", "error", "errorText", "pending", "empty", "emptyText", "messageAxes", "skeleton", "body", "message"], outputs: ["release"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
921
966
  }
922
967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartComponent, decorators: [{
923
968
  type: Component,
@@ -937,11 +982,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
937
982
  provide: CHART_SCALES,
938
983
  useExisting: forwardRef(() => ChartComponent),
939
984
  },
940
- ], template: "<figure\n class=\"chart\"\n dsChartStates\n messageAxes\n [unpin]=\"drawsUnpin\"\n [pinned]=\"cursorPinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"loading() || !renderReady()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"releaseCursor()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton\n height=\"var(--_chart-view-height)\"\n [shimmer]=\"loading()\" />\n </div>\n</ng-template>\n\n<ng-template #body>\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"tooltipSwatchesResolved()\"\n [dsChartTooltipExtraGap]=\"tooltipExtraGap()\"\n [dsChartTooltipPinned]=\"tooltipPinned()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate()\">\n <svg\n #canvasEl\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [class.pins]=\"bandPins()\"\n [style.block-size.px]=\"viewHeight()\"\n [attr.viewBox]=\"viewBox()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot().left\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"plot().width\"\n [attr.height]=\"plot().height\" />\n\n @if (secondaryPlot().top !== plot().top) {\n <rect\n class=\"plot-bg\"\n [attr.x]=\"secondaryPlot().left\"\n [attr.y]=\"secondaryPlot().top\"\n [attr.width]=\"secondaryPlot().width\"\n [attr.height]=\"secondaryPlot().height\" />\n }\n\n @if (cursorBand(); as band) {\n <g\n class=\"cursor\"\n aria-hidden=\"true\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\">\n <rect\n #cursorBandEl\n class=\"category-band\"\n [attr.x]=\"band.x\"\n [attr.y]=\"band.top\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - band.top\" />\n\n <line\n class=\"cursor-line\"\n [attr.x1]=\"band.x + band.width / 2\"\n [attr.x2]=\"band.x + band.width / 2\"\n [attr.y1]=\"band.top\"\n [attr.y2]=\"band.bottom\" />\n </g>\n }\n\n <!-- Not on the svg: an aria-hidden ancestor leaves a focusable projected mark\n reachable by Tab yet invisible to a reader. -->\n <g\n class=\"axes\"\n aria-hidden=\"true\">\n @for (tick of ticks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"plotBottom()\"\n [attr.y2]=\"plotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"plot().top\"\n [attr.y2]=\"plotBottom()\" />\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track tick.value) {\n <line\n class=\"grid-line is-secondary\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n }\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryPlotBottom()\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"secondaryPlot().top\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n }\n\n @if (reachesBelowZero()) {\n <line\n class=\"zero-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"zeroOffset()\"\n [attr.y2]=\"zeroOffset()\" />\n }\n </g>\n\n <!-- Two slots so a reference line paints under the marks in any source order. Both stay\n inside `.marks`, which the boot transition guard is keyed on. -->\n <g class=\"marks\">\n <ng-content select=\"[dsReferenceLine]\" />\n\n <ng-content />\n </g>\n\n <!-- After the marks, so a stop's ring paints over them. -->\n @if (keyboardStops()) {\n <g\n class=\"category-stops\"\n (keydown)=\"onStopKey($event)\">\n @for (stop of categoryStops(); track stop.index) {\n <rect\n class=\"category-stop\"\n [attr.data-category-index]=\"stop.index\"\n [attr.x]=\"stop.x\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"stop.width\"\n [attr.height]=\"plot().height\"\n [attr.tabindex]=\"stop.index === focusedCategory() ? 0 : -1\"\n [attr.aria-label]=\"stopLabel(stop.index)\"\n (focus)=\"onStopFocus(stop.index, $event)\"\n (blur)=\"onStopBlur($event)\" />\n }\n </g>\n }\n\n <g\n class=\"labels\"\n aria-hidden=\"true\">\n @if (axisLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"axisLabelFill()\"\n [attr.transform]=\"\n 'rotate(-90 ' +\n axisTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"axisTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ axisLabel() }}\n </text>\n }\n\n @if (secondaryAxisLabel() && hasSecondaryAxis()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"secondaryAxisLabelFill()\"\n [attr.transform]=\"\n 'rotate(90 ' +\n secondaryTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"secondaryTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ secondaryAxisLabel() }}\n </text>\n }\n\n @for (tick of ticks(); track tick.value) {\n <text\n class=\"axis-label is-primary\"\n text-anchor=\"end\"\n [style.fill]=\"axisLabelFill()\"\n [attr.x]=\"axisLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track tick.value) {\n <text\n class=\"axis-label is-secondary\"\n [style.fill]=\"secondaryAxisLabelFill()\"\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 label.index) {\n <text\n class=\"category-label\"\n [class.is-rotated]=\"categoryLabelsRotated()\"\n [attr.text-anchor]=\"categoryLabelsRotated() ? 'end' : 'middle'\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\"\n [attr.transform]=\"\n categoryLabelsRotated()\n ? 'rotate(-45 ' + label.x + ' ' + categoryLabelY() + ')'\n : null\n \"\n (pointerenter)=\"onCategoryLabelEnter(label.index, $event)\"\n (pointerleave)=\"onCategoryLabelLeave()\">\n {{ label.text }}\n </text>\n }\n\n <!-- Over the marks so an annotation's name survives a column drawn through it. -->\n <ng-content select=\"[dsReferenceLabel], [dsSeriesAnnotation]\" />\n </g>\n\n @if (cursorPinned() && cursorBand(); as band) {\n <g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' +\n (band.x + band.width / 2) +\n ',' +\n bandPinY(band) +\n ')'\n \">\n </g>\n }\n </svg>\n </div>\n</ng-template>\n", styles: [":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, var(--ds-chart-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{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}.chart{--_chart-grid-line-color: var(--ds-chart-grid-line-color, var(--chart-grid-line-color));--_chart-axis-line-color: var(--ds-chart-axis-line-color, var(--chart-axis-line-color));--_chart-axis-label-color: var(--ds-chart-axis-label-color, var(--chart-axis-label-color));--_chart-axis-font-size: var(--ds-chart-axis-font-size, var(--chart-axis-font-size));margin:0}:host{--_chart-message-height: var(--_chart-view-height)}.canvas{display:block;inline-size:100%}.canvas.pins{cursor:pointer}:host(.measuring) .marks ::ng-deep *{transition-duration:0ms!important}.grid-line{stroke:var(--_chart-grid-line-color);stroke-width:1}.axis-line,.zero-line{stroke:var(--_chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size)}.category-label.is-rotated{dominant-baseline:middle}.axis-title{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size);font-weight:var(--font-weight-bold)}.axis-label{dominant-baseline:middle}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}.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(--ds-chart-hover-bg-color)}.category-stop{fill:transparent;pointer-events:none}@media not (forced-colors:active){.category-stop:focus{outline:none}}@media not (forced-colors:active){.category-stop:focus-visible{outline:none}}.category-stop:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.cursor-line{stroke:var(--ds-chart-cursor-line-color);stroke-width:1}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"] }]
985
+ ], template: "<figure\n class=\"chart\"\n dsChartStates\n messageAxes\n [unpin]=\"drawsUnpin\"\n [pinned]=\"cursorPinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"loading() || !renderReady()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n (release)=\"releaseCursor()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton\n height=\"var(--_chart-view-height)\"\n [shimmer]=\"loading()\" />\n </div>\n</ng-template>\n\n<ng-template #body>\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipSwatches]=\"tooltipSwatchesResolved()\"\n [dsChartTooltipExtraGap]=\"tooltipGap()\"\n [dsChartTooltipPinned]=\"tooltipPinned()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate()\">\n <svg\n #canvasEl\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [class.pins]=\"bandPins()\"\n [style.block-size.px]=\"viewHeight()\"\n [attr.viewBox]=\"viewBox()\">\n <rect\n class=\"plot-bg\"\n [attr.x]=\"plot().left\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"plot().width\"\n [attr.height]=\"plot().height\" />\n\n @if (secondaryPlot().top !== plot().top) {\n <rect\n class=\"plot-bg\"\n [attr.x]=\"secondaryPlot().left\"\n [attr.y]=\"secondaryPlot().top\"\n [attr.width]=\"secondaryPlot().width\"\n [attr.height]=\"secondaryPlot().height\" />\n }\n\n @if (cursorBand(); as band) {\n <rect\n #cursorBandEl\n class=\"cursor-anchor\"\n aria-hidden=\"true\"\n [attr.x]=\"band.x\"\n [attr.y]=\"band.top\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - band.top\" />\n }\n\n @if (highlightBand(); as band) {\n <g\n class=\"cursor\"\n aria-hidden=\"true\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\">\n <rect\n class=\"category-band\"\n [attr.x]=\"band.x\"\n [attr.y]=\"band.top\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - band.top\" />\n\n <line\n class=\"cursor-line\"\n [attr.x1]=\"band.x + band.width / 2\"\n [attr.x2]=\"band.x + band.width / 2\"\n [attr.y1]=\"band.top\"\n [attr.y2]=\"band.bottom\" />\n </g>\n }\n\n <!-- Not on the svg: an aria-hidden ancestor leaves a focusable projected mark\n reachable by Tab yet invisible to a reader. -->\n <g\n class=\"axes\"\n aria-hidden=\"true\">\n @for (tick of ticks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"plotBottom()\"\n [attr.y2]=\"plotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"plot().top\"\n [attr.y2]=\"plotBottom()\" />\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track tick.value) {\n <line\n class=\"grid-line is-secondary\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n }\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryPlotBottom()\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plot().left\"\n [attr.y1]=\"secondaryPlot().top\"\n [attr.y2]=\"secondaryPlotBottom()\" />\n }\n\n @if (reachesBelowZero()) {\n <line\n class=\"zero-line\"\n [attr.x1]=\"plot().left\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"zeroOffset()\"\n [attr.y2]=\"zeroOffset()\" />\n }\n </g>\n\n <!-- Two slots so a reference line paints under the marks in any source order. Both stay\n inside `.marks`, which the boot transition guard is keyed on. -->\n <g class=\"marks\">\n <ng-content select=\"[dsReferenceLine]\" />\n\n <ng-content />\n </g>\n\n <!-- After the marks, so a stop's ring paints over them. -->\n @if (keyboardStops()) {\n <g\n class=\"category-stops\"\n (keydown)=\"onStopKey($event)\">\n @for (stop of categoryStops(); track stop.index) {\n <rect\n class=\"category-stop\"\n [attr.data-category-index]=\"stop.index\"\n [attr.x]=\"stop.x\"\n [attr.y]=\"plot().top\"\n [attr.width]=\"stop.width\"\n [attr.height]=\"plot().height\"\n [attr.tabindex]=\"stop.index === focusedCategory() ? 0 : -1\"\n [attr.aria-label]=\"stopLabel(stop.index)\"\n (focus)=\"onStopFocus(stop.index, $event)\"\n (blur)=\"onStopBlur($event)\" />\n }\n </g>\n }\n\n <g\n class=\"labels\"\n aria-hidden=\"true\">\n @if (axisLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"axisLabelFill()\"\n [attr.transform]=\"\n 'rotate(-90 ' +\n axisTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"axisTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ axisLabel() }}\n </text>\n }\n\n @if (secondaryAxisLabel() && hasSecondaryAxis()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [style.fill]=\"secondaryAxisLabelFill()\"\n [attr.transform]=\"\n 'rotate(90 ' +\n secondaryTitleX() +\n ' ' +\n (plot().top + plot().height / 2) +\n ')'\n \"\n [attr.x]=\"secondaryTitleX()\"\n [attr.y]=\"plot().top + plot().height / 2\">\n {{ secondaryAxisLabel() }}\n </text>\n }\n\n @for (tick of ticks(); track tick.value) {\n <text\n class=\"axis-label is-primary\"\n text-anchor=\"end\"\n [style.fill]=\"axisLabelFill()\"\n [attr.x]=\"axisLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track tick.value) {\n <text\n class=\"axis-label is-secondary\"\n [style.fill]=\"secondaryAxisLabelFill()\"\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 label.index) {\n <text\n class=\"category-label\"\n [class.is-rotated]=\"categoryLabelsRotated()\"\n [attr.text-anchor]=\"categoryLabelsRotated() ? 'end' : 'middle'\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\"\n [attr.transform]=\"\n categoryLabelsRotated()\n ? 'rotate(-45 ' + label.x + ' ' + categoryLabelY() + ')'\n : null\n \"\n (pointerenter)=\"onCategoryLabelEnter(label.index, $event)\"\n (pointerleave)=\"onCategoryLabelLeave()\">\n {{ label.text }}\n </text>\n }\n\n <!-- Over the marks so an annotation's name survives a column drawn through it. -->\n <ng-content select=\"[dsReferenceLabel], [dsSeriesAnnotation]\" />\n </g>\n\n @if (cursorPinned() && cursorBand(); as band) {\n <g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' +\n (band.x + band.width / 2) +\n ',' +\n bandPinY() +\n ')'\n \">\n </g>\n }\n </svg>\n </div>\n</ng-template>\n", styles: [":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, var(--ds-chart-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{-webkit-user-select:text;user-select:text}.empty-text.is-error{color:var(--error)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}.chart{--_chart-grid-line-color: var(--ds-chart-grid-line-color, var(--chart-grid-line-color));--_chart-axis-line-color: var(--ds-chart-axis-line-color, var(--chart-axis-line-color));--_chart-axis-label-color: var(--ds-chart-axis-label-color, var(--chart-axis-label-color));--_chart-axis-font-size: var(--ds-chart-axis-font-size, var(--chart-axis-font-size));margin:0}:host{--_chart-message-height: var(--_chart-view-height)}.canvas{display:block;inline-size:100%}.canvas.pins{cursor:pointer}:host(.measuring) .marks ::ng-deep *{transition-duration:0ms!important}.grid-line{stroke:var(--_chart-grid-line-color);stroke-width:1}.axis-line,.zero-line{stroke:var(--_chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size)}.category-label.is-rotated{dominant-baseline:middle}.axis-title{fill:var(--_chart-axis-label-color);font-size:var(--_chart-axis-font-size);font-weight:var(--font-weight-bold)}.axis-label{dominant-baseline:middle}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}.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(--ds-chart-hover-bg-color)}.cursor-anchor{fill:none;pointer-events:none}.category-stop{fill:transparent;pointer-events:none}@media not (forced-colors:active){.category-stop:focus{outline:none}}@media not (forced-colors:active){.category-stop:focus-visible{outline:none}}.category-stop:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color, var(--ds-chart-bg-color)))}.cursor-line{stroke:var(--ds-chart-cursor-line-color);stroke-width:1}.plot-bg{fill:var(--ds-chart-plot-bg-color, transparent);pointer-events:none}\n"] }]
941
986
  }], ctorParameters: () => [], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], cursor: [{ type: i0.Input, args: [{ isSignal: true, alias: "cursor", required: false }] }], maxSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSecondary", required: false }] }], plotHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "plotHeight", required: false }] }], axisGutter: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisGutter", required: false }] }], valueSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueSpace", required: false }] }], secondaryAxisMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryAxisMode", required: false }] }], axisColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisColor", required: false }] }], secondaryAxisColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryAxisColor", required: false }] }], axisLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisLabel", required: false }] }], secondaryAxisLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryAxisLabel", required: false }] }], tooltipTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTemplate", required: false }] }], tooltipExtraGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipExtraGap", required: false }] }], canvasElement: [{ type: i0.ViewChild, args: ['canvasEl', { isSignal: true }] }], bandElement: [{ type: i0.ViewChild, args: ['cursorBandEl', { isSignal: true }] }] } });
942
987
 
943
988
  /** Distance from a mark's tip to its value label's baseline. */
944
989
  const VALUE_LABEL_GAP = 8;
990
+ // The printed value's cap height at `--font-size-xs`.
991
+ const VALUE_LABEL_HEIGHT = 10;
945
992
  /** Blank at a stacked segment's lower end: a background-colour gap, not a drawn rule (which vanishes in print). */
946
993
  const STACK_SEGMENT_GAP = 2;
947
994
  let nextSeriesId$1 = 0;
@@ -1125,7 +1172,7 @@ class ColumnSeriesComponent {
1125
1172
  top: Math.min(tip, baseline),
1126
1173
  height: Math.abs(tip - baseline),
1127
1174
  labelY: below ? tip + VALUE_LABEL_GAP : tip - VALUE_LABEL_GAP,
1128
- pinY: Math.min(tip, baseline) + CHART_PIN_RADIUS + CHART_PIN_GAP,
1175
+ pinY: this.pinYOf(tip, baseline, below),
1129
1176
  origin: below ? 'top' : 'bottom',
1130
1177
  formattedValue: format(point.value, 'tooltip'),
1131
1178
  color,
@@ -1133,6 +1180,17 @@ class ColumnSeriesComponent {
1133
1180
  };
1134
1181
  });
1135
1182
  }, ...(ngDevMode ? [{ debugName: "marks" }] : /* istanbul ignore next */ []));
1183
+ /** Inside the column's top when it holds the disc - the panel opens there - and over the column
1184
+ * and its printed value when it is too short, so the disc never crosses the baseline. */
1185
+ pinYOf(tip, baseline, below) {
1186
+ const inset = CHART_PIN_RADIUS + CHART_PIN_GAP;
1187
+ const top = Math.min(tip, baseline);
1188
+ if (Math.abs(tip - baseline) >= 2 * inset) {
1189
+ return top + inset;
1190
+ }
1191
+ const value = this.showValues() && !below ? VALUE_LABEL_GAP + VALUE_LABEL_HEIGHT : 0;
1192
+ return top - value - inset;
1193
+ }
1136
1194
  markStagger(index) {
1137
1195
  return `${staggerDelay(index, this.marks().length, this.staggerMs())}ms`;
1138
1196
  }