@ids-group-ltd/ids-design-system 0.14.4 → 0.14.5
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.
- package/CHANGELOG.md +160 -0
- package/components.md +14 -14
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/ds-bar-chart.md +1 -1
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +1 -1
- package/docs/agent/charts/ds-funnel-chart.md +1 -1
- package/docs/agent/charts/ds-heatmap-chart.md +1 -1
- package/docs/agent/charts/ds-line-chart.md +1 -1
- package/docs/agent/charts/ds-pie-chart.md +3 -3
- package/docs/agent/charts/ds-scatter-chart.md +1 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/navigation/ds-breadcrumbs.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +58 -163
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +21 -34
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +34 -105
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +22 -48
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +6 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +28 -130
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +11 -29
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +10 -28
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +16 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +42 -69
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +15 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +6 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +3 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +12 -28
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +58 -112
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +182 -432
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +8 -22
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +28 -123
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +45 -116
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +4 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +7 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +7 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +16 -45
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +10 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +19 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +48 -163
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +27 -85
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +17 -25
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +21 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +3 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +50 -166
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +6 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +19 -36
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +30 -57
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +37 -103
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +5 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +9 -15
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +9 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +32 -120
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +14 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +15 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +9 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +27 -91
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +16 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +8 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +18 -52
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +30 -49
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +6 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +29 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +8 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +5 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +5 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +11 -23
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +7 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +9 -43
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +167 -353
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +33 -86
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +23 -47
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +21 -49
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +35 -63
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +38 -50
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +3 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +28 -85
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +325 -579
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +51 -85
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -21
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +4 -13
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +1 -2
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
- package/migrations/0.14.5.json +311 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +17 -2
- package/styles/_breakpoints.scss +6 -23
- package/styles/_chart-data-table.scss +3 -11
- package/styles/_chart-frame.scss +14 -63
- package/styles/_chart-interactive.scss +8 -36
- package/styles/_chart-motion.scss +11 -39
- package/styles/_check-box.scss +7 -26
- package/styles/_check-mark.scss +7 -23
- package/styles/_chip-row.scss +3 -14
- package/styles/_clear-button.scss +2 -7
- package/styles/_control-label.scss +2 -13
- package/styles/_control-line.scss +2 -6
- package/styles/_dropdown-overlay.scss +8 -33
- package/styles/_ds-color.scss +9 -28
- package/styles/_field-box.scss +4 -16
- package/styles/_field-group-segment.scss +6 -6
- package/styles/_field-label.scss +3 -14
- package/styles/_field-state.scss +5 -10
- package/styles/_focus.scss +20 -60
- package/styles/_icon-base.scss +0 -2
- package/styles/_layout-utils.scss +0 -3
- package/styles/_link.scss +4 -18
- package/styles/_overlay-motion.scss +15 -38
- package/styles/_page-grid.scss +4 -29
- package/styles/_press.scss +5 -18
- package/styles/_reset.scss +1 -14
- package/styles/_scrollbar.scss +0 -2
- package/styles/_skeleton-shimmer.scss +3 -14
- package/styles/_status.scss +5 -13
- package/styles/_surface-motion.scss +7 -34
- package/styles/_table-controls.scss +3 -6
- package/styles/_text-clip.scss +2 -6
- package/styles/_theme-activation.scss +7 -20
- package/styles/_toast-overlay.scss +2 -6
- package/styles/_tokens-charts.scss +31 -90
- package/styles/_tokens.scss +111 -156
- package/styles/_typography.scss +6 -13
- package/styles/_visually-hidden.scss +2 -3
- package/styles/ds.scss +2 -10
- package/themes/_base-palette.scss +12 -35
- package/themes/_semantic.scss +29 -98
- package/themes/dark/_palette.scss +15 -29
- package/themes/dark/_theme.scss +14 -32
- package/themes/light/_palette.scss +2 -17
- package/themes/light/_theme.scss +1 -7
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +2 -6
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +45 -119
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +19 -32
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +29 -92
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +23 -46
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +5 -5
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -8
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +27 -136
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +13 -32
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +6 -12
- package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +6 -9
- package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +36 -55
- package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +13 -18
- package/types/ids-group-ltd-ids-design-system-components-card.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +5 -11
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +10 -26
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +27 -49
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +161 -385
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +6 -10
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +5 -14
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +29 -124
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +23 -70
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +3 -7
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +1 -3
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +6 -8
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +17 -50
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +8 -12
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +13 -28
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +25 -113
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +17 -85
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +15 -23
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +18 -37
- package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +51 -160
- package/types/ids-group-ltd-ids-design-system-components-list.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +4 -9
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +13 -21
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +15 -28
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +27 -83
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +5 -6
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +5 -7
- package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +6 -10
- package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +8 -22
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +18 -102
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +7 -11
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +14 -25
- package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +7 -12
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +21 -96
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +12 -33
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +6 -7
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +12 -41
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +8 -15
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +23 -40
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +3 -5
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-sparkline.d.ts +14 -10
- package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +6 -7
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +2 -15
- package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +4 -6
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +5 -9
- package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +3 -7
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +4 -8
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +9 -43
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +160 -369
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +21 -49
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +5 -5
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +17 -34
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +17 -38
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +20 -37
- package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +17 -36
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +21 -70
- package/types/ids-group-ltd-ids-design-system-components.d.ts +262 -415
- package/types/ids-group-ltd-ids-design-system-core.d.ts +133 -260
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +2 -24
- package/types/ids-group-ltd-ids-design-system-overlay.d.ts +4 -13
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart.mjs","sources":["../../../src/lib/components/chart/chart.math.ts","../../../src/lib/components/chart/chart-scales.token.ts","../../../src/lib/components/chart/chart.component.ts","../../../src/lib/components/chart/chart.component.html","../../../src/lib/components/chart/column-series.component.ts","../../../src/lib/components/chart/column-series.component.html","../../../src/lib/components/chart/line-series.component.ts","../../../src/lib/components/chart/line-series.component.html","../../../src/lib/components/chart/reference-label.component.ts","../../../src/lib/components/chart/reference-label.component.html","../../../src/lib/components/chart/reference-line.component.ts","../../../src/lib/components/chart/reference-line.component.html","../../../src/lib/components/chart/series-annotation.component.ts","../../../src/lib/components/chart/series-annotation.component.html","../../../src/lib/components/chart/ids-group-ltd-ids-design-system-components-chart.ts"],"sourcesContent":["import {\n domainMinOf,\n linearScale,\n niceDomain,\n roundStepAtLeast,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { NiceDomain } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ChartAxisMode,\n ChartStackMode,\n ChartThreshold,\n ChartThresholdDash,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { ChartTooltipEntry } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type { ChartAxisEntry } from './chart-scales.token';\n\nexport const CHART_DEFAULT_TICK_COUNT = 5;\nexport const CHART_AXIS_LABEL_GAP = 8;\n\n/** Room a rotated axis title needs across the gutter: its line box, turned on its side. */\nexport const CHART_AXIS_TITLE_BAND = 20;\nexport const CHART_CATEGORY_LABEL_OFFSET = 18;\nexport const CHART_BAND_PADDING = 0.3;\n\n/** What the chart lays out at while it measures zero: under SSR, while the host is\n * `display: none`, and for the frame before the first `ResizeObserver` callback. Without it the\n * plot is `0 - axisGutter - EDGE_GUTTER` wide, which clamps to zero and stacks every category on\n * one x rather than leaving a blank space that the measurement then fills.\n *\n * The client cost is one frame drawn at this width and scaled to fit - measured at a 400px card\n * in Chrome 153: `viewBox=\"0 0 640 310\"` at t=242ms, `\"0 0 358 310\"` at t=260ms.\n *\n * @internal */\nexport const CHART_FALLBACK_WIDTH = 640;\n\nexport const CHART_DEFAULT_PLOT_HEIGHT = 240;\nexport const CHART_DEFAULT_AXIS_GUTTER = 46;\nexport const CHART_DEFAULT_VALUE_SPACE = 20;\n\n/** Room past the last band, so a mark centred on it is not cut by the viewBox edge. */\nexport const CHART_EDGE_GUTTER = 12;\n\n/** Blank between two stacked plots: enough for the lower plot's top tick label to clear the upper\n * plot's category-free bottom edge. */\nexport const CHART_STACKED_PLOT_GAP = 34;\n\n/** Height of the category-label row under the plot: one line plus its descenders. */\nconst CATEGORY_GUTTER = 30;\n\n/** The drawable rectangle, in the same CSS pixels the container was measured in.\n *\n * `measuredWidth` is the `<svg>`'s own rendered width, which is what makes every coordinate\n * derived from this an exact CSS pixel: the viewBox is sized to match, so one user unit is one\n * pixel and a mark capped at 48 is 48 pixels wide at every card width.\n *\n * @internal */\nexport function chartPlot(\n measuredWidth: number,\n plotHeight: number,\n axisGutter: number,\n valueSpace: number,\n rightGutter: number = CHART_EDGE_GUTTER,\n): { left: number; top: number; width: number; height: number } {\n return {\n left: axisGutter,\n top: valueSpace,\n width: Math.max(0, measuredWidth - axisGutter - rightGutter),\n height: Math.max(0, plotHeight),\n };\n}\n\n/** The viewBox's height, and the `<svg>`'s rendered height in pixels - the two are the same\n * number, which is what holds the 1:1 scale on the vertical axis too.\n *\n * `valueSpace` is always budgeted above the plot, for a value label over the tallest mark. It is\n * budgeted a SECOND time below the baseline only when the domain reaches under zero, where a\n * negative mark's label would otherwise print into the category labels: reserving it for every\n * chart costs the all-positive ones - the common case - that much height for nothing.\n *\n * @internal */\nexport function chartViewHeight(\n plotHeight: number,\n valueSpace: number,\n reservesBelowBaseline = false,\n): number {\n const below = reservesBelowBaseline ? valueSpace : 0;\n\n return valueSpace + Math.max(0, plotHeight) + below + CATEGORY_GUTTER;\n}\n\n/** The domain the value axis draws: the union of every reported set, always reaching zero,\n * widened by the pins and snapped to a round tick step.\n *\n * Zero is always in it because a bar measured against a floating floor misstates its own size,\n * and a pin only ever widens because a maximum under the data would push readings off the plot\n * rather than rescale them.\n *\n * @internal */\nexport function axisDomain(\n reported: Iterable<readonly number[]>,\n tickCount: number,\n pinnedMinimum: number | null = null,\n pinnedMaximum: number | null = null,\n): NiceDomain {\n let minimum = 0;\n let maximum = 0;\n for (const values of reported) {\n const finite = values.filter((value) => Number.isFinite(value));\n minimum = Math.min(minimum, domainMinOf(finite));\n maximum = finite.reduce(\n (highest, value) => Math.max(highest, value),\n maximum,\n );\n }\n if (\n pinnedMinimum !== null &&\n Number.isFinite(pinnedMinimum) &&\n pinnedMinimum < minimum\n ) {\n minimum = pinnedMinimum;\n }\n if (\n pinnedMaximum !== null &&\n Number.isFinite(pinnedMaximum) &&\n pinnedMaximum > maximum\n ) {\n maximum = pinnedMaximum;\n }\n\n return niceDomain(minimum, maximum, tickCount);\n}\n\n/** Where a value sits vertically, clamped inside the plot. An unplottable value lands on the\n * baseline rather than becoming a `NaN`, which would void the whole coordinate attribute it was\n * written into and take the mark off screen with nothing logged.\n *\n * @internal */\nexport function valueScale(\n domain: NiceDomain,\n top: number,\n height: number,\n): (value: number) => number {\n const baseline = top + height;\n const scale = linearScale(domain.min, domain.max, height);\n\n return (value) => {\n const y = baseline - scale(value);\n\n return Number.isFinite(y) ? Math.min(Math.max(y, top), baseline) : baseline;\n };\n}\n\n/** Distance from a reference line, or a band's upper edge, to its label's baseline. */\nconst THRESHOLD_LABEL_GAP = 5;\n\n/** Inset from the plot's LEFT edge. The label sits at the start of the line rather than its end\n * because a value label is centred on its column, and the last column's is the one nearest the\n * edge the line stops at - measured on the docs demo, a right-anchored \"Escalation\" printed over\n * the last column's own value. */\nconst THRESHOLD_LABEL_INSET = 4;\n\n/** @internal */\nexport interface ThresholdMark {\n /** Position in the list, not the reading: two thresholds may legitimately name the same value -\n * a target and the floor of the band around it - and keying on the value would collapse them\n * into one drawn line. */\n readonly key: number;\n readonly label: string;\n readonly color: string | null;\n readonly dash: ChartThresholdDash;\n readonly band: boolean;\n readonly left: number;\n readonly right: number;\n readonly width: number;\n readonly y: number;\n readonly top: number;\n readonly height: number;\n readonly labelX: number;\n readonly labelY: number;\n}\n\n/** Every drawable coordinate of a chart's reference lines and bands, so the strokes and the labels\n * - which paint in different layers, under the marks and over them - are laid out by one\n * calculation rather than by two that can disagree.\n *\n * @internal */\nexport function thresholdMarks(\n thresholds: readonly ChartThreshold[],\n plot: { left: number; top: number; width: number; height: number },\n toY: (value: number) => number,\n): readonly ThresholdMark[] {\n return thresholds.map((threshold, index) => {\n const y = toY(threshold.value);\n const far = threshold.to == null ? y : toY(threshold.to);\n const top = Math.min(y, far);\n\n return {\n key: index,\n label: threshold.label ?? '',\n color: threshold.color ?? null,\n dash: threshold.dash ?? 'dashed',\n band: threshold.to != null,\n left: plot.left,\n right: plot.left + plot.width,\n width: plot.width,\n y,\n top,\n height: Math.abs(y - far),\n labelX: plot.left + THRESHOLD_LABEL_INSET,\n labelY: top - THRESHOLD_LABEL_GAP,\n };\n });\n}\n\n/** A tick row's index for the value zero, or `null` when the rows do not carry one.\n *\n * Two axes share gridlines only if they also share a zero: a second scale hung on the first's\n * rows has to put its own zero on the same row, or a reading above the line on one axis sits\n * below it on the other. */\nfunction zeroRow(ticks: readonly number[]): number | null {\n if (ticks.length < 2) {\n return null;\n }\n const step = ticks[1] - ticks[0];\n if (!Number.isFinite(step) || step === 0) {\n return null;\n }\n const row = (0 - ticks[0]) / step;\n const rounded = Math.round(row);\n\n return Math.abs(row - rounded) < 1e-9 &&\n rounded >= 0 &&\n rounded < ticks.length\n ? rounded\n : null;\n}\n\n/** @internal */\nexport interface SecondaryAxis {\n readonly domain: NiceDomain;\n readonly ticks: readonly number[];\n /** True when the labels below belong on the PRIMARY axis's own tick rows, so the plot carries\n * one set of gridlines rather than two crossing each other. */\n readonly aligned: boolean;\n}\n\n/** The second value axis, as the four modes define it.\n *\n * `'aligned'` and `'exact'` hang the second scale on the first's tick rows and differ only in the\n * step: `'aligned'` snaps it up to a round number and overshoots the data, `'exact'` takes the\n * step the data needs and lands on it. `'dual-grid'` and `'split'` nice the second domain on\n * its own - stacked plots sit one above the other, so there is nothing to align.\n *\n * Falls back to an independent scale wherever alignment is not available: fewer than two rows, no\n * shared zero row, or a domain whose sign has no rows on its side of that zero.\n *\n * @internal */\nexport function secondaryAxis(\n primaryTicks: readonly number[],\n reported: Iterable<readonly number[]>,\n tickCount: number,\n mode: ChartAxisMode,\n pinnedMax: number | null = null,\n): SecondaryAxis {\n let minimum = 0;\n let maximum = 0;\n for (const values of reported) {\n const finite = values.filter((value) => Number.isFinite(value));\n minimum = Math.min(minimum, domainMinOf(finite));\n maximum = finite.reduce(\n (highest, value) => Math.max(highest, value),\n maximum,\n );\n }\n if (pinnedMax !== null && Number.isFinite(pinnedMax)) {\n maximum = pinnedMax;\n }\n const independent = (): SecondaryAxis => ({\n domain: niceDomain(minimum, maximum, tickCount),\n ticks: tickValues(minimum, maximum, tickCount),\n aligned: false,\n });\n\n if (mode !== 'aligned' && mode !== 'exact') {\n return independent();\n }\n const zero = zeroRow(primaryTicks);\n if (zero === null) {\n return independent();\n }\n const rowsAbove = primaryTicks.length - 1 - zero;\n const rowsBelow = zero;\n if ((maximum > 0 && rowsAbove === 0) || (minimum < 0 && rowsBelow === 0)) {\n return independent();\n }\n const needed = Math.max(\n rowsAbove > 0 ? maximum / rowsAbove : 0,\n rowsBelow > 0 ? -minimum / rowsBelow : 0,\n );\n const step = mode === 'aligned' ? roundStepAtLeast(needed) : needed;\n if (!Number.isFinite(step) || step <= 0) {\n return {\n domain: { min: 0, max: 0 },\n ticks: primaryTicks.map(() => 0),\n aligned: true,\n };\n }\n\n return {\n domain: { min: -rowsBelow * step, max: rowsAbove * step },\n ticks: primaryTicks.map((_, row) => roundTick((row - zero) * step)),\n aligned: true,\n };\n}\n\n/** A step multiplied back out rarely lands on itself, and an axis label that prints\n * `149.99999999999997` is the visible form of that. */\nfunction roundTick(value: number): number {\n return Number(value.toFixed(6));\n}\n\n/** Every segment's span on the value axis, series-major: `offsets[series][category]`.\n *\n * `'none'` and `'grouped'` give every series the same span it would have alone - the two differ in\n * where the band puts them, which is geometry rather than value. The stacking modes run a\n * POSITIVE and a NEGATIVE pile per category, so a negative segment hangs below the baseline\n * instead of being subtracted from the positive pile it sits in.\n *\n * `'normalized'` divides a running SUM rather than each share in turn: adding 20/60 to 40/60\n * lands on 0.9999999999999999, which draws a category that visibly falls short of full.\n */\nexport function stackOffsets(\n series: readonly (readonly number[])[],\n mode: ChartStackMode,\n): readonly (readonly ChartStackOffset[])[] {\n const reading = (value: number): number =>\n Number.isFinite(value) ? value : 0;\n if (mode === 'none' || mode === 'grouped') {\n return series.map((values) =>\n values.map((value) => ({ from: 0, to: reading(value) })),\n );\n }\n const magnitude: number[] = [];\n if (mode === 'normalized') {\n for (const values of series) {\n values.forEach((value, category) => {\n magnitude[category] =\n (magnitude[category] ?? 0) + Math.abs(reading(value));\n });\n }\n }\n const risen: number[] = [];\n const fallen: number[] = [];\n\n return series.map((values) =>\n values.map((raw, category) => {\n const value = reading(raw);\n const pile = value < 0 ? fallen : risen;\n const from = pile[category] ?? 0;\n const to = from + value;\n pile[category] = to;\n const total = mode === 'normalized' ? (magnitude[category] ?? 0) : 1;\n\n return total > 0\n ? { from: from / total, to: to / total }\n : { from: 0, to: 0 };\n }),\n );\n}\n\n/** A label pinned to one reading, so the point it names is legible with no pointer.\n *\n * @internal */\nexport interface ChartAnnotationMark {\n readonly key: string;\n readonly label: string;\n readonly x: number;\n readonly y: number;\n readonly anchor: 'start' | 'middle' | 'end';\n}\n\n/** View units between a reading and the label above it, and the margin inside which a label\n * anchors to its own edge instead of centring.\n *\n * @internal */\nconst ANNOTATION_GAP = 12;\n/** @internal */\nconst ANNOTATION_EDGE_GUARD = 48;\n\n/** Places a label against each reading it names.\n *\n * @internal */\nexport function annotationMarks(\n readings: readonly { key: string; label: string; x: number; y: number }[],\n plotWidth: number,\n): readonly ChartAnnotationMark[] {\n return readings.map((reading) => ({\n key: reading.key,\n label: reading.label,\n x: reading.x,\n // Above the reading, and below it where there is no room - a peak sits at the top of the\n // plot, which is exactly where a label clamped upward lands on its own marker.\n y:\n reading.y - ANNOTATION_GAP >= ANNOTATION_GAP\n ? reading.y - ANNOTATION_GAP\n : reading.y + ANNOTATION_GAP,\n // Anchored away from the plot edges: a centred label at the first or last category hangs\n // half outside the viewBox and is clipped rather than merely tight.\n anchor:\n reading.x < ANNOTATION_EDGE_GUARD\n ? 'start'\n : reading.x > plotWidth - ANNOTATION_EDGE_GUARD\n ? 'end'\n : 'middle',\n }));\n}\n\n/** Where one series' segment starts and ends on the value axis, in the axis's own unit - or in\n * shares of the category total under `'normalized'`.\n */\nexport interface ChartStackOffset {\n readonly from: number;\n readonly to: number;\n}\n\n/** Which category a pointer at `x` is over, or `-1` outside the plot. Bands are equal and abut,\n * so the reading is a division rather than a search - and the half band at each end belongs to\n * the first and last category, which is where a reader aiming at the edge means to be.\n *\n * @internal */\nexport function categoryAt(\n x: number,\n plotLeft: number,\n plotWidth: number,\n categoryCount: number,\n): number {\n if (categoryCount <= 0 || plotWidth <= 0 || !Number.isFinite(x)) {\n return -1;\n }\n const offset = x - plotLeft;\n if (offset < 0 || offset > plotWidth) {\n return -1;\n }\n const band = plotWidth / categoryCount;\n\n return Math.min(categoryCount - 1, Math.floor(offset / band));\n}\n\n/** Readings in the order the reader sees their marks, top to bottom, with the height dropped. A\n * tie, or a reading with no height, keeps its given place. */\nexport function topDown(\n entries: readonly ChartAxisEntry[],\n): ChartTooltipEntry[] {\n return [...entries]\n .sort((above, below) => (above.y ?? Infinity) - (below.y ?? Infinity) || 0)\n .map(({ y: _drawnAt, ...reading }) => reading);\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport type { ChartAxis } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartTooltipContext,\n ChartTooltipEntry,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\n\n/** A mark's reading at the cursor's category, with the height it is drawn at. */\nexport interface ChartAxisEntry extends ChartTooltipEntry {\n /** Where the reading is drawn, in plot pixels from the top. A category panel lists its rows in\n * the order the reader sees the marks, top to bottom; a reading without one keeps its place\n * after the placed ones. */\n readonly y?: number;\n}\n\n/** What a mark hands the container so the container can open the panel for it. The mark decides\n * WHAT the panel says and WHERE it points; the container decides that there is one, which is what\n * keeps a plot from opening two. */\nexport interface ChartTooltipSource {\n readonly context: Signal<ChartTooltipContext | null>;\n readonly origin: Signal<ChartTooltipOrigin | null>;\n /** Whether the mark is held. A held panel takes the pointer, so its text can be selected. */\n readonly pinned?: Signal<boolean>;\n /** Whether this mark shows a tooltip at all. Absent means it does. Two marks that do make the\n * plot a composed one, which is what turns the category cursor on under `cursor=\"auto\"`. */\n readonly offersTooltip?: Signal<boolean>;\n /** This mark's own reading at the category the cursor is on, as an element, whether or not the\n * pointer is over it. A category panel hangs over the highest of these. Absent falls back to\n * `origin`. */\n readonly axisOrigin?: Signal<Element | null>;\n /** What this mark reads at the category the cursor is on, whatever its own tooltip setting. A\n * category panel names every series at that category, and a mark that answers per-mark still\n * belongs in it. */\n readonly axisEntries?: Signal<readonly ChartAxisEntry[]>;\n}\n\n/** The drawable rectangle inside `ds-chart`, in CSS pixels: the container measures itself and\n * sizes its `viewBox` so one user unit is one pixel. A length written into a mark is therefore\n * the length it says it is, at every card width. The gutters outside it carry the axis labels. */\nexport interface ChartPlot {\n readonly width: number;\n readonly height: number;\n readonly left: number;\n readonly top: number;\n}\n\n/** What `ds-chart` offers the marks projected into it: one shared coordinate space, one shared\n * value domain, and one shared idea of which category the reader is on.\n *\n * A mark injects the token, reports the values it intends to draw, and reads its coordinates\n * back. It never sees the other marks, and the container never learns what kind of mark it is\n * holding - which is what lets a reference line, a bar series and an annotation share an axis\n * without any of them importing the others. */\nexport interface ChartScales {\n readonly categories: Signal<readonly string[]>;\n readonly plot: Signal<ChartPlot>;\n /** Whether the plot has its real width yet. Until it does, the scales describe a stand-in width\n * that the first measurement replaces, so a mark that waits for this builds its geometry once\n * instead of twice. Absent means always measured. */\n readonly measured?: Signal<boolean>;\n /** The CENTRE of a category's band. A mark with a width of its own subtracts half of\n * `bandWidth` to reach its leading edge. */\n readonly xPosition: Signal<(index: number) => number>;\n /** Clamped into the plot, so a value outside the drawn domain lands on an edge rather than\n * over the axis labels. */\n readonly yPosition: Signal<(value: number) => number>;\n readonly bandWidth: Signal<number>;\n /** The rectangle a secondary-axis mark draws in. The same one as `plot` unless the two axes are\n * stacked, where it is the lower of the two plots. */\n readonly secondaryPlot: Signal<ChartPlot>;\n /** `yPosition` for the second value axis. Identical to it while no mark has reported against\n * that axis, so a mark may read it without first asking whether one exists. */\n readonly secondaryYPosition: Signal<(value: number) => number>;\n readonly hasSecondaryAxis: Signal<boolean>;\n /** The y of value zero, which is the baseline a bar grows from and the line a signed domain\n * is read against. */\n readonly zeroOffset: Signal<number>;\n /** The category under the pointer or the keyboard, or `-1` for none. */\n readonly activeIndex: Signal<number>;\n /** Whether the category cursor answers the pointer. While it does, its band is the one hover\n * area on the plot: a mark leaves pointer hover to it and answers focus and clicks only.\n * Absent means off. */\n readonly cursorOn?: Signal<boolean>;\n /** The category whose axis label the pointer is on, with the event, while the category cursor\n * is off. A mark answers it as it would the pointer on its own reading at that category. */\n readonly categoryLabelHover?: Signal<{\n readonly index: number;\n readonly event: PointerEvent;\n } | null>;\n /** How long a resting pointer waits before a mark answers it, resolved once for the plot so\n * every mark in it waits alike. Absent means at once. */\n readonly hoverDelayMs?: Signal<number>;\n /** The band drawn over the active category, for a mark that anchors a panel to the CATEGORY\n * rather than to one of its own marks. `null` while `cursor` is off or nothing is active. */\n readonly cursorOrigin: Signal<Element | null>;\n /** Where the pointer last was, in client pixels, for a mark that anchors a panel to the cursor\n * rather than to a reading. `null` while `cursor` is off or the pointer has left. */\n readonly cursorPointer: Signal<{\n readonly x: number;\n readonly y: number;\n } | null>;\n setActiveIndex(index: number): void;\n /** Contributes values to the shared domain under an id the caller owns. Reporting again with\n * the same id replaces that contribution.\n *\n * Call it from an `effect`: a mark whose values come from a required `input` cannot read them\n * in its constructor, and the effect is also what re-reports when they change. */\n reportDomain(id: string, values: readonly number[], axis?: ChartAxis): void;\n /** Withdraws a contribution, which a mark does in `ngOnDestroy`. */\n releaseDomain(id: string): void;\n /** Offers the container a panel to open while this mark is the active one. Reporting again with\n * the same id replaces the offer. */\n reportTooltip(id: string, source: ChartTooltipSource): void;\n releaseTooltip(id: string): void;\n}\n\nexport const CHART_SCALES = new InjectionToken<ChartScales>('CHART_SCALES');\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n Signal,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n TemplateRef,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n bandScale,\n elementWidth,\n labelInterval,\n rotationWouldFit,\n tickValues,\n chartRenderGate,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { isPlatformBrowser } from '@angular/common';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport {\n CHART_PIN_GAP,\n CHART_PIN_RADIUS,\n ChartPinMarkerComponent,\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type { ChartTooltipContext } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartAxisMode,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n categoryAt,\n CHART_AXIS_LABEL_GAP,\n CHART_AXIS_TITLE_BAND,\n CHART_BAND_PADDING,\n CHART_CATEGORY_LABEL_OFFSET,\n CHART_DEFAULT_AXIS_GUTTER,\n CHART_DEFAULT_PLOT_HEIGHT,\n CHART_DEFAULT_TICK_COUNT,\n CHART_DEFAULT_VALUE_SPACE,\n CHART_EDGE_GUTTER,\n CHART_FALLBACK_WIDTH,\n CHART_STACKED_PLOT_GAP,\n axisDomain,\n chartPlot,\n chartViewHeight,\n secondaryAxis,\n topDown,\n valueScale,\n} from './chart.math';\nimport {\n CHART_SCALES,\n type ChartPlot,\n type ChartScales,\n type ChartTooltipSource,\n} from './chart-scales.token';\n\n@Component({\n selector: 'ds-chart',\n standalone: true,\n exportAs: 'dsChart',\n imports: [SkeletonComponent, ChartTooltipDirective, ChartPinMarkerComponent],\n templateUrl: './chart.component.html',\n styleUrl: './chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n '[class.measuring]': '!settled()',\n '[style.--_chart-view-height]': \"viewHeight() + 'px'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: CHART_SCALES,\n useExisting: forwardRef(() => ChartComponent),\n },\n ],\n})\nexport class ChartComponent implements ChartScales {\n protected readonly renderReady = chartRenderGate();\n\n /** The category axis. Every projected mark is positioned against this list, so its length is\n * what decides how many bands the plot has. */\n readonly categories = input<readonly string[]>([]);\n\n /** How many value-axis ticks to aim for. A hint, not a count: ticks snap to a round step, so\n * the axis may carry one more or one fewer. */\n readonly tickCount = input(CHART_DEFAULT_TICK_COUNT, {\n transform: numberAttribute,\n });\n\n /** Pins the floor of the value axis instead of deriving it from the marks. It only ever opens\n * the axis further: a floor above the data would push readings off the plot. */\n readonly min = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Pins the ceiling of the value axis. See `min`. Two charts drawn one subject at a time are\n * only comparable when both are pinned. */\n readonly max = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Draws a band and a crosshair down the category under the pointer, and reports that category\n * to every mark through `activeIndex`. On a plot of two or more marks that show a tooltip, the\n * panel then names every mark's reading at that category wherever in it the pointer is.\n * `'auto'`, the default, is `'category'` for such a composed plot and `'none'` for a plot of one\n * mark, whose marks already answer per mark: two affordances on one plot read as two different\n * questions. */\n readonly cursor = input<'none' | 'category' | 'auto'>('auto');\n\n /** Whether a press holds the category cursor where it is, so the reader can look away from the\n * plot with the comparison still on screen. Released by pressing it again, by Escape, or by a\n * press outside the plot. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then `true`. */\n readonly cursorPin = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n readonly cursorPinResolved = resolveWithConfig(\n this.cursorPin,\n (config) => config.chart?.pinOnClick,\n true,\n );\n\n /** Milliseconds the cursor survives the pointer leaving the plot. The tooltip panel is portaled\n * out of the plot, so without a grace period it closes before the pointer can reach it. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Pins the ceiling of the SECOND value axis, the way `max` pins the first. Two plots read\n * against each other need both pinned, or the second rescales under them. */\n readonly maxSecondary = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Height of the plot itself, in CSS pixels, axis labels and value headroom excluded. Real\n * pixels rather than a share of the width: one viewBox unit is one pixel, so a card that\n * widens spreads the categories further apart and leaves the plot exactly this tall. */\n readonly plotHeight = input(CHART_DEFAULT_PLOT_HEIGHT, {\n transform: numberAttribute,\n });\n\n /** Width in CSS pixels of the gutter down the left that carries the value-axis labels. Widen it\n * for long tick labels; the plot takes whatever is left. */\n readonly axisGutter = input(CHART_DEFAULT_AXIS_GUTTER, {\n transform: numberAttribute,\n });\n\n /** Pixels reserved for a value label at each end of the plot: above the top tick for a mark at\n * the ceiling, and below the baseline for a negative mark, whose label would otherwise print\n * over the category labels. Reserved whether or not a mark draws one, because a chart that\n * gains a label on one value must not change height. */\n readonly valueSpace = input(CHART_DEFAULT_VALUE_SPACE, {\n transform: numberAttribute,\n });\n\n /** Printed above the plot as the chart's visible title. */\n readonly caption = input<string | null>(null);\n\n /** Whether the projected marks answer to the pointer and the keyboard. The container draws no\n * marks of its own and only reads this for the plot's role: a group of controls to step\n * through, against a single image to be described. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Accessible name for the plot. The container holds no readings of its own, so a chart that\n * needs its numbers described supplies the sentence here - `describeSeries` is what the five\n * presets build it with. It is the whole label in the static case, where nothing else is\n * reachable. */\n readonly summary = input<string | null>(null);\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves it bare, for one placed inside a card the page has already drawn. Unset\n * falls back to `DS_CONFIG.chart.frame`, then `'auto'`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** Whether the tooltip draws a colour dot beside each reading. Unset falls back to\n * `DS_CONFIG.chart.tooltipSwatches`, then draws them for up to four readings. */\n readonly tooltipSwatches = input<boolean | null>(null, {\n transform: (value: unknown) =>\n value == null ? null : booleanAttribute(value),\n });\n\n /** Draws a placeholder in place of the plot, at the plot's own height, so the page does not\n * resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `categories` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty\n * `categories`, because \"the request failed\" and \"there is nothing to show\" read the same to a\n * reader and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats the value-axis ticks. Unset falls back to `DS_CONFIG.chart.valueFormat`, then\n * `DS_CONFIG.locale` / `LOCALE_ID`. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** How the second value axis relates to the first, once a mark has reported against it. The\n * same four words `ds-line-chart` takes. */\n readonly secondaryAxisMode = input<ChartAxisMode>('aligned');\n\n /** Paints the first axis's tick labels in the colour of the marks measured against it. A\n * two-scale plot is ambiguous without it - nothing on the canvas says which of two lines is\n * read against which set of numbers - and it is the author, not the container, who knows which\n * colour an axis belongs to, because several marks can share one. */\n readonly axisColor = input<string | null>(null);\n\n /** `axisColor` for the second axis. */\n readonly secondaryAxisColor = input<string | null>(null);\n\n /** Names the first axis's unit beside it. On a two-scale plot the colour says which line reads\n * which axis and this says what the numbers ARE - a reader who has neither is left comparing\n * two quantities that may not be comparable at all. */\n readonly axisLabel = input<string | null>(null);\n\n /** `axisLabel` for the second axis. */\n readonly secondaryAxisLabel = input<string | null>(null);\n\n private readonly defaults = resolveChartDefaults(this);\n\n protected readonly tooltipSwatchesResolved = this.defaults.tooltipSwatches;\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n readonly hoverDelayMs = this.defaults.hoverDelayMs;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly zone = inject(NgZone);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** The `<svg>`'s own rendered width: `:host(.framed)` carries the frame padding, so the host's\n * CONTENT box - which is what a `ResizeObserver` reports - is the box the canvas fills at\n * `inline-size: 100%`. Measuring the host is therefore measuring the canvas. */\n private readonly measuredWidth = elementWidth(this.host);\n\n /** Server-rendered output has no width to wait for, so it draws at the stand-in. */\n readonly measured = computed(\n () => !this.isBrowser || this.measuredWidth() > 0,\n );\n\n protected readonly viewWidth = computed(\n () => this.measuredWidth() || CHART_FALLBACK_WIDTH,\n );\n\n /** Whether the marks may animate yet. The first frame draws at `CHART_FALLBACK_WIDTH` scaled to\n * fit, so the measurement that follows moves every mark - and a mark that transitions its\n * geometry would play that correction as an animated slide on every load, hydration included.\n *\n * Two frames, not one. A transition starts when the property changes in a style that also\n * enables it, so the enabling must not land in the same style recalculation as the correction.\n * One `requestAnimationFrame` is not enough: scheduled from the change detection that writes\n * the corrected geometry, it runs at the START of the next frame, still before that geometry\n * has been through a recalculation. Measured with one frame: `transitionrun` on `x` and\n * `width`, both marks, on the same tick the class cleared. */\n protected readonly settled = signal(false);\n\n constructor() {\n effect((onCleanup) => {\n if (this.settled() || this.measuredWidth() === 0) {\n return;\n }\n let first = 0;\n let second = 0;\n // Outside the zone: under zone.js each frame callback is a full application tick, two per\n // chart, and the signal write schedules the one render this needs by itself.\n this.zone.runOutsideAngular(() => {\n first = requestAnimationFrame(() => {\n second = requestAnimationFrame(() => this.settled.set(true));\n });\n });\n onCleanup(() => {\n cancelAnimationFrame(first);\n cancelAnimationFrame(second);\n });\n });\n\n effect((onCleanup) => {\n const canvas = this.canvasElement()?.nativeElement;\n if (canvas && this.cursorResolved() === 'category') {\n onCleanup(this.listenForCursor(canvas));\n }\n });\n\n // The read phase, so every `getComputedTextLength` lands in one batch before any write:\n // interleaving them forces a synchronous layout per label. It re-measures when a label's text\n // changes, and only then - not when a resize merely moves the labels.\n afterRenderEffect({\n read: () => {\n this.labelTexts();\n this.measuredLabelWidth.set(this.widestLabel('.axis-label.is-primary'));\n this.measuredSecondaryLabelWidth.set(\n this.widestLabel('.axis-label.is-secondary'),\n );\n this.measuredCategoryLabelWidth.set(\n this.widestLabel('.category-label'),\n );\n },\n });\n }\n\n private widestLabel(selector: string): number {\n const labels =\n this.host.nativeElement.querySelectorAll<SVGTextElement>(selector);\n let widest = 0;\n for (const label of labels) {\n widest = Math.max(widest, label.getComputedTextLength());\n }\n\n return Math.ceil(widest);\n }\n\n /** Two plots, one above the other, sharing the category axis: the only mode whose second axis\n * is a second PLOT rather than a second scale over the first. */\n protected readonly stacked = computed(\n () => this.secondaryAxisMode() === 'split' && this.hasSecondaryAxis(),\n );\n\n protected readonly viewHeight = computed(\n () =>\n chartViewHeight(\n this.plotHeight(),\n this.valueSpace(),\n this.reachesBelowZero(),\n ) + (this.stacked() ? this.plotHeight() + CHART_STACKED_PLOT_GAP : 0),\n );\n\n /** One viewBox unit is one CSS pixel, in both axes. That is the whole point of measuring: a\n * radius, a gutter or a width cap set anywhere inside the plot is then the length it says it\n * is, at every card width, instead of a share of one that a fixed viewBox stretches. */\n protected readonly viewBox = computed(\n () => `0 0 ${this.viewWidth()} ${this.viewHeight()}`,\n );\n\n /** Widest tick label actually rendered, in the CSS pixels the canvas is drawn in. Zero until the\n * first read, and zero under SSR, where `axisGutter` alone decides. */\n private readonly measuredLabelWidth = signal(0);\n\n /** The widest category label as drawn, which is what decides whether they all fit. */\n private readonly measuredCategoryLabelWidth = signal(0);\n\n /** `axisGutter` is the FLOOR, not the answer: a compact number is far wider in some locales than\n * in others - `3,5 тыс.` against `3.5k` - and an SVG canvas CLIPS what a DOM column merely\n * overflowed, so a fixed gutter silently eats the leading digit. The gutter takes whichever is\n * larger, so setting the token still guarantees at least that much room.\n *\n * This converges rather than oscillating: a tick's TEXT is decided by the domain and the tick\n * count, neither of which the gutter feeds, so widening it moves the labels without rewriting\n * them and the second measurement equals the first. */\n protected readonly effectiveAxisGutter = computed(() =>\n Math.max(\n this.axisGutter(),\n this.measuredLabelWidth() + CHART_AXIS_LABEL_GAP + this.axisTitleGutter(),\n ),\n );\n\n /** A rotated axis title stands in the same gutter as the tick labels, so the gutter has to carry\n * both or the widest tick runs through the title. Its own width is its line height, because it\n * is turned on its side. */\n protected readonly axisTitleGutter = computed(() =>\n this.axisLabel() ? CHART_AXIS_TITLE_BAND : 0,\n );\n\n /** Where a rotated axis title sits: hard against the outer edge, with the tick labels between it\n * and the plot. */\n protected readonly axisTitleX = computed(() => CHART_AXIS_TITLE_BAND / 2);\n\n /** Mirrors `axisTitleX` against the right edge, so the two titles stand the same distance from\n * their own ticks. */\n protected readonly secondaryTitleX = computed(\n () => this.viewWidth() - CHART_AXIS_TITLE_BAND / 2,\n );\n\n /** Widest secondary tick label, measured the same way and for the same reason as the primary\n * one: those labels sit OUTSIDE the plot's right edge and an SVG canvas clips what a DOM\n * column merely overflowed. */\n private readonly measuredSecondaryLabelWidth = signal(0);\n\n /** The plot gives the right-hand labels room only when they are drawn there - a stacked second\n * axis puts both label columns down the left, so the plot keeps the full width. */\n protected readonly rightGutter = computed(() =>\n this.hasSecondaryAxis() && !this.stacked()\n ? Math.max(\n this.axisGutter(),\n this.measuredSecondaryLabelWidth() +\n CHART_AXIS_LABEL_GAP +\n this.secondaryTitleGutter(),\n )\n : CHART_EDGE_GUTTER,\n );\n\n /** The second axis's title stands in the right gutter exactly as the first one's stands in the\n * left, so both sides reserve the same band and the plot sits centred between its two labels. */\n protected readonly secondaryTitleGutter = computed(() =>\n this.secondaryAxisLabel() && this.hasSecondaryAxis()\n ? CHART_AXIS_TITLE_BAND\n : 0,\n );\n\n readonly plot: Signal<ChartPlot> = computed(() =>\n chartPlot(\n this.viewWidth(),\n this.plotHeight(),\n this.effectiveAxisGutter(),\n this.valueSpace(),\n this.rightGutter(),\n ),\n );\n\n readonly secondaryPlot: Signal<ChartPlot> = computed(() => {\n const plot = this.plot();\n\n return this.stacked()\n ? { ...plot, top: plot.top + plot.height + CHART_STACKED_PLOT_GAP }\n : plot;\n });\n\n private readonly reportedDomains = signal<\n ReadonlyMap<\n string,\n { readonly axis: ChartAxis; readonly values: readonly number[] }\n >\n >(new Map());\n\n reportDomain(\n id: string,\n values: readonly number[],\n axis: ChartAxis = 'primary',\n ): void {\n this.reportedDomains.update((reported) =>\n new Map(reported).set(id, { axis, values }),\n );\n }\n\n private valuesOn(axis: ChartAxis): readonly (readonly number[])[] {\n const found: (readonly number[])[] = [];\n for (const report of this.reportedDomains().values()) {\n if (report.axis === axis) {\n found.push(report.values);\n }\n }\n\n return found;\n }\n\n releaseDomain(id: string): void {\n this.reportedDomains.update((reported) => {\n const next = new Map(reported);\n next.delete(id);\n\n return next;\n });\n }\n\n /** A template that replaces the panel's body, for a preset that prints more than label+value. */\n readonly tooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n /** Extra clearance between the mark and the panel, for a chart that prints a value label in\n * the gap the panel would otherwise take. */\n readonly tooltipExtraGap = input(0, { transform: numberAttribute });\n\n private readonly tooltipSources = signal<\n ReadonlyMap<string, ChartTooltipSource>\n >(new Map());\n\n reportTooltip(id: string, source: ChartTooltipSource): void {\n this.tooltipSources.update((sources) => new Map(sources).set(id, source));\n }\n\n releaseTooltip(id: string): void {\n this.tooltipSources.update((sources) => {\n const next = new Map(sources);\n next.delete(id);\n\n return next;\n });\n }\n\n /** Two or more marks that show a tooltip: the plot reads as one comparison, so its panel is about\n * the category rather than about whichever mark the pointer happens to be over. */\n private readonly composed = computed(\n () =>\n [...this.tooltipSources().values()].filter(\n (source) => source.offersTooltip?.() ?? true,\n ).length > 1,\n );\n\n protected readonly cursorResolved = computed(() => {\n const cursor = this.cursor();\n if (cursor !== 'auto') {\n return cursor;\n }\n\n return this.composed() ? 'category' : 'none';\n });\n\n readonly cursorOn = computed(() => this.cursorResolved() === 'category');\n\n /** The offer to show, if any mark is making one. At most one mark has a context at a time: a\n * per-mark tooltip only fills it while that mark is hovered, and an axis tooltip only while the\n * category cursor is on. The container opening the panel is what stops two marks opening two. */\n private readonly activeTooltip = computed(\n () =>\n [...this.tooltipSources().values()].find(\n (source) => source.context() !== null,\n ) ?? null,\n );\n\n protected readonly tooltipContext = computed(() => {\n const base = this.activeTooltip()?.context() ?? null;\n const categoryIndex = this.activeIndex();\n if (this.cursorResolved() !== 'category' || categoryIndex < 0) {\n return base;\n }\n const readings = [...this.tooltipSources().values()].flatMap(\n (source) => source.axisEntries?.() ?? [],\n );\n if (base === null) {\n return readings.length === 0\n ? null\n : {\n category: this.categories()[categoryIndex] ?? '',\n entries: topDown(readings),\n };\n }\n // A mark offers its own panel under the cursor only from focus or an axis tooltip, and that\n // panel is about the category, so every other mark's reading belongs in it too. Matched by\n // label: the mark that offered it keeps its own row, detail included, at its drawn height.\n const named = new Map(base.entries.map((entry) => [entry.label, entry]));\n if (readings.every((reading) => named.has(reading.label))) {\n return base;\n }\n const drawn = new Set(readings.map((reading) => reading.label));\n\n return {\n ...base,\n entries: [\n ...base.entries.filter((entry) => !drawn.has(entry.label)),\n ...topDown(readings).map(\n (reading) => named.get(reading.label) ?? reading,\n ),\n ],\n };\n });\n\n protected readonly tooltipOrigin = computed(() => {\n const own = this.activeTooltip()?.origin() ?? null;\n // A point rather than an element is a panel that follows the pointer, and stays with it.\n if (\n this.cursorResolved() !== 'category' ||\n (own !== null && !(own instanceof Element))\n ) {\n return own;\n }\n // A category panel belongs over the TALLEST reading at that category, not over whichever mark\n // happened to open it: a line that dips under a column would otherwise put the panel low and\n // let the column stand over it. Every mark's reading counts whether or not the pointer is on\n // it, or the panel jumps between the two as the pointer crosses the column's edge.\n const boxes = [...this.tooltipSources().values()]\n .map((source) => (source.axisOrigin ?? source.origin)())\n .filter((origin): origin is Element => origin instanceof Element)\n .map((element) => ({ element, top: element.getBoundingClientRect().top }))\n .filter(({ element }) => {\n const box = element.getBoundingClientRect();\n\n return box.width > 0 && box.height > 0;\n });\n\n return boxes.length === 0\n ? (own ?? this.cursorOrigin())\n : boxes.reduce((highest, candidate) =>\n candidate.top < highest.top ? candidate : highest,\n ).element;\n });\n\n protected readonly tooltipPinned = computed(\n () => (this.activeTooltip()?.pinned?.() ?? false) || this.cursorPinned(),\n );\n\n /** Compared by value, which is what stops a mark that reports AND reads `yPosition()` in one\n * effect from running forever: every report allocates a fresh `Map` and `niceDomain` a fresh\n * object, so identity always differs and the read would re-arm the write. Measured without it:\n * 97507 effect runs in 45 seconds, no Angular loop error, renderer unresponsive. */\n protected readonly domain = computed(\n () =>\n axisDomain(\n this.valuesOn('primary'),\n this.tickCount(),\n this.min(),\n this.max(),\n ),\n { equal: (a, b) => a.min === b.min && a.max === b.max },\n );\n\n // Counts VALUES, not reporters: `valuesOn` returns one entry per mark that registered, and a\n // line series registers both axes unconditionally, so an empty contribution would otherwise\n // raise a whole second axis on a plot that has one.\n readonly hasSecondaryAxis = computed(() =>\n this.valuesOn('secondary').some((values) => values.length > 0),\n );\n\n protected readonly secondary = computed(\n () =>\n secondaryAxis(\n this.ticks().map((tick) => tick.value),\n this.valuesOn('secondary'),\n this.tickCount(),\n this.secondaryAxisMode(),\n this.maxSecondary(),\n ),\n {\n equal: (a, b) =>\n a.aligned === b.aligned &&\n a.domain.min === b.domain.min &&\n a.domain.max === b.domain.max &&\n a.ticks.length === b.ticks.length &&\n a.ticks.every((tick, index) => tick === b.ticks[index]),\n },\n );\n\n readonly secondaryYPosition = computed(() => {\n if (!this.hasSecondaryAxis()) {\n return this.yPosition();\n }\n const plot = this.secondaryPlot();\n\n return valueScale(this.secondary().domain, plot.top, plot.height);\n });\n\n protected readonly secondaryTicks = computed(() => {\n if (!this.hasSecondaryAxis()) {\n return [];\n }\n const toY = this.secondaryYPosition();\n const format = this.valueFormatResolved();\n\n return this.secondary().ticks.map((value) => ({\n value,\n y: toY(value),\n label: format(value, 'tick'),\n }));\n });\n\n /** A second set of gridlines only where the two scales do NOT share rows: drawn against an\n * aligned axis they would land on the primary's own lines and double every stroke. */\n protected readonly showSecondaryGridlines = computed(\n () =>\n this.hasSecondaryAxis() &&\n (this.stacked() || !this.secondary().aligned) &&\n this.secondaryTicks().length > 1,\n );\n\n protected readonly secondaryLabelX = computed(() =>\n this.stacked()\n ? this.plot().left - CHART_AXIS_LABEL_GAP\n : this.plot().left + this.plot().width + CHART_AXIS_LABEL_GAP,\n );\n\n protected readonly secondaryLabelAnchor = computed(() =>\n this.stacked() ? 'end' : 'start',\n );\n\n protected readonly secondaryPlotBottom = computed(\n () => this.secondaryPlot().top + this.secondaryPlot().height,\n );\n\n /** No tint on a single-scale plot: one axis needs no telling apart, and colouring it would only\n * restate the marks' own colour in the furniture. */\n protected readonly axisLabelFill = computed(() =>\n this.hasSecondaryAxis() ? this.axisColor() : null,\n );\n\n protected readonly secondaryAxisLabelFill = computed(() =>\n this.secondaryAxisColor(),\n );\n\n private readonly bands = computed(() =>\n bandScale(this.categories().length, this.plot().width, CHART_BAND_PADDING),\n );\n\n readonly bandWidth = computed(() => this.bands().bandWidth);\n\n readonly xPosition = computed(() => {\n const plot = this.plot();\n const bands = this.bands();\n\n return (index: number) =>\n plot.left + bands.position(index) + bands.bandWidth / 2;\n });\n\n readonly yPosition = computed(() => {\n const plot = this.plot();\n\n return valueScale(this.domain(), plot.top, plot.height);\n });\n\n readonly zeroOffset = computed(() => this.yPosition()(0));\n\n protected readonly cursorBand = computed(() => {\n const index = this.activeIndex();\n if (this.cursorResolved() !== 'category' || index < 0) {\n return null;\n }\n const width = this.bandWidth();\n const plot = this.plot();\n\n return {\n x: this.xPosition()(index) - width / 2,\n width,\n top: plot.top,\n bottom: plot.top + plot.height,\n };\n });\n\n /** The same state machine the element marks run on: pin, linger, the grace period that lets the\n * pointer reach a portaled panel, Escape and press-outside. A category cursor differs from a\n * mark only in what the index counts, so it takes the behaviour rather than restating it. */\n private readonly cursorState = chartActiveMark(\n () => this.defaults.tooltipLingerMs(),\n () => this.hoverDelayMs(),\n );\n\n readonly activeIndex = this.cursorState.index;\n\n private readonly pointerAt = signal<{ x: number; y: number } | null>(null);\n\n // Set at once, not after the hover delay: the pointer cursor says what a press would do there.\n private readonly pointerInBand = signal(false);\n\n // At the band's foot: its head is where the panel opens, over the tallest reading.\n protected bandPinY(band: { readonly bottom: number }): number {\n return band.bottom - CHART_PIN_RADIUS - CHART_PIN_GAP;\n }\n\n protected readonly bandPins = computed(\n () => this.cursorPinResolved() && this.pointerInBand(),\n );\n\n readonly cursorPointer = computed(() =>\n this.activeIndex() < 0 ? null : this.pointerAt(),\n );\n\n /** Whether the cursor is held. A preset renders its own way out of the pin from this. */\n readonly cursorPinned = this.cursorState.pinned;\n\n releaseCursor(): void {\n this.cursorState.release();\n }\n\n private readonly canvasElement =\n viewChild<ElementRef<SVGSVGElement>>('canvasEl');\n\n // Read once per hover and dropped on any scroll, rather than on every move: a move that follows\n // the cursor band's own update would otherwise force a second layout in the same frame.\n private canvasRect: DOMRect | null = null;\n\n private plotPointer(event: PointerEvent, canvas: SVGSVGElement): void {\n this.canvasRect ??= canvas.getBoundingClientRect();\n const plot = this.plot();\n // The canvas is scaled to its box, so a client x has to come back through the viewBox before\n // it means anything to a plot measured in view units.\n const viewX =\n ((event.clientX - this.canvasRect.left) / this.canvasRect.width) *\n this.viewWidth();\n // Every point of the plot belongs to its nearest category, so the cursor moves from one\n // category straight to the next and never passes through \"none\".\n const index = this.clampIndex(\n categoryAt(viewX, plot.left, plot.width, this.categories().length),\n );\n this.pointerAt.set({ x: event.clientX, y: event.clientY });\n this.pointerInBand.set(index >= 0);\n if (index < 0) {\n if (event.type === 'pointerdown' && this.cursorPinned()) {\n this.cursorState.release();\n } else {\n this.cursorState.leave();\n }\n\n return;\n }\n if (event.type === 'pointerdown' && this.cursorPinResolved()) {\n this.cursorState.pin(index, event);\n\n return;\n }\n this.cursorState.enter(index, event);\n }\n\n /** The plot listens to the pointer only when it draws a category cursor, and outside the zone:\n * the handler writes signals, which schedule the render they need. */\n private listenForCursor(canvas: SVGSVGElement): () => void {\n const forgetRect = (): void => {\n this.canvasRect = null;\n };\n const onPointer = (event: PointerEvent): void =>\n this.plotPointer(event, canvas);\n const onEnter = (): void =>\n window.addEventListener('scroll', forgetRect, {\n capture: true,\n passive: true,\n });\n const onLeave = (): void => {\n window.removeEventListener('scroll', forgetRect, { capture: true });\n forgetRect();\n this.pointerInBand.set(false);\n this.cursorState.leave();\n };\n this.zone.runOutsideAngular(() => {\n canvas.addEventListener('pointerenter', onEnter);\n canvas.addEventListener('pointermove', onPointer);\n canvas.addEventListener('pointerdown', onPointer);\n canvas.addEventListener('pointerleave', onLeave);\n });\n\n return () => {\n canvas.removeEventListener('pointerenter', onEnter);\n canvas.removeEventListener('pointermove', onPointer);\n canvas.removeEventListener('pointerdown', onPointer);\n canvas.removeEventListener('pointerleave', onLeave);\n window.removeEventListener('scroll', forgetRect, { capture: true });\n forgetRect();\n };\n }\n\n private readonly bandElement = viewChild<ElementRef<Element>>('cursorBandEl');\n\n readonly cursorOrigin = computed<Element | null>(() =>\n this.cursorBand() ? (this.bandElement()?.nativeElement ?? null) : null,\n );\n\n setActiveIndex(index: number): void {\n this.cursorState.setIndex(this.clampIndex(index));\n }\n\n private clampIndex(index: number): number {\n const last = this.categories().length - 1;\n\n return Number.isFinite(index)\n ? Math.min(Math.max(Math.trunc(index), -1), last)\n : -1;\n }\n\n protected readonly plotRight = computed(\n () => this.plot().left + this.plot().width,\n );\n protected readonly plotBottom = computed(\n () => this.plot().top + this.plot().height,\n );\n protected readonly axisLabelX = computed(\n () => this.plot().left - CHART_AXIS_LABEL_GAP,\n );\n /** Clears the same reservation the view height budgets, and only when it is there: adding it\n * unconditionally would drop the labels past a viewBox that no longer holds the space. */\n protected readonly categoryLabelY = computed(\n () =>\n this.secondaryPlotBottom() +\n (this.reachesBelowZero() ? this.valueSpace() : 0) +\n CHART_CATEGORY_LABEL_OFFSET,\n );\n\n protected readonly ticks = computed(() => {\n const domain = this.domain();\n const toY = this.yPosition();\n const format = this.valueFormatResolved();\n\n return tickValues(domain.min, domain.max, this.tickCount()).map(\n (value) => ({\n value,\n y: toY(value),\n label: format(value, 'tick'),\n }),\n );\n });\n\n private readonly labelTexts = computed(() =>\n [\n ...this.ticks().map((tick) => tick.label),\n ...this.secondaryTicks().map((tick) => tick.label),\n ...this.categories(),\n ].join('\\n'),\n );\n\n /** Rotation is spent before thinning: a tilt costs the reader a glance, dropping a label costs\n * them a reading. Both are decided from the widest label as it actually rendered. */\n protected readonly categoryLabelsRotated = computed(() =>\n rotationWouldFit(\n [this.measuredCategoryLabelWidth()],\n this.plot().width / Math.max(1, this.categories().length),\n ),\n );\n\n private readonly categoryLabelInterval = computed(() =>\n labelInterval(\n [this.measuredCategoryLabelWidth()],\n this.plot().width / Math.max(1, this.categories().length),\n this.categoryLabelsRotated(),\n ),\n );\n\n private readonly labelHovered = signal<{\n readonly index: number;\n readonly event: PointerEvent;\n } | null>(null);\n\n readonly categoryLabelHover = this.labelHovered.asReadonly();\n\n // Under the category cursor a label is already inside its band's hover area.\n protected onCategoryLabelEnter(index: number, event: PointerEvent): void {\n if (!this.cursorOn()) {\n this.labelHovered.set({ index, event });\n }\n }\n\n protected onCategoryLabelLeave(): void {\n this.labelHovered.set(null);\n }\n\n protected readonly categoryLabels = computed(() => {\n const toX = this.xPosition();\n const interval = this.categoryLabelInterval();\n\n return (\n this.categories()\n .map((text, index) => ({ x: toX(index), text, index }))\n // The first is always drawn and the rest follow the interval, so the axis keeps an anchor\n // the reader can count from rather than an arbitrary offset into the categories.\n .filter((label) => label.index % interval === 0)\n );\n });\n\n protected readonly reachesBelowZero = computed(() => this.domain().min < 0);\n\n /** Empty is read off `categories` alone, never off the reported domains: the marks are\n * projected INTO the branch that this decides, so a container that waited for a report before\n * rendering them would never receive one. */\n protected readonly isEmpty = computed(() => this.categories().length === 0);\n\n protected readonly accessibleName = computed(\n () => this.summary() ?? this.caption() ?? this.intl().chart.title,\n );\n}\n","<figure class=\"chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton\n height=\"var(--_chart-view-height)\"\n [shimmer]=\"loading()\" />\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\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 @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 <!-- Hidden as a group rather than on the svg: a projected mark may be focusable, and an\n aria-hidden ancestor would leave it reachable by Tab and 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, one group: a reference line has to paint UNDER the marks whatever order the\n consumer wrote it in, and a selected slot is what decides that instead of the author.\n Both stay inside `.marks`, which is what the boot transition guard is keyed on. -->\n <g class=\"marks\">\n <ng-content select=\"[dsReferenceLine]\" />\n\n <ng-content />\n </g>\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, where `.marks` is under them: an annotation's LINE is furniture and\n belongs below the readings, its NAME has to survive 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 }\n</figure>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n untracked,\n inject,\n input,\n numberAttribute,\n output,\n viewChildren,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n CHART_TOOLTIP_LINGER_MS,\n chartValueFormat,\n describeShare,\n listenForMarkFocus,\n markOf,\n rovingMarks,\n leaveMark,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n injectDsLocale,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { MarkHit } from '@ids-group-ltd/ids-design-system/components';\nimport {\n CHART_PIN_GAP,\n CHART_PIN_RADIUS,\n ChartPinMarkerComponent,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { CHART_SCALES } from './chart-scales.token';\nimport type { ChartAxisEntry } from './chart-scales.token';\nimport { chartViewHeight } from './chart.math';\nimport type { ChartStackOffset } from './chart.math';\n\nexport interface ColumnSeriesPoint {\n id?: string;\n label: string;\n value: number;\n color?: string;\n fill?: 'solid' | 'hatched';\n}\n\n/** Distance from a mark's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/** Blank left at a stacked segment's lower end, so the boundary between two segments is a gap in\n * the surface colour rather than a drawn rule. A rule is a third ink the palette has to stay\n * legible against and it vanishes in print; a gap survives both, and it is the secondary encoding\n * the palette's 6-8 dE separation band asks for. */\nconst STACK_SEGMENT_GAP = 2;\n\nlet nextSeriesId = 0;\n\n/**\n * One column per datum, drawn against the scales `ds-chart` supplies.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants, so `<ds-column-series>` inside the\n * container's canvas would draw nothing. Written as `<svg:g dsColumnSeries>`.\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas: an element the SVG specification does not know is not rendered, and neither\n // are its children. Measured in Chrome 153 - a rect under an HTML host and under an\n // SVG-namespaced unknown host both report a 0x0 box, the same rect under a `<g>` reports 80x80.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsColumnSeries]',\n standalone: true,\n imports: [ChartPinMarkerComponent],\n exportAs: 'dsColumnSeries',\n templateUrl: './column-series.component.html',\n styleUrl: './column-series.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnSeriesComponent implements OnDestroy {\n protected readonly leaveMark = leaveMark;\n\n private readonly scales = inject(CHART_SCALES);\n private readonly locale = injectDsLocale();\n protected readonly intl = inject(DS_INTL);\n\n /** Not `input.required`: the preset reads `tooltipContext()` from a binding on this same\n * element, and a required input throws NG0950 for the pass before its own value is written. */\n readonly data = input<readonly ColumnSeriesPoint[]>([]);\n\n /** Prints each column's value above the column. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** Turns on the click affordance - the pointer cursor and the hover tint. `pointClicked`\n * fires whether or not this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until a second click,\n * Escape or a press outside releases it. Under the category cursor the container holds the\n * category instead. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then `true`. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n readonly pinOnClickResolved = resolveWithConfig(\n this.pinOnClick,\n (config) => config.chart?.pinOnClick,\n true,\n );\n protected readonly pins = computed(\n () => this.pinOnClickResolved() && !this.scales.cursorOn?.(),\n );\n\n /** Fades every mark but the one under the pointer. Off by default: the dimming buys loudness\n * for one mark and pays for it with the separation between the rest. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Milliseconds between one mark's entrance and the next. The steps narrow to fit the whole\n * spread within 260ms, so a long series does not crawl in.\n * `0` is no stagger. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n /** Declares that the marks are parts of one whole, which is what makes a share of their total\n * a real quantity. On, each mark's share appears on the tooltip's second line. */\n readonly partOfWhole = input(false, { transform: booleanAttribute });\n\n /** Whether a hovered or focused column opens a tooltip. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n /** Where the tooltip is pinned. `'mark'` is the column itself; `'cell'` is the full-height\n * category cell, which puts the panel at the top of the plot whatever the column's value. */\n readonly tooltipAnchor = input<'mark' | 'cell'>('mark');\n\n /** How long the panel survives the pointer leaving the mark, in milliseconds. The default lets\n * the pointer reach the next mark before the panel closes, so it glides there instead. */\n readonly tooltipLingerMs = input(CHART_TOOLTIP_LINGER_MS, {\n transform: numberAttribute,\n });\n\n /** Formats every value this series prints. Called with `'tick'` for an axis label and\n * `'tooltip'` everywhere a value is printed in full. */\n readonly valueFormat = input<ChartValueFormat>(\n chartValueFormat(injectDsLocale()),\n );\n\n /** The mark's share of its category's own slot, before the maximum width caps it. Measured off\n * the slot rather than off `bandWidth()`, which has the container's own padding already taken\n * out of it - applying both would narrow every uncapped column twice. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n /** This series' position among the slots a category's band is divided into. */\n readonly slot = input(0, { transform: numberAttribute });\n\n /** How many slots the band is divided into - the number of series drawn side by side. One, the\n * default, is the whole band, which is what a single series has always taken. */\n readonly slotCount = input(1, { transform: numberAttribute });\n\n /** Where each mark starts and ends on the value axis, one entry per point. Unset, every mark\n * runs from zero to its own value, which is the unstacked case. */\n readonly offsets = input<readonly ChartStackOffset[] | null>(null);\n\n /** The only series in its slot, as a waterfall's floating bars are: `offsets` lifts each mark\n * off the axis, but nothing is stacked above or below it, so the mark answers the pointer over\n * the whole plot height rather than over its own span. */\n readonly soleSeries = input(false, { transform: booleanAttribute });\n\n /** Which value axis the columns are measured against. `'secondary'` reads them off the second\n * axis, the way `axis: 'secondary'` does on a line series' data. */\n readonly axis = input<ChartAxis>('primary');\n\n /** One colour for the whole series, which is what several series drawn together need. Unset,\n * each mark takes the categorical palette by its own position - the right reading when the\n * marks ARE the categories, which is the single-series case. A point's own colour wins over\n * both. */\n readonly seriesColor = input<string | null>(null);\n\n /** `seriesColor` for the fill pattern. A point's own `fill` wins. */\n readonly seriesFill = input<'solid' | 'hatched' | null>(null);\n\n /** Names the series in the tooltip, where the category then becomes the panel's heading. Unset,\n * the panel names the category instead, which is what a chart of one series has to say. */\n readonly seriesLabel = input<string | null>(null);\n\n /** Identifies this series to the legend, so hovering a legend item can single it out. */\n readonly seriesKey = input<string | null>(null);\n\n /** The series the reader is pointing at in the legend. Every other series fades. */\n readonly highlighted = input<string | null>(null);\n\n protected readonly dimmedBySeries = computed(() => {\n const highlighted = this.highlighted();\n\n return highlighted !== null && highlighted !== this.seriesKey();\n });\n\n /** The clicked datum. Fires on click and on Enter or Space, whatever `interactive` says. */\n readonly pointClicked = output<ColumnSeriesPoint>();\n\n private readonly seriesId = nextSeriesId++;\n\n private readonly domainId = `column-series-${this.seriesId}`;\n\n /** Per instance: two charts on one page would otherwise share the first `<pattern>` to reach the\n * document, and every hatched mark would take that chart's colour. */\n protected readonly hatchId = `ds-column-hatch-${this.seriesId}`;\n\n /** Where each mark actually spans, which is what the axis has to hold: a stacked segment's top\n * is its category's running total, not its own reading. */\n private readonly spans = computed<readonly ChartStackOffset[]>(() => {\n const given = this.offsets();\n\n return this.data().map(\n (point, index) =>\n given?.[index] ?? {\n from: 0,\n to: Number.isFinite(point.value) ? point.value : 0,\n },\n );\n });\n\n constructor() {\n effect(() =>\n this.scales.reportDomain(\n this.domainId,\n this.spans().flatMap((span) => [span.from, span.to]),\n this.axis(),\n ),\n );\n // The container opens the panel, so a plot holding several marks can only ever show one.\n this.scales.reportTooltip(this.domainId, {\n context: this.tooltipContext,\n origin: computed(() => this.activeMark.origin()),\n pinned: this.activeMark.pinned,\n offersTooltip: computed(() => this.tooltip() !== 'none'),\n axisOrigin: computed(() => {\n const categoryIndex = this.scales.activeIndex();\n\n return categoryIndex < 0\n ? null\n : (this.barElements()[categoryIndex]?.nativeElement ?? null);\n }),\n axisEntries: this.axisEntries,\n });\n const host = inject<ElementRef<Element>>(ElementRef);\n listenForMarkFocus(\n host,\n (event, hit) => this.onMarkFocus(event, hit),\n () => {\n this.activeMark.leave();\n if (this.scales.cursorOn?.()) {\n this.scales.setActiveIndex(-1);\n }\n },\n );\n let answeringLabel = false;\n effect(() => {\n const hover = this.scales.categoryLabelHover?.() ?? null;\n untracked(() => {\n const mark =\n hover &&\n host.nativeElement.querySelector(\n `[data-mark-index=\"${hover.index}\"]`,\n );\n if (hover && mark) {\n answeringLabel = true;\n this.activeMark.enter(\n hover.index,\n hover.event,\n this.tooltipMark(),\n mark,\n );\n } else if (answeringLabel) {\n answeringLabel = false;\n this.activeMark.leave();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this.scales.releaseTooltip(this.domainId);\n this.scales.releaseDomain(this.domainId);\n }\n\n readonly activeMark = chartActiveMark(\n () => this.tooltipLingerMs(),\n () => this.scales.hoverDelayMs?.() ?? 0,\n );\n\n private readonly barElements = viewChildren<ElementRef<Element>>('barEl');\n\n /** One SERIES' slot inside a category's band: the whole band while a chart draws one series,\n * a share of it per series when several are grouped. The box that catches the pointer is sized\n * from this rather than from the drawn column, so a short column stays reachable. */\n private readonly slotStep = computed(() => {\n const count = this.data().length;\n const slots = Math.max(1, this.slotCount());\n\n return count > 0 ? this.scales.plot().width / count / slots : 0;\n });\n\n protected readonly slotStepPx = computed(() => `${this.slotStep()}px`);\n\n protected readonly markWidthPx = computed(\n () => `${this.slotStep() * this.columnWidthRatio()}px`,\n );\n\n /** The whole canvas, reserved end included. Overshooting when the container drops that\n * reservation costs nothing - the outer `<svg>` clips it - while falling short would leave a\n * strip under the plot that answers no pointer. */\n protected readonly hitHeight = computed(() => {\n const plot = this.scales.plot();\n\n return chartViewHeight(plot.height, plot.top, true);\n });\n\n /** Stacked series sit on top of one another, so a full-slot hit box on each one means only the\n * series drawn last is ever reachable. Stacked, a mark catches the pointer over its own segment\n * and nothing else. */\n protected readonly stacked = computed(\n () => this.offsets() !== null && !this.soleSeries(),\n );\n\n /** Keeps a thin segment reachable without letting it reach into its neighbours. */\n private static readonly MIN_STACK_HIT = 6;\n\n protected hitBox(mark: { top: number; height: number }): {\n y: number;\n height: number;\n } {\n if (!this.stacked()) {\n return { y: 0, height: this.hitHeight() };\n }\n const height = Math.max(mark.height, ColumnSeriesComponent.MIN_STACK_HIT);\n const overflow = height - mark.height;\n\n return { y: mark.top - overflow / 2, height };\n }\n\n protected readonly hatchInUse = computed(() =>\n this.marks().some((mark) => mark.hatched),\n );\n\n protected readonly marks = computed(() => {\n const toX = this.scales.xPosition();\n const toY =\n this.axis() === 'secondary'\n ? this.scales.secondaryYPosition()\n : this.scales.yPosition();\n const spans = this.spans();\n const format = this.valueFormat();\n\n return this.data().map((point, index) => {\n const span = spans[index];\n const foot = toY(span.from);\n const tip = toY(span.to);\n const below = tip > foot;\n // Only a segment that has one under it gives up the gap: taking it off the baseline segment\n // would lift the whole stack off the axis.\n const gap =\n span.from === 0 ? 0 : Math.min(STACK_SEGMENT_GAP, Math.abs(tip - foot));\n const baseline = below ? foot + gap : foot - gap;\n const color =\n point.color ??\n this.seriesColor() ??\n CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length];\n\n return {\n key: point.id ?? String(index),\n point,\n x: toX(index),\n tip,\n below,\n baseline,\n top: Math.min(tip, baseline),\n height: Math.abs(tip - baseline),\n labelY: below ? tip + VALUE_LABEL_GAP : tip - VALUE_LABEL_GAP,\n pinY: Math.min(tip, baseline) + CHART_PIN_RADIUS + CHART_PIN_GAP,\n // Growing from the baseline, never the mark's own tip - a column below zero grows\n // downward, so its transform-origin flips to the top edge it hangs from.\n origin: below ? 'top' : 'bottom',\n formattedValue: format(point.value, 'tooltip'),\n color,\n hatched: (point.fill ?? this.seriesFill()) === 'hatched',\n };\n });\n });\n\n protected markStagger(index: number): string {\n return `${staggerDelay(index, this.marks().length, this.staggerMs())}ms`;\n }\n\n private readonly tooltipMark = computed(() =>\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n\n protected onMarkClick(event: MouseEvent): void {\n const hit = markOf(event);\n const mark = hit && this.marks()[hit.index];\n if (!hit || !mark) {\n return;\n }\n this.pointClicked.emit(mark.point);\n if (this.pins()) {\n this.activeMark.pin(hit.index, event, this.tooltipMark(), hit.element);\n }\n }\n\n protected onMarkOver(event: PointerEvent): void {\n const hit = markOf(event);\n if (hit && !this.scales.cursorOn?.()) {\n this.activeMark.enter(hit.index, event, this.tooltipMark(), hit.element);\n }\n }\n\n protected onMarkOut(event: PointerEvent): void {\n const hit = markOf(event);\n const next =\n event.relatedTarget instanceof Element\n ? event.relatedTarget.closest('[data-mark-index]')\n : null;\n if (hit && next !== hit.element && !this.scales.cursorOn?.()) {\n this.activeMark.leave();\n }\n }\n\n protected readonly roving = rovingMarks(() => this.marks().length);\n\n private onMarkFocus(event: FocusEvent, hit: MarkHit): void {\n this.roving.focus(hit.index);\n // Under the category cursor focus names the category, as a pointer anywhere in its band does.\n if (this.scales.cursorOn?.()) {\n this.scales.setActiveIndex(hit.index);\n }\n this.activeMark.enter(hit.index, event, this.tooltipMark(), hit.element);\n }\n\n protected onMarkKey(event: KeyboardEvent): void {\n const hit = markOf(event);\n if (!hit) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n // Only the column's own key opens it: a key pressed on a control inside belongs to that\n // control.\n const mark = this.marks()[hit.index];\n if (this.interactive() && event.target === hit.element && mark) {\n event.preventDefault();\n this.pointClicked.emit(mark.point);\n }\n\n return;\n }\n this.roving.navigate(event, hit.index, hit.element.closest('.columns'));\n }\n\n protected entryLabel(mark: {\n point: ColumnSeriesPoint;\n formattedValue: string;\n }): string {\n return `${mark.point.label}, ${mark.formattedValue}`;\n }\n\n /** This series' reading at the category the cursor is on. Filled whatever `tooltip` says: it\n * feeds the container's category panel, never a panel of this mark's own. */\n readonly axisEntries = computed<readonly ChartAxisEntry[]>(() => {\n const categoryIndex = this.scales.activeIndex();\n const mark = this.marks()[categoryIndex];\n if (categoryIndex < 0 || !mark) {\n return [];\n }\n\n return [\n {\n label: this.seriesLabel() ?? mark.point.label,\n value: mark.point.value,\n formatted: mark.formattedValue,\n color: mark.color,\n hatched: mark.hatched,\n detail: this.shareDetail(categoryIndex),\n y: mark.tip,\n },\n ];\n });\n\n private shareDetail(index: number): string | undefined {\n return this.partOfWhole()\n ? describeShare(\n this.data().map((point) => point.value),\n index,\n this.locale,\n (share) => this.intl().chart.shareOfTotal(share),\n )\n : undefined;\n }\n\n readonly tooltipContext = computed<ChartTooltipContext | null>(() => {\n const mark = this.marks()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !mark) {\n return null;\n }\n\n const series = this.seriesLabel();\n\n return {\n category: series ? mark.point.label : '',\n entries: [\n {\n label: series ?? mark.point.label,\n value: mark.point.value,\n formatted: mark.formattedValue,\n color: mark.color,\n hatched: mark.hatched,\n detail: this.shareDetail(this.activeMark.index()),\n },\n ],\n };\n });\n}\n","<svg:g\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [class.is-dimmed]=\"dimmedBySeries()\"\n [style.--_column-chart-column-share]=\"markWidthPx()\"\n [style.--_column-chart-slot-step]=\"slotStepPx()\"\n [style.--_column-slot]=\"slot()\"\n [style.--_column-slots]=\"slotCount()\"\n (pointerover)=\"onMarkOver($event)\"\n (pointerout)=\"onMarkOut($event)\"\n (keydown)=\"onMarkKey($event)\"\n (click)=\"onMarkClick($event)\">\n <!-- `userSpaceOnUse`, so the stripe pitch is the same on a tall column and a short one: with the\n default object bounding box it would scale with each mark and read as a different texture\n per bar. The stripe runs down the tile's middle: on its edge the tile clips it to half its\n width. -->\n @if (hatchInUse()) {\n <svg:defs>\n <svg:pattern\n class=\"hatch\"\n patternUnits=\"userSpaceOnUse\"\n width=\"8\"\n height=\"8\"\n patternTransform=\"rotate(45)\"\n [attr.id]=\"hatchId\">\n <svg:rect\n class=\"hatch-ground\"\n width=\"8\"\n height=\"8\" />\n\n <svg:line\n class=\"hatch-stripe\"\n x1=\"4\"\n y1=\"0\"\n x2=\"4\"\n y2=\"8\" />\n </svg:pattern>\n </svg:defs>\n }\n\n @for (mark of marks(); track mark.key; let index = $index) {\n <svg:g\n class=\"column\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"pins()\"\n [class.is-active]=\"activeMark.index() === index\"\n [class.below-baseline]=\"mark.below\"\n [class.is-pinned]=\"activeMark.pinned() && activeMark.index() === index\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [style.--_column-mark-height]=\"mark.height + 'px'\"\n [style.--_column-baseline-y]=\"mark.baseline + 'px'\"\n [style.--_column-x]=\"mark.x + 'px'\"\n [attr.data-mark-index]=\"index\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.aria-label]=\"interactive() ? entryLabel(mark) : null\"\n (animate.leave)=\"leaveMark($event)\">\n <!-- The box that catches the pointer is the whole category slot, not the drawn column: a\n column two pixels tall is otherwise unreachable, and a pointer that has to find the\n mark is a pointer that misses it. -->\n @let hit = hitBox(mark);\n\n <svg:rect\n class=\"hit-area\"\n [attr.y]=\"hit.y\"\n [attr.height]=\"hit.height\" />\n\n <svg:g\n #barEl\n class=\"bar\"\n [style.transform-origin]=\"mark.origin\">\n <!-- Under the capped rect, not beside it: `rx` rounds all four corners, and the cap\n belongs on the free end alone. This one fills the two corners at the baseline back\n in, and both keep `y` and `height` a plain interpolable length, which a `<path>`\n would not. -->\n <svg:rect\n class=\"bar-base\"\n [attr.fill]=\"mark.color\" />\n\n <svg:rect\n class=\"bar-cap\"\n [attr.y]=\"mark.top\"\n [attr.height]=\"mark.height\"\n [attr.fill]=\"mark.color\" />\n\n <!-- Stripes OVER the painted mark, not a pattern in place of its fill: a pattern carries\n its own colour, so one shared definition cannot take each mark's. Painting the surface\n colour through it leaves the mark's own hue showing between the stripes. -->\n @if (mark.hatched) {\n <svg:rect\n class=\"bar-hatch\"\n [attr.y]=\"mark.top\"\n [attr.height]=\"mark.height\"\n [attr.fill]=\"'url(#' + hatchId + ')'\" />\n }\n </svg:g>\n\n @if (showValues()) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.y]=\"mark.labelY\">\n {{ mark.formattedValue }}\n </svg:text>\n }\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"'translate(0,' + mark.pinY + ')'\" />\n }\n </svg:g>\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n CHART_TOOLTIP_LINGER_MS,\n areaPath,\n chartValueFormat,\n focusMark,\n listenForMarkFocus,\n markOf,\n bandPath,\n lineSegments,\n nextRovingIndex,\n linePath,\n leaveMark,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n LinePoint,\n MarkHit,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n injectDsLocale,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartCurve,\n ChartGaps,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n CHART_PIN_GAP,\n CHART_PIN_RADIUS,\n ChartPinMarkerComponent,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartTooltipTrigger,\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { CHART_SCALES } from './chart-scales.token';\nimport type { ChartAxisEntry } from './chart-scales.token';\nimport { topDown } from './chart.math';\n\nexport interface LineSeriesData {\n id: string;\n label: string;\n /** One reading per category. A `null` is a missing reading, and `gaps` decides what it draws. */\n data: readonly (number | null)[];\n /** Which value axis the readings are measured against. Defaults to `'primary'`. */\n axis?: ChartAxis;\n /** Fills the band between the line and its axis baseline. */\n area?: boolean;\n /** The band's floor, one entry per category, in the axis's own unit. Unset fills to the\n * baseline. Given, the fill is the band between the two curves - which is what a stacked plot\n * needs, and the caller that owns the pile is the one that knows where each band starts. A\n * `null` must sit in exactly the categories `data` has one, or the two sides break in\n * different places. */\n lower?: readonly (number | null)[];\n /** Any CSS colour. Unset takes the categorical palette slot for the series' position. */\n color?: string;\n}\n\nlet nextSeriesId = 0;\n\n/**\n * One line per series, drawn against the scales `ds-chart` supplies, on either of its two value\n * axes.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsLineSeries>`.\n */\n// The active marker's default radius, `--chart-dot-radius-active`.\nconst PIN_MARKER_CLEARANCE = 6;\n\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsLineSeries]',\n standalone: true,\n imports: [ChartPinMarkerComponent],\n exportAs: 'dsLineSeries',\n templateUrl: './line-series.component.html',\n styleUrl: './line-series.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineSeriesComponent implements OnDestroy {\n protected readonly leaveMark = leaveMark;\n\n private readonly scales = inject(CHART_SCALES);\n\n /** Not `input.required`: the preset reads `tooltipContext()` from a binding on this same\n * element, and a required input throws NG0950 for the pass before its own value is written. */\n readonly data = input<readonly LineSeriesData[]>([]);\n\n /** Draws a round marker at every reading. Off leaves the line alone, which reads better past\n * roughly twenty points. */\n readonly showMarkers = input(true, { transform: booleanAttribute });\n\n /** Lays the line and its markers on a band of the surface colour, so they stay legible where\n * they cross other marks. On by default: a line shares its plot more often than not, and on an\n * empty plot the band only separates it from the gridlines. */\n readonly outline = input(true, { transform: booleanAttribute });\n\n /** Turns on the click affordance - the pointer cursor and the hover tint. `pointClicked`\n * fires whether or not this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until a second click,\n * Escape or a press outside releases it. Under the category cursor the container holds the\n * category instead. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then `true`. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n readonly pinOnClickResolved = resolveWithConfig(\n this.pinOnClick,\n (config) => config.chart?.pinOnClick,\n true,\n );\n protected readonly pins = computed(\n () => this.pinOnClickResolved() && !this.scales.cursorOn?.(),\n );\n\n /** Fades every series but the one under the pointer. Off by default: the dimming buys loudness\n * for one line and pays for it with the separation between the rest. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** The one series to single out: every other one draws faded and this one draws bold, so the\n * comparison survives a monochrome print. Driven from a legend, or from whatever else the app\n * uses to mean \"show me this one\". Fades the others whether or not `dimOthers` is set, which\n * governs only what a pointer over a marker does. */\n readonly highlighted = input<string | null>(null);\n\n /** A dash pattern per series, in the order the series are given. A series past the end of the\n * list, or given an empty string, draws solid. */\n readonly patterns = input<readonly string[]>([]);\n\n /** Fills each area from the series below it rather than from the baseline, which is what a\n * stacked plot needs and what the fill reads as. */\n readonly stacked = input(false, { transform: booleanAttribute });\n\n /** The dash for a series' position, or null where it draws solid. */\n protected dashFor(seriesIndex: number): string | null {\n return this.patterns()[seriesIndex] || null;\n }\n\n /** Milliseconds between one series' entrance and the next, narrowed so the last series still\n * starts within the stagger budget. `0` turns the stagger off. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n /** What a `null` reading draws: `'break'` leaves a hole in the line, `'zero'` plots a point\n * at zero. A missing measurement and a measured zero are different facts. */\n readonly gaps = input<ChartGaps>('break');\n\n /** How the line joins its readings. `'linear'` by default, which asserts nothing the data does\n * not say; a curve is a claim about what happened BETWEEN two readings. `'step'` holds each\n * reading to the next, `'smooth'` is a monotone cubic that draws no peak the data lacks. */\n readonly curve = input<ChartCurve>('linear');\n\n /** Whether a hovered or focused reading opens a tooltip, and for what. `'item'` names the\n * marker itself. `'axis'` names every series at the category under the pointer, which is the\n * reading a multi-series line is compared on - it follows the container's `cursor`, so set\n * `cursor=\"category\"` on `ds-chart` with it or nothing marks the category being read. */\n readonly tooltip = input<ChartTooltipTrigger>('item');\n\n /** Where an `'axis'` panel hangs: `'reading'` puts it over the highest reading in the category,\n * so it names what it points at and stays put while the pointer travels within one band;\n * `'pointer'` follows the cursor. */\n readonly tooltipAnchor = input<'reading' | 'pointer'>('reading');\n\n /** How long the panel survives the pointer leaving the marker, in milliseconds. The default lets\n * the pointer reach the next marker before the panel closes, so it glides there instead. */\n readonly tooltipLingerMs = input(CHART_TOOLTIP_LINGER_MS, {\n transform: numberAttribute,\n });\n\n /** Formats every value this series prints. Called with `'tick'` for an axis label and\n * `'tooltip'` everywhere a value is printed in full. */\n readonly valueFormat = input<ChartValueFormat>(\n chartValueFormat(injectDsLocale()),\n );\n\n /** The clicked reading, with the series it belongs to and its position in `categories`.\n * Fires on click and on Enter or Space, whatever `interactive` says. */\n readonly pointClicked = output<{\n series: LineSeriesData;\n categoryIndex: number;\n value: number;\n }>();\n\n private readonly domainId = `line-series-${nextSeriesId++}`;\n\n constructor() {\n effect(() => {\n this.scales.reportDomain(\n `${this.domainId}-primary`,\n this.valuesOn('primary'),\n 'primary',\n );\n this.scales.reportDomain(\n `${this.domainId}-secondary`,\n this.valuesOn('secondary'),\n 'secondary',\n );\n });\n // The container opens the panel, so a plot holding several marks can only ever show one.\n this.scales.reportTooltip(this.domainId, {\n context: this.tooltipContext,\n origin: this.tooltipOrigin,\n offersTooltip: computed(() => this.tooltip() !== 'none'),\n axisOrigin: this.topReadingElement,\n axisEntries: this.axisEntries,\n });\n listenForMarkFocus(\n inject(ElementRef),\n (event, hit) => this.onMarkerFocus(event, hit),\n () => {\n this.focusedSeries.set(null);\n this.activeMark.leave();\n this.scales.setActiveIndex(-1);\n },\n );\n }\n\n ngOnDestroy(): void {\n this.scales.releaseTooltip(this.domainId);\n this.scales.releaseDomain(`${this.domainId}-primary`);\n this.scales.releaseDomain(`${this.domainId}-secondary`);\n }\n\n readonly activeMark = chartActiveMark(\n () => this.tooltipLingerMs(),\n () => this.scales.hoverDelayMs?.() ?? 0,\n );\n\n private valuesOn(axis: ChartAxis): number[] {\n return this.data()\n .filter((series) => (series.axis ?? 'primary') === axis)\n .flatMap((series) =>\n series.data.filter((value): value is number => value !== null),\n );\n }\n\n /** A `null` past the end is the same missing reading as a `null` inside the run, so a series\n * shorter than `categories` ends its line rather than running off the plot's edge. */\n private readingsOf(series: LineSeriesData, count: number): (number | null)[] {\n const zeroed = this.gaps() === 'zero';\n const readings: (number | null)[] = [];\n for (let index = 0; index < count; index++) {\n const raw = series.data[index];\n const reading =\n typeof raw === 'number' && Number.isFinite(raw) ? raw : null;\n readings.push(reading === null && zeroed ? 0 : reading);\n }\n\n return readings;\n }\n\n protected readonly plotted = computed(() => {\n const toX = this.scales.xPosition();\n const primaryY = this.scales.yPosition();\n const secondaryY = this.scales.secondaryYPosition();\n const categories = this.scales.categories();\n let markerIndex = 0;\n\n return this.data().map((series, index) => {\n const secondary = (series.axis ?? 'primary') === 'secondary';\n const toY = secondary ? secondaryY : primaryY;\n const color =\n series.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length];\n const points: (LinePoint | null)[] = this.readingsOf(\n series,\n categories.length,\n ).map((value, categoryIndex) =>\n value === null\n ? null\n : {\n categoryIndex,\n x: toX(categoryIndex),\n y: toY(value),\n value,\n },\n );\n const segments = lineSegments(points);\n const format = this.valueFormat();\n const curve = this.curve();\n\n return {\n series,\n color,\n seriesIndex: index,\n linePaths: segments.map((segment) => linePath(segment, curve)),\n areaPaths: series.area\n ? this.areaPathsFor(series, segments, toX, toY, curve)\n : [],\n markers: points\n .filter((point): point is LinePoint => point !== null)\n .map((point) => ({\n key: `${series.id}-${point.categoryIndex}`,\n markIndex: markerIndex++,\n x: point.x,\n y: point.y,\n value: point.value,\n category: categories[point.categoryIndex] ?? '',\n formattedValue: format(point.value, 'tooltip'),\n seriesLabel: series.label,\n seriesId: series.id,\n categoryIndex: point.categoryIndex,\n color,\n })),\n };\n });\n });\n\n private areaPathsFor(\n series: LineSeriesData,\n segments: readonly (readonly LinePoint[])[],\n toX: (categoryIndex: number) => number,\n toY: (value: number) => number,\n curve: ChartCurve,\n ): readonly string[] {\n const lower = series.lower;\n if (!lower) {\n return segments\n .map((segment) => areaPath(segment, toY(0), curve))\n .filter((path) => path.length > 0);\n }\n const lowerSegments = lineSegments(\n lower.map((value, categoryIndex) =>\n value === null\n ? null\n : {\n categoryIndex,\n x: toX(categoryIndex),\n y: toY(value),\n value,\n },\n ),\n );\n\n return segments\n .map((segment, index) =>\n lowerSegments[index]\n ? bandPath(segment, lowerSegments[index], curve)\n : areaPath(segment, toY(0), curve),\n )\n .filter((path) => path.length > 0);\n }\n\n private readonly allMarkers = computed(() =>\n this.plotted().flatMap((entry) => entry.markers),\n );\n\n protected seriesStagger(index: number): string {\n return `${staggerDelay(index, this.plotted().length, this.staggerMs())}ms`;\n }\n\n /** One tab stop PER SERIES: each line is a strand the reader walks with the arrows, and the\n * strands are what the chart is comparing. WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable, which is what keeps a\n * 12-category, 2-series plot from being twenty-four stops in the page's tab order. */\n private readonly rovingBySeries = signal<ReadonlyMap<string, number>>(\n new Map(),\n );\n\n private readonly firstMarkerBySeries = computed(\n () =>\n new Map(\n this.plotted().map((entry) => [\n entry.series.id,\n entry.markers[0]?.markIndex,\n ]),\n ),\n );\n\n protected isTabStop(seriesId: string, markIndex: number): boolean {\n return (\n (this.rovingBySeries().get(seriesId) ??\n this.firstMarkerBySeries().get(seriesId)) === markIndex\n );\n }\n\n /** The series a marker holds focus on, which narrows an `'axis'` panel to that one reading: a\n * pointer answers for every series at once, a focused marker answers for its own. */\n private readonly focusedSeries = signal<string | null>(null);\n\n /** A reading is active when its own marker is hovered OR when the category cursor is on its\n * category: one band, one answer, so the dot grows wherever in the band the pointer is rather\n * than only on the 4px dot itself. */\n protected isActiveMarker(marker: {\n markIndex: number;\n categoryIndex: number;\n }): boolean {\n return (\n marker.markIndex === this.activeMark.index() ||\n marker.categoryIndex === this.scales.activeIndex()\n );\n }\n\n protected readonly pinnedMarker = computed(() =>\n this.activeMark.pinned()\n ? (this.allMarkers()[this.activeMark.index()] ?? null)\n : null,\n );\n\n // Above the reading, clear of the marker drawn on it.\n protected readonly pinLift =\n CHART_PIN_RADIUS + CHART_PIN_GAP + PIN_MARKER_CLEARANCE;\n\n protected onMarkerOver(event: PointerEvent): void {\n const hit = markOf(event);\n if (hit && !this.scales.cursorOn?.()) {\n this.activeMark.enter(hit.index, event, undefined, hit.element);\n }\n }\n\n protected onMarkerOut(event: PointerEvent): void {\n const hit = markOf(event);\n if (!hit || this.scales.cursorOn?.()) {\n return;\n }\n const next =\n event.relatedTarget instanceof Element\n ? event.relatedTarget.closest('[data-mark-index]')\n : null;\n if (next !== hit.element) {\n this.activeMark.leave();\n }\n }\n\n private onMarkerFocus(event: FocusEvent, hit: MarkHit): void {\n const marker = this.allMarkers()[hit.index];\n if (marker) {\n this.rovingBySeries.update((roving) =>\n new Map(roving).set(marker.seriesId, hit.index),\n );\n this.focusedSeries.set(marker.seriesId);\n this.scales.setActiveIndex(marker.categoryIndex);\n }\n this.activeMark.enter(hit.index, event, undefined, hit.element);\n }\n\n protected onMarkerKey(event: KeyboardEvent): void {\n const hit = markOf(event);\n if (!hit) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n this.selectMarker(hit.index);\n\n return;\n }\n const marker = this.allMarkers()[hit.index];\n const strand = this.allMarkers().filter(\n (candidate) => candidate.seriesId === marker?.seriesId,\n );\n const current = strand.findIndex(\n (candidate) => candidate.markIndex === hit.index,\n );\n const next = nextRovingIndex(event.key, current, strand.length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n focusMark(hit.element.closest('.lines'), strand[next].markIndex);\n }\n\n protected isDimmed(seriesId: string): boolean {\n const highlighted = this.highlighted();\n\n // Not gated on `dimOthers`: that input governs what a POINTER over a mark does, and naming a\n // series in the legend is the reader asking for this one directly.\n return highlighted !== null && highlighted !== seriesId;\n }\n\n protected onMarkerClick(event: MouseEvent): void {\n const hit = markOf(event);\n if (!hit) {\n return;\n }\n if (this.pins()) {\n this.activeMark.pin(hit.index, event, '.series-marker', hit.element);\n }\n this.selectMarker(hit.index);\n }\n\n private selectMarker(markIndex: number): void {\n const marker = this.allMarkers()[markIndex];\n const series = this.data().find((entry) => entry.id === marker?.seriesId);\n if (marker && series) {\n this.pointClicked.emit({\n series,\n categoryIndex: marker.categoryIndex,\n value: marker.value,\n });\n }\n }\n\n protected markerLabel(marker: {\n seriesLabel: string;\n category: string;\n formattedValue: string;\n }): string {\n return `${marker.seriesLabel}, ${marker.category}, ${marker.formattedValue}`;\n }\n\n /** What this series reads at the category the cursor is on, whatever `tooltip` says. It feeds\n * the container's category panel, so one band answers for every mark on the plot rather than\n * each mark owning a hover field of its own. */\n readonly axisEntries = computed<readonly ChartAxisEntry[]>(() =>\n this.readingsAtCursor().map(({ reading }) => reading),\n );\n\n private readonly readingsAtCursor = computed(() => {\n const categoryIndex = this.scales.activeIndex();\n if (categoryIndex < 0) {\n return [];\n }\n\n return this.plotted().flatMap((entry) => {\n const marker = entry.markers.find(\n (candidate) => candidate.categoryIndex === categoryIndex,\n );\n\n return marker\n ? [\n {\n seriesId: entry.series.id,\n reading: {\n label: marker.seriesLabel,\n value: marker.value,\n formatted: marker.formattedValue,\n color: marker.color,\n y: marker.y,\n } satisfies ChartAxisEntry,\n },\n ]\n : [];\n });\n });\n\n readonly tooltipContext = computed<ChartTooltipContext | null>(() => {\n if (this.tooltip() === 'none') {\n return null;\n }\n if (this.tooltip() === 'axis') {\n return this.axisTooltipContext();\n }\n const marker = this.allMarkers()[this.activeMark.index()];\n if (!marker) {\n return null;\n }\n\n return {\n category: marker.category,\n entries: [\n {\n label: marker.seriesLabel,\n value: marker.value,\n formatted: marker.formattedValue,\n color: marker.color,\n },\n ],\n };\n });\n\n private readonly markerElements =\n viewChildren<ElementRef<Element>>('markerEl');\n\n /** The topmost reading at the active category, as its own element. The cursor band spans the\n * whole plot, so anchoring an `'axis'` panel to it opens the panel at the top of the chart\n * rather than over the readings it is about. */\n private readonly topReadingElement = computed<Element | null>(() => {\n const categoryIndex = this.scales.activeIndex();\n if (categoryIndex < 0) {\n return null;\n }\n const highest = this.allMarkers()\n .filter((marker) => marker.categoryIndex === categoryIndex)\n .reduce<{ markIndex: number; y: number } | null>(\n (top, marker) => (top === null || marker.y < top.y ? marker : top),\n null,\n );\n\n return highest\n ? (this.markerElements()[highest.markIndex]?.nativeElement ?? null)\n : null;\n });\n\n /** Where the panel hangs: the reading or the pointer in `'axis'` mode, the hovered mark\n * otherwise. */\n readonly tooltipOrigin = computed<ChartTooltipOrigin | null>(() => {\n if (this.tooltip() !== 'axis') {\n return this.activeMark.origin();\n }\n if (this.tooltipAnchor() === 'pointer') {\n return this.scales.cursorPointer() ?? this.scales.cursorOrigin();\n }\n\n return this.topReadingElement() ?? this.scales.cursorOrigin();\n });\n\n /** Every series' reading at the category the CONTAINER says is active, which is what the\n * category cursor sets. A series with no reading there contributes no row rather than a\n * blank one. */\n private readonly axisTooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const categoryIndex = this.scales.activeIndex();\n if (categoryIndex < 0) {\n return null;\n }\n const focused = this.focusedSeries();\n const entries = topDown(\n this.readingsAtCursor()\n .filter(({ seriesId }) => !focused || seriesId === focused)\n .map(({ reading }) => reading),\n );\n if (!entries.length) {\n return null;\n }\n\n return {\n category: this.scales.categories()[categoryIndex] ?? '',\n entries,\n };\n },\n );\n}\n","<svg:g\n class=\"lines\"\n [class.dims-others]=\"dimOthers()\"\n [class.is-outlined]=\"outline()\"\n (pointerover)=\"onMarkerOver($event)\"\n (pointerout)=\"onMarkerOut($event)\"\n (keydown)=\"onMarkerKey($event)\"\n (click)=\"onMarkerClick($event)\">\n @for (entry of plotted(); track entry.series.id) {\n @for (path of entry.areaPaths; track $index) {\n <svg:path\n class=\"series-area\"\n [class.is-stacked]=\"stacked()\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\"\n (animate.leave)=\"leaveMark($event)\" />\n }\n }\n\n @if (outline()) {\n @for (entry of plotted(); track entry.series.id) {\n @for (path of entry.linePaths; track $index) {\n <svg:path\n class=\"series-halo\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.is-dashed]=\"dashFor(entry.seriesIndex) !== null\"\n [attr.stroke-dasharray]=\"dashFor(entry.seriesIndex)\"\n [attr.pathLength]=\"dashFor(entry.seriesIndex) === null ? 1 : null\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.d]=\"path\" />\n }\n }\n }\n\n @for (entry of plotted(); track entry.series.id) {\n @for (path of entry.linePaths; track $index) {\n <svg:path\n class=\"series-line\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.is-dashed]=\"dashFor(entry.seriesIndex) !== null\"\n [attr.stroke-dasharray]=\"dashFor(entry.seriesIndex)\"\n [attr.pathLength]=\"dashFor(entry.seriesIndex) === null ? 1 : null\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.d]=\"path\"\n [attr.stroke]=\"entry.color\"\n (animate.leave)=\"leaveMark($event)\" />\n }\n }\n\n @if (\n showMarkers() ||\n interactive() ||\n pins()\n ) {\n @for (entry of plotted(); track entry.series.id) {\n @for (marker of entry.markers; track marker.key) {\n <svg:circle\n #markerEl\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"pins()\"\n [class.is-active]=\"isActiveMarker(marker)\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.data-mark-index]=\"marker.markIndex\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.markIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"interactive() ? markerLabel(marker) : null\" />\n }\n }\n }\n\n @if (pinnedMarker(); as marker) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' + marker.x + ',' + (marker.y - pinLift) + ')'\n \" />\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartThreshold } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { thresholdMarks } from './chart.math';\n\n/**\n * The names of a chart's reference lines, laid out by the same geometry that draws them.\n *\n * A second element rather than part of `g[dsReferenceLine]`: the strokes belong under the marks\n * and the names over them, and a projected element lands in exactly one of the container's slots.\n * Reports no domain - the line it names already did.\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsReferenceLabel]',\n standalone: true,\n templateUrl: './reference-label.component.html',\n styleUrl: './reference-label.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReferenceLabelComponent {\n private readonly scales = inject(CHART_SCALES);\n\n /** The same list `dsReferenceLine` is given. This mark draws only the labels, so it is placed\n * AFTER the series and the line mark before it, which is what keeps a label legible over a mark\n * that would otherwise cover it. */\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n protected readonly lines = computed(() =>\n thresholdMarks(\n this.thresholds(),\n this.scales.plot(),\n this.scales.yPosition(),\n ).filter((mark) => mark.label !== ''),\n );\n}\n","@if (lines().length) {\n <svg:g class=\"reference-labels\">\n @for (line of lines(); track line.key) {\n <svg:text\n class=\"threshold-label\"\n text-anchor=\"start\"\n [style.--_chart-threshold-color]=\"line.color\"\n [attr.x]=\"line.labelX\"\n [attr.y]=\"line.labelY\">\n {{ line.label }}\n </svg:text>\n }\n </svg:g>\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartThreshold } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { thresholdMarks } from './chart.math';\n\nlet nextReferenceId = 0;\n\n/**\n * Reference lines and bands across the plot, drawn against the scales `ds-chart` supplies.\n *\n * Strokes only: the LABELS are a second element, `g[dsReferenceLabel]`, because the two belong in\n * different layers of the canvas - a line reads as furniture under the marks, a label has to stay\n * legible over them - and one projected element can only land in one of the container's slots.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsReferenceLine>`.\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsReferenceLine]',\n standalone: true,\n templateUrl: './reference-line.component.html',\n styleUrl: './reference-line.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReferenceLineComponent implements OnDestroy {\n private readonly scales = inject(CHART_SCALES);\n\n /** The lines and bands to draw across the plot. Each entry is ONE reading, `value`, plus an\n * optional `label`, `color` and `dash`; a `to` makes it a band between two readings. Each one\n * widens the value axis to hold it, so a target above every mark still lands on the plot. */\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n private readonly domainId = `reference-line-${nextReferenceId++}`;\n\n constructor() {\n // Reported like a series: a target above every reading is the one the reader most needs to\n // see, and an axis derived from the data alone would draw it off the plot.\n effect(() =>\n this.scales.reportDomain(\n this.domainId,\n this.thresholds().flatMap((threshold) =>\n threshold.to == null\n ? [threshold.value]\n : [threshold.value, threshold.to],\n ),\n ),\n );\n }\n\n ngOnDestroy(): void {\n this.scales.releaseDomain(this.domainId);\n }\n\n protected readonly lines = computed(() =>\n thresholdMarks(\n this.thresholds(),\n this.scales.plot(),\n this.scales.yPosition(),\n ),\n );\n}\n","@if (lines().length) {\n <svg:g\n class=\"references\"\n aria-hidden=\"true\">\n @for (line of lines(); track line.key) {\n <svg:g\n class=\"reference\"\n [style.--_chart-threshold-color]=\"line.color\">\n @if (line.band) {\n <svg:rect\n class=\"threshold-band\"\n [attr.x]=\"line.left\"\n [attr.y]=\"line.top\"\n [attr.width]=\"line.width\"\n [attr.height]=\"line.height\" />\n } @else {\n <svg:line\n class=\"threshold-line\"\n [class.is-dashed]=\"line.dash === 'dashed'\"\n [class.is-dotted]=\"line.dash === 'dotted'\"\n [attr.x1]=\"line.left\"\n [attr.x2]=\"line.right\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\" />\n }\n </svg:g>\n }\n </svg:g>\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartAxis } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { annotationMarks } from './chart.math';\n\nexport interface ChartAnnotation {\n /** 0-based position along the category axis. */\n readonly categoryIndex: number;\n /** The reading the label names, in the axis's own unit. */\n readonly value: number;\n readonly label: string;\n /** Which value axis the reading is measured against. Defaults to `'primary'`. */\n readonly axis?: ChartAxis;\n}\n\n/**\n * A tooltip answers \"what is this?\" on hover; an annotation answers it in a printed page or a\n * screenshot.\n *\n * Takes the readings rather than finding them: a mark never sees the other marks, so the caller\n * that owns the series is the one that knows which value a label belongs to. Reports no domain -\n * the series it annotates already did.\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsSeriesAnnotation]',\n standalone: true,\n templateUrl: './series-annotation.component.html',\n styleUrl: './series-annotation.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SeriesAnnotationComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly annotations = input<readonly ChartAnnotation[]>([]);\n\n protected readonly placed = computed(() => {\n const plot = this.scales.plot();\n const xPosition = this.scales.xPosition();\n const yPosition = this.scales.yPosition();\n const secondaryYPosition = this.scales.secondaryYPosition();\n\n return annotationMarks(\n this.annotations().map((annotation, index) => ({\n key: `${annotation.categoryIndex}:${index}`,\n label: annotation.label,\n x: xPosition(annotation.categoryIndex),\n y: (annotation.axis === 'secondary' ? secondaryYPosition : yPosition)(\n annotation.value,\n ),\n })),\n plot.left + plot.width,\n );\n });\n}\n","@if (placed().length) {\n <svg:g class=\"annotations\">\n @for (note of placed(); track note.key) {\n <svg:text\n class=\"annotation\"\n [attr.x]=\"note.x\"\n [attr.y]=\"note.y\"\n [attr.text-anchor]=\"note.anchor\">\n {{ note.label }}\n </svg:text>\n }\n </svg:g>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextSeriesId"],"mappings":";;;;;;;;AAiBO,MAAM,wBAAwB,GAAG,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC;AAErC;AACO,MAAM,qBAAqB,GAAG,EAAE;AAChC,MAAM,2BAA2B,GAAG,EAAE;AACtC,MAAM,kBAAkB,GAAG,GAAG;AAErC;;;;;;;;AAQgB;AACT,MAAM,oBAAoB,GAAG,GAAG;AAEhC,MAAM,yBAAyB,GAAG,GAAG;AACrC,MAAM,yBAAyB,GAAG,EAAE;AACpC,MAAM,yBAAyB,GAAG;AAEzC;AACO,MAAM,iBAAiB,GAAG,EAAE;AAEnC;AACwC;AACjC,MAAM,sBAAsB,GAAG,EAAE;AAExC;AACA,MAAM,eAAe,GAAG,EAAE;AAE1B;;;;;;AAMgB;AACV,SAAU,SAAS,CACvB,aAAqB,EACrB,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,WAAA,GAAsB,iBAAiB,EAAA;IAEvC,OAAO;AACL,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,GAAG,EAAE,UAAU;AACf,QAAA,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,WAAW,CAAC;QAC5D,MAAM,EAAE,IAAI,CAAC,GAA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A,CAAA,EAAA;;;AEvCjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart.mjs","sources":["../../../src/lib/components/chart/chart.math.ts","../../../src/lib/components/chart/chart-scales.token.ts","../../../src/lib/components/chart/chart.component.ts","../../../src/lib/components/chart/chart.component.html","../../../src/lib/components/chart/column-series.component.ts","../../../src/lib/components/chart/column-series.component.html","../../../src/lib/components/chart/line-series.component.ts","../../../src/lib/components/chart/line-series.component.html","../../../src/lib/components/chart/reference-label.component.ts","../../../src/lib/components/chart/reference-label.component.html","../../../src/lib/components/chart/reference-line.component.ts","../../../src/lib/components/chart/reference-line.component.html","../../../src/lib/components/chart/series-annotation.component.ts","../../../src/lib/components/chart/series-annotation.component.html","../../../src/lib/components/chart/ids-group-ltd-ids-design-system-components-chart.ts"],"sourcesContent":["import {\n domainMinOf,\n linearScale,\n niceDomain,\n roundStepAtLeast,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { NiceDomain } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ChartAxisMode,\n ChartStackMode,\n ChartThreshold,\n ChartThresholdDash,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { ChartTooltipEntry } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type { ChartAxisEntry } from './chart-scales.token';\n\nexport const CHART_DEFAULT_TICK_COUNT = 5;\nexport const CHART_AXIS_LABEL_GAP = 8;\n\n/** Room a rotated axis title needs across the gutter. */\nexport const CHART_AXIS_TITLE_BAND = 20;\nexport const CHART_CATEGORY_LABEL_OFFSET = 18;\nexport const CHART_BAND_PADDING = 0.3;\n\n/** The width the chart lays out at while it measures zero (SSR, `display: none`, before the first\n * `ResizeObserver` callback); without it every category stacks on one x.\n *\n * @internal */\nexport const CHART_FALLBACK_WIDTH = 640;\n\nexport const CHART_DEFAULT_PLOT_HEIGHT = 240;\nexport const CHART_DEFAULT_AXIS_GUTTER = 46;\nexport const CHART_DEFAULT_VALUE_SPACE = 20;\n\n/** Room past the last band, so a mark centred on it is not cut by the viewBox edge. */\nexport const CHART_EDGE_GUTTER = 12;\n\n/** Blank between two stacked plots, so the lower plot's top tick label clears the upper plot. */\nexport const CHART_STACKED_PLOT_GAP = 34;\n\nconst CATEGORY_GUTTER = 30;\n\n/** The drawable rectangle, in CSS pixels; the viewBox matches `measuredWidth`, so one user unit is one pixel.\n *\n * @internal */\nexport function chartPlot(\n measuredWidth: number,\n plotHeight: number,\n axisGutter: number,\n valueSpace: number,\n rightGutter: number = CHART_EDGE_GUTTER,\n): { left: number; top: number; width: number; height: number } {\n return {\n left: axisGutter,\n top: valueSpace,\n width: Math.max(0, measuredWidth - axisGutter - rightGutter),\n height: Math.max(0, plotHeight),\n };\n}\n\n/** The viewBox's height, equal to the `<svg>`'s rendered height in pixels.\n *\n * `valueSpace` is budgeted above the plot, and below the baseline only when the domain reaches\n * under zero (a negative mark's label would print into the category labels).\n *\n * @internal */\nexport function chartViewHeight(\n plotHeight: number,\n valueSpace: number,\n reservesBelowBaseline = false,\n): number {\n const below = reservesBelowBaseline ? valueSpace : 0;\n\n return valueSpace + Math.max(0, plotHeight) + below + CATEGORY_GUTTER;\n}\n\n/** The domain the value axis draws: the union of every reported set, always reaching zero (a bar\n * against a floating floor misstates its size), widened by the pins and snapped to a round tick step.\n *\n * @internal */\nexport function axisDomain(\n reported: Iterable<readonly number[]>,\n tickCount: number,\n pinnedMinimum: number | null = null,\n pinnedMaximum: number | null = null,\n): NiceDomain {\n let minimum = 0;\n let maximum = 0;\n for (const values of reported) {\n const finite = values.filter((value) => Number.isFinite(value));\n minimum = Math.min(minimum, domainMinOf(finite));\n maximum = finite.reduce(\n (highest, value) => Math.max(highest, value),\n maximum,\n );\n }\n if (\n pinnedMinimum !== null &&\n Number.isFinite(pinnedMinimum) &&\n pinnedMinimum < minimum\n ) {\n minimum = pinnedMinimum;\n }\n if (\n pinnedMaximum !== null &&\n Number.isFinite(pinnedMaximum) &&\n pinnedMaximum > maximum\n ) {\n maximum = pinnedMaximum;\n }\n\n return niceDomain(minimum, maximum, tickCount);\n}\n\n/** Where a value sits vertically, clamped inside the plot. An unplottable value lands on the\n * baseline: a `NaN` would void the coordinate attribute and hide the mark silently.\n *\n * @internal */\nexport function valueScale(\n domain: NiceDomain,\n top: number,\n height: number,\n): (value: number) => number {\n const baseline = top + height;\n const scale = linearScale(domain.min, domain.max, height);\n\n return (value) => {\n const y = baseline - scale(value);\n\n return Number.isFinite(y) ? Math.min(Math.max(y, top), baseline) : baseline;\n };\n}\n\n/** Distance from a reference line, or a band's upper edge, to its label's baseline. */\nconst THRESHOLD_LABEL_GAP = 5;\n\n/** Inset from the plot's left edge; a right-anchored label collides with the last column's value label. */\nconst THRESHOLD_LABEL_INSET = 4;\n\n/** @internal */\nexport interface ThresholdMark {\n /** Position in the list, not the reading: two thresholds may share a value. */\n readonly key: number;\n readonly label: string;\n readonly color: string | null;\n readonly dash: ChartThresholdDash;\n readonly band: boolean;\n readonly left: number;\n readonly right: number;\n readonly width: number;\n readonly y: number;\n readonly top: number;\n readonly height: number;\n readonly labelX: number;\n readonly labelY: number;\n}\n\n/** Every drawable coordinate of a chart's reference lines and bands; strokes and labels paint in\n * different layers and share one calculation.\n *\n * @internal */\nexport function thresholdMarks(\n thresholds: readonly ChartThreshold[],\n plot: { left: number; top: number; width: number; height: number },\n toY: (value: number) => number,\n): readonly ThresholdMark[] {\n return thresholds.map((threshold, index) => {\n const y = toY(threshold.value);\n const far = threshold.to == null ? y : toY(threshold.to);\n const top = Math.min(y, far);\n\n return {\n key: index,\n label: threshold.label ?? '',\n color: threshold.color ?? null,\n dash: threshold.dash ?? 'dashed',\n band: threshold.to != null,\n left: plot.left,\n right: plot.left + plot.width,\n width: plot.width,\n y,\n top,\n height: Math.abs(y - far),\n labelX: plot.left + THRESHOLD_LABEL_INSET,\n labelY: top - THRESHOLD_LABEL_GAP,\n };\n });\n}\n\n/** A tick row's index for the value zero, or `null` when the rows do not carry one. Two axes share\n * gridlines only if they share a zero row, or a reading above the line on one axis sits below it on the other. */\nfunction zeroRow(ticks: readonly number[]): number | null {\n if (ticks.length < 2) {\n return null;\n }\n const step = ticks[1] - ticks[0];\n if (!Number.isFinite(step) || step === 0) {\n return null;\n }\n const row = (0 - ticks[0]) / step;\n const rounded = Math.round(row);\n\n return Math.abs(row - rounded) < 1e-9 &&\n rounded >= 0 &&\n rounded < ticks.length\n ? rounded\n : null;\n}\n\n/** @internal */\nexport interface SecondaryAxis {\n readonly domain: NiceDomain;\n readonly ticks: readonly number[];\n /** True when the labels below sit on the primary axis's own tick rows. */\n readonly aligned: boolean;\n}\n\n/** The second value axis, as the four modes define it.\n *\n * `'aligned'` and `'exact'` hang the second scale on the first's tick rows; `'aligned'` snaps the\n * step to a round number, `'exact'` takes the step the data needs. `'dual-grid'` and `'split'`\n * nice the second domain on its own.\n *\n * Falls back to an independent scale when alignment is unavailable: fewer than two rows, no shared\n * zero row, or a domain whose sign has no rows on its side of zero.\n *\n * @internal */\nexport function secondaryAxis(\n primaryTicks: readonly number[],\n reported: Iterable<readonly number[]>,\n tickCount: number,\n mode: ChartAxisMode,\n pinnedMax: number | null = null,\n): SecondaryAxis {\n let minimum = 0;\n let maximum = 0;\n for (const values of reported) {\n const finite = values.filter((value) => Number.isFinite(value));\n minimum = Math.min(minimum, domainMinOf(finite));\n maximum = finite.reduce(\n (highest, value) => Math.max(highest, value),\n maximum,\n );\n }\n if (pinnedMax !== null && Number.isFinite(pinnedMax)) {\n maximum = pinnedMax;\n }\n const independent = (): SecondaryAxis => ({\n domain: niceDomain(minimum, maximum, tickCount),\n ticks: tickValues(minimum, maximum, tickCount),\n aligned: false,\n });\n\n if (mode !== 'aligned' && mode !== 'exact') {\n return independent();\n }\n const zero = zeroRow(primaryTicks);\n if (zero === null) {\n return independent();\n }\n const rowsAbove = primaryTicks.length - 1 - zero;\n const rowsBelow = zero;\n if ((maximum > 0 && rowsAbove === 0) || (minimum < 0 && rowsBelow === 0)) {\n return independent();\n }\n const needed = Math.max(\n rowsAbove > 0 ? maximum / rowsAbove : 0,\n rowsBelow > 0 ? -minimum / rowsBelow : 0,\n );\n const step = mode === 'aligned' ? roundStepAtLeast(needed) : needed;\n if (!Number.isFinite(step) || step <= 0) {\n return {\n domain: { min: 0, max: 0 },\n ticks: primaryTicks.map(() => 0),\n aligned: true,\n };\n }\n\n return {\n domain: { min: -rowsBelow * step, max: rowsAbove * step },\n ticks: primaryTicks.map((_, row) => roundTick((row - zero) * step)),\n aligned: true,\n };\n}\n\n/** A step multiplied back out rarely lands on itself (`149.99999999999997`). */\nfunction roundTick(value: number): number {\n return Number(value.toFixed(6));\n}\n\n/** Every segment's span on the value axis, series-major: `offsets[series][category]`.\n *\n * `'none'` and `'grouped'` give every series the span it would have alone. The stacking modes run a\n * positive and a negative pile per category.\n *\n * `'normalized'` divides a running sum, not each share in turn: 20/60 + 40/60 is\n * 0.9999999999999999 and draws a category visibly short of full.\n */\nexport function stackOffsets(\n series: readonly (readonly number[])[],\n mode: ChartStackMode,\n): readonly (readonly ChartStackOffset[])[] {\n const reading = (value: number): number =>\n Number.isFinite(value) ? value : 0;\n if (mode === 'none' || mode === 'grouped') {\n return series.map((values) =>\n values.map((value) => ({ from: 0, to: reading(value) })),\n );\n }\n const magnitude: number[] = [];\n if (mode === 'normalized') {\n for (const values of series) {\n values.forEach((value, category) => {\n magnitude[category] =\n (magnitude[category] ?? 0) + Math.abs(reading(value));\n });\n }\n }\n const risen: number[] = [];\n const fallen: number[] = [];\n\n return series.map((values) =>\n values.map((raw, category) => {\n const value = reading(raw);\n const pile = value < 0 ? fallen : risen;\n const from = pile[category] ?? 0;\n const to = from + value;\n pile[category] = to;\n const total = mode === 'normalized' ? (magnitude[category] ?? 0) : 1;\n\n return total > 0\n ? { from: from / total, to: to / total }\n : { from: 0, to: 0 };\n }),\n );\n}\n\n/** A label pinned to one reading, legible with no pointer.\n *\n * @internal */\nexport interface ChartAnnotationMark {\n readonly key: string;\n readonly label: string;\n readonly x: number;\n readonly y: number;\n readonly anchor: 'start' | 'middle' | 'end';\n}\n\n/** View units between a reading and the label above it, and the margin inside which a label\n * anchors to its own edge instead of centring.\n *\n * @internal */\nconst ANNOTATION_GAP = 12;\n/** @internal */\nconst ANNOTATION_EDGE_GUARD = 48;\n\n/** Places a label against each reading it names.\n *\n * @internal */\nexport function annotationMarks(\n readings: readonly { key: string; label: string; x: number; y: number }[],\n plotWidth: number,\n): readonly ChartAnnotationMark[] {\n return readings.map((reading) => ({\n key: reading.key,\n label: reading.label,\n x: reading.x,\n // Below the reading where there is no room above, or a label at a peak lands on its own marker.\n y:\n reading.y - ANNOTATION_GAP >= ANNOTATION_GAP\n ? reading.y - ANNOTATION_GAP\n : reading.y + ANNOTATION_GAP,\n // Anchored away from the plot edges: a centred first/last label hangs outside the viewBox.\n anchor:\n reading.x < ANNOTATION_EDGE_GUARD\n ? 'start'\n : reading.x > plotWidth - ANNOTATION_EDGE_GUARD\n ? 'end'\n : 'middle',\n }));\n}\n\n/** Where one series' segment starts and ends on the value axis, in the axis's own unit, or in\n * shares of the category total under `'normalized'`.\n */\nexport interface ChartStackOffset {\n readonly from: number;\n readonly to: number;\n}\n\n/** Which category a pointer at `x` is over, or `-1` outside the plot. The half band at each end\n * belongs to the first and last category.\n *\n * @internal */\nexport function categoryAt(\n x: number,\n plotLeft: number,\n plotWidth: number,\n categoryCount: number,\n): number {\n if (categoryCount <= 0 || plotWidth <= 0 || !Number.isFinite(x)) {\n return -1;\n }\n const offset = x - plotLeft;\n if (offset < 0 || offset > plotWidth) {\n return -1;\n }\n const band = plotWidth / categoryCount;\n\n return Math.min(categoryCount - 1, Math.floor(offset / band));\n}\n\n/** Readings ordered top to bottom with the height dropped; ties and readings with no height keep their place. */\nexport function topDown(\n entries: readonly ChartAxisEntry[],\n): ChartTooltipEntry[] {\n return [...entries]\n .sort((above, below) => (above.y ?? Infinity) - (below.y ?? Infinity) || 0)\n .map(({ y: _drawnAt, ...reading }) => reading);\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport type { ChartAxis } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartTooltipContext,\n ChartTooltipEntry,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\n\n/** A mark's reading at the cursor's category, with the height it is drawn at. */\nexport interface ChartAxisEntry extends ChartTooltipEntry {\n /** Where the reading is drawn, in plot pixels from the top; a category panel orders rows by it. */\n readonly y?: number;\n}\n\n/** What a mark hands the container to open its panel: the mark decides the content and anchor, the container ensures a plot never opens two. */\nexport interface ChartTooltipSource {\n readonly context: Signal<ChartTooltipContext | null>;\n readonly origin: Signal<ChartTooltipOrigin | null>;\n /** Whether the mark is held; a held panel takes the pointer. */\n readonly pinned?: Signal<boolean>;\n /** Whether this mark shows a tooltip; absent means it does. Two such marks turn the category cursor on under `cursor=\"auto\"`. */\n readonly offersTooltip?: Signal<boolean>;\n /** Whether the mark's own panel is about the category, as `tooltip=\"axis\"` is; one such mark turns\n * the category cursor on under `cursor=\"auto\"`. */\n readonly readsCategory?: Signal<boolean>;\n /** This mark's reading at the cursor's category as an element; a category panel hangs over the highest. Absent falls back to `origin`. */\n readonly axisOrigin?: Signal<Element | null>;\n /** What this mark reads at the cursor's category, whatever its own tooltip setting. */\n readonly axisEntries?: Signal<readonly ChartAxisEntry[]>;\n}\n\n/** The drawable rectangle inside `ds-chart`, in CSS pixels; one `viewBox` user unit is one pixel. */\nexport interface ChartPlot {\n readonly width: number;\n readonly height: number;\n readonly left: number;\n readonly top: number;\n}\n\n/** What `ds-chart` offers the marks projected into it: a shared coordinate space, value domain and\n * active category. A mark reports the values it will draw and reads its coordinates back. */\nexport interface ChartScales {\n readonly categories: Signal<readonly string[]>;\n readonly plot: Signal<ChartPlot>;\n /** Whether the plot has its real width yet; until then the scales use a stand-in. Absent means always measured. */\n readonly measured?: Signal<boolean>;\n /** The centre of a category's band. */\n readonly xPosition: Signal<(index: number) => number>;\n /** Clamped into the plot. */\n readonly yPosition: Signal<(value: number) => number>;\n readonly bandWidth: Signal<number>;\n /** The rectangle a secondary-axis mark draws in. */\n readonly secondaryPlot: Signal<ChartPlot>;\n /** `yPosition` for the second value axis. */\n readonly secondaryYPosition: Signal<(value: number) => number>;\n readonly hasSecondaryAxis: Signal<boolean>;\n /** The y of value zero. */\n readonly zeroOffset: Signal<number>;\n /** The category under the pointer or the keyboard, or `-1` for none. */\n readonly activeIndex: Signal<number>;\n /** Whether the category cursor answers the pointer; while it does, marks answer focus and clicks only. Absent means off. */\n readonly cursorOn?: Signal<boolean>;\n /** The category whose axis label the pointer is on, while the category cursor is off. */\n readonly categoryLabelHover?: Signal<{\n readonly index: number;\n readonly event: PointerEvent;\n } | null>;\n /** How long a resting pointer waits before a mark answers it. Absent means at once. */\n readonly hoverDelayMs?: Signal<number>;\n /** The band over the active category. `null` while `cursor` is off or nothing is active. */\n readonly cursorOrigin: Signal<Element | null>;\n /** Where the pointer last was, in client pixels. `null` while `cursor` is off or the pointer has left. */\n readonly cursorPointer: Signal<{\n readonly x: number;\n readonly y: number;\n } | null>;\n setActiveIndex(index: number): void;\n /** Contributes values to the shared domain under a caller-owned id; the same id replaces its earlier report.\n * Call from an `effect`: required inputs are unreadable in the constructor. */\n reportDomain(id: string, values: readonly number[], axis?: ChartAxis): void;\n /** Withdraws a contribution. */\n releaseDomain(id: string): void;\n /** Offers a panel to open while this mark is active; the same id replaces the offer. */\n reportTooltip(id: string, source: ChartTooltipSource): void;\n releaseTooltip(id: string): void;\n}\n\nexport const CHART_SCALES = new InjectionToken<ChartScales>('CHART_SCALES');\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n Signal,\n ViewEncapsulation,\n afterRenderEffect,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n TemplateRef,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n bandScale,\n elementWidth,\n labelInterval,\n rotationWouldFit,\n tickValues,\n chartRenderGate,\n DsChartBase,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { isPlatformBrowser } from '@angular/common';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport {\n CHART_PIN_GAP,\n CHART_PIN_RADIUS,\n ChartPinMarkerComponent,\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type { ChartTooltipContext } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartAxisMode,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n categoryAt,\n CHART_AXIS_LABEL_GAP,\n CHART_AXIS_TITLE_BAND,\n CHART_BAND_PADDING,\n CHART_CATEGORY_LABEL_OFFSET,\n CHART_DEFAULT_AXIS_GUTTER,\n CHART_DEFAULT_PLOT_HEIGHT,\n CHART_DEFAULT_TICK_COUNT,\n CHART_DEFAULT_VALUE_SPACE,\n CHART_EDGE_GUTTER,\n CHART_FALLBACK_WIDTH,\n CHART_STACKED_PLOT_GAP,\n axisDomain,\n chartPlot,\n chartViewHeight,\n secondaryAxis,\n topDown,\n valueScale,\n} from './chart.math';\nimport {\n CHART_SCALES,\n type ChartPlot,\n type ChartScales,\n type ChartTooltipSource,\n} from './chart-scales.token';\n\n@Component({\n selector: 'ds-chart',\n standalone: true,\n exportAs: 'dsChart',\n imports: [SkeletonComponent, ChartTooltipDirective, ChartPinMarkerComponent],\n templateUrl: './chart.component.html',\n styleUrl: './chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n '[class.measuring]': '!settled()',\n '[style.--_chart-view-height]': \"viewHeight() + 'px'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: CHART_SCALES,\n useExisting: forwardRef(() => ChartComponent),\n },\n ],\n})\nexport class ChartComponent extends DsChartBase implements ChartScales {\n protected readonly renderReady = chartRenderGate();\n\n /** One band per category; every projected mark is positioned against them. */\n readonly categories = input<readonly string[]>([]);\n\n /** How many value-axis ticks to aim for; ticks snap to a round step, so the count may differ by one. */\n readonly tickCount = input(CHART_DEFAULT_TICK_COUNT, {\n transform: numberAttribute,\n });\n\n /** Pins the floor of the value axis. It only opens the axis further; a floor above the data is ignored. */\n readonly min = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Pins the ceiling of the value axis. See `min`. */\n readonly max = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Draws a band and crosshair down the category under the pointer and reports it to every mark\n * through `activeIndex`; the panel then names every reading at that category. `'auto'` (default)\n * is `'category'` with two or more tooltip-showing marks or a mark with `tooltip=\"axis\"`, else\n * `'none'`. */\n readonly cursor = input<'none' | 'category' | 'auto'>('auto');\n\n readonly pinOnClickResolved = resolveWithConfig(\n this.pinOnClick,\n (config) => config.chart?.pinOnClick,\n true,\n );\n\n /** Pins the ceiling of the SECOND value axis, the way `max` pins the first. */\n readonly maxSecondary = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Plot height in CSS pixels, axis labels and headroom excluded; fixed across card widths. */\n readonly plotHeight = input(CHART_DEFAULT_PLOT_HEIGHT, {\n transform: numberAttribute,\n });\n\n /** Width in CSS pixels of the left gutter that carries the value-axis labels. */\n readonly axisGutter = input(CHART_DEFAULT_AXIS_GUTTER, {\n transform: numberAttribute,\n });\n\n /** Pixels reserved at each end of the plot for a value label, drawn or not. */\n readonly valueSpace = input(CHART_DEFAULT_VALUE_SPACE, {\n transform: numberAttribute,\n });\n\n /** How the second value axis relates to the first, once a mark has reported against it. */\n readonly secondaryAxisMode = input<ChartAxisMode>('aligned');\n\n /** Colours the first axis's tick labels like the marks measured against it. */\n readonly axisColor = input<string | null>(null);\n\n /** `axisColor` for the second axis. */\n readonly secondaryAxisColor = input<string | null>(null);\n\n /** Names the first axis's unit beside it. */\n readonly axisLabel = input<string | null>(null);\n\n /** `axisLabel` for the second axis. */\n readonly secondaryAxisLabel = input<string | null>(null);\n\n protected readonly tooltipSwatchesResolved = this.defaults.tooltipSwatches;\n readonly hoverDelayMs = this.defaults.hoverDelayMs;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly zone = inject(NgZone);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** The `<svg>`'s rendered width: the host's content box, since `:host(.framed)` carries the padding. */\n private readonly measuredWidth = elementWidth(this.host);\n\n /** True under SSR, which draws at the fallback width. */\n readonly measured = computed(\n () => !this.isBrowser || this.measuredWidth() > 0,\n );\n\n protected readonly viewWidth = computed(\n () => this.measuredWidth() || CHART_FALLBACK_WIDTH,\n );\n\n /** Whether the marks may animate: the correction after measuring must not. Two frames, because\n * after one the corrected geometry is unstyled and `transitionrun` fires on `x` and `width`. */\n protected readonly settled = signal(false);\n\n constructor() {\n super();\n effect((onCleanup) => {\n if (this.settled() || this.measuredWidth() === 0) {\n return;\n }\n let first = 0;\n let second = 0;\n // Outside the zone: under zone.js each frame callback is a full application tick.\n this.zone.runOutsideAngular(() => {\n first = requestAnimationFrame(() => {\n second = requestAnimationFrame(() => this.settled.set(true));\n });\n });\n onCleanup(() => {\n cancelAnimationFrame(first);\n cancelAnimationFrame(second);\n });\n });\n\n effect((onCleanup) => {\n const canvas = this.canvasElement()?.nativeElement;\n if (canvas && this.cursorResolved() === 'category') {\n onCleanup(this.listenForCursor(canvas));\n }\n });\n\n // Read phase: every `getComputedTextLength` before any write, or each label forces a layout.\n afterRenderEffect({\n read: () => {\n this.labelTexts();\n this.measuredLabelWidth.set(this.widestLabel('.axis-label.is-primary'));\n this.measuredSecondaryLabelWidth.set(\n this.widestLabel('.axis-label.is-secondary'),\n );\n this.measuredCategoryLabelWidth.set(\n this.widestLabel('.category-label'),\n );\n },\n });\n }\n\n private widestLabel(selector: string): number {\n const labels =\n this.host.nativeElement.querySelectorAll<SVGTextElement>(selector);\n let widest = 0;\n for (const label of labels) {\n widest = Math.max(widest, label.getComputedTextLength());\n }\n\n return Math.ceil(widest);\n }\n\n /** Two plots stacked on a shared category axis. */\n protected readonly stacked = computed(\n () => this.secondaryAxisMode() === 'split' && this.hasSecondaryAxis(),\n );\n\n protected readonly viewHeight = computed(\n () =>\n chartViewHeight(\n this.plotHeight(),\n this.valueSpace(),\n this.reachesBelowZero(),\n ) + (this.stacked() ? this.plotHeight() + CHART_STACKED_PLOT_GAP : 0),\n );\n\n /** One viewBox unit is one CSS pixel, so lengths inside the plot hold at every width. */\n protected readonly viewBox = computed(\n () => `0 0 ${this.viewWidth()} ${this.viewHeight()}`,\n );\n\n /** Widest tick label as rendered, in CSS pixels. Zero until the first read and under SSR. */\n private readonly measuredLabelWidth = signal(0);\n\n private readonly measuredCategoryLabelWidth = signal(0);\n\n /** `axisGutter` is the floor: compact numbers are wider in some locales and the SVG clips overflow. */\n protected readonly effectiveAxisGutter = computed(() =>\n Math.max(\n this.axisGutter(),\n this.measuredLabelWidth() + CHART_AXIS_LABEL_GAP + this.axisTitleGutter(),\n ),\n );\n\n /** A rotated axis title shares the tick gutter; its width is its line height. */\n protected readonly axisTitleGutter = computed(() =>\n this.axisLabel() ? CHART_AXIS_TITLE_BAND : 0,\n );\n\n protected readonly axisTitleX = computed(() => CHART_AXIS_TITLE_BAND / 2);\n\n protected readonly secondaryTitleX = computed(\n () => this.viewWidth() - CHART_AXIS_TITLE_BAND / 2,\n );\n\n private readonly measuredSecondaryLabelWidth = signal(0);\n\n /** Right-hand label room only when the second axis is drawn there; a stacked one is on the left. */\n protected readonly rightGutter = computed(() =>\n this.hasSecondaryAxis() && !this.stacked()\n ? Math.max(\n this.axisGutter(),\n this.measuredSecondaryLabelWidth() +\n CHART_AXIS_LABEL_GAP +\n this.secondaryTitleGutter(),\n )\n : CHART_EDGE_GUTTER,\n );\n\n protected readonly secondaryTitleGutter = computed(() =>\n this.secondaryAxisLabel() && this.hasSecondaryAxis()\n ? CHART_AXIS_TITLE_BAND\n : 0,\n );\n\n readonly plot: Signal<ChartPlot> = computed(() =>\n chartPlot(\n this.viewWidth(),\n this.plotHeight(),\n this.effectiveAxisGutter(),\n this.valueSpace(),\n this.rightGutter(),\n ),\n );\n\n readonly secondaryPlot: Signal<ChartPlot> = computed(() => {\n const plot = this.plot();\n\n return this.stacked()\n ? { ...plot, top: plot.top + plot.height + CHART_STACKED_PLOT_GAP }\n : plot;\n });\n\n private readonly reportedDomains = signal<\n ReadonlyMap<\n string,\n { readonly axis: ChartAxis; readonly values: readonly number[] }\n >\n >(new Map());\n\n reportDomain(\n id: string,\n values: readonly number[],\n axis: ChartAxis = 'primary',\n ): void {\n this.reportedDomains.update((reported) =>\n new Map(reported).set(id, { axis, values }),\n );\n }\n\n private valuesOn(axis: ChartAxis): readonly (readonly number[])[] {\n const found: (readonly number[])[] = [];\n for (const report of this.reportedDomains().values()) {\n if (report.axis === axis) {\n found.push(report.values);\n }\n }\n\n return found;\n }\n\n releaseDomain(id: string): void {\n this.reportedDomains.update((reported) => {\n const next = new Map(reported);\n next.delete(id);\n\n return next;\n });\n }\n\n /** A template that replaces the panel's body. */\n readonly tooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n /** Extra clearance between the mark and the panel, for a value label printed in that gap. */\n readonly tooltipExtraGap = input(0, { transform: numberAttribute });\n\n private readonly tooltipSources = signal<\n ReadonlyMap<string, ChartTooltipSource>\n >(new Map());\n\n reportTooltip(id: string, source: ChartTooltipSource): void {\n this.tooltipSources.update((sources) => new Map(sources).set(id, source));\n }\n\n releaseTooltip(id: string): void {\n this.tooltipSources.update((sources) => {\n const next = new Map(sources);\n next.delete(id);\n\n return next;\n });\n }\n\n /** Two or more marks that show a tooltip: the panel is about the category, not the mark under the pointer. */\n private readonly composed = computed(\n () =>\n [...this.tooltipSources().values()].filter(\n (source) => source.offersTooltip?.() ?? true,\n ).length > 1,\n );\n\n protected readonly cursorResolved = computed(() => {\n const cursor = this.cursor();\n if (cursor !== 'auto') {\n return cursor;\n }\n\n const readsCategory = [...this.tooltipSources().values()].some(\n (source) => source.readsCategory?.() ?? false,\n );\n\n return this.composed() || readsCategory ? 'category' : 'none';\n });\n\n readonly cursorOn = computed(() => this.cursorResolved() === 'category');\n\n /** The tooltip context to show, if any; at most one mark has one at a time. */\n private readonly activeTooltip = computed(\n () =>\n [...this.tooltipSources().values()].find(\n (source) => source.context() !== null,\n ) ?? null,\n );\n\n protected readonly tooltipContext = computed(() => {\n const base = this.activeTooltip()?.context() ?? null;\n const categoryIndex = this.activeIndex();\n if (this.cursorResolved() !== 'category' || categoryIndex < 0) {\n return base;\n }\n const readings = [...this.tooltipSources().values()].flatMap(\n (source) => source.axisEntries?.() ?? [],\n );\n if (base === null) {\n return readings.length === 0\n ? null\n : {\n category: this.categories()[categoryIndex] ?? '',\n entries: topDown(readings),\n };\n }\n // The panel is about the category, so every other mark's reading joins it, matched by label; the offering mark keeps its own row and detail.\n const named = new Map(base.entries.map((entry) => [entry.label, entry]));\n if (readings.every((reading) => named.has(reading.label))) {\n return base;\n }\n const drawn = new Set(readings.map((reading) => reading.label));\n\n return {\n ...base,\n entries: [\n ...base.entries.filter((entry) => !drawn.has(entry.label)),\n ...topDown(readings).map(\n (reading) => named.get(reading.label) ?? reading,\n ),\n ],\n };\n });\n\n protected readonly tooltipOrigin = computed(() => {\n const own = this.activeTooltip()?.origin() ?? null;\n if (\n this.cursorResolved() !== 'category' ||\n (own !== null && !(own instanceof Element))\n ) {\n return own;\n }\n // Anchor over the tallest reading at the category, pointer over it or not: the opening mark\n // puts the panel low under a column, and pointer-only readings make it jump at the column's edge.\n const boxes = [...this.tooltipSources().values()]\n .map((source) => (source.axisOrigin ?? source.origin)())\n .filter((origin): origin is Element => origin instanceof Element)\n .map((element) => ({ element, top: element.getBoundingClientRect().top }))\n .filter(({ element }) => {\n const box = element.getBoundingClientRect();\n\n return box.width > 0 && box.height > 0;\n });\n\n return boxes.length === 0\n ? (own ?? this.cursorOrigin())\n : boxes.reduce((highest, candidate) =>\n candidate.top < highest.top ? candidate : highest,\n ).element;\n });\n\n protected readonly tooltipPinned = computed(\n () => (this.activeTooltip()?.pinned?.() ?? false) || this.cursorPinned(),\n );\n\n /** Compared by value: a mark that reports and reads `yPosition()` in one effect would otherwise loop forever. */\n protected readonly domain = computed(\n () =>\n axisDomain(\n this.valuesOn('primary'),\n this.tickCount(),\n this.min(),\n this.max(),\n ),\n { equal: (a, b) => a.min === b.min && a.max === b.max },\n );\n\n // Counts values, not reporters: a line series registers both axes, so an empty one would raise a second axis.\n readonly hasSecondaryAxis = computed(() =>\n this.valuesOn('secondary').some((values) => values.length > 0),\n );\n\n protected readonly secondary = computed(\n () =>\n secondaryAxis(\n this.ticks().map((tick) => tick.value),\n this.valuesOn('secondary'),\n this.tickCount(),\n this.secondaryAxisMode(),\n this.maxSecondary(),\n ),\n {\n equal: (a, b) =>\n a.aligned === b.aligned &&\n a.domain.min === b.domain.min &&\n a.domain.max === b.domain.max &&\n a.ticks.length === b.ticks.length &&\n a.ticks.every((tick, index) => tick === b.ticks[index]),\n },\n );\n\n readonly secondaryYPosition = computed(() => {\n if (!this.hasSecondaryAxis()) {\n return this.yPosition();\n }\n const plot = this.secondaryPlot();\n\n return valueScale(this.secondary().domain, plot.top, plot.height);\n });\n\n protected readonly secondaryTicks = computed(() => {\n if (!this.hasSecondaryAxis()) {\n return [];\n }\n const toY = this.secondaryYPosition();\n const format = this.valueFormatResolved();\n\n return this.secondary().ticks.map((value) => ({\n value,\n y: toY(value),\n label: format(value, 'tick'),\n }));\n });\n\n /** Second gridlines only where the scales do not share rows; an aligned axis would double every stroke. */\n protected readonly showSecondaryGridlines = computed(\n () =>\n this.hasSecondaryAxis() &&\n (this.stacked() || !this.secondary().aligned) &&\n this.secondaryTicks().length > 1,\n );\n\n protected readonly secondaryLabelX = computed(() =>\n this.stacked()\n ? this.plot().left - CHART_AXIS_LABEL_GAP\n : this.plot().left + this.plot().width + CHART_AXIS_LABEL_GAP,\n );\n\n protected readonly secondaryLabelAnchor = computed(() =>\n this.stacked() ? 'end' : 'start',\n );\n\n protected readonly secondaryPlotBottom = computed(\n () => this.secondaryPlot().top + this.secondaryPlot().height,\n );\n\n /** No tint on a single-scale plot. */\n protected readonly axisLabelFill = computed(() =>\n this.hasSecondaryAxis() ? this.axisColor() : null,\n );\n\n protected readonly secondaryAxisLabelFill = computed(() =>\n this.secondaryAxisColor(),\n );\n\n private readonly bands = computed(() =>\n bandScale(this.categories().length, this.plot().width, CHART_BAND_PADDING),\n );\n\n readonly bandWidth = computed(() => this.bands().bandWidth);\n\n readonly xPosition = computed(() => {\n const plot = this.plot();\n const bands = this.bands();\n\n return (index: number) =>\n plot.left + bands.position(index) + bands.bandWidth / 2;\n });\n\n readonly yPosition = computed(() => {\n const plot = this.plot();\n\n return valueScale(this.domain(), plot.top, plot.height);\n });\n\n readonly zeroOffset = computed(() => this.yPosition()(0));\n\n protected readonly cursorBand = computed(() => {\n const index = this.activeIndex();\n if (this.cursorResolved() !== 'category' || index < 0) {\n return null;\n }\n const width = this.bandWidth();\n const plot = this.plot();\n\n return {\n x: this.xPosition()(index) - width / 2,\n width,\n top: plot.top,\n bottom: plot.top + plot.height,\n };\n });\n\n /** The same state machine the element marks run on; here the index counts categories. */\n private readonly cursorState = chartActiveMark(\n () => this.defaults.tooltipLingerMs(),\n () => this.hoverDelayMs(),\n );\n\n readonly activeIndex = this.cursorState.index;\n\n private readonly pointerAt = signal<{ x: number; y: number } | null>(null);\n\n // Set at once, not after the hover delay.\n private readonly pointerInBand = signal(false);\n\n // At the band's foot: its head is where the panel opens, over the tallest reading.\n protected bandPinY(band: { readonly bottom: number }): number {\n return band.bottom - CHART_PIN_RADIUS - CHART_PIN_GAP;\n }\n\n protected readonly bandPins = computed(\n () => this.pinOnClickResolved() && this.pointerInBand(),\n );\n\n readonly cursorPointer = computed(() =>\n this.activeIndex() < 0 ? null : this.pointerAt(),\n );\n\n /** Whether the cursor is held. */\n readonly cursorPinned = this.cursorState.pinned;\n\n releaseCursor(): void {\n this.cursorState.release();\n }\n\n private readonly canvasElement =\n viewChild<ElementRef<SVGSVGElement>>('canvasEl');\n\n // Read once per hover and dropped on scroll: reading on every move forces a second layout after the band update.\n private canvasRect: DOMRect | null = null;\n\n private plotPointer(event: PointerEvent, canvas: SVGSVGElement): void {\n this.canvasRect ??= canvas.getBoundingClientRect();\n const plot = this.plot();\n // Client x to view units: the canvas is scaled to its box.\n const viewX =\n ((event.clientX - this.canvasRect.left) / this.canvasRect.width) *\n this.viewWidth();\n // Every point belongs to its nearest category, so the cursor never passes through \"none\".\n const index = this.clampIndex(\n categoryAt(viewX, plot.left, plot.width, this.categories().length),\n );\n this.pointerAt.set({ x: event.clientX, y: event.clientY });\n this.pointerInBand.set(index >= 0);\n if (index < 0) {\n if (event.type === 'pointerdown' && this.cursorPinned()) {\n this.cursorState.release();\n } else {\n this.cursorState.leave();\n }\n\n return;\n }\n if (event.type === 'pointerdown' && this.pinOnClickResolved()) {\n this.cursorState.pin(index, event);\n\n return;\n }\n this.cursorState.enter(index, event);\n }\n\n /** Listens only when a category cursor is drawn, outside the zone. */\n private listenForCursor(canvas: SVGSVGElement): () => void {\n const forgetRect = (): void => {\n this.canvasRect = null;\n };\n const onPointer = (event: PointerEvent): void =>\n this.plotPointer(event, canvas);\n const onEnter = (): void =>\n window.addEventListener('scroll', forgetRect, {\n capture: true,\n passive: true,\n });\n const onLeave = (): void => {\n window.removeEventListener('scroll', forgetRect, { capture: true });\n forgetRect();\n this.pointerInBand.set(false);\n this.cursorState.leave();\n };\n this.zone.runOutsideAngular(() => {\n canvas.addEventListener('pointerenter', onEnter);\n canvas.addEventListener('pointermove', onPointer);\n canvas.addEventListener('pointerdown', onPointer);\n canvas.addEventListener('pointerleave', onLeave);\n });\n\n return () => {\n canvas.removeEventListener('pointerenter', onEnter);\n canvas.removeEventListener('pointermove', onPointer);\n canvas.removeEventListener('pointerdown', onPointer);\n canvas.removeEventListener('pointerleave', onLeave);\n window.removeEventListener('scroll', forgetRect, { capture: true });\n forgetRect();\n };\n }\n\n private readonly bandElement = viewChild<ElementRef<Element>>('cursorBandEl');\n\n readonly cursorOrigin = computed<Element | null>(() =>\n this.cursorBand() ? (this.bandElement()?.nativeElement ?? null) : null,\n );\n\n setActiveIndex(index: number): void {\n this.cursorState.setIndex(this.clampIndex(index));\n }\n\n private clampIndex(index: number): number {\n const last = this.categories().length - 1;\n\n return Number.isFinite(index)\n ? Math.min(Math.max(Math.trunc(index), -1), last)\n : -1;\n }\n\n protected readonly plotRight = computed(\n () => this.plot().left + this.plot().width,\n );\n protected readonly plotBottom = computed(\n () => this.plot().top + this.plot().height,\n );\n protected readonly axisLabelX = computed(\n () => this.plot().left - CHART_AXIS_LABEL_GAP,\n );\n /** Clears the reservation the view height budgets, only when it is there; otherwise the labels fall past the viewBox. */\n protected readonly categoryLabelY = computed(\n () =>\n this.secondaryPlotBottom() +\n (this.reachesBelowZero() ? this.valueSpace() : 0) +\n CHART_CATEGORY_LABEL_OFFSET,\n );\n\n protected readonly ticks = computed(() => {\n const domain = this.domain();\n const toY = this.yPosition();\n const format = this.valueFormatResolved();\n\n return tickValues(domain.min, domain.max, this.tickCount()).map(\n (value) => ({\n value,\n y: toY(value),\n label: format(value, 'tick'),\n }),\n );\n });\n\n private readonly labelTexts = computed(() =>\n [\n ...this.ticks().map((tick) => tick.label),\n ...this.secondaryTicks().map((tick) => tick.label),\n ...this.categories(),\n ].join('\\n'),\n );\n\n /** Rotation is tried before thinning; both use the widest label as rendered. */\n protected readonly categoryLabelsRotated = computed(() =>\n rotationWouldFit(\n [this.measuredCategoryLabelWidth()],\n this.plot().width / Math.max(1, this.categories().length),\n ),\n );\n\n private readonly categoryLabelInterval = computed(() =>\n labelInterval(\n [this.measuredCategoryLabelWidth()],\n this.plot().width / Math.max(1, this.categories().length),\n this.categoryLabelsRotated(),\n ),\n );\n\n private readonly labelHovered = signal<{\n readonly index: number;\n readonly event: PointerEvent;\n } | null>(null);\n\n readonly categoryLabelHover = this.labelHovered.asReadonly();\n\n protected onCategoryLabelEnter(index: number, event: PointerEvent): void {\n if (!this.cursorOn()) {\n this.labelHovered.set({ index, event });\n }\n }\n\n protected onCategoryLabelLeave(): void {\n this.labelHovered.set(null);\n }\n\n protected readonly categoryLabels = computed(() => {\n const toX = this.xPosition();\n const interval = this.categoryLabelInterval();\n\n return this.categories()\n .map((text, index) => ({ x: toX(index), text, index }))\n .filter((label) => label.index % interval === 0);\n });\n\n protected readonly reachesBelowZero = computed(() => this.domain().min < 0);\n\n /** Read off `categories` alone: the marks are projected into the branch this decides, so waiting for a report would deadlock. */\n protected readonly isEmpty = computed(() => this.categories().length === 0);\n\n protected readonly accessibleName = computed(\n () => this.summary() ?? this.caption() ?? this.intl().chart.title,\n );\n}\n","<figure class=\"chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton\n height=\"var(--_chart-view-height)\"\n [shimmer]=\"loading()\" />\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\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 <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 }\n</figure>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n untracked,\n inject,\n input,\n numberAttribute,\n output,\n viewChildren,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n CHART_TOOLTIP_LINGER_MS,\n chartValueFormat,\n describeShare,\n listenForMarkFocus,\n markOf,\n rovingMarks,\n leaveMark,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n injectDsLocale,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { MarkHit } from '@ids-group-ltd/ids-design-system/components';\nimport {\n CHART_PIN_GAP,\n CHART_PIN_RADIUS,\n ChartPinMarkerComponent,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { CHART_SCALES } from './chart-scales.token';\nimport type { ChartAxisEntry } from './chart-scales.token';\nimport { chartViewHeight } from './chart.math';\nimport type { ChartStackOffset } from './chart.math';\n\nexport interface ColumnSeriesPoint {\n id?: string;\n label: string;\n value: number;\n color?: string;\n fill?: 'solid' | 'hatched';\n}\n\n/** Distance from a mark's tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/** Blank at a stacked segment's lower end: a background-colour gap, not a drawn rule (which vanishes in print). */\nconst STACK_SEGMENT_GAP = 2;\n\nlet nextSeriesId = 0;\n\n/**\n * One column per datum, drawn against the scales `ds-chart` supplies.\n *\n * Hosted on a `<g>`: an element SVG does not know renders nothing, nor do its descendants. Written\n * as `<svg:g dsColumnSeries>`.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsColumnSeries]',\n standalone: true,\n imports: [ChartPinMarkerComponent],\n exportAs: 'dsColumnSeries',\n templateUrl: './column-series.component.html',\n styleUrl: './column-series.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnSeriesComponent implements OnDestroy {\n protected readonly leaveMark = leaveMark;\n\n private readonly scales = inject(CHART_SCALES);\n private readonly locale = injectDsLocale();\n protected readonly intl = inject(DS_INTL);\n\n /** Not `input.required`: the preset reads `tooltipContext()` from a binding on this same element,\n * and a required input throws NG0950 before its value is written. */\n readonly data = input<readonly ColumnSeriesPoint[]>([]);\n\n /** Prints each column's value above the column. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** Turns on the click affordance (pointer cursor and hover tint). `pointClicked` fires either way. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Holds the clicked mark and its tooltip until a second click, Escape or a press outside. Unset\n * falls back to `DS_CONFIG.chart.pinOnClick`, then `true`; the category cursor holds the category instead. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n readonly pinOnClickResolved = resolveWithConfig(\n this.pinOnClick,\n (config) => config.chart?.pinOnClick,\n true,\n );\n protected readonly pins = computed(\n () => this.pinOnClickResolved() && !this.scales.cursorOn?.(),\n );\n\n /** Fades every mark but the one under the pointer. Off by default: it costs separation between the rest. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Milliseconds between one mark's entrance and the next, narrowed to fit 260ms. `0` is no stagger. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n /** Declares the marks are parts of one whole; each mark's share then appears on the tooltip's second line. */\n readonly partOfWhole = input(false, { transform: booleanAttribute });\n\n /** Whether a hovered or focused column opens a tooltip. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n /** Where the tooltip is pinned: `'mark'` is the column, `'cell'` the full-height category cell (panel at the plot top). */\n readonly tooltipAnchor = input<'mark' | 'cell'>('mark');\n\n /** Milliseconds the panel survives the pointer leaving the mark. */\n readonly tooltipLingerMs = input(CHART_TOOLTIP_LINGER_MS, {\n transform: numberAttribute,\n });\n\n /** Formats every value this series prints: `'tick'` for an axis label, `'tooltip'` for a value in full. */\n readonly valueFormat = input<ChartValueFormat>(\n chartValueFormat(injectDsLocale()),\n );\n\n /** The mark's share of its category slot before the maximum width caps it. Measured off the slot,\n * not `bandWidth()`, whose padding is already taken out (both would narrow columns twice). */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n /** This series' position among the slots a category's band is divided into. */\n readonly slot = input(0, { transform: numberAttribute });\n\n /** How many slots the band is divided into: the series drawn side by side. */\n readonly slotCount = input(1, { transform: numberAttribute });\n\n /** Where each mark starts and ends on the value axis, one entry per point. Unset, marks run from zero. */\n readonly offsets = input<readonly ChartStackOffset[] | null>(null);\n\n /** The only series in its slot, as a waterfall's floating bars are: each answers the pointer over the whole plot height. */\n readonly soleSeries = input(false, { transform: booleanAttribute });\n\n /** Which value axis the columns are measured against; `'secondary'` reads the second axis. */\n readonly axis = input<ChartAxis>('primary');\n\n /** One colour for the whole series. Unset, each mark takes the categorical palette by position;\n * a point's own colour wins. */\n readonly seriesColor = input<string | null>(null);\n\n /** `seriesColor` for the fill pattern. A point's own `fill` wins. */\n readonly seriesFill = input<'solid' | 'hatched' | null>(null);\n\n /** Names the series in the tooltip, making the category the panel's heading. */\n readonly seriesLabel = input<string | null>(null);\n\n /** Identifies this series to the legend, so hovering a legend item can single it out. */\n readonly seriesKey = input<string | null>(null);\n\n /** The series the reader is pointing at in the legend. Every other series fades. */\n readonly highlighted = input<string | null>(null);\n\n protected readonly dimmedBySeries = computed(() => {\n const highlighted = this.highlighted();\n\n return highlighted !== null && highlighted !== this.seriesKey();\n });\n\n /** The clicked datum. Fires on click and on Enter or Space, whatever `interactive` says. */\n readonly pointClicked = output<ColumnSeriesPoint>();\n\n private readonly seriesId = nextSeriesId++;\n\n private readonly domainId = `column-series-${this.seriesId}`;\n\n /** Per instance: otherwise every hatched mark takes the first chart's `<pattern>` colour. */\n protected readonly hatchId = `ds-column-hatch-${this.seriesId}`;\n\n /** Where each mark spans, which the axis has to hold: a stacked segment's top is the running total. */\n private readonly spans = computed<readonly ChartStackOffset[]>(() => {\n const given = this.offsets();\n\n return this.data().map(\n (point, index) =>\n given?.[index] ?? {\n from: 0,\n to: Number.isFinite(point.value) ? point.value : 0,\n },\n );\n });\n\n constructor() {\n effect(() =>\n this.scales.reportDomain(\n this.domainId,\n this.spans().flatMap((span) => [span.from, span.to]),\n this.axis(),\n ),\n );\n this.scales.reportTooltip(this.domainId, {\n context: this.tooltipContext,\n origin: computed(() => this.activeMark.origin()),\n pinned: this.activeMark.pinned,\n offersTooltip: computed(() => this.tooltip() !== 'none'),\n axisOrigin: computed(() => {\n const categoryIndex = this.scales.activeIndex();\n\n return categoryIndex < 0\n ? null\n : (this.barElements()[categoryIndex]?.nativeElement ?? null);\n }),\n axisEntries: this.axisEntries,\n });\n const host = inject<ElementRef<Element>>(ElementRef);\n listenForMarkFocus(\n host,\n (event, hit) => this.onMarkFocus(event, hit),\n () => {\n this.activeMark.leave();\n if (this.scales.cursorOn?.()) {\n this.scales.setActiveIndex(-1);\n }\n },\n );\n let answeringLabel = false;\n effect(() => {\n const hover = this.scales.categoryLabelHover?.() ?? null;\n untracked(() => {\n const mark =\n hover &&\n host.nativeElement.querySelector(\n `[data-mark-index=\"${hover.index}\"]`,\n );\n if (hover && mark) {\n answeringLabel = true;\n this.activeMark.enter(\n hover.index,\n hover.event,\n this.tooltipMark(),\n mark,\n );\n } else if (answeringLabel) {\n answeringLabel = false;\n this.activeMark.leave();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this.scales.releaseTooltip(this.domainId);\n this.scales.releaseDomain(this.domainId);\n }\n\n readonly activeMark = chartActiveMark(\n () => this.tooltipLingerMs(),\n () => this.scales.hoverDelayMs?.() ?? 0,\n );\n\n private readonly barElements = viewChildren<ElementRef<Element>>('barEl');\n\n /** One series' slot inside a category's band: the whole band, or a share per series when grouped. The pointer box is sized from it. */\n private readonly slotStep = computed(() => {\n const count = this.data().length;\n const slots = Math.max(1, this.slotCount());\n\n return count > 0 ? this.scales.plot().width / count / slots : 0;\n });\n\n protected readonly slotStepPx = computed(() => `${this.slotStep()}px`);\n\n protected readonly markWidthPx = computed(\n () => `${this.slotStep() * this.columnWidthRatio()}px`,\n );\n\n /** The whole canvas, reserved end included: falling short leaves a strip under the plot that answers no pointer. */\n protected readonly hitHeight = computed(() => {\n const plot = this.scales.plot();\n\n return chartViewHeight(plot.height, plot.top, true);\n });\n\n /** Stacked series overlap, so a stacked mark catches the pointer over its own segment only. */\n protected readonly stacked = computed(\n () => this.offsets() !== null && !this.soleSeries(),\n );\n\n /** Keeps a thin segment reachable without letting it reach into its neighbours. */\n private static readonly MIN_STACK_HIT = 6;\n\n protected hitBox(mark: { top: number; height: number }): {\n y: number;\n height: number;\n } {\n if (!this.stacked()) {\n return { y: 0, height: this.hitHeight() };\n }\n const height = Math.max(mark.height, ColumnSeriesComponent.MIN_STACK_HIT);\n const overflow = height - mark.height;\n\n return { y: mark.top - overflow / 2, height };\n }\n\n protected readonly hatchInUse = computed(() =>\n this.marks().some((mark) => mark.hatched),\n );\n\n protected readonly marks = computed(() => {\n const toX = this.scales.xPosition();\n const toY =\n this.axis() === 'secondary'\n ? this.scales.secondaryYPosition()\n : this.scales.yPosition();\n const spans = this.spans();\n const format = this.valueFormat();\n\n return this.data().map((point, index) => {\n const span = spans[index];\n const foot = toY(span.from);\n const tip = toY(span.to);\n const below = tip > foot;\n // Only a segment with one under it gives up the gap; the baseline segment would lift the stack off the axis.\n const gap =\n span.from === 0 ? 0 : Math.min(STACK_SEGMENT_GAP, Math.abs(tip - foot));\n const baseline = below ? foot + gap : foot - gap;\n const color =\n point.color ??\n this.seriesColor() ??\n CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length];\n\n return {\n key: point.id ?? String(index),\n point,\n x: toX(index),\n tip,\n below,\n baseline,\n top: Math.min(tip, baseline),\n height: Math.abs(tip - baseline),\n labelY: below ? tip + VALUE_LABEL_GAP : tip - VALUE_LABEL_GAP,\n pinY: Math.min(tip, baseline) + CHART_PIN_RADIUS + CHART_PIN_GAP,\n origin: below ? 'top' : 'bottom',\n formattedValue: format(point.value, 'tooltip'),\n color,\n hatched: (point.fill ?? this.seriesFill()) === 'hatched',\n };\n });\n });\n\n protected markStagger(index: number): string {\n return `${staggerDelay(index, this.marks().length, this.staggerMs())}ms`;\n }\n\n private readonly tooltipMark = computed(() =>\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n\n protected onMarkClick(event: MouseEvent): void {\n const hit = markOf(event);\n const mark = hit && this.marks()[hit.index];\n if (!hit || !mark) {\n return;\n }\n this.pointClicked.emit(mark.point);\n if (this.pins()) {\n this.activeMark.pin(hit.index, event, this.tooltipMark(), hit.element);\n }\n }\n\n protected onMarkOver(event: PointerEvent): void {\n const hit = markOf(event);\n if (hit && !this.scales.cursorOn?.()) {\n this.activeMark.enter(hit.index, event, this.tooltipMark(), hit.element);\n }\n }\n\n protected onMarkOut(event: PointerEvent): void {\n const hit = markOf(event);\n const next =\n event.relatedTarget instanceof Element\n ? event.relatedTarget.closest('[data-mark-index]')\n : null;\n if (hit && next !== hit.element && !this.scales.cursorOn?.()) {\n this.activeMark.leave();\n }\n }\n\n protected readonly roving = rovingMarks(() => this.marks().length);\n\n private onMarkFocus(event: FocusEvent, hit: MarkHit): void {\n this.roving.focus(hit.index);\n if (this.scales.cursorOn?.()) {\n this.scales.setActiveIndex(hit.index);\n }\n this.activeMark.enter(hit.index, event, this.tooltipMark(), hit.element);\n }\n\n protected onMarkKey(event: KeyboardEvent): void {\n const hit = markOf(event);\n if (!hit) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n // A key pressed on a control inside belongs to that control.\n const mark = this.marks()[hit.index];\n if (this.interactive() && event.target === hit.element && mark) {\n event.preventDefault();\n this.pointClicked.emit(mark.point);\n }\n\n return;\n }\n this.roving.navigate(event, hit.index, hit.element.closest('.columns'));\n }\n\n protected entryLabel(mark: {\n point: ColumnSeriesPoint;\n formattedValue: string;\n }): string {\n return `${mark.point.label}, ${mark.formattedValue}`;\n }\n\n /** This series' reading at the cursor's category, filled whatever `tooltip` says; feeds only the container's category panel. */\n readonly axisEntries = computed<readonly ChartAxisEntry[]>(() => {\n const categoryIndex = this.scales.activeIndex();\n const mark = this.marks()[categoryIndex];\n if (categoryIndex < 0 || !mark) {\n return [];\n }\n\n return [\n {\n label: this.seriesLabel() ?? mark.point.label,\n value: mark.point.value,\n formatted: mark.formattedValue,\n color: mark.color,\n hatched: mark.hatched,\n detail: this.shareDetail(categoryIndex),\n y: mark.tip,\n },\n ];\n });\n\n private shareDetail(index: number): string | undefined {\n return this.partOfWhole()\n ? describeShare(\n this.data().map((point) => point.value),\n index,\n this.locale,\n (share) => this.intl().chart.shareOfTotal(share),\n )\n : undefined;\n }\n\n readonly tooltipContext = computed<ChartTooltipContext | null>(() => {\n const mark = this.marks()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !mark) {\n return null;\n }\n\n const series = this.seriesLabel();\n\n return {\n category: series ? mark.point.label : '',\n entries: [\n {\n label: series ?? mark.point.label,\n value: mark.point.value,\n formatted: mark.formattedValue,\n color: mark.color,\n hatched: mark.hatched,\n detail: this.shareDetail(this.activeMark.index()),\n },\n ],\n };\n });\n}\n","<svg:g\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [class.is-dimmed]=\"dimmedBySeries()\"\n [style.--_column-chart-column-share]=\"markWidthPx()\"\n [style.--_column-chart-slot-step]=\"slotStepPx()\"\n [style.--_column-slot]=\"slot()\"\n [style.--_column-slots]=\"slotCount()\"\n (pointerover)=\"onMarkOver($event)\"\n (pointerout)=\"onMarkOut($event)\"\n (keydown)=\"onMarkKey($event)\"\n (click)=\"onMarkClick($event)\">\n <!-- `userSpaceOnUse` keeps the stripe pitch equal on tall and short columns (the object bounding box\n scales it per mark). The stripe runs down the tile's middle: on its edge the tile clips it to half. -->\n @if (hatchInUse()) {\n <svg:defs>\n <svg:pattern\n class=\"hatch\"\n patternUnits=\"userSpaceOnUse\"\n width=\"8\"\n height=\"8\"\n patternTransform=\"rotate(45)\"\n [attr.id]=\"hatchId\">\n <svg:rect\n class=\"hatch-ground\"\n width=\"8\"\n height=\"8\" />\n\n <svg:line\n class=\"hatch-stripe\"\n x1=\"4\"\n y1=\"0\"\n x2=\"4\"\n y2=\"8\" />\n </svg:pattern>\n </svg:defs>\n }\n\n @for (mark of marks(); track mark.key; let index = $index) {\n <svg:g\n class=\"column\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"pins()\"\n [class.is-active]=\"activeMark.index() === index\"\n [class.below-baseline]=\"mark.below\"\n [class.is-pinned]=\"activeMark.pinned() && activeMark.index() === index\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [style.--_column-mark-height]=\"mark.height + 'px'\"\n [style.--_column-baseline-y]=\"mark.baseline + 'px'\"\n [style.--_column-x]=\"mark.x + 'px'\"\n [attr.data-mark-index]=\"index\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.aria-label]=\"interactive() ? entryLabel(mark) : null\"\n (animate.leave)=\"leaveMark($event)\">\n <!-- The pointer target is the whole category slot, so a two-pixel column stays reachable. -->\n @let hit = hitBox(mark);\n\n <svg:rect\n class=\"hit-area\"\n [attr.y]=\"hit.y\"\n [attr.height]=\"hit.height\" />\n\n <svg:g\n #barEl\n class=\"bar\"\n [style.transform-origin]=\"mark.origin\">\n <!-- `rx` rounds all four corners but the cap belongs on the free end alone; this rect fills the\n two baseline corners back in. Unlike a `<path>`, both keep `y` and `height` interpolable. -->\n <svg:rect\n class=\"bar-base\"\n [attr.fill]=\"mark.color\" />\n\n <svg:rect\n class=\"bar-cap\"\n [attr.y]=\"mark.top\"\n [attr.height]=\"mark.height\"\n [attr.fill]=\"mark.color\" />\n\n <!-- Stripes over the painted mark, not a pattern as its fill: a pattern carries its own colour,\n so one shared definition could not take each mark's. -->\n @if (mark.hatched) {\n <svg:rect\n class=\"bar-hatch\"\n [attr.y]=\"mark.top\"\n [attr.height]=\"mark.height\"\n [attr.fill]=\"'url(#' + hatchId + ')'\" />\n }\n </svg:g>\n\n @if (showValues()) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.y]=\"mark.labelY\">\n {{ mark.formattedValue }}\n </svg:text>\n }\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"'translate(0,' + mark.pinY + ')'\" />\n }\n </svg:g>\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n CHART_TOOLTIP_LINGER_MS,\n areaPath,\n chartValueFormat,\n focusMark,\n listenForMarkFocus,\n markOf,\n bandPath,\n lineSegments,\n nextRovingIndex,\n linePath,\n leaveMark,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n LinePoint,\n MarkHit,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n injectDsLocale,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartAxis,\n ChartCurve,\n ChartGaps,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n CHART_PIN_GAP,\n CHART_PIN_RADIUS,\n ChartPinMarkerComponent,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartTooltipTrigger,\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { CHART_SCALES } from './chart-scales.token';\nimport type { ChartAxisEntry } from './chart-scales.token';\nimport { topDown } from './chart.math';\n\nexport interface LineSeriesData {\n id: string;\n label: string;\n /** One reading per category; a `null` is missing, and `gaps` decides what it draws. */\n data: readonly (number | null)[];\n /** Which value axis the readings are measured against. */\n axis?: ChartAxis;\n /** Fills the band between the line and its axis baseline: `true` in one flat tint, `'fade'`\n * fading to nothing at the baseline. */\n area?: boolean | 'fade';\n /** The band's floor, one entry per category, in the axis's own unit. Unset fills to the baseline;\n * given, the fill is the band between the two curves. A `null` must sit in the same categories as in `data`. */\n lower?: readonly (number | null)[];\n /** Any CSS colour. Unset takes the categorical palette slot for the series' position. */\n color?: string;\n}\n\nlet nextSeriesId = 0;\n\n// The active marker's default radius, `--chart-dot-radius-active`.\nconst PIN_MARKER_CLEARANCE = 6;\n\n/**\n * One line per series, drawn against the scales `ds-chart` supplies, on either value axis.\n *\n * Hosted on a `<g>`: an element SVG does not know renders nothing, nor do its descendants.\n * Written as `<svg:g dsLineSeries>`.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsLineSeries]',\n standalone: true,\n imports: [ChartPinMarkerComponent],\n exportAs: 'dsLineSeries',\n templateUrl: './line-series.component.html',\n styleUrl: './line-series.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LineSeriesComponent implements OnDestroy {\n protected readonly leaveMark = leaveMark;\n\n private readonly scales = inject(CHART_SCALES);\n\n /** Not `input.required`: the preset reads `tooltipContext()` from a binding on this element (NG0950). */\n readonly data = input<readonly LineSeriesData[]>([]);\n\n /** Draws a round marker at every reading; reads better off past roughly twenty points. */\n readonly showMarkers = input(true, { transform: booleanAttribute });\n\n /** Lays the line and markers on a background-colour band so they stay legible where they cross other marks. */\n readonly outline = input(true, { transform: booleanAttribute });\n\n /** Turns on the click affordance (pointer cursor and hover tint). `pointClicked` fires either way. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Holds the clicked mark and its tooltip until a second click, Escape or a press outside. Unset\n * falls back to `DS_CONFIG.chart.pinOnClick`, then `true`; the category cursor holds the category instead. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n readonly pinOnClickResolved = resolveWithConfig(\n this.pinOnClick,\n (config) => config.chart?.pinOnClick,\n true,\n );\n protected readonly pins = computed(\n () => this.pinOnClickResolved() && !this.scales.cursorOn?.(),\n );\n\n /** Fades every series but the one under the pointer. Off by default: it costs separation between the rest. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** The series to single out: the others draw faded and this one bold. Fades the others whether or not `dimOthers` is set. */\n readonly highlighted = input<string | null>(null);\n\n /** A dash pattern per series, in series order. A series past the end, or given `''`, draws solid. */\n readonly patterns = input<readonly string[]>([]);\n\n /** Fills each area from the series below it rather than from the baseline (stacked plots). */\n readonly stacked = input(false, { transform: booleanAttribute });\n\n protected dashFor(seriesIndex: number): string | null {\n return this.patterns()[seriesIndex] || null;\n }\n\n /** Milliseconds between one series' entrance and the next, narrowed to fit the stagger budget; `0` is off. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n /** What a `null` reading draws: `'break'` leaves a hole in the line, `'zero'` plots a point at zero. */\n readonly gaps = input<ChartGaps>('break');\n\n /** How the line joins its readings: `'linear'` (default) asserts nothing between them; `'step'`\n * holds each reading to the next; `'smooth'` is a monotone cubic that draws no peak the data lacks. */\n readonly curve = input<ChartCurve>('linear');\n\n /** Whether a hovered or focused reading opens a tooltip: `'item'` names the marker, `'axis'` every\n * series at the category, turning the container's category cursor on under `cursor=\"auto\"`. */\n readonly tooltip = input<ChartTooltipTrigger>('item');\n\n /** Where an `'axis'` panel hangs: `'reading'` over the highest reading in the category; `'pointer'` follows the cursor. */\n readonly tooltipAnchor = input<'reading' | 'pointer'>('reading');\n\n /** Milliseconds the panel survives the pointer leaving the marker. */\n readonly tooltipLingerMs = input(CHART_TOOLTIP_LINGER_MS, {\n transform: numberAttribute,\n });\n\n /** Formats every value this series prints: `'tick'` for an axis label, `'tooltip'` for a value in full. */\n readonly valueFormat = input<ChartValueFormat>(\n chartValueFormat(injectDsLocale()),\n );\n\n /** The clicked reading, its series and position in `categories`. Fires on click and Enter or Space, whatever `interactive` says. */\n readonly pointClicked = output<{\n series: LineSeriesData;\n categoryIndex: number;\n value: number;\n }>();\n\n private readonly domainId = `line-series-${nextSeriesId++}`;\n\n protected fadeId(seriesIndex: number): string {\n return `${this.domainId}-fade-${seriesIndex}`;\n }\n\n constructor() {\n effect(() => {\n this.scales.reportDomain(\n `${this.domainId}-primary`,\n this.valuesOn('primary'),\n 'primary',\n );\n this.scales.reportDomain(\n `${this.domainId}-secondary`,\n this.valuesOn('secondary'),\n 'secondary',\n );\n });\n this.scales.reportTooltip(this.domainId, {\n context: this.tooltipContext,\n origin: this.tooltipOrigin,\n offersTooltip: computed(() => this.tooltip() !== 'none'),\n readsCategory: computed(() => this.tooltip() === 'axis'),\n axisOrigin: this.topReadingElement,\n axisEntries: this.axisEntries,\n });\n listenForMarkFocus(\n inject(ElementRef),\n (event, hit) => this.onMarkerFocus(event, hit),\n () => {\n this.focusedSeries.set(null);\n this.activeMark.leave();\n this.scales.setActiveIndex(-1);\n },\n );\n }\n\n ngOnDestroy(): void {\n this.scales.releaseTooltip(this.domainId);\n this.scales.releaseDomain(`${this.domainId}-primary`);\n this.scales.releaseDomain(`${this.domainId}-secondary`);\n }\n\n readonly activeMark = chartActiveMark(\n () => this.tooltipLingerMs(),\n () => this.scales.hoverDelayMs?.() ?? 0,\n );\n\n private valuesOn(axis: ChartAxis): number[] {\n return this.data()\n .filter((series) => (series.axis ?? 'primary') === axis)\n .flatMap((series) =>\n series.data.filter((value): value is number => value !== null),\n );\n }\n\n /** A `null` past the end is a missing reading. */\n private readingsOf(series: LineSeriesData, count: number): (number | null)[] {\n const zeroed = this.gaps() === 'zero';\n const readings: (number | null)[] = [];\n for (let index = 0; index < count; index++) {\n const raw = series.data[index];\n const reading =\n typeof raw === 'number' && Number.isFinite(raw) ? raw : null;\n readings.push(reading === null && zeroed ? 0 : reading);\n }\n\n return readings;\n }\n\n protected readonly plotted = computed(() => {\n const toX = this.scales.xPosition();\n const primaryY = this.scales.yPosition();\n const secondaryY = this.scales.secondaryYPosition();\n const categories = this.scales.categories();\n let markerIndex = 0;\n\n return this.data().map((series, index) => {\n const secondary = (series.axis ?? 'primary') === 'secondary';\n const toY = secondary ? secondaryY : primaryY;\n const color =\n series.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length];\n const points: (LinePoint | null)[] = this.readingsOf(\n series,\n categories.length,\n ).map((value, categoryIndex) =>\n value === null\n ? null\n : {\n categoryIndex,\n x: toX(categoryIndex),\n y: toY(value),\n value,\n },\n );\n const segments = lineSegments(points);\n const format = this.valueFormat();\n const curve = this.curve();\n\n return {\n series,\n color,\n seriesIndex: index,\n linePaths: segments.map((segment) => linePath(segment, curve)),\n areaPaths: series.area\n ? this.areaPathsFor(series, segments, toX, toY, curve)\n : [],\n markers: points\n .filter((point): point is LinePoint => point !== null)\n .map((point) => ({\n key: `${series.id}-${point.categoryIndex}`,\n markIndex: markerIndex++,\n x: point.x,\n y: point.y,\n value: point.value,\n category: categories[point.categoryIndex] ?? '',\n formattedValue: format(point.value, 'tooltip'),\n seriesLabel: series.label,\n seriesId: series.id,\n categoryIndex: point.categoryIndex,\n color,\n })),\n };\n });\n });\n\n private areaPathsFor(\n series: LineSeriesData,\n segments: readonly (readonly LinePoint[])[],\n toX: (categoryIndex: number) => number,\n toY: (value: number) => number,\n curve: ChartCurve,\n ): readonly string[] {\n const lower = series.lower;\n if (!lower) {\n return segments\n .map((segment) => areaPath(segment, toY(0), curve))\n .filter((path) => path.length > 0);\n }\n const lowerSegments = lineSegments(\n lower.map((value, categoryIndex) =>\n value === null\n ? null\n : {\n categoryIndex,\n x: toX(categoryIndex),\n y: toY(value),\n value,\n },\n ),\n );\n\n return segments\n .map((segment, index) =>\n lowerSegments[index]\n ? bandPath(segment, lowerSegments[index], curve)\n : areaPath(segment, toY(0), curve),\n )\n .filter((path) => path.length > 0);\n }\n\n private readonly allMarkers = computed(() =>\n this.plotted().flatMap((entry) => entry.markers),\n );\n\n protected seriesStagger(index: number): string {\n return `${staggerDelay(index, this.plotted().length, this.staggerMs())}ms`;\n }\n\n /** One tab stop per series, walked with the arrows: 12 categories x 2 series would be 24 stops. */\n private readonly rovingBySeries = signal<ReadonlyMap<string, number>>(\n new Map(),\n );\n\n private readonly firstMarkerBySeries = computed(\n () =>\n new Map(\n this.plotted().map((entry) => [\n entry.series.id,\n entry.markers[0]?.markIndex,\n ]),\n ),\n );\n\n protected isTabStop(seriesId: string, markIndex: number): boolean {\n return (\n (this.rovingBySeries().get(seriesId) ??\n this.firstMarkerBySeries().get(seriesId)) === markIndex\n );\n }\n\n /** The series a marker holds focus on; narrows an `'axis'` panel to that reading. */\n private readonly focusedSeries = signal<string | null>(null);\n\n /** Active when its own marker is hovered or the category cursor is on its category, so the dot grows anywhere in the band. */\n protected isActiveMarker(marker: {\n markIndex: number;\n categoryIndex: number;\n }): boolean {\n return (\n marker.markIndex === this.activeMark.index() ||\n marker.categoryIndex === this.scales.activeIndex()\n );\n }\n\n protected readonly pinnedMarker = computed(() =>\n this.activeMark.pinned()\n ? (this.allMarkers()[this.activeMark.index()] ?? null)\n : null,\n );\n\n protected readonly pinLift =\n CHART_PIN_RADIUS + CHART_PIN_GAP + PIN_MARKER_CLEARANCE;\n\n protected onMarkerOver(event: PointerEvent): void {\n const hit = markOf(event);\n if (hit && !this.scales.cursorOn?.()) {\n this.activeMark.enter(hit.index, event, undefined, hit.element);\n }\n }\n\n protected onMarkerOut(event: PointerEvent): void {\n const hit = markOf(event);\n if (!hit || this.scales.cursorOn?.()) {\n return;\n }\n const next =\n event.relatedTarget instanceof Element\n ? event.relatedTarget.closest('[data-mark-index]')\n : null;\n if (next !== hit.element) {\n this.activeMark.leave();\n }\n }\n\n private onMarkerFocus(event: FocusEvent, hit: MarkHit): void {\n const marker = this.allMarkers()[hit.index];\n if (marker) {\n this.rovingBySeries.update((roving) =>\n new Map(roving).set(marker.seriesId, hit.index),\n );\n this.focusedSeries.set(marker.seriesId);\n this.scales.setActiveIndex(marker.categoryIndex);\n }\n this.activeMark.enter(hit.index, event, undefined, hit.element);\n }\n\n protected onMarkerKey(event: KeyboardEvent): void {\n const hit = markOf(event);\n if (!hit) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n this.selectMarker(hit.index);\n\n return;\n }\n const marker = this.allMarkers()[hit.index];\n const strand = this.allMarkers().filter(\n (candidate) => candidate.seriesId === marker?.seriesId,\n );\n const current = strand.findIndex(\n (candidate) => candidate.markIndex === hit.index,\n );\n const next = nextRovingIndex(event.key, current, strand.length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n focusMark(hit.element.closest('.lines'), strand[next].markIndex);\n }\n\n protected isDimmed(seriesId: string): boolean {\n const highlighted = this.highlighted();\n\n return highlighted !== null && highlighted !== seriesId;\n }\n\n protected onMarkerClick(event: MouseEvent): void {\n const hit = markOf(event);\n if (!hit) {\n return;\n }\n if (this.pins()) {\n this.activeMark.pin(hit.index, event, '.series-marker', hit.element);\n }\n this.selectMarker(hit.index);\n }\n\n private selectMarker(markIndex: number): void {\n const marker = this.allMarkers()[markIndex];\n const series = this.data().find((entry) => entry.id === marker?.seriesId);\n if (marker && series) {\n this.pointClicked.emit({\n series,\n categoryIndex: marker.categoryIndex,\n value: marker.value,\n });\n }\n }\n\n protected markerLabel(marker: {\n seriesLabel: string;\n category: string;\n formattedValue: string;\n }): string {\n return `${marker.seriesLabel}, ${marker.category}, ${marker.formattedValue}`;\n }\n\n /** What this series reads at the cursor's category, whatever `tooltip` says; feeds the category panel. */\n readonly axisEntries = computed<readonly ChartAxisEntry[]>(() =>\n this.readingsAtCursor().map(({ reading }) => reading),\n );\n\n private readonly readingsAtCursor = computed(() => {\n const categoryIndex = this.scales.activeIndex();\n if (categoryIndex < 0) {\n return [];\n }\n\n return this.plotted().flatMap((entry) => {\n const marker = entry.markers.find(\n (candidate) => candidate.categoryIndex === categoryIndex,\n );\n\n return marker\n ? [\n {\n seriesId: entry.series.id,\n reading: {\n label: marker.seriesLabel,\n value: marker.value,\n formatted: marker.formattedValue,\n color: marker.color,\n y: marker.y,\n } satisfies ChartAxisEntry,\n },\n ]\n : [];\n });\n });\n\n readonly tooltipContext = computed<ChartTooltipContext | null>(() => {\n if (this.tooltip() === 'none') {\n return null;\n }\n if (this.tooltip() === 'axis') {\n return this.axisTooltipContext();\n }\n const marker = this.allMarkers()[this.activeMark.index()];\n if (!marker) {\n return null;\n }\n\n return {\n category: marker.category,\n entries: [\n {\n label: marker.seriesLabel,\n value: marker.value,\n formatted: marker.formattedValue,\n color: marker.color,\n },\n ],\n };\n });\n\n private readonly markerElements =\n viewChildren<ElementRef<Element>>('markerEl');\n\n /** The topmost reading at the active category, as an element; the cursor band spans the plot and would open an `'axis'` panel at the top. */\n private readonly topReadingElement = computed<Element | null>(() => {\n const categoryIndex = this.scales.activeIndex();\n if (categoryIndex < 0) {\n return null;\n }\n const highest = this.allMarkers()\n .filter((marker) => marker.categoryIndex === categoryIndex)\n .reduce<{ markIndex: number; y: number } | null>(\n (top, marker) => (top === null || marker.y < top.y ? marker : top),\n null,\n );\n\n return highest\n ? (this.markerElements()[highest.markIndex]?.nativeElement ?? null)\n : null;\n });\n\n readonly tooltipOrigin = computed<ChartTooltipOrigin | null>(() => {\n if (this.tooltip() !== 'axis') {\n return this.activeMark.origin();\n }\n if (this.tooltipAnchor() === 'pointer') {\n return this.scales.cursorPointer() ?? this.scales.cursorOrigin();\n }\n\n return this.topReadingElement() ?? this.scales.cursorOrigin();\n });\n\n /** Every series' reading at the active category; a series with none contributes no row. */\n private readonly axisTooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const categoryIndex = this.scales.activeIndex();\n if (categoryIndex < 0) {\n return null;\n }\n const focused = this.focusedSeries();\n const entries = topDown(\n this.readingsAtCursor()\n .filter(({ seriesId }) => !focused || seriesId === focused)\n .map(({ reading }) => reading),\n );\n if (!entries.length) {\n return null;\n }\n\n return {\n category: this.scales.categories()[categoryIndex] ?? '',\n entries,\n };\n },\n );\n}\n","<svg:g\n class=\"lines\"\n [class.dims-others]=\"dimOthers()\"\n [class.is-outlined]=\"outline()\"\n (pointerover)=\"onMarkerOver($event)\"\n (pointerout)=\"onMarkerOut($event)\"\n (keydown)=\"onMarkerKey($event)\"\n (click)=\"onMarkerClick($event)\">\n @for (entry of plotted(); track entry.series.id) {\n @let fades = entry.series.area === 'fade';\n\n @if (fades && entry.areaPaths.length) {\n <svg:defs>\n <svg:linearGradient\n x1=\"0\"\n x2=\"0\"\n y1=\"0\"\n y2=\"1\"\n [attr.id]=\"fadeId(entry.seriesIndex)\"\n [style.--_series-area-color]=\"entry.color\">\n <svg:stop\n class=\"fade-start\"\n offset=\"0\" />\n\n <svg:stop\n class=\"fade-end\"\n offset=\"1\" />\n </svg:linearGradient>\n </svg:defs>\n }\n\n @for (path of entry.areaPaths; track $index) {\n <svg:path\n class=\"series-area\"\n [class.is-fade]=\"fades\"\n [class.is-stacked]=\"stacked()\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [style.--_series-area-color]=\"entry.color\"\n [style.fill]=\"fades ? 'url(#' + fadeId(entry.seriesIndex) + ')' : null\"\n [attr.d]=\"path\"\n (animate.leave)=\"leaveMark($event)\" />\n }\n }\n\n @if (outline()) {\n @for (entry of plotted(); track entry.series.id) {\n @for (path of entry.linePaths; track $index) {\n <svg:path\n class=\"series-halo\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.is-dashed]=\"dashFor(entry.seriesIndex) !== null\"\n [attr.stroke-dasharray]=\"dashFor(entry.seriesIndex)\"\n [attr.pathLength]=\"dashFor(entry.seriesIndex) === null ? 1 : null\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.d]=\"path\" />\n }\n }\n }\n\n @for (entry of plotted(); track entry.series.id) {\n @for (path of entry.linePaths; track $index) {\n <svg:path\n class=\"series-line\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.is-dashed]=\"dashFor(entry.seriesIndex) !== null\"\n [attr.stroke-dasharray]=\"dashFor(entry.seriesIndex)\"\n [attr.pathLength]=\"dashFor(entry.seriesIndex) === null ? 1 : null\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.d]=\"path\"\n [attr.stroke]=\"entry.color\"\n (animate.leave)=\"leaveMark($event)\" />\n }\n }\n\n @if (\n showMarkers() ||\n interactive() ||\n pins()\n ) {\n @for (entry of plotted(); track entry.series.id) {\n @for (marker of entry.markers; track marker.key) {\n <svg:circle\n #markerEl\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.pins]=\"pins()\"\n [class.is-active]=\"isActiveMarker(marker)\"\n [style.--_chart-mark-stagger]=\"seriesStagger(entry.seriesIndex)\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.data-mark-index]=\"marker.markIndex\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.markIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"interactive() ? markerLabel(marker) : null\" />\n }\n }\n }\n\n @if (pinnedMarker(); as marker) {\n <svg:g\n dsChartPinMarker\n [attr.transform]=\"\n 'translate(' + marker.x + ',' + (marker.y - pinLift) + ')'\n \" />\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartThreshold } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { thresholdMarks } from './chart.math';\n\n/**\n * The names of a chart's reference lines, laid out by the same geometry that draws them.\n *\n * A second element because strokes go under the marks and names over them, and a projected element\n * lands in one slot only. Reports no domain; the line it names already did.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsReferenceLabel]',\n standalone: true,\n templateUrl: './reference-label.component.html',\n styleUrl: './reference-label.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReferenceLabelComponent {\n private readonly scales = inject(CHART_SCALES);\n\n /** The same list `dsReferenceLine` is given. Place this mark after the series so labels stay legible over marks. */\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n protected readonly lines = computed(() =>\n thresholdMarks(\n this.thresholds(),\n this.scales.plot(),\n this.scales.yPosition(),\n ).filter((mark) => mark.label !== ''),\n );\n}\n","@if (lines().length) {\n <svg:g class=\"reference-labels\">\n @for (line of lines(); track line.key) {\n <svg:text\n class=\"threshold-label\"\n text-anchor=\"start\"\n [style.--_chart-threshold-color]=\"line.color\"\n [attr.x]=\"line.labelX\"\n [attr.y]=\"line.labelY\">\n {{ line.label }}\n </svg:text>\n }\n </svg:g>\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartThreshold } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { thresholdMarks } from './chart.math';\n\nlet nextReferenceId = 0;\n\n/**\n * Reference lines and bands across the plot, drawn against the scales `ds-chart` supplies.\n *\n * Strokes only: labels are `g[dsReferenceLabel]`, a second element, since they paint in another layer.\n *\n * Hosted on a `<g>`: an element SVG does not know renders nothing, nor do its descendants.\n * Written as `<svg:g dsReferenceLine>`.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsReferenceLine]',\n standalone: true,\n templateUrl: './reference-line.component.html',\n styleUrl: './reference-line.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReferenceLineComponent implements OnDestroy {\n private readonly scales = inject(CHART_SCALES);\n\n /** The lines and bands to draw: one `value` plus optional `label`, `color` and `dash`; a `to` makes it a band. Each widens the value axis. */\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n private readonly domainId = `reference-line-${nextReferenceId++}`;\n\n constructor() {\n // Reported like a series: an axis derived from the data alone would draw a high target off the plot.\n effect(() =>\n this.scales.reportDomain(\n this.domainId,\n this.thresholds().flatMap((threshold) =>\n threshold.to == null\n ? [threshold.value]\n : [threshold.value, threshold.to],\n ),\n ),\n );\n }\n\n ngOnDestroy(): void {\n this.scales.releaseDomain(this.domainId);\n }\n\n protected readonly lines = computed(() =>\n thresholdMarks(\n this.thresholds(),\n this.scales.plot(),\n this.scales.yPosition(),\n ),\n );\n}\n","@if (lines().length) {\n <svg:g\n class=\"references\"\n aria-hidden=\"true\">\n @for (line of lines(); track line.key) {\n <svg:g\n class=\"reference\"\n [style.--_chart-threshold-color]=\"line.color\">\n @if (line.band) {\n <svg:rect\n class=\"threshold-band\"\n [attr.x]=\"line.left\"\n [attr.y]=\"line.top\"\n [attr.width]=\"line.width\"\n [attr.height]=\"line.height\" />\n } @else {\n <svg:line\n class=\"threshold-line\"\n [class.is-dashed]=\"line.dash === 'dashed'\"\n [class.is-dotted]=\"line.dash === 'dotted'\"\n [attr.x1]=\"line.left\"\n [attr.x2]=\"line.right\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\" />\n }\n </svg:g>\n }\n </svg:g>\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport type { ChartAxis } from '@ids-group-ltd/ids-design-system/core';\nimport { CHART_SCALES } from './chart-scales.token';\nimport { annotationMarks } from './chart.math';\n\nexport interface ChartAnnotation {\n /** 0-based position along the category axis. */\n readonly categoryIndex: number;\n /** The reading the label names, in the axis's own unit. */\n readonly value: number;\n readonly label: string;\n /** Which value axis the reading is measured against. */\n readonly axis?: ChartAxis;\n}\n\n/**\n * A tooltip answers \"what is this?\" on hover; an annotation answers it on a printed page or in a\n * screenshot. Takes the readings rather than finding them: the caller that owns the series knows\n * which value a label belongs to. Reports no domain.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsSeriesAnnotation]',\n standalone: true,\n templateUrl: './series-annotation.component.html',\n styleUrl: './series-annotation.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SeriesAnnotationComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly annotations = input<readonly ChartAnnotation[]>([]);\n\n protected readonly placed = computed(() => {\n const plot = this.scales.plot();\n const xPosition = this.scales.xPosition();\n const yPosition = this.scales.yPosition();\n const secondaryYPosition = this.scales.secondaryYPosition();\n\n return annotationMarks(\n this.annotations().map((annotation, index) => ({\n key: `${annotation.categoryIndex}:${index}`,\n label: annotation.label,\n x: xPosition(annotation.categoryIndex),\n y: (annotation.axis === 'secondary' ? secondaryYPosition : yPosition)(\n annotation.value,\n ),\n })),\n plot.left + plot.width,\n );\n });\n}\n","@if (placed().length) {\n <svg:g class=\"annotations\">\n @for (note of placed(); track note.key) {\n <svg:text\n class=\"annotation\"\n [attr.x]=\"note.x\"\n [attr.y]=\"note.y\"\n [attr.text-anchor]=\"note.anchor\">\n {{ note.label }}\n </svg:text>\n }\n </svg:g>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextSeriesId"],"mappings":";;;;;;;;AAiBO,MAAM,wBAAwB,GAAG,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC;AAErC;AACO,MAAM,qBAAqB,GAAG,EAAE;AAChC,MAAM,2BAA2B,GAAG,EAAE;AACtC,MAAM,kBAAkB,GAAG,GAAG;AAErC;;;AAGgB;AACT,MAAM,oBAAoB,GAAG,GAAG;AAEhC,MAAM,yBAAyB,GAAG,GAAG;AACrC,MAAM,yBAAyB,GAAG,EAAE;AACpC,MAAM,yBAAyB,GAAG;AAEzC;AACO,MAAM,iBAAiB,GAAG,EAAE;AAEnC;AACO,MAAM,sBAAsB,GAAG,EAAE;AAExC,MAAM,eAAe,GAAG,EAAE;AAE1B;;AAEgB;AACV,SAAU,SAAS,CACvB,aAAqB,EACrB,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,WAAA,GAAsB,iBAAiB,EAAA;IAEvC,OAAO;AACL,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,GAAG,EAAE,UAAU;AACf,QAA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