ngwr 16.2.0 → 16.3.0
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/badge/styles/_tag.scss +73 -1
- package/calendar/styles/_index.scss +22 -0
- package/cascader/styles/_rules.scss +7 -0
- package/color-picker/styles/_index.scss +21 -0
- package/date-picker/styles/_index.scss +19 -0
- package/dropdown/styles/_index.scss +13 -19
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert-testing.mjs +70 -0
- package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +17 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +3 -3
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +129 -11
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
- package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger-testing.mjs +45 -0
- package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-testing.mjs +18 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +500 -73
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +37 -16
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +153 -37
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +10 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare-testing.mjs +84 -0
- package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +342 -69
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +59 -8
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +18 -18
- package/fesm2022/ngwr-directives.mjs +15 -15
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +51 -29
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +52 -95
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -3
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +186 -33
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +274 -15
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +3 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +102 -42
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +19 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +19 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +19 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +19 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +19 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +19 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +19 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +19 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +19 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +19 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +19 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +19 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +19 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +19 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +19 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +19 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +19 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +19 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +19 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +19 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +19 -4
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number-testing.mjs +11 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +68 -7
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +24 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +152 -36
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +175 -13
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +5 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +31 -29
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +44 -63
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +7 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +58 -156
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +50 -9
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable-testing.mjs +113 -0
- package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
- package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-schema-form.mjs +415 -19
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +19 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +263 -83
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +6 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +21 -3
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +29 -12
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +42 -11
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-testing.mjs +88 -2
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +891 -74
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-testing.mjs +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +11 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +128 -16
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +40 -19
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-transfer-testing.mjs +6 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +24 -5
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +62 -2
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +966 -78
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +34 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +33 -22
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +156 -0
- package/i18n/ar.json +21 -4
- package/i18n/cs.json +21 -4
- package/i18n/de.json +21 -4
- package/i18n/en.json +21 -4
- package/i18n/es.json +21 -4
- package/i18n/fr.json +21 -4
- package/i18n/he.json +21 -4
- package/i18n/hi.json +21 -4
- package/i18n/id.json +21 -4
- package/i18n/it.json +21 -4
- package/i18n/ja.json +21 -4
- package/i18n/ko.json +21 -4
- package/i18n/nl.json +21 -4
- package/i18n/pl.json +21 -4
- package/i18n/pt.json +21 -4
- package/i18n/ru.json +21 -4
- package/i18n/sv.json +21 -4
- package/i18n/tr.json +21 -4
- package/i18n/uk.json +21 -4
- package/i18n/vi.json +21 -4
- package/i18n/zh-TW.json +21 -4
- package/i18n/zh.json +21 -4
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/llms-full.txt +52 -20
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +33 -1
- package/popconfirm/styles/_index.scss +3 -11
- package/progress/styles/_index.scss +32 -0
- package/schema-form/styles/_index.scss +78 -0
- package/schematics/use/rule.js +2 -0
- package/schematics/use/symbol-map.json +4 -0
- package/select/styles/_index.scss +114 -22
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +9 -1
- package/slider/styles/_index.scss +22 -0
- package/table/styles/_index.scss +167 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +5 -0
- package/theme/styles/_motion.scss +5 -0
- package/transfer/styles/_index.scss +84 -0
- package/tree/styles/_index.scss +138 -5
- package/types/ngwr-alert-testing.d.ts +88 -0
- package/types/ngwr-badge.d.ts +72 -2
- package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
- package/types/ngwr-burger-testing.d.ts +51 -0
- package/types/ngwr-calendar-testing.d.ts +18 -6
- package/types/ngwr-calendar.d.ts +272 -22
- package/types/ngwr-cascader.d.ts +10 -1
- package/types/ngwr-charts-chart-legend.d.ts +9 -4
- package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
- package/types/ngwr-charts-line-chart.d.ts +7 -4
- package/types/ngwr-color-picker-testing.d.ts +15 -4
- package/types/ngwr-color-picker.d.ts +76 -6
- package/types/ngwr-compare-testing.d.ts +72 -0
- package/types/ngwr-date-picker-testing.d.ts +23 -8
- package/types/ngwr-date-picker.d.ts +100 -9
- package/types/ngwr-date.d.ts +71 -1
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +20 -0
- package/types/ngwr-dropdown.d.ts +24 -6
- package/types/ngwr-event-calendar.d.ts +66 -8
- package/types/ngwr-file-upload-testing.d.ts +31 -2
- package/types/ngwr-file-upload.d.ts +148 -1
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +8 -3
- package/types/ngwr-graph.d.ts +147 -7
- package/types/ngwr-input-number-testing.d.ts +10 -0
- package/types/ngwr-input-number.d.ts +30 -1
- package/types/ngwr-input-otp.d.ts +10 -0
- package/types/ngwr-input-testing.d.ts +30 -0
- package/types/ngwr-input.d.ts +54 -3
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +2 -1
- package/types/ngwr-popconfirm-testing.d.ts +12 -3
- package/types/ngwr-popconfirm.d.ts +28 -3
- package/types/ngwr-popover-testing.d.ts +19 -2
- package/types/ngwr-popover.d.ts +22 -2
- package/types/ngwr-progress.d.ts +29 -1
- package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
- package/types/ngwr-resizable-testing.d.ts +116 -0
- package/types/ngwr-schema-form-testing.d.ts +260 -0
- package/types/ngwr-schema-form.d.ts +76 -6
- package/types/ngwr-select-testing.d.ts +20 -0
- package/types/ngwr-select.d.ts +112 -11
- package/types/ngwr-sidebar-testing.d.ts +176 -0
- package/types/ngwr-slider-testing.d.ts +3 -1
- package/types/ngwr-slider.d.ts +21 -1
- package/types/ngwr-sortable-list.d.ts +6 -0
- package/types/ngwr-stepper.d.ts +20 -11
- package/types/ngwr-table-testing.d.ts +70 -6
- package/types/ngwr-table.d.ts +480 -50
- package/types/ngwr-tabs-testing.d.ts +14 -17
- package/types/ngwr-tabs.d.ts +6 -0
- package/types/ngwr-textarea-testing.d.ts +10 -0
- package/types/ngwr-textarea.d.ts +48 -2
- package/types/ngwr-toast.d.ts +8 -1
- package/types/ngwr-transfer-testing.d.ts +3 -0
- package/types/ngwr-transfer.d.ts +24 -1
- package/types/ngwr-tree-testing.d.ts +65 -1
- package/types/ngwr-tree.d.ts +333 -12
- package/types/ngwr-utils.d.ts +28 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-charts-line-chart-testing.mjs","names":[],"sources":["../../../projects/lib/charts/line-chart/testing/wr-line-chart-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport { WrChartLegendHarness } from 'ngwr/charts/chart-legend/testing';\n\nimport type { WrLineChartHarnessFilters, WrLineChartTableRow, WrLineChartTooltipRow } from './types';\n\n/**\n * One body row of the chart's data table, so its header and cells are read off the row\n * they sit in rather than matched up by position across the whole table.\n */\nclass TableRowHarness extends ComponentHarness {\n static hostSelector = '.wr-chart-table tbody tr';\n\n async read(): Promise<WrLineChartTableRow> {\n const header = await this.locatorFor('th[scope=\"row\"]')();\n const cells = await this.locatorForAll('td')();\n return { header: await header.text(), cells: await Promise.all(cells.map(cell => cell.text())) };\n }\n}\n\n/**\n * Test harness for `<wr-line-chart>`.\n *\n * **The lines are paths and the paths are not assertable.** A `d` attribute is a\n * rendering detail — it moves with the viewBox, the padding and the value range — so\n * this harness counts the lines and reads everything TEXTUAL instead: the legend, the\n * axis ticks, the x labels and the tooltip. Those are what a reader gets, and they\n * are what breaks when the data wiring does.\n *\n * **The harness opens no tooltip, and the reason is worth knowing.** It follows a\n * `mousemove` over the plot, and the component turns the cursor's x into an index by\n * measuring the drawing's box — which jsdom reports as 0×0, so every synthetic move\n * resolves to the same index or to none at all. There is deliberately no `hoverAt()`;\n * {@link getTooltipRows} reads the tooltip once something else has opened it: a\n * browser-run harness, or a spec that gives the drawing a box (`getBoundingClientRect`)\n * and dispatches the move itself.\n *\n * @example\n * ```ts\n * const chart = await loader.getHarness(WrLineChartHarness);\n *\n * expect(await chart.getSeriesLabels()).toEqual(['Revenue', 'Costs']);\n * expect(await chart.getLineCount()).toBe(2);\n * expect(await chart.getXLabels()).toEqual(['Jan', 'Feb', 'Mar']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrLineChartHarness extends ComponentHarness {\n static hostSelector = 'wr-line-chart';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrLineChartHarnessFilters = {}): HarnessPredicate<WrLineChartHarness> {\n return new HarnessPredicate(WrLineChartHarness, options)\n .addOption('ariaLabel', options.ariaLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('seriesLabel', options.seriesLabel, async (harness, label) => {\n for (const series of await harness.getSeriesLabels()) {\n if (await HarnessPredicate.stringMatches(series, label)) return true;\n }\n return false;\n });\n }\n\n /** The plot's accessible name — the only name the drawing has. */\n async getAccessibleName(): Promise<string | null> {\n return (await this.locatorFor('.wr-line-chart__plot')()).getAttribute('aria-label');\n }\n\n /** Whether the legend is rendered (`showLegend`, and at least one series). */\n async hasLegend(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-line-chart__legend')()) !== null;\n }\n\n /** The series names from the legend, in order — hidden series included, since their rows stay. */\n async getSeriesLabels(): Promise<string[]> {\n const items = await this.locatorForAll('.wr-line-chart__legend-item')();\n // A hidden row of a legend that does not toggle says \"hidden\" for a screen reader;\n // that word is its state, not part of the name.\n return Promise.all(items.map(item => item.text({ exclude: '.wr-chart-legend__sr-only' })));\n }\n\n /**\n * The legend, as a {@link WrChartLegendHarness}: each row's key and its hidden state\n * and, with `toggleableLegend`, the toggles that show and hide a series.\n *\n * Throws when the chart draws no legend (`showLegend` off, or no series) rather than\n * answering with an empty one: {@link hasLegend} is the question for that.\n */\n async getLegendHarness(): Promise<WrChartLegendHarness> {\n const legend = await this.locatorForOptional(WrChartLegendHarness)();\n if (!legend) {\n throw new Error(\n 'WrLineChartHarness.getLegendHarness(): the chart draws no legend — `showLegend` is off or there are no ' +\n 'series. Ask hasLegend() first.'\n );\n }\n return legend;\n }\n\n /**\n * How many lines were drawn.\n *\n * Worth comparing with {@link getSeriesLabels}: the legend and the paths come from\n * the same list, so a mismatch is a series that got filtered out of one of them. The\n * one difference by design is a series hidden through `hiddenSeries`, which keeps its\n * legend row and draws no line — the legend harness's `getHidden()` names those.\n */\n async getLineCount(): Promise<number> {\n return (await this.locatorForAll('.wr-line-chart__line')()).length;\n }\n\n /** How many point dots were drawn across every series (`showDots`). */\n async getDotCount(): Promise<number> {\n return (await this.locatorForAll('.wr-line-chart__dot')()).length;\n }\n\n /**\n * Whether the chart is in area mode (`showArea`), read off its\n * `wr-line-chart--area` modifier. {@link getAreaCount} says how many fills it drew:\n * an area chart with no run of two points draws none.\n */\n async hasArea(): Promise<boolean> {\n return (await this.host()).hasClass('wr-line-chart--area');\n }\n\n /**\n * How many fills were drawn under the lines with `showArea`: one per unbroken run of\n * two points or more in each series shown. A hole in a series splits its fill in two,\n * and a hidden series draws none. A fill's shape is a path like a line's and is not\n * read, for the reason given in the class note.\n */\n async getAreaCount(): Promise<number> {\n return (await this.locatorForAll('.wr-line-chart__area')()).length;\n }\n\n /** Whether the series are stacked (`stacked`), read off the `wr-line-chart--stacked` modifier. */\n async isStacked(): Promise<boolean> {\n return (await this.host()).hasClass('wr-line-chart--stacked');\n }\n\n /** Whether the hidden data table is rendered (`dataTable`). */\n async hasDataTable(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-chart-table')()) !== null;\n }\n\n /**\n * The data table's column headings: one per series shown, in order. Hidden series\n * leave the table.\n *\n * Throws when the chart renders no table (`dataTable` off) rather than answering with\n * no columns, which is also what a table of fully hidden series answers.\n */\n async getTableColumns(): Promise<string[]> {\n await this.assertDataTable('getTableColumns');\n const headings = await this.locatorForAll('.wr-chart-table thead th[scope=\"col\"]')();\n return Promise.all(headings.map(heading => heading.text()));\n }\n\n /**\n * The data table's rows, one per x: the row header and each series' own value, as a\n * screen reader walks them. Under `stacked` they are still the series' own values, not\n * the stacked tops the lines are drawn at.\n *\n * Throws when the chart renders no table (`dataTable` off), for the reason\n * {@link getTableColumns} gives.\n */\n async getTableRows(): Promise<WrLineChartTableRow[]> {\n await this.assertDataTable('getTableRows');\n const rows = await this.locatorForAll(TableRowHarness)();\n return Promise.all(rows.map(row => row.read()));\n }\n\n /** Whether the horizontal grid lines are drawn (`showGrid`). */\n async hasGrid(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-line-chart__grid-line')()) !== null;\n }\n\n /** The y-axis tick labels, top to bottom as drawn. */\n async getYTicks(): Promise<string[]> {\n const ticks = await this.locatorForAll('.wr-line-chart__tick')();\n return Promise.all(ticks.map(tick => tick.text()));\n }\n\n /**\n * The x-axis labels printed under the plot, in order: every one while the widest fits\n * between two points, and every n-th otherwise — the labels a reader sees, not the\n * whole of `xLabels`. The tooltip and the data table name every x.\n */\n async getXLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-line-chart__x-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /** Whether the hover tooltip is showing. */\n async hasTooltip(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-line-chart__tooltip')()) !== null;\n }\n\n /** The tooltip's heading — the x label of the hovered point — or `null` while it is closed. */\n async getTooltipLabel(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-line-chart__tooltip-label')();\n return label ? label.text() : null;\n }\n\n /** The tooltip's rows, one per series shown with a reading at that x, or `[]` while it is closed. */\n async getTooltipRows(): Promise<WrLineChartTooltipRow[]> {\n const names = await this.locatorForAll('.wr-line-chart__tooltip-name')();\n const values = await this.locatorForAll('.wr-line-chart__tooltip-value')();\n\n return Promise.all(\n names.map(async (name, index) => ({\n label: await name.text(),\n value: (await values[index]?.text()) ?? '',\n }))\n );\n }\n\n private async assertDataTable(method: string): Promise<void> {\n if (!(await this.hasDataTable())) {\n throw new Error(\n `WrLineChartHarness.${method}(): the chart renders no data table — \\`dataTable\\` is off. Ask hasDataTable() first.`\n );\n }\n }\n\n /**\n * The plot's height in pixels, read off the `style` ATTRIBUTE.\n *\n * NOT `getCssValue()`, which is `getComputedStyle()` — the same rule this\n * file's class note already states and this method alone broke. A computed\n * read answers from the LAID-OUT box, so it agrees with the inline value in\n * jsdom (which lays nothing out and echoes the declaration) and disagrees in a\n * browser, where sub-pixel rounding turns a declared 240 into 239.5. A harness\n * that answers differently in the two places it runs is worse than one that\n * refuses.\n */\n async getPlotHeight(): Promise<number> {\n const style = await (await this.locatorFor('.wr-line-chart__plot')()).getAttribute('style');\n const match = /height:\\s*([\\d.]+)px/.exec(style ?? '');\n if (!match) {\n throw new Error(\n `WrLineChartHarness.getPlotHeight(): no inline height on .wr-line-chart__plot (style: \"${style ?? ''}\"). ` +\n 'The component writes one unconditionally, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n }\n}\n"],"mappings":";;;;;;;;AAiBA,IAAM,kBAAN,cAA8B,iBAAgB;CAC5C,OAAO,eAAe;CAEtB,MAAM,OAAI;EACR,MAAM,SAAS,MAAM,KAAK,WAAW,mBAAiB,CAAC,CAAA;EACvD,MAAM,QAAQ,MAAM,KAAK,cAAc,IAAI,CAAC,CAAA;EAC5C,OAAO;GAAE,QAAQ,MAAM,OAAO,KAAI;GAAI,OAAO,MAAM,QAAQ,IAAI,MAAM,KAAI,SAAQ,KAAK,KAAI,CAAE,CAAC;EAAC;CAChG;;AA+BF,IAAa,qBAAb,MAAa,2BAA2B,iBAAgB;CACtD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAqC,CAAA,GAAE;EACjD,OAAO,IAAI,iBAAiB,oBAAoB,OAAO,CAAC,CACrD,UAAU,aAAa,QAAQ,YAAY,SAAS,UACnD,iBAAiB,cAAc,QAAQ,kBAAiB,GAAI,KAAK,CAAC,CACnE,CACA,UAAU,eAAe,QAAQ,aAAa,OAAO,SAAS,UAAS;GACtE,KAAK,MAAM,UAAU,MAAM,QAAQ,gBAAe,GAChD,IAAI,MAAM,iBAAiB,cAAc,QAAQ,KAAK,GAAG,OAAO;GAElE,OAAO;EACT,CAAC;CACL;CAGA,MAAM,oBAAiB;EACrB,QAAQ,MAAM,KAAK,WAAW,sBAAsB,CAAC,CAAA,EAAA,CAAI,aAAa,YAAY;CACpF;CAGA,MAAM,YAAS;EACb,OAAQ,MAAM,KAAK,mBAAmB,wBAAwB,CAAC,CAAA,MAAQ;CACzE;CAGA,MAAM,kBAAe;EACnB,MAAM,QAAQ,MAAM,KAAK,cAAc,6BAA6B,CAAC,CAAA;EAGrE,OAAO,QAAQ,IAAI,MAA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],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, parallel } from '@angular/cdk/testing';\n\nimport { WrChartLegendHarness } from 'ngwr/charts/chart-legend/testing';\n\nimport type { WrLineChartHarnessFilters, WrLineChartTableRow, WrLineChartTooltipRow } from './types';\n\n/**\n * One body row of the chart's data table, so its header and cells are read off the row\n * they sit in rather than matched up by position across the whole table.\n */\nclass TableRowHarness extends ComponentHarness {\n static hostSelector = '.wr-chart-table tbody tr';\n\n async read(): Promise<WrLineChartTableRow> {\n const header = await this.locatorFor('th[scope=\"row\"]')();\n const cells = await this.locatorForAll('td')();\n return { header: await header.text(), cells: await Promise.all(cells.map(cell => cell.text())) };\n }\n}\n\n/**\n * Test harness for `<wr-line-chart>`.\n *\n * **The lines are paths and the paths are not assertable.** A `d` attribute is a\n * rendering detail — it moves with the viewBox, the padding and the value range — so\n * this harness counts the lines and reads everything TEXTUAL instead: the legend, the\n * axis ticks, the x labels and the tooltip. Those are what a reader gets, and they\n * are what breaks when the data wiring does.\n *\n * **The harness opens no tooltip, and the reason is worth knowing.** It follows a\n * `mousemove` over the plot, and the component turns the cursor's x into an index by\n * measuring the drawing's box — which jsdom reports as 0×0, so every synthetic move\n * resolves to the same index or to none at all. There is deliberately no `hoverAt()`;\n * {@link getTooltipRows} reads the tooltip once something else has opened it: a\n * browser-run harness, or a spec that gives the drawing a box (`getBoundingClientRect`)\n * and dispatches the move itself.\n *\n * @example\n * ```ts\n * const chart = await loader.getHarness(WrLineChartHarness);\n *\n * expect(await chart.getSeriesLabels()).toEqual(['Revenue', 'Costs']);\n * expect(await chart.getLineCount()).toBe(2);\n * expect(await chart.getXLabels()).toEqual(['Jan', 'Feb', 'Mar']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrLineChartHarness extends ComponentHarness {\n static hostSelector = 'wr-line-chart';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrLineChartHarnessFilters = {}): HarnessPredicate<WrLineChartHarness> {\n return new HarnessPredicate(WrLineChartHarness, options)\n .addOption('ariaLabel', options.ariaLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('seriesLabel', options.seriesLabel, async (harness, label) => {\n for (const series of await harness.getSeriesLabels()) {\n if (await HarnessPredicate.stringMatches(series, label)) return true;\n }\n return false;\n });\n }\n\n /** The plot's accessible name — the only name the drawing has. */\n async getAccessibleName(): Promise<string | null> {\n return (await this.locatorFor('.wr-line-chart__plot')()).getAttribute('aria-label');\n }\n\n /** Whether the legend is rendered (`showLegend`, and at least one series). */\n async hasLegend(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-line-chart__legend')()) !== null;\n }\n\n /** The series names from the legend, in order — hidden series included, since their rows stay. */\n async getSeriesLabels(): Promise<string[]> {\n const items = await this.locatorForAll('.wr-line-chart__legend-item')();\n // A hidden row of a legend that does not toggle says \"hidden\" for a screen reader;\n // that word is its state, not part of the name.\n return Promise.all(items.map(item => item.text({ exclude: '.wr-chart-legend__sr-only' })));\n }\n\n /**\n * The legend, as a {@link WrChartLegendHarness}: each row's key and its hidden state\n * and, with `toggleableLegend`, the toggles that show and hide a series.\n *\n * Throws when the chart draws no legend (`showLegend` off, or no series) rather than\n * answering with an empty one: {@link hasLegend} is the question for that.\n */\n async getLegendHarness(): Promise<WrChartLegendHarness> {\n const legend = await this.locatorForOptional(WrChartLegendHarness)();\n if (!legend) {\n throw new Error(\n 'WrLineChartHarness.getLegendHarness(): the chart draws no legend — `showLegend` is off or there are no ' +\n 'series. Ask hasLegend() first.'\n );\n }\n return legend;\n }\n\n /**\n * How many lines were drawn.\n *\n * Worth comparing with {@link getSeriesLabels}: the legend and the paths come from\n * the same list, so a mismatch is a series that got filtered out of one of them. The\n * one difference by design is a series hidden through `hiddenSeries`, which keeps its\n * legend row and draws no line — the legend harness's `getHidden()` names those.\n */\n async getLineCount(): Promise<number> {\n return (await this.locatorForAll('.wr-line-chart__line')()).length;\n }\n\n /**\n * How many point dots were drawn across every series (`showDots`). A series draws its\n * dots as one path with a subpath each, so this counts subpaths, not elements.\n */\n async getDotCount(): Promise<number> {\n const paths = await this.locatorForAll('.wr-line-chart__dot')();\n const drawn = await parallel(() => paths.map(path => path.getAttribute('d')));\n return drawn.reduce((count, d) => count + (d?.match(/M/g)?.length ?? 0), 0);\n }\n\n /**\n * Whether the chart is in area mode (`showArea`), read off its\n * `wr-line-chart--area` modifier. {@link getAreaCount} says how many fills it drew:\n * an area chart with no run of two points draws none.\n */\n async hasArea(): Promise<boolean> {\n return (await this.host()).hasClass('wr-line-chart--area');\n }\n\n /**\n * How many fills were drawn under the lines with `showArea`: one per unbroken run of\n * two points or more in each series shown. A hole in a series splits its fill in two,\n * and a hidden series draws none. A fill's shape is a path like a line's and is not\n * read, for the reason given in the class note.\n */\n async getAreaCount(): Promise<number> {\n return (await this.locatorForAll('.wr-line-chart__area')()).length;\n }\n\n /** Whether the series are stacked (`stacked`), read off the `wr-line-chart--stacked` modifier. */\n async isStacked(): Promise<boolean> {\n return (await this.host()).hasClass('wr-line-chart--stacked');\n }\n\n /** Whether the hidden data table is rendered (`dataTable`). */\n async hasDataTable(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-chart-table')()) !== null;\n }\n\n /**\n * The data table's column headings: one per series shown, in order. Hidden series\n * leave the table.\n *\n * Throws when the chart renders no table (`dataTable` off) rather than answering with\n * no columns, which is also what a table of fully hidden series answers.\n */\n async getTableColumns(): Promise<string[]> {\n await this.assertDataTable('getTableColumns');\n const headings = await this.locatorForAll('.wr-chart-table thead th[scope=\"col\"]')();\n return Promise.all(headings.map(heading => heading.text()));\n }\n\n /**\n * The data table's rows, one per x: the row header and each series' own value, as a\n * screen reader walks them. Under `stacked` they are still the series' own values, not\n * the stacked tops the lines are drawn at.\n *\n * Throws when the chart renders no table (`dataTable` off), for the reason\n * {@link getTableColumns} gives.\n */\n async getTableRows(): Promise<WrLineChartTableRow[]> {\n await this.assertDataTable('getTableRows');\n const rows = await this.locatorForAll(TableRowHarness)();\n return Promise.all(rows.map(row => row.read()));\n }\n\n /** Whether the horizontal grid lines are drawn (`showGrid`). */\n async hasGrid(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-line-chart__grid-line')()) !== null;\n }\n\n /** The y-axis tick labels, top to bottom as drawn. */\n async getYTicks(): Promise<string[]> {\n const ticks = await this.locatorForAll('.wr-line-chart__tick')();\n return Promise.all(ticks.map(tick => tick.text()));\n }\n\n /**\n * The x-axis labels printed under the plot, in order: every one while the widest fits\n * between two points, and every n-th otherwise — the labels a reader sees, not the\n * whole of `xLabels`. The tooltip and the data table name every x.\n */\n async getXLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-line-chart__x-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /** Whether the hover tooltip is showing. */\n async hasTooltip(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-line-chart__tooltip')()) !== null;\n }\n\n /** The tooltip's heading — the x label of the hovered point — or `null` while it is closed. */\n async getTooltipLabel(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-line-chart__tooltip-label')();\n return label ? label.text() : null;\n }\n\n /** The tooltip's rows, one per series shown with a reading at that x, or `[]` while it is closed. */\n async getTooltipRows(): Promise<WrLineChartTooltipRow[]> {\n const names = await this.locatorForAll('.wr-line-chart__tooltip-name')();\n const values = await this.locatorForAll('.wr-line-chart__tooltip-value')();\n\n return Promise.all(\n names.map(async (name, index) => ({\n label: await name.text(),\n value: (await values[index]?.text()) ?? '',\n }))\n );\n }\n\n private async assertDataTable(method: string): Promise<void> {\n if (!(await this.hasDataTable())) {\n throw new Error(\n `WrLineChartHarness.${method}(): the chart renders no data table — \\`dataTable\\` is off. Ask hasDataTable() first.`\n );\n }\n }\n\n /**\n * The plot's height in pixels, read off the `style` ATTRIBUTE.\n *\n * NOT `getCssValue()`, which is `getComputedStyle()` — the same rule this\n * file's class note already states and this method alone broke. A computed\n * read answers from the LAID-OUT box, so it agrees with the inline value in\n * jsdom (which lays nothing out and echoes the declaration) and disagrees in a\n * browser, where sub-pixel rounding turns a declared 240 into 239.5. A harness\n * that answers differently in the two places it runs is worse than one that\n * refuses.\n */\n async getPlotHeight(): Promise<number> {\n const style = await (await this.locatorFor('.wr-line-chart__plot')()).getAttribute('style');\n const match = /height:\\s*([\\d.]+)px/.exec(style ?? '');\n if (!match) {\n throw new Error(\n `WrLineChartHarness.getPlotHeight(): no inline height on .wr-line-chart__plot (style: \"${style ?? ''}\"). ` +\n 'The component writes one unconditionally, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n }\n}\n"],"mappings":";;;;;;;;AAiBA,IAAM,kBAAN,cAA8B,iBAAgB;CAC5C,OAAO,eAAe;CAEtB,MAAM,OAAI;EACR,MAAM,SAAS,MAAM,KAAK,WAAW,mBAAiB,CAAC,CAAA;EACvD,MAAM,QAAQ,MAAM,KAAK,cAAc,IAAI,CAAC,CAAA;EAC5C,OAAO;GAAE,QAAQ,MAAM,OAAO,KAAI;GAAI,OAAO,MAAM,QAAQ,IAAI,MAAM,KAAI,SAAQ,KAAK,KAAI,CAAE,CAAC;EAAC;CAChG;;AA+BF,IAAa,qBAAb,MAAa,2BAA2B,iBAAgB;CACtD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAqC,CAAA,GAAE;EACjD,OAAO,IAAI,iBAAiB,oBAAoB,OAAO,CAAC,CACrD,UAAU,aAAa,QAAQ,YAAY,SAAS,UACnD,iBAAiB,cAAc,QAAQ,kBAAiB,GAAI,KAAK,CAAC,CACnE,CACA,UAAU,eAAe,QAAQ,aAAa,OAAO,SAAS,UAAS;GACtE,KAAK,MAAM,UAAU,MAAM,QAAQ,gBAAe,GAChD,IAAI,MAAM,iBAAiB,cAAc,QAAQ,KAAK,GAAG,OAAO;GAElE,OAAO;EACT,CAAC;CACL;CAGA,MA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MAAM,KAAK,aAAY,GAC3B,MAAM,IAAI,MACR,sBAAsB,OAAM,sFAAuF;CAGzH;CAaA,MAAM,gBAAa;EACjB,MAAM,QAAQ,OAAO,MAAM,KAAK,WAAW,sBAAsB,CAAC,CAAA,EAAA,CAAI,aAAa,OAAO;EAC1F,MAAM,QAAQ,uBAAuB,KAAK,SAAS,EAAE;EACrD,IAAI,CAAC,OACH,MAAM,IAAI,MACR,yFAAyF,SAAS,GAAE,4FACT;EAG/F,OAAO,OAAO,WAAW,MAAM,EAAE;CACnC"}
|
|
@@ -208,9 +208,18 @@ var WrLineChart = class WrLineChart {
|
|
|
208
208
|
color: s.color,
|
|
209
209
|
dash: s.dash,
|
|
210
210
|
d: this.pathFor(s.tops),
|
|
211
|
-
dots: dots ?
|
|
211
|
+
dots: dots ? this.dotsFor(s.tops) : ""
|
|
212
212
|
}));
|
|
213
213
|
}, ...ngDevMode ? [{ debugName: "drawn" }] : /* istanbul ignore next */ []);
|
|
214
|
+
dotsFor(values) {
|
|
215
|
+
const { min, max } = this.bounds();
|
|
216
|
+
const commands = [];
|
|
217
|
+
for (let i = 0; i < values.length; i++) {
|
|
218
|
+
const v = values[i];
|
|
219
|
+
if (v !== null) commands.push(this.dotPath(this.pointX(i), (max - v) / (max - min) * this.vbH));
|
|
220
|
+
}
|
|
221
|
+
return commands.join(" ");
|
|
222
|
+
}
|
|
214
223
|
areas = computed(() => {
|
|
215
224
|
if (!this.showArea() || this.pointCount() <= 1) return [];
|
|
216
225
|
return this.plottedSeries().flatMap((s) => {
|
|
@@ -416,7 +425,7 @@ var WrLineChart = class WrLineChart {
|
|
|
416
425
|
}, ...ngDevMode ? [{ debugName: "tableData" }] : /* istanbul ignore next */ []);
|
|
417
426
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
418
427
|
minVersion: "12.0.0",
|
|
419
|
-
version: "22.2.
|
|
428
|
+
version: "22.2.6",
|
|
420
429
|
ngImport: i0,
|
|
421
430
|
type: WrLineChart,
|
|
422
431
|
deps: [],
|
|
@@ -424,7 +433,7 @@ var WrLineChart = class WrLineChart {
|
|
|
424
433
|
});
|
|
425
434
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
426
435
|
minVersion: "17.0.0",
|
|
427
|
-
version: "22.2.
|
|
436
|
+
version: "22.2.6",
|
|
428
437
|
type: WrLineChart,
|
|
429
438
|
isStandalone: true,
|
|
430
439
|
selector: "wr-line-chart",
|
|
@@ -567,7 +576,7 @@ var WrLineChart = class WrLineChart {
|
|
|
567
576
|
}
|
|
568
577
|
],
|
|
569
578
|
ngImport: i0,
|
|
570
|
-
template: "@let hovered = activeIndex();\n@if (showLegend() && resolvedSeries().length > 0) {\n <!-- Every row keys its series by the series' own dash rather than a solid block: a\n coloured square leaves the reader to match it to the LINE, and matching by colour\n is the step the patterns exist to remove. Rows are tracked by position, so two\n series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-line-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n ></ul>\n}\n\n<!-- Two columns: the y-axis labels at inline start, the drawing beside them, and the\n x labels under the drawing only, so their percentages are the drawing's. -->\n<div class=\"wr-line-chart__body\">\n @if (showGrid()) {\n <!-- The tick labels are HTML beside the drawing rather than `<text>` inside it: the\n drawing stretches with `preserveAspectRatio=\"none\"` and its type stretched with\n it. In flow, so the column is exactly as wide as the longest label; each one\n hands the stylesheet the y of its own gridline, as the x labels hand it their x.\n Hidden, as they were inside the plot's `img`: the plot's name is what is\n announced. -->\n <div class=\"wr-line-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yAxis(); track $index) {\n <span class=\"wr-line-chart__tick\" [style.--wr-line-chart-y]=\"tick.y\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-line-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"onPointerLeave()\"\n >\n <!-- Named, where it was the only unnamed element in the component. The legend\n swatch is an `<svg>` too now, so `querySelector('svg')` no longer means\n \"the chart\" — and a plot that nothing can address by name is one a\n consumer's stylesheet and a spec both have to reach by position. -->\n <svg #svg class=\"wr-line-chart__svg\" [attr.viewBox]=\"viewBox()\" preserveAspectRatio=\"none\">\n @if (showGrid()) {\n @for (tick of yTicks(); track tick.value) {\n <!-- The colour is the stylesheet's, from `--wr-line-chart-grid-color`, so forced\n colors can swap it for the system's own. -->\n <line\n class=\"wr-line-chart__grid-line\"\n x1=\"0\"\n [attr.x2]=\"vbW\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n stroke-width=\"1\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n <!-- Every fill before every line, so the lines and their dashes stay on top where\n the fills overlap and the series are still told apart by shape. The opacity is\n the stylesheet's, from `--wr-line-chart-area-opacity`. -->\n @for (area of areas(); track area.key) {\n <path class=\"wr-line-chart__area\" [attr.d]=\"area.d\" [attr.fill]=\"area.color\" stroke=\"none\" />\n }\n\n <!-- By position, not by label: two series may share one, and a duplicate key\n makes Angular re-create rows it cannot tell apart. Each is drawn at its\n plotted values, which under `stacked` are the tops of its band. Every path is\n built once per data change (`drawn`), so hovering rebuilds none of them. -->\n @for (s of drawn(); track s.index) {\n <path\n class=\"wr-line-chart__line\"\n [attr.d]=\"s.d\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-dasharray]=\"s.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n
|
|
579
|
+
template: "@let hovered = activeIndex();\n@if (showLegend() && resolvedSeries().length > 0) {\n <!-- Every row keys its series by the series' own dash rather than a solid block: a\n coloured square leaves the reader to match it to the LINE, and matching by colour\n is the step the patterns exist to remove. Rows are tracked by position, so two\n series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-line-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n ></ul>\n}\n\n<!-- Two columns: the y-axis labels at inline start, the drawing beside them, and the\n x labels under the drawing only, so their percentages are the drawing's. -->\n<div class=\"wr-line-chart__body\">\n @if (showGrid()) {\n <!-- The tick labels are HTML beside the drawing rather than `<text>` inside it: the\n drawing stretches with `preserveAspectRatio=\"none\"` and its type stretched with\n it. In flow, so the column is exactly as wide as the longest label; each one\n hands the stylesheet the y of its own gridline, as the x labels hand it their x.\n Hidden, as they were inside the plot's `img`: the plot's name is what is\n announced. -->\n <div class=\"wr-line-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yAxis(); track $index) {\n <span class=\"wr-line-chart__tick\" [style.--wr-line-chart-y]=\"tick.y\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-line-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"onPointerLeave()\"\n >\n <!-- Named, where it was the only unnamed element in the component. The legend\n swatch is an `<svg>` too now, so `querySelector('svg')` no longer means\n \"the chart\" — and a plot that nothing can address by name is one a\n consumer's stylesheet and a spec both have to reach by position. -->\n <svg #svg class=\"wr-line-chart__svg\" [attr.viewBox]=\"viewBox()\" preserveAspectRatio=\"none\">\n @if (showGrid()) {\n @for (tick of yTicks(); track tick.value) {\n <!-- The colour is the stylesheet's, from `--wr-line-chart-grid-color`, so forced\n colors can swap it for the system's own. -->\n <line\n class=\"wr-line-chart__grid-line\"\n x1=\"0\"\n [attr.x2]=\"vbW\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n stroke-width=\"1\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n <!-- Every fill before every line, so the lines and their dashes stay on top where\n the fills overlap and the series are still told apart by shape. The opacity is\n the stylesheet's, from `--wr-line-chart-area-opacity`. -->\n @for (area of areas(); track area.key) {\n <path class=\"wr-line-chart__area\" [attr.d]=\"area.d\" [attr.fill]=\"area.color\" stroke=\"none\" />\n }\n\n <!-- By position, not by label: two series may share one, and a duplicate key\n makes Angular re-create rows it cannot tell apart. Each is drawn at its\n plotted values, which under `stacked` are the tops of its band. Every path is\n built once per data change (`drawn`), so hovering rebuilds none of them. -->\n @for (s of drawn(); track s.index) {\n <path\n class=\"wr-line-chart__line\"\n [attr.d]=\"s.d\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-dasharray]=\"s.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- Every dot of the series in one path, a subpath each, so a long series costs\n one element rather than one per point. A hole in the data gets no dot. A dot\n is a zero-length line with a round cap and a non-scaling stroke, which stays\n a 6px circle however the drawing stretches; a `<circle>` scaled with it, into\n a 3 × 5px oval on a phone and a 9 × 5px one at 1920px. -->\n @if (s.dots) {\n <path\n class=\"wr-line-chart__dot\"\n [attr.d]=\"s.dots\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <line\n class=\"wr-line-chart__crosshair\"\n [attr.x1]=\"pointX(hovered)\"\n [attr.x2]=\"pointX(hovered)\"\n y1=\"0\"\n [attr.y2]=\"vbH\"\n stroke-width=\"1\"\n stroke-dasharray=\"3 3\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- A ring of the series' colour round a surface-coloured centre, drawn the way a\n dot is and for the same reason. The centre's colour is the stylesheet's, from\n `--wr-line-chart-hover-center`. -->\n @for (p of hoverPoints(); track p.index) {\n <path\n class=\"wr-line-chart__hover-dot\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n [attr.stroke]=\"p.color\"\n stroke-width=\"12\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n class=\"wr-line-chart__hover-dot-center\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n stroke-width=\"8\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n </svg>\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <!-- The layer covers the plot and is what the tooltip's `cqw` measures. It is out of\n flow, so the containment it turns on costs the plot's own sizing nothing. The\n tooltip takes the same `--wr-line-chart-x` the x labels take, and the same\n clamp: centred on its point, never past either end. At the top of the plot, or\n where that would cover a marker it reads, at the bottom (`--below`) or beside the\n crosshair (`--left`, `--right`). -->\n <div class=\"wr-line-chart__tooltip-layer\">\n <div\n #tooltip\n class=\"wr-line-chart__tooltip\"\n [class.wr-line-chart__tooltip--below]=\"tooltipPlacement() === 'below'\"\n [class.wr-line-chart__tooltip--left]=\"tooltipPlacement() === 'left'\"\n [class.wr-line-chart__tooltip--right]=\"tooltipPlacement() === 'right'\"\n [style.--wr-line-chart-x]=\"xPercent(hovered)\"\n >\n <div class=\"wr-line-chart__tooltip-label\">{{ hoverLabel() }}</div>\n @for (p of hoverPoints(); track p.index) {\n <div class=\"wr-line-chart__tooltip-row\">\n <span class=\"wr-line-chart__swatch\" [style.background]=\"p.color\"></span>\n <span class=\"wr-line-chart__tooltip-name\">{{ p.label }}</span>\n <span class=\"wr-line-chart__tooltip-value\">{{ p.text }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n @if (xLabels().length > 0) {\n <!-- The strip is as wide as the plot, and hands the stylesheet the distance between\n two printed labels; each label hands it the x of the point it names. Both are\n percentages of the drawing's width, so they track the drawing at any size: the\n stylesheet centres a label on its point and ellipsises it past its slot. Laying the\n labels out as equal centred flex slots instead is bar-chart geometry: only the\n middle label landed on its dot, and the outer ones sat up to half a column away.\n The hidden copy of every label, a line each, is what the room they need is\n measured against: it is as wide as the widest. -->\n <div class=\"wr-line-chart__x-labels\" [style.--wr-line-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-line-chart__x-probe\" aria-hidden=\"true\">{{ probeText() }}</span>\n @for (tick of xAxis().ticks; track tick.index) {\n <span class=\"wr-line-chart__x-label\" [style.--wr-line-chart-x]=\"tick.x\">{{ tick.label }}</span>\n }\n </div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n",
|
|
571
580
|
dependencies: [{
|
|
572
581
|
kind: "component",
|
|
573
582
|
type: WrChartLegend,
|
|
@@ -576,7 +585,8 @@ var WrLineChart = class WrLineChart {
|
|
|
576
585
|
"items",
|
|
577
586
|
"toggleable",
|
|
578
587
|
"hiddenSeries",
|
|
579
|
-
"ariaLabel"
|
|
588
|
+
"ariaLabel",
|
|
589
|
+
"hiddenLabel"
|
|
580
590
|
],
|
|
581
591
|
outputs: ["hiddenSeriesChange", "toggled"]
|
|
582
592
|
}, {
|
|
@@ -594,7 +604,7 @@ var WrLineChart = class WrLineChart {
|
|
|
594
604
|
};
|
|
595
605
|
i0.ɵɵngDeclareClassMetadata({
|
|
596
606
|
minVersion: "12.0.0",
|
|
597
|
-
version: "22.2.
|
|
607
|
+
version: "22.2.6",
|
|
598
608
|
ngImport: i0,
|
|
599
609
|
type: WrLineChart,
|
|
600
610
|
decorators: [{
|
|
@@ -612,7 +622,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
612
622
|
provide: WR_CHART_LEGEND_BLOCK,
|
|
613
623
|
useValue: "wr-line-chart"
|
|
614
624
|
}],
|
|
615
|
-
template: "@let hovered = activeIndex();\n@if (showLegend() && resolvedSeries().length > 0) {\n <!-- Every row keys its series by the series' own dash rather than a solid block: a\n coloured square leaves the reader to match it to the LINE, and matching by colour\n is the step the patterns exist to remove. Rows are tracked by position, so two\n series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-line-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n ></ul>\n}\n\n<!-- Two columns: the y-axis labels at inline start, the drawing beside them, and the\n x labels under the drawing only, so their percentages are the drawing's. -->\n<div class=\"wr-line-chart__body\">\n @if (showGrid()) {\n <!-- The tick labels are HTML beside the drawing rather than `<text>` inside it: the\n drawing stretches with `preserveAspectRatio=\"none\"` and its type stretched with\n it. In flow, so the column is exactly as wide as the longest label; each one\n hands the stylesheet the y of its own gridline, as the x labels hand it their x.\n Hidden, as they were inside the plot's `img`: the plot's name is what is\n announced. -->\n <div class=\"wr-line-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yAxis(); track $index) {\n <span class=\"wr-line-chart__tick\" [style.--wr-line-chart-y]=\"tick.y\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-line-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"onPointerLeave()\"\n >\n <!-- Named, where it was the only unnamed element in the component. The legend\n swatch is an `<svg>` too now, so `querySelector('svg')` no longer means\n \"the chart\" — and a plot that nothing can address by name is one a\n consumer's stylesheet and a spec both have to reach by position. -->\n <svg #svg class=\"wr-line-chart__svg\" [attr.viewBox]=\"viewBox()\" preserveAspectRatio=\"none\">\n @if (showGrid()) {\n @for (tick of yTicks(); track tick.value) {\n <!-- The colour is the stylesheet's, from `--wr-line-chart-grid-color`, so forced\n colors can swap it for the system's own. -->\n <line\n class=\"wr-line-chart__grid-line\"\n x1=\"0\"\n [attr.x2]=\"vbW\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n stroke-width=\"1\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n <!-- Every fill before every line, so the lines and their dashes stay on top where\n the fills overlap and the series are still told apart by shape. The opacity is\n the stylesheet's, from `--wr-line-chart-area-opacity`. -->\n @for (area of areas(); track area.key) {\n <path class=\"wr-line-chart__area\" [attr.d]=\"area.d\" [attr.fill]=\"area.color\" stroke=\"none\" />\n }\n\n <!-- By position, not by label: two series may share one, and a duplicate key\n makes Angular re-create rows it cannot tell apart. Each is drawn at its\n plotted values, which under `stacked` are the tops of its band. Every path is\n built once per data change (`drawn`), so hovering rebuilds none of them. -->\n @for (s of drawn(); track s.index) {\n <path\n class=\"wr-line-chart__line\"\n [attr.d]=\"s.d\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-dasharray]=\"s.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n
|
|
625
|
+
template: "@let hovered = activeIndex();\n@if (showLegend() && resolvedSeries().length > 0) {\n <!-- Every row keys its series by the series' own dash rather than a solid block: a\n coloured square leaves the reader to match it to the LINE, and matching by colour\n is the step the patterns exist to remove. Rows are tracked by position, so two\n series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-line-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n ></ul>\n}\n\n<!-- Two columns: the y-axis labels at inline start, the drawing beside them, and the\n x labels under the drawing only, so their percentages are the drawing's. -->\n<div class=\"wr-line-chart__body\">\n @if (showGrid()) {\n <!-- The tick labels are HTML beside the drawing rather than `<text>` inside it: the\n drawing stretches with `preserveAspectRatio=\"none\"` and its type stretched with\n it. In flow, so the column is exactly as wide as the longest label; each one\n hands the stylesheet the y of its own gridline, as the x labels hand it their x.\n Hidden, as they were inside the plot's `img`: the plot's name is what is\n announced. -->\n <div class=\"wr-line-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yAxis(); track $index) {\n <span class=\"wr-line-chart__tick\" [style.--wr-line-chart-y]=\"tick.y\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-line-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"onPointerLeave()\"\n >\n <!-- Named, where it was the only unnamed element in the component. The legend\n swatch is an `<svg>` too now, so `querySelector('svg')` no longer means\n \"the chart\" — and a plot that nothing can address by name is one a\n consumer's stylesheet and a spec both have to reach by position. -->\n <svg #svg class=\"wr-line-chart__svg\" [attr.viewBox]=\"viewBox()\" preserveAspectRatio=\"none\">\n @if (showGrid()) {\n @for (tick of yTicks(); track tick.value) {\n <!-- The colour is the stylesheet's, from `--wr-line-chart-grid-color`, so forced\n colors can swap it for the system's own. -->\n <line\n class=\"wr-line-chart__grid-line\"\n x1=\"0\"\n [attr.x2]=\"vbW\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n stroke-width=\"1\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n <!-- Every fill before every line, so the lines and their dashes stay on top where\n the fills overlap and the series are still told apart by shape. The opacity is\n the stylesheet's, from `--wr-line-chart-area-opacity`. -->\n @for (area of areas(); track area.key) {\n <path class=\"wr-line-chart__area\" [attr.d]=\"area.d\" [attr.fill]=\"area.color\" stroke=\"none\" />\n }\n\n <!-- By position, not by label: two series may share one, and a duplicate key\n makes Angular re-create rows it cannot tell apart. Each is drawn at its\n plotted values, which under `stacked` are the tops of its band. Every path is\n built once per data change (`drawn`), so hovering rebuilds none of them. -->\n @for (s of drawn(); track s.index) {\n <path\n class=\"wr-line-chart__line\"\n [attr.d]=\"s.d\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-dasharray]=\"s.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- Every dot of the series in one path, a subpath each, so a long series costs\n one element rather than one per point. A hole in the data gets no dot. A dot\n is a zero-length line with a round cap and a non-scaling stroke, which stays\n a 6px circle however the drawing stretches; a `<circle>` scaled with it, into\n a 3 × 5px oval on a phone and a 9 × 5px one at 1920px. -->\n @if (s.dots) {\n <path\n class=\"wr-line-chart__dot\"\n [attr.d]=\"s.dots\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <line\n class=\"wr-line-chart__crosshair\"\n [attr.x1]=\"pointX(hovered)\"\n [attr.x2]=\"pointX(hovered)\"\n y1=\"0\"\n [attr.y2]=\"vbH\"\n stroke-width=\"1\"\n stroke-dasharray=\"3 3\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- A ring of the series' colour round a surface-coloured centre, drawn the way a\n dot is and for the same reason. The centre's colour is the stylesheet's, from\n `--wr-line-chart-hover-center`. -->\n @for (p of hoverPoints(); track p.index) {\n <path\n class=\"wr-line-chart__hover-dot\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n [attr.stroke]=\"p.color\"\n stroke-width=\"12\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n class=\"wr-line-chart__hover-dot-center\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n stroke-width=\"8\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n </svg>\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <!-- The layer covers the plot and is what the tooltip's `cqw` measures. It is out of\n flow, so the containment it turns on costs the plot's own sizing nothing. The\n tooltip takes the same `--wr-line-chart-x` the x labels take, and the same\n clamp: centred on its point, never past either end. At the top of the plot, or\n where that would cover a marker it reads, at the bottom (`--below`) or beside the\n crosshair (`--left`, `--right`). -->\n <div class=\"wr-line-chart__tooltip-layer\">\n <div\n #tooltip\n class=\"wr-line-chart__tooltip\"\n [class.wr-line-chart__tooltip--below]=\"tooltipPlacement() === 'below'\"\n [class.wr-line-chart__tooltip--left]=\"tooltipPlacement() === 'left'\"\n [class.wr-line-chart__tooltip--right]=\"tooltipPlacement() === 'right'\"\n [style.--wr-line-chart-x]=\"xPercent(hovered)\"\n >\n <div class=\"wr-line-chart__tooltip-label\">{{ hoverLabel() }}</div>\n @for (p of hoverPoints(); track p.index) {\n <div class=\"wr-line-chart__tooltip-row\">\n <span class=\"wr-line-chart__swatch\" [style.background]=\"p.color\"></span>\n <span class=\"wr-line-chart__tooltip-name\">{{ p.label }}</span>\n <span class=\"wr-line-chart__tooltip-value\">{{ p.text }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n @if (xLabels().length > 0) {\n <!-- The strip is as wide as the plot, and hands the stylesheet the distance between\n two printed labels; each label hands it the x of the point it names. Both are\n percentages of the drawing's width, so they track the drawing at any size: the\n stylesheet centres a label on its point and ellipsises it past its slot. Laying the\n labels out as equal centred flex slots instead is bar-chart geometry: only the\n middle label landed on its dot, and the outer ones sat up to half a column away.\n The hidden copy of every label, a line each, is what the room they need is\n measured against: it is as wide as the widest. -->\n <div class=\"wr-line-chart__x-labels\" [style.--wr-line-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-line-chart__x-probe\" aria-hidden=\"true\">{{ probeText() }}</span>\n @for (tick of xAxis().ticks; track tick.index) {\n <span class=\"wr-line-chart__x-label\" [style.--wr-line-chart-x]=\"tick.x\">{{ tick.label }}</span>\n }\n </div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"
|
|
616
626
|
}]
|
|
617
627
|
}],
|
|
618
628
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-charts-line-chart.mjs","names":["DOCUMENT"],"sources":["../../../projects/lib/charts/line-chart/line-chart.ts","../../../projects/lib/charts/line-chart/line-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n LOCALE_ID,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { WR_CHART_LEGEND_BLOCK, WrChartLegend, type WrChartLegendItem } from 'ngwr/charts/chart-legend';\nimport {\n WrChartTable,\n type WrChartTableData,\n wrChartAxis,\n wrChartColor,\n wrChartDash,\n useChartNumbers,\n} from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { wrClamp, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrLineSeries } from './types';\n\n/**\n * The drawing's width in CSS px, assumed until a browser has measured it: what the server\n * and the first paint thin the x labels against.\n */\nconst ASSUMED_WIDTH = 560;\n\n/** The plot's inline padding in CSS px — `--wr-line-chart-plot-inset-x` — until measured. */\nconst ASSUMED_INSET = 16;\n\n/** How wide a character of an x label is taken to be, in CSS px, before a browser has measured the widest. */\nconst CHAR_WIDTH = 7;\n\n/** The least room between two printed x labels, in CSS px. */\nconst LABEL_GAP = 8;\n\n/** The hover marker's radius in CSS px: half the 12px stroke its ring is drawn with. */\nconst HOVER_RADIUS = 6;\n\n/**\n * How far a readout set beside the crosshair (`--left` / `--right`) keeps from it, in CSS\n * px: the marker's radius and as much again. The stylesheet's `$beside`.\n */\nconst BESIDE = 12;\n\n/**\n * Where the readout sits: over the crosshair at the top of the plot, over it at the bottom,\n * or at the top beside it on either side. Physical, as the drawing's own x is.\n */\ntype TooltipPlacement = 'top' | 'below' | 'left' | 'right';\n\n/** What a browser measured, in CSS px: the drawing's width, the plot's inline padding and the widest x label. */\ninterface Measured {\n readonly width: number;\n readonly inset: number;\n readonly label: number;\n}\n\n/** A series as it is drawn: `tops` is what each x is plotted at, `bases` where its band starts under `stacked`. */\ninterface PlottedSeries {\n readonly index: number;\n readonly label: string;\n readonly dash: string;\n readonly color: string;\n readonly data: readonly (number | null)[];\n readonly tops: readonly (number | null)[];\n readonly bases: readonly (number | null)[] | null;\n}\n\n/**\n * Multi-series line chart with axes, gridlines, and a hover tooltip.\n * SVG-only — no external dependency.\n *\n * @example\n * ```html\n * <wr-line-chart\n * [series]=\"[\n * { label: 'Visits', data: [12, 18, 9, 22, 30, 27, 35] },\n * { label: 'Signups', data: [3, 5, 4, 8, 11, 9, 14], color: 'var(--wr-color-success)' }\n * ]\"\n * [xLabels]=\"['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\"\n * />\n * ```\n *\n * The legend is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), and with\n * `toggleableLegend` its rows show and hide their series through `hiddenSeries`.\n *\n * An AREA chart is this one with `showArea`, which fills under every line down to\n * zero, and `stacked` piles the series on each other so the top line reads the total:\n *\n * ```html\n * <wr-line-chart [series]=\"series\" [xLabels]=\"labels\" showArea stacked />\n * ```\n *\n * The x labels are printed every one while the widest fits between two points, and every\n * n-th otherwise, so a long axis keeps whole labels rather than a row of ellipses; the\n * tooltip and the data table name every x. The drawing keeps time running left to right\n * under RTL, as every SVG chart here does; the y labels move to the right of it.\n *\n * @see https://ngwr.dev/charts/line-chart\n */\n@Component({\n selector: 'wr-line-chart',\n templateUrl: './line-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-line-chart',\n '[class.wr-line-chart--area]': 'showArea()',\n '[class.wr-line-chart--stacked]': 'stacked()',\n },\n imports: [WrChartLegend, WrChartTable],\n // The legend's rows keep the classes this chart drew before it drew them through\n // `WrChartLegend`: `.wr-line-chart__legend-item`, `__swatch` and `__legend-label`.\n viewProviders: [{ provide: WR_CHART_LEGEND_BLOCK, useValue: 'wr-line-chart' }],\n})\nexport class WrLineChart {\n /**\n * One entry per line. A series with no `color` takes the next entry from the\n * chart's fallback palette, so several lines are distinguishable unconfigured.\n */\n readonly series = input<readonly WrLineSeries[]>([]);\n\n /**\n * Accessible name of the chart. The legend carries the series NAMES only — the numbers\n * are nowhere in text unless `dataTable` puts them there — so without this the plot is\n * nothing at all to a screen reader. Falls back to `lineChart.label`, or to\n * `lineChart.areaLabel` with `showArea`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly lineLabel = useI18nText(this.ariaLabel, 'lineChart.label', 'Line chart');\n private readonly areaLabel = useI18nText(this.ariaLabel, 'lineChart.areaLabel', 'Area chart');\n\n /** The plot's name, which the data table takes as its caption. */\n protected readonly resolvedAriaLabel = computed(() => (this.showArea() ? this.areaLabel() : this.lineLabel()));\n\n /**\n * Writes every number the chart shows: the y-axis ticks and the tooltip values.\n * `null` uses `Intl.NumberFormat` in `LOCALE_ID`, with compact ticks (`1.2K`, `3.4M`)\n * unless the full numbers are shorter.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The tooltip's exact figures and the axis' compact ticks, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n /**\n * Labels for the X axis (one per data point). Printed every one while the widest fits\n * between two points, and every n-th otherwise. An x past the end of this list is named\n * by its position, counting from 1, in `LOCALE_ID`'s digits, in the tooltip and the data\n * table.\n */\n readonly xLabels = input<readonly string[]>([]);\n\n /** Chart pixel height. @default 240 */\n readonly height = input(240, { transform: (v: unknown): number => Math.max(80, coerceNumberProperty(v, 240)) });\n\n /** Show gridlines + axis ticks. @default true */\n readonly showGrid = input(true, { transform: coerceBooleanProperty });\n\n /** Show the legend above the chart. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Make each legend row a toggle button that shows and hides its series, through\n * `hiddenSeries`. A row is a `<button aria-pressed>`, pressed while its series is\n * shown, so the legend becomes one tab stop per series. @default false\n */\n readonly toggleableLegend = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `series` of the series that are hidden. Positions rather than\n * labels, since two series may share a label. A toggleable legend writes it, and a\n * host may bind it with or without one: `[(hiddenSeries)]`.\n *\n * A hidden series is left out of everything that reads its values. It draws no line\n * and no dots, it has no row or ring in the tooltip, and the y axis is fitted to the\n * series still shown, so hiding a large series lets the small ones fill the plot. The\n * x axis does not change, because its length belongs to the chart (`xLabels`) rather\n * than to one series, and the lines still shown keep their positions. The legend keeps\n * the hidden series' row, struck through, so it can be shown again; the row says\n * \"hidden\" to a screen reader as well, through `aria-pressed` on a toggle and a\n * visually hidden word otherwise. With every series\n * hidden the plot is the empty 0 to 1 frame. A position past the end of `series` is\n * kept and ignored.\n */\n readonly hiddenSeries = model<readonly number[]>([]);\n\n /** Show dots at each data point. @default true */\n readonly showDots = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Fill the space under each line, down to zero, which makes this an area chart.\n *\n * Each unbroken run of a series is one fill (`.wr-line-chart__area`) in the series'\n * colour at `--wr-line-chart-area-opacity`. A hole in the data breaks the fill as it\n * breaks the line, and a lone point between two holes has nothing to fill. Every fill\n * is drawn under every line, so the lines and their dashes stay on top and the series\n * are still told apart by shape where the fills overlap. The y axis takes zero in,\n * since the fills reach it: an all-negative series fills up to a zero at the top of\n * the plot. The plot's name falls back to `lineChart.areaLabel`. @default false\n */\n readonly showArea = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Stack the series on each other in order, so at every x each series is drawn on top\n * of the ones before it and the top line reads the total.\n *\n * Positive values stack up from zero and negative values stack down from it, each sign\n * on its own, so no band crosses another at a point. A hole, or the missing end of a\n * shorter series, adds nothing to the stack and breaks that series' own line. The\n * lines, the dots, the hover markers and the y axis follow the stacked tops; the\n * tooltip and the data table keep each series' own value, which is the figure a reader\n * asks for. A series hidden through `hiddenSeries` leaves the stack. With `showArea`\n * each band fills from the series below to its own line, and the fill is stronger,\n * since the bands do not overlap. @default false\n */\n readonly stacked = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Render the chart's figures as a table that only assistive technology reaches: a row\n * per x, headed by its x label, and a column per series shown, every value written the\n * way the tooltip writes it. A hole is an empty cell.\n *\n * The plot is one named `role=\"img\"`, which hides everything inside it, so without\n * the table the numbers are nowhere a screen reader can walk. It is rendered beside\n * the plot, clipped to nothing: it takes no room, draws nothing and holds no tab stop.\n * A stacked chart's table keeps each series' own values, and a hidden series leaves\n * it. @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Show the hover readout: the crosshair, the point markers and the tooltip. Off\n * drops all three, since a crosshair with no values beside it points at nothing.\n * @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Drawn edge to edge in a 600×300 viewBox that stretches to the plot. Nothing in it is\n * text: the tick labels used to be `<text>` in here, and with\n * `preserveAspectRatio=\"none\"` a glyph stretches with the drawing, while the 36 units\n * kept for them at the left were a different width in pixels at every size. They are\n * HTML beside the drawing now, in a gutter as wide as its longest label, and the space\n * round the lines is CSS padding on the plot.\n */\n protected readonly vbW = 600;\n protected readonly vbH = 300;\n\n private readonly svg = viewChild.required<ElementRef<SVGSVGElement>>('svg');\n\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n\n private readonly probe = viewChild<ElementRef<HTMLElement>>('probe');\n\n private readonly tooltipEl = viewChild<ElementRef<HTMLElement>>('tooltip');\n\n /** An x with no label of its own, by its position from 1 in the reader's own digits. */\n private readonly ordinals = new Intl.NumberFormat(inject(LOCALE_ID));\n\n /** What a browser measured, once it has: `null` on the server and until the first render. */\n private readonly measured = signal<Measured | null>(null);\n\n /**\n * Where the readout sits (see `placeTooltip`): at the top of the plot unless that covers\n * a marker it reads. Decided in a browser, from the readout's own size, each time the\n * hovered x changes.\n */\n protected readonly tooltipPlacement = signal<TooltipPlacement>('top');\n\n /** Hovered point index (across all series) — null when no hover. */\n protected readonly hoveredIndex = signal<number | null>(null);\n\n /** The hovered index while the readout is on, so turning `tooltip` off mid-hover clears it. */\n protected readonly activeIndex = computed(() => (this.tooltip() ? this.hoveredIndex() : null));\n\n /**\n * The index Escape dismissed. It stays shut while the pointer stays on that point —\n * WCAG 1.4.13 asks for dismissal WITHOUT moving the pointer, and every `mousemove`\n * re-reports the point, so a plain close would reopen on the next pixel. The rule\n * the shared chart tooltip follows for the other charts.\n */\n private dismissed: number | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/line-chart');\n // Escape closes the readout wherever focus is, the way it closes every other\n // chart's: nothing in the readout can take focus, so a key handler on the chart\n // would never hear it. Listened for only while the readout is up, which is never\n // on the server.\n const document = inject(DOCUMENT);\n effect(onCleanup => {\n if (this.activeIndex() === null) return;\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape') return;\n this.dismissed = this.hoveredIndex();\n this.hoveredIndex.set(null);\n };\n document.addEventListener('keydown', onKeydown);\n onCleanup(() => document.removeEventListener('keydown', onKeydown));\n });\n\n // Measured after render, in a browser: the drawing's width and the widest x label,\n // which decide how many labels print, and the readout's height, which decides where it\n // sits. Never on the server, which thins the labels against `ASSUMED_WIDTH`.\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const destroyRef = inject(DestroyRef);\n\n afterRenderEffect(() => {\n this.probeText();\n untracked(() => this.measure());\n });\n\n afterRenderEffect(() => {\n const points = this.hoverPoints();\n const tooltip = this.tooltipEl()?.nativeElement;\n if (points.length === 0 || !tooltip) return;\n untracked(() => this.placeTooltip(points, tooltip));\n });\n\n afterNextRender(() => {\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() => this.measure());\n observer.observe(this.svg().nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /**\n * Every series, resolved: its palette colour, its dash (`wrChartDash`, so the lines are\n * told apart by shape and not only by hue, the first one solid) and its data with a\n * HOLE at each non-finite point. Hidden ones included, since the legend lists them.\n *\n * A non-finite point becomes a hole at its own index, not a missing element. It\n * cannot stay a number: `Math.min` and `Math.max` over the pooled data are both NaN\n * as soon as one datum is, so every coordinate in EVERY series came out `NaN`, which\n * is invalid path geometry, and the whole chart vanished rather than the one bad\n * point. But filtering it out closed the gap and slid every LATER point one x-slot to\n * the left, so each of them was drawn under, and reported in the tooltip as, the\n * wrong x label. A gap is kept as a gap and the line is broken across it:\n * interpolating would invent a reading the data never took.\n */\n protected readonly resolvedSeries = computed(() =>\n this.series().map((s, i) => ({\n index: i,\n label: s.label,\n dash: wrChartDash(i),\n data: s.data.map(v => (typeof v === 'number' && Number.isFinite(v) ? v : null)),\n color: s.color ?? wrChartColor(i),\n }))\n );\n\n /** The legend's rows: every series, keyed by its own dash. */\n protected readonly legendItems = computed<readonly WrChartLegendItem[]>(() =>\n this.resolvedSeries().map(({ label, color, dash }) => ({ label, color, dash }))\n );\n\n /** The series drawn, read and fitted to: every one `hiddenSeries` does not name. */\n protected readonly visibleSeries = computed(() => {\n const hidden = new Set(this.hiddenSeries());\n return this.resolvedSeries().filter(s => !hidden.has(s.index));\n });\n\n /**\n * The series drawn, each with the value it is PLOTTED at for every x. That is its own\n * value, except under `stacked`, where it is the top of its band, and `bases` holds\n * where the band starts: zero, or the top of the last series before it on the same\n * side of zero. Positive values pile up and negative ones pile down, each sign on its\n * own, so two bands never cross at a point. A hole stays a hole and adds nothing.\n */\n protected readonly plottedSeries = computed<readonly PlottedSeries[]>(() => {\n const visible = this.visibleSeries();\n if (!this.stacked()) return visible.map(s => ({ ...s, tops: s.data, bases: null }));\n\n // Indexed by x, and sparse: an x no series has reached yet starts from zero.\n const up: number[] = [];\n const down: number[] = [];\n return visible.map(s => {\n const tops: (number | null)[] = [];\n const bases: (number | null)[] = [];\n s.data.forEach((v, i) => {\n if (v === null) {\n tops.push(null);\n bases.push(null);\n return;\n }\n const pile = v < 0 ? down : up;\n const base = pile[i] ?? 0;\n pile[i] = base + v;\n bases.push(base);\n tops.push(base + v);\n });\n return { ...s, tops, bases };\n });\n });\n\n /**\n * The y axis, from `wrChartAxis`, over what is plotted for the series still shown. It\n * floors at zero and never lifts to zero from below, so an all-negative series keeps\n * an axis that ends just above its peak, and it snaps to a readable step: seven\n * integers between 3 and 35 read 0 / 10 / 20 / 30 / 40, where \"the data's max plus\n * 10%, divided into four\" read 38.2 / 28.7 / 19.1 / 9.6 / 0. With nothing to fit, it is\n * the empty 0 to 1 frame.\n *\n * With `showArea` or `stacked` it takes zero in on either side instead: zero is the\n * baseline a fill reaches and the floor a stack starts from, so an axis that stopped\n * short of it would cut the fills off and misstate every band.\n */\n protected readonly bounds = computed(() => {\n // A loop rather than `Math.min(...values)`: a spread of every plotted value overflows\n // the stack past about 125k of them, and the chart rendered nothing at all.\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n for (const s of this.plottedSeries()) {\n for (const v of s.tops) {\n if (v === null) continue;\n if (v < min) min = v;\n if (v > max) max = v;\n }\n }\n if (min > max) return wrChartAxis(Number.NaN, Number.NaN);\n if (this.showArea() || this.stacked()) return wrChartAxis(min, max, { includeZero: true });\n return wrChartAxis(Math.min(0, min), max);\n });\n\n protected readonly pointCount = computed(() => {\n const maxLen = this.resolvedSeries().reduce((acc, s) => Math.max(acc, s.data.length), 0);\n return Math.max(maxLen, this.xLabels().length);\n });\n\n /**\n * Y-axis tick marks, one per `step` from the top down — so every label is a\n * whole multiple of a readable number rather than a quarter of whatever the\n * data happened to reach.\n */\n protected readonly yTicks = computed(() => {\n const { min, max, ticks } = this.bounds();\n return ticks.map(value => ({ value, y: ((max - value) / (max - min)) * this.vbH }));\n });\n\n /**\n * The SVG path for a series' plotted values — one subpath per unbroken run, so a hole\n * in the data leaves a hole in the line rather than a straight segment across it.\n */\n protected pathFor(values: readonly (number | null)[]): string {\n const { min, max } = this.bounds();\n\n const commands: string[] = [];\n let run = 0;\n let last = '';\n // A subpath of one `M` is not stroked at all, so a point with a gap on both sides —\n // or the only point of a one-point chart — would simply vanish when `showDots` is off.\n // Repeating it gives the round linecap something to paint.\n const closeRun = (): void => {\n if (run === 1) commands.push(`L ${last}`);\n run = 0;\n };\n\n values.forEach((v, i) => {\n if (v === null) {\n closeRun();\n return;\n }\n const x = this.pointX(i);\n const y = ((max - v) / (max - min)) * this.vbH;\n last = `${x.toFixed(2)} ${y.toFixed(2)}`;\n commands.push(`${run === 0 ? 'M' : 'L'} ${last}`);\n run++;\n });\n closeRun();\n\n return commands.join(' ');\n }\n\n /**\n * Every series shown as the template draws it: its line's path, and with `showDots` a\n * dot's path per x, `null` on a hole. Built once per change to the data or the axis, so\n * moving the pointer from x to x, which re-renders the hover layer, rebuilds no path.\n */\n protected readonly drawn = computed(() => {\n const dots = this.showDots();\n return this.plottedSeries().map(s => ({\n index: s.index,\n color: s.color,\n dash: s.dash,\n d: this.pathFor(s.tops),\n dots: dots ? s.tops.map((v, i) => (v === null ? null : this.dotPath(this.pointX(i), this.pointY(v)))) : [],\n }));\n });\n\n /**\n * The fills under the lines with `showArea`: one per unbroken run of two points or\n * more, from the line down to zero, or down to the top of the band below under\n * `stacked`. A run of one point has no width to fill. Keyed by the series' position\n * and the run's first x, so a run that moves is a new fill.\n */\n protected readonly areas = computed(() => {\n if (!this.showArea() || this.pointCount() <= 1) return [];\n return this.plottedSeries().flatMap(s => {\n const fills: { key: string; color: string; d: string }[] = [];\n let start = -1;\n const close = (end: number): void => {\n if (start >= 0 && end - start >= 2) {\n fills.push({ key: `${s.index}:${start}`, color: s.color, d: this.areaPath(s, start, end) });\n }\n start = -1;\n };\n s.tops.forEach((v, i) => {\n if (v === null) close(i);\n else if (start < 0) start = i;\n });\n close(s.tops.length);\n return fills;\n });\n });\n\n /** One fill: along the run's plotted values, then back along its base, from `start` up to `end`. */\n private areaPath(series: PlottedSeries, start: number, end: number): string {\n const at = (i: number, value: number): string => `${this.pointX(i).toFixed(2)} ${this.pointY(value).toFixed(2)}`;\n const commands: string[] = [];\n for (let i = start; i < end; i++) commands.push(`${i === start ? 'M' : 'L'} ${at(i, series.tops[i] ?? 0)}`);\n for (let i = end - 1; i >= start; i--) commands.push(`L ${at(i, series.bases?.[i] ?? 0)}`);\n commands.push('Z');\n return commands.join(' ');\n }\n\n /** A point's x in the viewBox — a lone point in the middle, as the sparkline draws one. */\n protected pointX(index: number): number {\n const count = this.pointCount();\n if (count <= 1) return this.vbW / 2;\n return (index / (count - 1)) * this.vbW;\n }\n\n protected pointY(value: number): number {\n const { min, max } = this.bounds();\n return ((max - value) / (max - min)) * this.vbH;\n }\n\n /**\n * A point's x as a percentage of the drawing's width, which the SVG stretches to. The\n * x labels and the tooltip are placed with it, in a box as wide as the plot: the\n * stylesheet adds the plot's inline padding, so they land on the point at any size.\n */\n protected xPercent(index: number): number {\n return (this.pointX(index) / this.vbW) * 100;\n }\n\n /**\n * How far apart two neighbouring printed labels are, as a percentage of the drawing's\n * width — the room each x label has, half on either side of its point: the distance\n * between two points times the step `xAxis` prints at. The stylesheet bounds a label to\n * it, cut back at the ends of the strip, and ellipsises past that. Centring a label on its\n * point says nothing about its WIDTH, and with no bound at all twelve month names printed\n * over each other and the last one hung outside the chart.\n */\n protected readonly xSlot = computed(() => {\n const count = this.pointCount();\n // A single label has no neighbour to collide with and the whole strip to sit in.\n return count <= 1 ? 100 : Math.min(100, (100 * this.xAxis().every) / (count - 1));\n });\n\n /**\n * Every x label once, a line each: the hidden copy the labels' room is measured against.\n * Laid out as wide as its widest line, so it measures the widest label rather than the\n * one with the most characters — `WWWWW` is wider than `iiiiiii`.\n */\n protected readonly probeText = computed(() =>\n [...new Set(this.xLabels().map(label => label.replace(/\\r\\n?|\\n/g, ' ')))].join('\\n')\n );\n\n /**\n * Which x labels print. Every one while the widest label and a gap fit between two\n * points, as before there was any thinning; otherwise every `every`-th from the first,\n * the smallest step whose labels keep that gap — the first label included, which the\n * strip's start moves inwards when it is wider than the room before its point — and the\n * last one printed is left out if moving it inwards from the strip's end brings it\n * within the gap of the one before. The step is decided in a browser from the widest\n * label as laid out and the drawing's width, and against `ASSUMED_WIDTH` and seven\n * pixels a character before that, so the server thins a long axis too.\n *\n * Only the printed labels render: a label laid out and hidden still costs its share of\n * every resize.\n */\n protected readonly xAxis = computed(() => {\n const labels = this.xLabels();\n const count = this.pointCount();\n const measured = this.measured();\n const width = measured?.width ?? ASSUMED_WIDTH;\n const inset = measured?.inset ?? ASSUMED_INSET;\n const strip = width + 2 * inset;\n const longest = labels.reduce((most, label) => Math.max(most, label.length), 0);\n const label = Math.min(measured && measured.label > 0 ? measured.label : longest * CHAR_WIDTH, strip);\n const step = count <= 1 ? strip : width / (count - 1);\n /** Where a printed label's box starts, in px from the strip's start: centred on its point, moved in at either end. */\n const start = (index: number): number =>\n wrClamp(inset + this.pointX(index) * (width / this.vbW) - label / 2, 0, strip - label);\n // A hair of slack on every comparison, so the regular spacing never fails on a rounding.\n const crowds = (from: number, previousEnd: number): boolean => from + 1e-6 < previousEnd + LABEL_GAP;\n\n let every = count <= 1 ? 1 : Math.max(1, Math.ceil((label + LABEL_GAP - 1e-6) / step));\n while (every < labels.length - 1 && crowds(start(every), start(0) + label)) every++;\n\n const ticks: { readonly index: number; readonly label: string; readonly x: number }[] = [];\n let end = Number.NEGATIVE_INFINITY;\n for (let index = 0; index < labels.length; index += every) {\n const from = start(index);\n if (every > 1 && crowds(from, end)) break;\n ticks.push({ index, label: labels[index], x: this.xPercent(index) });\n end = from + label;\n }\n return { every, ticks };\n });\n\n /**\n * The hovered x's readings, one per series shown that has one. Each marker sits where\n * the series is drawn, which under `stacked` is the top of its band, while the row\n * reads the series' own value.\n */\n protected readonly hoverPoints = computed(() => {\n const i = this.activeIndex();\n if (i === null) return [];\n return this.plottedSeries().flatMap(s => {\n // Past the end of a short series, or on a hole in a longer one — either way there\n // is no reading at this x, so the series contributes neither a marker nor a row.\n const value = s.data[i];\n const plotted = s.tops[i];\n if (value === undefined || value === null || plotted === undefined || plotted === null) return [];\n const text = this.numbers.value(value);\n return [\n { index: s.index, label: s.label, value, text, color: s.color, x: this.pointX(i), y: this.pointY(plotted) },\n ];\n });\n });\n\n protected readonly hoverLabel = computed(() => {\n const i = this.activeIndex();\n if (i === null) return '';\n return this.xLabels()[i] ?? this.ordinals.format(i + 1);\n });\n\n /**\n * The point under the pointer. A MOUSE event, as the sparkline's is: a tap fires\n * `pointerdown`, `pointerup` and `pointerleave` and no `pointermove`, then the\n * compatibility `mousemove`, so a `pointermove` listener never opened the readout on\n * a phone and the `pointerleave` closed whatever it had. Every other chart opens on\n * the compatibility events a tap fires.\n *\n * Heard on the whole plot and measured against the drawing inside it. The drawing\n * runs edge to edge, so the first and last dots overhang it into the plot's padding;\n * listening on the drawing alone closed the readout on the outer half of either dot.\n * Over the padding the nearest point is the end one, so the index is clamped.\n */\n protected onPointerMove(event: MouseEvent): void {\n if (!this.tooltip()) return;\n const count = this.pointCount();\n const box = this.svg().nativeElement.getBoundingClientRect();\n if (count === 0 || box.width <= 0) return;\n const ratio = (event.clientX - box.left) / box.width;\n const i = count === 1 ? 0 : wrClamp(Math.round(ratio * (count - 1)), 0, count - 1);\n if (i === this.dismissed) return;\n this.dismissed = null;\n this.hoveredIndex.set(i);\n }\n\n protected onPointerLeave(): void {\n this.dismissed = null;\n this.hoveredIndex.set(null);\n }\n\n /** A zero-length line at a point, which a round cap paints as a dot. */\n protected dotPath(x: number, y: number): string {\n return `M ${x.toFixed(2)} ${y.toFixed(2)} h 0`;\n }\n\n /**\n * Read the drawing's width, the plot's inline padding and the widest x label off the\n * layout. A hidden chart measures 0 and keeps its last reading rather than thin to\n * nothing; with no label to measure the estimate stays in charge.\n */\n private measure(): void {\n const box = this.svg().nativeElement.getBoundingClientRect();\n if (box.width <= 0) return;\n const inset = box.left - this.plot().nativeElement.getBoundingClientRect().left;\n const label = this.probe()?.nativeElement.getBoundingClientRect().width ?? 0;\n const last = this.measured();\n if (last?.width === box.width && last.inset === inset && last.label === label) return;\n this.measured.set({ width: box.width, inset, label });\n }\n\n /**\n * Place the readout clear of the markers it reads. Over the crosshair at the top of the\n * plot, as it always sat, while that covers none of them; else at the bottom, while that\n * covers none; else beside the crosshair at the top, on the side with more room, which\n * covers none of them as long as it fits there — every marker is on the crosshair. Where\n * each covers some, the one that covers fewest, in that order on a tie.\n *\n * Every candidate is worked out from the readout's own size and from how far inside the\n * drawing's edge it sits, which is the same at the top and, moved below, at the bottom —\n * so the choice never depends on where it is now, and settles in one pass.\n */\n private placeTooltip(points: readonly { readonly x: number; readonly y: number }[], tooltip: HTMLElement): void {\n const box = this.svg().nativeElement.getBoundingClientRect();\n const plot = this.plot().nativeElement.getBoundingClientRect();\n const rect = tooltip.getBoundingClientRect();\n if (box.height <= 0 || rect.height <= 0 || rect.width <= 0) return;\n const current = this.tooltipPlacement();\n const inset = current === 'below' ? box.bottom - rect.bottom : rect.top - box.top;\n const { width, height } = rect;\n // Every marker of one x is on the crosshair.\n const x = box.left + (points[0].x / this.vbW) * box.width;\n const ys = points.map(p => box.top + (p.y / this.vbH) * box.height);\n /** Held inside the plot, as the stylesheet's clamp holds it. */\n const across = (left: number): number => wrClamp(left, plot.left, plot.right - width);\n const top = box.top + inset;\n const candidates: readonly { placement: TooltipPlacement; left: number; top: number }[] = [\n { placement: 'top', left: across(x - width / 2), top },\n { placement: 'below', left: across(x - width / 2), top: box.bottom - inset - height },\n x - plot.left > plot.right - x\n ? { placement: 'left', left: across(x - BESIDE - width), top }\n : { placement: 'right', left: across(x + BESIDE), top },\n ];\n const covers = (c: { left: number; top: number }): number =>\n x + HOVER_RADIUS > c.left && x - HOVER_RADIUS < c.left + width\n ? ys.filter(y => y + HOVER_RADIUS > c.top && y - HOVER_RADIUS < c.top + height).length\n : 0;\n let best = candidates[0];\n let fewest = covers(best);\n for (const candidate of candidates.slice(1)) {\n if (fewest === 0) break;\n const count = covers(candidate);\n if (count < fewest) {\n best = candidate;\n fewest = count;\n }\n }\n if (best.placement !== current) this.tooltipPlacement.set(best.placement);\n }\n\n /**\n * The y-axis labels, top to bottom, in the reader's own language — and decided for\n * the AXIS, not one tick at a time (`useChartNumbers().ticks`).\n *\n * Compact, through `Intl` (`1.2K`, `3.4M`, `4 Mio.`, `5 тыс.`): the abbreviation used\n * to be a `k` from the catalog beside digits from `Intl`, which no locale's own\n * convention matched past the thousands, and `Intl` knows each one's units — German\n * abbreviates no thousands at all, Japanese counts in ten-thousands. Each tick gets\n * exactly the significant digits the STEP needs, and when abbreviating would make the\n * labels LONGER the whole axis is written in full instead, so no axis mixes `-1K`\n * with `-1,025`.\n */\n protected readonly tickLabels = computed<readonly string[]>(() =>\n this.numbers.ticks(\n this.yTicks().map(tick => tick.value),\n this.bounds().step\n )\n );\n\n /**\n * Each y label beside the y of its gridline, as a percentage of the drawing's height.\n * The stylesheet places a label from that number inside the plot's block padding, the\n * way the x labels are placed from `xPercent`, so a label meets its line at any height\n * whatever the labels around it measure.\n */\n protected readonly yAxis = computed(() => {\n const labels = this.tickLabels();\n return this.yTicks().map((tick, i) => ({ label: labels[i], y: (tick.y / this.vbH) * 100 }));\n });\n\n protected readonly viewBox = computed(() => `0 0 ${this.vbW} ${this.vbH}`);\n\n /**\n * The figures for `dataTable`: the plot's name as the caption, a column per series\n * shown and a row per x, headed as the tooltip heads it. Each cell is the series' own\n * value, stacked or not, written as the tooltip writes it, and empty on a hole. With\n * every series hidden there is nothing to tabulate, and no rows.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const series = this.visibleSeries();\n const labels = this.xLabels();\n const rows =\n series.length === 0\n ? []\n : Array.from({ length: this.pointCount() }, (_, i) => ({\n header: labels[i] ?? this.ordinals.format(i + 1),\n cells: series.map(s => {\n const value = s.data[i];\n return value === undefined || value === null ? '' : this.numbers.value(value);\n }),\n }));\n return { caption: this.resolvedAriaLabel(), columns: series.map(s => s.label), groups: [{ rows }] };\n });\n}\n\nexport type { WrLineSeries } from './types';\n","@let hovered = activeIndex();\n@if (showLegend() && resolvedSeries().length > 0) {\n <!-- Every row keys its series by the series' own dash rather than a solid block: a\n coloured square leaves the reader to match it to the LINE, and matching by colour\n is the step the patterns exist to remove. Rows are tracked by position, so two\n series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-line-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n ></ul>\n}\n\n<!-- Two columns: the y-axis labels at inline start, the drawing beside them, and the\n x labels under the drawing only, so their percentages are the drawing's. -->\n<div class=\"wr-line-chart__body\">\n @if (showGrid()) {\n <!-- The tick labels are HTML beside the drawing rather than `<text>` inside it: the\n drawing stretches with `preserveAspectRatio=\"none\"` and its type stretched with\n it. In flow, so the column is exactly as wide as the longest label; each one\n hands the stylesheet the y of its own gridline, as the x labels hand it their x.\n Hidden, as they were inside the plot's `img`: the plot's name is what is\n announced. -->\n <div class=\"wr-line-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yAxis(); track $index) {\n <span class=\"wr-line-chart__tick\" [style.--wr-line-chart-y]=\"tick.y\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-line-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"onPointerLeave()\"\n >\n <!-- Named, where it was the only unnamed element in the component. The legend\n swatch is an `<svg>` too now, so `querySelector('svg')` no longer means\n \"the chart\" — and a plot that nothing can address by name is one a\n consumer's stylesheet and a spec both have to reach by position. -->\n <svg #svg class=\"wr-line-chart__svg\" [attr.viewBox]=\"viewBox()\" preserveAspectRatio=\"none\">\n @if (showGrid()) {\n @for (tick of yTicks(); track tick.value) {\n <!-- The colour is the stylesheet's, from `--wr-line-chart-grid-color`, so forced\n colors can swap it for the system's own. -->\n <line\n class=\"wr-line-chart__grid-line\"\n x1=\"0\"\n [attr.x2]=\"vbW\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n stroke-width=\"1\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n <!-- Every fill before every line, so the lines and their dashes stay on top where\n the fills overlap and the series are still told apart by shape. The opacity is\n the stylesheet's, from `--wr-line-chart-area-opacity`. -->\n @for (area of areas(); track area.key) {\n <path class=\"wr-line-chart__area\" [attr.d]=\"area.d\" [attr.fill]=\"area.color\" stroke=\"none\" />\n }\n\n <!-- By position, not by label: two series may share one, and a duplicate key\n makes Angular re-create rows it cannot tell apart. Each is drawn at its\n plotted values, which under `stacked` are the tops of its band. Every path is\n built once per data change (`drawn`), so hovering rebuilds none of them. -->\n @for (s of drawn(); track s.index) {\n <path\n class=\"wr-line-chart__line\"\n [attr.d]=\"s.d\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-dasharray]=\"s.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n @for (dot of s.dots; track $index) {\n <!-- A hole in the data gets no dot: the index still belongs to it, so the\n points after it stay on their own x. A dot is a zero-length line with a\n round cap and a non-scaling stroke, which stays a 6px circle however the\n drawing stretches; a `<circle>` scaled with it, into a 3 × 5px oval on a\n phone and a 9 × 5px one at 1920px. -->\n @if (dot !== null) {\n <path\n class=\"wr-line-chart__dot\"\n [attr.d]=\"dot\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n }\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <line\n class=\"wr-line-chart__crosshair\"\n [attr.x1]=\"pointX(hovered)\"\n [attr.x2]=\"pointX(hovered)\"\n y1=\"0\"\n [attr.y2]=\"vbH\"\n stroke-width=\"1\"\n stroke-dasharray=\"3 3\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- A ring of the series' colour round a surface-coloured centre, drawn the way a\n dot is and for the same reason. The centre's colour is the stylesheet's, from\n `--wr-line-chart-hover-center`. -->\n @for (p of hoverPoints(); track p.index) {\n <path\n class=\"wr-line-chart__hover-dot\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n [attr.stroke]=\"p.color\"\n stroke-width=\"12\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n class=\"wr-line-chart__hover-dot-center\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n stroke-width=\"8\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n </svg>\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <!-- The layer covers the plot and is what the tooltip's `cqw` measures. It is out of\n flow, so the containment it turns on costs the plot's own sizing nothing. The\n tooltip takes the same `--wr-line-chart-x` the x labels take, and the same\n clamp: centred on its point, never past either end. At the top of the plot, or\n where that would cover a marker it reads, at the bottom (`--below`) or beside the\n crosshair (`--left`, `--right`). -->\n <div class=\"wr-line-chart__tooltip-layer\">\n <div\n #tooltip\n class=\"wr-line-chart__tooltip\"\n [class.wr-line-chart__tooltip--below]=\"tooltipPlacement() === 'below'\"\n [class.wr-line-chart__tooltip--left]=\"tooltipPlacement() === 'left'\"\n [class.wr-line-chart__tooltip--right]=\"tooltipPlacement() === 'right'\"\n [style.--wr-line-chart-x]=\"xPercent(hovered)\"\n >\n <div class=\"wr-line-chart__tooltip-label\">{{ hoverLabel() }}</div>\n @for (p of hoverPoints(); track p.index) {\n <div class=\"wr-line-chart__tooltip-row\">\n <span class=\"wr-line-chart__swatch\" [style.background]=\"p.color\"></span>\n <span class=\"wr-line-chart__tooltip-name\">{{ p.label }}</span>\n <span class=\"wr-line-chart__tooltip-value\">{{ p.text }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n @if (xLabels().length > 0) {\n <!-- The strip is as wide as the plot, and hands the stylesheet the distance between\n two printed labels; each label hands it the x of the point it names. Both are\n percentages of the drawing's width, so they track the drawing at any size: the\n stylesheet centres a label on its point and ellipsises it past its slot. Laying the\n labels out as equal centred flex slots instead is bar-chart geometry: only the\n middle label landed on its dot, and the outer ones sat up to half a column away.\n The hidden copy of every label, a line each, is what the room they need is\n measured against: it is as wide as the widest. -->\n <div class=\"wr-line-chart__x-labels\" [style.--wr-line-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-line-chart__x-probe\" aria-hidden=\"true\">{{ probeText() }}</span>\n @for (tick of xAxis().ticks; track tick.index) {\n <span class=\"wr-line-chart__x-label\" [style.--wr-line-chart-x]=\"tick.x\">{{ tick.label }}</span>\n }\n </div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AA8CA,MAAM,gBAAgB;AAGtB,MAAM,gBAAgB;AAGtB,MAAM,aAAa;AAGnB,MAAM,YAAY;AAGlB,MAAM,eAAe;AAMrB,MAAM,SAAS;AAwEf,IAAa,cAAb,MAAa,YAAW;CAKb,SAAS,MAA+B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAQ3C,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE9B,YAAY,YAAY,KAAK,WAAW,mBAAmB,YAAY;CACvE,YAAY,YAAY,KAAK,WAAW,uBAAuB,YAAY;CAGzE,oBAAoB,eAAgB,KAAK,SAAQ,IAAK,KAAK,UAAS,IAAK,KAAK,UAAS,GAAI,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAOrG,cAAc,MAA0C,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA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A;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-charts-line-chart.mjs","names":["DOCUMENT"],"sources":["../../../projects/lib/charts/line-chart/line-chart.ts","../../../projects/lib/charts/line-chart/line-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n LOCALE_ID,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { WR_CHART_LEGEND_BLOCK, WrChartLegend, type WrChartLegendItem } from 'ngwr/charts/chart-legend';\nimport {\n WrChartTable,\n type WrChartTableData,\n wrChartAxis,\n wrChartColor,\n wrChartDash,\n useChartNumbers,\n} from 'ngwr/charts/core';\nimport { useI18nText } from 'ngwr/i18n';\nimport { wrClamp, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrLineSeries } from './types';\n\n/**\n * The drawing's width in CSS px, assumed until a browser has measured it: what the server\n * and the first paint thin the x labels against.\n */\nconst ASSUMED_WIDTH = 560;\n\n/** The plot's inline padding in CSS px — `--wr-line-chart-plot-inset-x` — until measured. */\nconst ASSUMED_INSET = 16;\n\n/** How wide a character of an x label is taken to be, in CSS px, before a browser has measured the widest. */\nconst CHAR_WIDTH = 7;\n\n/** The least room between two printed x labels, in CSS px. */\nconst LABEL_GAP = 8;\n\n/** The hover marker's radius in CSS px: half the 12px stroke its ring is drawn with. */\nconst HOVER_RADIUS = 6;\n\n/**\n * How far a readout set beside the crosshair (`--left` / `--right`) keeps from it, in CSS\n * px: the marker's radius and as much again. The stylesheet's `$beside`.\n */\nconst BESIDE = 12;\n\n/**\n * Where the readout sits: over the crosshair at the top of the plot, over it at the bottom,\n * or at the top beside it on either side. Physical, as the drawing's own x is.\n */\ntype TooltipPlacement = 'top' | 'below' | 'left' | 'right';\n\n/** What a browser measured, in CSS px: the drawing's width, the plot's inline padding and the widest x label. */\ninterface Measured {\n readonly width: number;\n readonly inset: number;\n readonly label: number;\n}\n\n/** A series as it is drawn: `tops` is what each x is plotted at, `bases` where its band starts under `stacked`. */\ninterface PlottedSeries {\n readonly index: number;\n readonly label: string;\n readonly dash: string;\n readonly color: string;\n readonly data: readonly (number | null)[];\n readonly tops: readonly (number | null)[];\n readonly bases: readonly (number | null)[] | null;\n}\n\n/**\n * Multi-series line chart with axes, gridlines, and a hover tooltip.\n * SVG-only — no external dependency.\n *\n * @example\n * ```html\n * <wr-line-chart\n * [series]=\"[\n * { label: 'Visits', data: [12, 18, 9, 22, 30, 27, 35] },\n * { label: 'Signups', data: [3, 5, 4, 8, 11, 9, 14], color: 'var(--wr-color-success)' }\n * ]\"\n * [xLabels]=\"['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\"\n * />\n * ```\n *\n * The legend is a `ul[wr-chart-legend]` (`ngwr/charts/chart-legend`), and with\n * `toggleableLegend` its rows show and hide their series through `hiddenSeries`.\n *\n * An AREA chart is this one with `showArea`, which fills under every line down to\n * zero, and `stacked` piles the series on each other so the top line reads the total:\n *\n * ```html\n * <wr-line-chart [series]=\"series\" [xLabels]=\"labels\" showArea stacked />\n * ```\n *\n * The x labels are printed every one while the widest fits between two points, and every\n * n-th otherwise, so a long axis keeps whole labels rather than a row of ellipses; the\n * tooltip and the data table name every x. The drawing keeps time running left to right\n * under RTL, as every SVG chart here does; the y labels move to the right of it.\n *\n * @see https://ngwr.dev/charts/line-chart\n */\n@Component({\n selector: 'wr-line-chart',\n templateUrl: './line-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-line-chart',\n '[class.wr-line-chart--area]': 'showArea()',\n '[class.wr-line-chart--stacked]': 'stacked()',\n },\n imports: [WrChartLegend, WrChartTable],\n // The legend's rows keep the classes this chart drew before it drew them through\n // `WrChartLegend`: `.wr-line-chart__legend-item`, `__swatch` and `__legend-label`.\n viewProviders: [{ provide: WR_CHART_LEGEND_BLOCK, useValue: 'wr-line-chart' }],\n})\nexport class WrLineChart {\n /**\n * One entry per line. A series with no `color` takes the next entry from the\n * chart's fallback palette, so several lines are distinguishable unconfigured.\n */\n readonly series = input<readonly WrLineSeries[]>([]);\n\n /**\n * Accessible name of the chart. The legend carries the series NAMES only — the numbers\n * are nowhere in text unless `dataTable` puts them there — so without this the plot is\n * nothing at all to a screen reader. Falls back to `lineChart.label`, or to\n * `lineChart.areaLabel` with `showArea`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly lineLabel = useI18nText(this.ariaLabel, 'lineChart.label', 'Line chart');\n private readonly areaLabel = useI18nText(this.ariaLabel, 'lineChart.areaLabel', 'Area chart');\n\n /** The plot's name, which the data table takes as its caption. */\n protected readonly resolvedAriaLabel = computed(() => (this.showArea() ? this.areaLabel() : this.lineLabel()));\n\n /**\n * Writes every number the chart shows: the y-axis ticks and the tooltip values.\n * `null` uses `Intl.NumberFormat` in `LOCALE_ID`, with compact ticks (`1.2K`, `3.4M`)\n * unless the full numbers are shorter.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The tooltip's exact figures and the axis' compact ticks, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n /**\n * Labels for the X axis (one per data point). Printed every one while the widest fits\n * between two points, and every n-th otherwise. An x past the end of this list is named\n * by its position, counting from 1, in `LOCALE_ID`'s digits, in the tooltip and the data\n * table.\n */\n readonly xLabels = input<readonly string[]>([]);\n\n /** Chart pixel height. @default 240 */\n readonly height = input(240, { transform: (v: unknown): number => Math.max(80, coerceNumberProperty(v, 240)) });\n\n /** Show gridlines + axis ticks. @default true */\n readonly showGrid = input(true, { transform: coerceBooleanProperty });\n\n /** Show the legend above the chart. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Make each legend row a toggle button that shows and hides its series, through\n * `hiddenSeries`. A row is a `<button aria-pressed>`, pressed while its series is\n * shown, so the legend becomes one tab stop per series. @default false\n */\n readonly toggleableLegend = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `series` of the series that are hidden. Positions rather than\n * labels, since two series may share a label. A toggleable legend writes it, and a\n * host may bind it with or without one: `[(hiddenSeries)]`.\n *\n * A hidden series is left out of everything that reads its values. It draws no line\n * and no dots, it has no row or ring in the tooltip, and the y axis is fitted to the\n * series still shown, so hiding a large series lets the small ones fill the plot. The\n * x axis does not change, because its length belongs to the chart (`xLabels`) rather\n * than to one series, and the lines still shown keep their positions. The legend keeps\n * the hidden series' row, struck through, so it can be shown again; the row says\n * \"hidden\" to a screen reader as well, through `aria-pressed` on a toggle and a\n * visually hidden word otherwise. With every series\n * hidden the plot is the empty 0 to 1 frame. A position past the end of `series` is\n * kept and ignored.\n */\n readonly hiddenSeries = model<readonly number[]>([]);\n\n /** Show dots at each data point. @default true */\n readonly showDots = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Fill the space under each line, down to zero, which makes this an area chart.\n *\n * Each unbroken run of a series is one fill (`.wr-line-chart__area`) in the series'\n * colour at `--wr-line-chart-area-opacity`. A hole in the data breaks the fill as it\n * breaks the line, and a lone point between two holes has nothing to fill. Every fill\n * is drawn under every line, so the lines and their dashes stay on top and the series\n * are still told apart by shape where the fills overlap. The y axis takes zero in,\n * since the fills reach it: an all-negative series fills up to a zero at the top of\n * the plot. The plot's name falls back to `lineChart.areaLabel`. @default false\n */\n readonly showArea = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Stack the series on each other in order, so at every x each series is drawn on top\n * of the ones before it and the top line reads the total.\n *\n * Positive values stack up from zero and negative values stack down from it, each sign\n * on its own, so no band crosses another at a point. A hole, or the missing end of a\n * shorter series, adds nothing to the stack and breaks that series' own line. The\n * lines, the dots, the hover markers and the y axis follow the stacked tops; the\n * tooltip and the data table keep each series' own value, which is the figure a reader\n * asks for. A series hidden through `hiddenSeries` leaves the stack. With `showArea`\n * each band fills from the series below to its own line, and the fill is stronger,\n * since the bands do not overlap. @default false\n */\n readonly stacked = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Render the chart's figures as a table that only assistive technology reaches: a row\n * per x, headed by its x label, and a column per series shown, every value written the\n * way the tooltip writes it. A hole is an empty cell.\n *\n * The plot is one named `role=\"img\"`, which hides everything inside it, so without\n * the table the numbers are nowhere a screen reader can walk. It is rendered beside\n * the plot, clipped to nothing: it takes no room, draws nothing and holds no tab stop.\n * A stacked chart's table keeps each series' own values, and a hidden series leaves\n * it. @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Show the hover readout: the crosshair, the point markers and the tooltip. Off\n * drops all three, since a crosshair with no values beside it points at nothing.\n * @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Drawn edge to edge in a 600×300 viewBox that stretches to the plot. Nothing in it is\n * text: the tick labels used to be `<text>` in here, and with\n * `preserveAspectRatio=\"none\"` a glyph stretches with the drawing, while the 36 units\n * kept for them at the left were a different width in pixels at every size. They are\n * HTML beside the drawing now, in a gutter as wide as its longest label, and the space\n * round the lines is CSS padding on the plot.\n */\n protected readonly vbW = 600;\n protected readonly vbH = 300;\n\n private readonly svg = viewChild.required<ElementRef<SVGSVGElement>>('svg');\n\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n\n private readonly probe = viewChild<ElementRef<HTMLElement>>('probe');\n\n private readonly tooltipEl = viewChild<ElementRef<HTMLElement>>('tooltip');\n\n /** An x with no label of its own, by its position from 1 in the reader's own digits. */\n private readonly ordinals = new Intl.NumberFormat(inject(LOCALE_ID));\n\n /** What a browser measured, once it has: `null` on the server and until the first render. */\n private readonly measured = signal<Measured | null>(null);\n\n /**\n * Where the readout sits (see `placeTooltip`): at the top of the plot unless that covers\n * a marker it reads. Decided in a browser, from the readout's own size, each time the\n * hovered x changes.\n */\n protected readonly tooltipPlacement = signal<TooltipPlacement>('top');\n\n /** Hovered point index (across all series) — null when no hover. */\n protected readonly hoveredIndex = signal<number | null>(null);\n\n /** The hovered index while the readout is on, so turning `tooltip` off mid-hover clears it. */\n protected readonly activeIndex = computed(() => (this.tooltip() ? this.hoveredIndex() : null));\n\n /**\n * The index Escape dismissed. It stays shut while the pointer stays on that point —\n * WCAG 1.4.13 asks for dismissal WITHOUT moving the pointer, and every `mousemove`\n * re-reports the point, so a plain close would reopen on the next pixel. The rule\n * the shared chart tooltip follows for the other charts.\n */\n private dismissed: number | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/line-chart');\n // Escape closes the readout wherever focus is, the way it closes every other\n // chart's: nothing in the readout can take focus, so a key handler on the chart\n // would never hear it. Listened for only while the readout is up, which is never\n // on the server.\n const document = inject(DOCUMENT);\n effect(onCleanup => {\n if (this.activeIndex() === null) return;\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape') return;\n this.dismissed = this.hoveredIndex();\n this.hoveredIndex.set(null);\n };\n document.addEventListener('keydown', onKeydown);\n onCleanup(() => document.removeEventListener('keydown', onKeydown));\n });\n\n // Measured after render, in a browser: the drawing's width and the widest x label,\n // which decide how many labels print, and the readout's height, which decides where it\n // sits. Never on the server, which thins the labels against `ASSUMED_WIDTH`.\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const destroyRef = inject(DestroyRef);\n\n afterRenderEffect(() => {\n this.probeText();\n untracked(() => this.measure());\n });\n\n afterRenderEffect(() => {\n const points = this.hoverPoints();\n const tooltip = this.tooltipEl()?.nativeElement;\n if (points.length === 0 || !tooltip) return;\n untracked(() => this.placeTooltip(points, tooltip));\n });\n\n afterNextRender(() => {\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() => this.measure());\n observer.observe(this.svg().nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /**\n * Every series, resolved: its palette colour, its dash (`wrChartDash`, so the lines are\n * told apart by shape and not only by hue, the first one solid) and its data with a\n * HOLE at each non-finite point. Hidden ones included, since the legend lists them.\n *\n * A non-finite point becomes a hole at its own index, not a missing element. It\n * cannot stay a number: `Math.min` and `Math.max` over the pooled data are both NaN\n * as soon as one datum is, so every coordinate in EVERY series came out `NaN`, which\n * is invalid path geometry, and the whole chart vanished rather than the one bad\n * point. But filtering it out closed the gap and slid every LATER point one x-slot to\n * the left, so each of them was drawn under, and reported in the tooltip as, the\n * wrong x label. A gap is kept as a gap and the line is broken across it:\n * interpolating would invent a reading the data never took.\n */\n protected readonly resolvedSeries = computed(() =>\n this.series().map((s, i) => ({\n index: i,\n label: s.label,\n dash: wrChartDash(i),\n data: s.data.map(v => (typeof v === 'number' && Number.isFinite(v) ? v : null)),\n color: s.color ?? wrChartColor(i),\n }))\n );\n\n /** The legend's rows: every series, keyed by its own dash. */\n protected readonly legendItems = computed<readonly WrChartLegendItem[]>(() =>\n this.resolvedSeries().map(({ label, color, dash }) => ({ label, color, dash }))\n );\n\n /** The series drawn, read and fitted to: every one `hiddenSeries` does not name. */\n protected readonly visibleSeries = computed(() => {\n const hidden = new Set(this.hiddenSeries());\n return this.resolvedSeries().filter(s => !hidden.has(s.index));\n });\n\n /**\n * The series drawn, each with the value it is PLOTTED at for every x. That is its own\n * value, except under `stacked`, where it is the top of its band, and `bases` holds\n * where the band starts: zero, or the top of the last series before it on the same\n * side of zero. Positive values pile up and negative ones pile down, each sign on its\n * own, so two bands never cross at a point. A hole stays a hole and adds nothing.\n */\n protected readonly plottedSeries = computed<readonly PlottedSeries[]>(() => {\n const visible = this.visibleSeries();\n if (!this.stacked()) return visible.map(s => ({ ...s, tops: s.data, bases: null }));\n\n // Indexed by x, and sparse: an x no series has reached yet starts from zero.\n const up: number[] = [];\n const down: number[] = [];\n return visible.map(s => {\n const tops: (number | null)[] = [];\n const bases: (number | null)[] = [];\n s.data.forEach((v, i) => {\n if (v === null) {\n tops.push(null);\n bases.push(null);\n return;\n }\n const pile = v < 0 ? down : up;\n const base = pile[i] ?? 0;\n pile[i] = base + v;\n bases.push(base);\n tops.push(base + v);\n });\n return { ...s, tops, bases };\n });\n });\n\n /**\n * The y axis, from `wrChartAxis`, over what is plotted for the series still shown. It\n * floors at zero and never lifts to zero from below, so an all-negative series keeps\n * an axis that ends just above its peak, and it snaps to a readable step: seven\n * integers between 3 and 35 read 0 / 10 / 20 / 30 / 40, where \"the data's max plus\n * 10%, divided into four\" read 38.2 / 28.7 / 19.1 / 9.6 / 0. With nothing to fit, it is\n * the empty 0 to 1 frame.\n *\n * With `showArea` or `stacked` it takes zero in on either side instead: zero is the\n * baseline a fill reaches and the floor a stack starts from, so an axis that stopped\n * short of it would cut the fills off and misstate every band.\n */\n protected readonly bounds = computed(() => {\n // A loop rather than `Math.min(...values)`: a spread of every plotted value overflows\n // the stack past about 125k of them, and the chart rendered nothing at all.\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n for (const s of this.plottedSeries()) {\n for (const v of s.tops) {\n if (v === null) continue;\n if (v < min) min = v;\n if (v > max) max = v;\n }\n }\n if (min > max) return wrChartAxis(Number.NaN, Number.NaN);\n if (this.showArea() || this.stacked()) return wrChartAxis(min, max, { includeZero: true });\n return wrChartAxis(Math.min(0, min), max);\n });\n\n protected readonly pointCount = computed(() => {\n const maxLen = this.resolvedSeries().reduce((acc, s) => Math.max(acc, s.data.length), 0);\n return Math.max(maxLen, this.xLabels().length);\n });\n\n /**\n * Y-axis tick marks, one per `step` from the top down — so every label is a\n * whole multiple of a readable number rather than a quarter of whatever the\n * data happened to reach.\n */\n protected readonly yTicks = computed(() => {\n const { min, max, ticks } = this.bounds();\n return ticks.map(value => ({ value, y: ((max - value) / (max - min)) * this.vbH }));\n });\n\n /**\n * The SVG path for a series' plotted values — one subpath per unbroken run, so a hole\n * in the data leaves a hole in the line rather than a straight segment across it.\n */\n protected pathFor(values: readonly (number | null)[]): string {\n const { min, max } = this.bounds();\n\n const commands: string[] = [];\n let run = 0;\n let last = '';\n // A subpath of one `M` is not stroked at all, so a point with a gap on both sides —\n // or the only point of a one-point chart — would simply vanish when `showDots` is off.\n // Repeating it gives the round linecap something to paint.\n const closeRun = (): void => {\n if (run === 1) commands.push(`L ${last}`);\n run = 0;\n };\n\n values.forEach((v, i) => {\n if (v === null) {\n closeRun();\n return;\n }\n const x = this.pointX(i);\n const y = ((max - v) / (max - min)) * this.vbH;\n last = `${x.toFixed(2)} ${y.toFixed(2)}`;\n commands.push(`${run === 0 ? 'M' : 'L'} ${last}`);\n run++;\n });\n closeRun();\n\n return commands.join(' ');\n }\n\n /**\n * Every series shown as the template draws it: its line's path, and with `showDots` one\n * path holding a subpath per dot, empty when there is none to draw. Built once per change\n * to the data or the axis, so moving the pointer from x to x, which re-renders the hover\n * layer, rebuilds no path.\n */\n protected readonly drawn = computed(() => {\n const dots = this.showDots();\n return this.plottedSeries().map(s => ({\n index: s.index,\n color: s.color,\n dash: s.dash,\n d: this.pathFor(s.tops),\n dots: dots ? this.dotsFor(s.tops) : '',\n }));\n });\n\n /** A series' dots as one path, a subpath each. A hole in the data gets none. */\n private dotsFor(values: readonly (number | null)[]): string {\n const { min, max } = this.bounds();\n const commands: string[] = [];\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n if (v !== null) commands.push(this.dotPath(this.pointX(i), ((max - v) / (max - min)) * this.vbH));\n }\n return commands.join(' ');\n }\n\n /**\n * The fills under the lines with `showArea`: one per unbroken run of two points or\n * more, from the line down to zero, or down to the top of the band below under\n * `stacked`. A run of one point has no width to fill. Keyed by the series' position\n * and the run's first x, so a run that moves is a new fill.\n */\n protected readonly areas = computed(() => {\n if (!this.showArea() || this.pointCount() <= 1) return [];\n return this.plottedSeries().flatMap(s => {\n const fills: { key: string; color: string; d: string }[] = [];\n let start = -1;\n const close = (end: number): void => {\n if (start >= 0 && end - start >= 2) {\n fills.push({ key: `${s.index}:${start}`, color: s.color, d: this.areaPath(s, start, end) });\n }\n start = -1;\n };\n s.tops.forEach((v, i) => {\n if (v === null) close(i);\n else if (start < 0) start = i;\n });\n close(s.tops.length);\n return fills;\n });\n });\n\n /** One fill: along the run's plotted values, then back along its base, from `start` up to `end`. */\n private areaPath(series: PlottedSeries, start: number, end: number): string {\n const at = (i: number, value: number): string => `${this.pointX(i).toFixed(2)} ${this.pointY(value).toFixed(2)}`;\n const commands: string[] = [];\n for (let i = start; i < end; i++) commands.push(`${i === start ? 'M' : 'L'} ${at(i, series.tops[i] ?? 0)}`);\n for (let i = end - 1; i >= start; i--) commands.push(`L ${at(i, series.bases?.[i] ?? 0)}`);\n commands.push('Z');\n return commands.join(' ');\n }\n\n /** A point's x in the viewBox — a lone point in the middle, as the sparkline draws one. */\n protected pointX(index: number): number {\n const count = this.pointCount();\n if (count <= 1) return this.vbW / 2;\n return (index / (count - 1)) * this.vbW;\n }\n\n protected pointY(value: number): number {\n const { min, max } = this.bounds();\n return ((max - value) / (max - min)) * this.vbH;\n }\n\n /**\n * A point's x as a percentage of the drawing's width, which the SVG stretches to. The\n * x labels and the tooltip are placed with it, in a box as wide as the plot: the\n * stylesheet adds the plot's inline padding, so they land on the point at any size.\n */\n protected xPercent(index: number): number {\n return (this.pointX(index) / this.vbW) * 100;\n }\n\n /**\n * How far apart two neighbouring printed labels are, as a percentage of the drawing's\n * width — the room each x label has, half on either side of its point: the distance\n * between two points times the step `xAxis` prints at. The stylesheet bounds a label to\n * it, cut back at the ends of the strip, and ellipsises past that. Centring a label on its\n * point says nothing about its WIDTH, and with no bound at all twelve month names printed\n * over each other and the last one hung outside the chart.\n */\n protected readonly xSlot = computed(() => {\n const count = this.pointCount();\n // A single label has no neighbour to collide with and the whole strip to sit in.\n return count <= 1 ? 100 : Math.min(100, (100 * this.xAxis().every) / (count - 1));\n });\n\n /**\n * Every x label once, a line each: the hidden copy the labels' room is measured against.\n * Laid out as wide as its widest line, so it measures the widest label rather than the\n * one with the most characters — `WWWWW` is wider than `iiiiiii`.\n */\n protected readonly probeText = computed(() =>\n [...new Set(this.xLabels().map(label => label.replace(/\\r\\n?|\\n/g, ' ')))].join('\\n')\n );\n\n /**\n * Which x labels print. Every one while the widest label and a gap fit between two\n * points, as before there was any thinning; otherwise every `every`-th from the first,\n * the smallest step whose labels keep that gap — the first label included, which the\n * strip's start moves inwards when it is wider than the room before its point — and the\n * last one printed is left out if moving it inwards from the strip's end brings it\n * within the gap of the one before. The step is decided in a browser from the widest\n * label as laid out and the drawing's width, and against `ASSUMED_WIDTH` and seven\n * pixels a character before that, so the server thins a long axis too.\n *\n * Only the printed labels render: a label laid out and hidden still costs its share of\n * every resize.\n */\n protected readonly xAxis = computed(() => {\n const labels = this.xLabels();\n const count = this.pointCount();\n const measured = this.measured();\n const width = measured?.width ?? ASSUMED_WIDTH;\n const inset = measured?.inset ?? ASSUMED_INSET;\n const strip = width + 2 * inset;\n const longest = labels.reduce((most, label) => Math.max(most, label.length), 0);\n const label = Math.min(measured && measured.label > 0 ? measured.label : longest * CHAR_WIDTH, strip);\n const step = count <= 1 ? strip : width / (count - 1);\n /** Where a printed label's box starts, in px from the strip's start: centred on its point, moved in at either end. */\n const start = (index: number): number =>\n wrClamp(inset + this.pointX(index) * (width / this.vbW) - label / 2, 0, strip - label);\n // A hair of slack on every comparison, so the regular spacing never fails on a rounding.\n const crowds = (from: number, previousEnd: number): boolean => from + 1e-6 < previousEnd + LABEL_GAP;\n\n let every = count <= 1 ? 1 : Math.max(1, Math.ceil((label + LABEL_GAP - 1e-6) / step));\n while (every < labels.length - 1 && crowds(start(every), start(0) + label)) every++;\n\n const ticks: { readonly index: number; readonly label: string; readonly x: number }[] = [];\n let end = Number.NEGATIVE_INFINITY;\n for (let index = 0; index < labels.length; index += every) {\n const from = start(index);\n if (every > 1 && crowds(from, end)) break;\n ticks.push({ index, label: labels[index], x: this.xPercent(index) });\n end = from + label;\n }\n return { every, ticks };\n });\n\n /**\n * The hovered x's readings, one per series shown that has one. Each marker sits where\n * the series is drawn, which under `stacked` is the top of its band, while the row\n * reads the series' own value.\n */\n protected readonly hoverPoints = computed(() => {\n const i = this.activeIndex();\n if (i === null) return [];\n return this.plottedSeries().flatMap(s => {\n // Past the end of a short series, or on a hole in a longer one — either way there\n // is no reading at this x, so the series contributes neither a marker nor a row.\n const value = s.data[i];\n const plotted = s.tops[i];\n if (value === undefined || value === null || plotted === undefined || plotted === null) return [];\n const text = this.numbers.value(value);\n return [\n { index: s.index, label: s.label, value, text, color: s.color, x: this.pointX(i), y: this.pointY(plotted) },\n ];\n });\n });\n\n protected readonly hoverLabel = computed(() => {\n const i = this.activeIndex();\n if (i === null) return '';\n return this.xLabels()[i] ?? this.ordinals.format(i + 1);\n });\n\n /**\n * The point under the pointer. A MOUSE event, as the sparkline's is: a tap fires\n * `pointerdown`, `pointerup` and `pointerleave` and no `pointermove`, then the\n * compatibility `mousemove`, so a `pointermove` listener never opened the readout on\n * a phone and the `pointerleave` closed whatever it had. Every other chart opens on\n * the compatibility events a tap fires.\n *\n * Heard on the whole plot and measured against the drawing inside it. The drawing\n * runs edge to edge, so the first and last dots overhang it into the plot's padding;\n * listening on the drawing alone closed the readout on the outer half of either dot.\n * Over the padding the nearest point is the end one, so the index is clamped.\n */\n protected onPointerMove(event: MouseEvent): void {\n if (!this.tooltip()) return;\n const count = this.pointCount();\n const box = this.svg().nativeElement.getBoundingClientRect();\n if (count === 0 || box.width <= 0) return;\n const ratio = (event.clientX - box.left) / box.width;\n const i = count === 1 ? 0 : wrClamp(Math.round(ratio * (count - 1)), 0, count - 1);\n if (i === this.dismissed) return;\n this.dismissed = null;\n this.hoveredIndex.set(i);\n }\n\n protected onPointerLeave(): void {\n this.dismissed = null;\n this.hoveredIndex.set(null);\n }\n\n /** A zero-length line at a point, which a round cap paints as a dot. */\n protected dotPath(x: number, y: number): string {\n return `M ${x.toFixed(2)} ${y.toFixed(2)} h 0`;\n }\n\n /**\n * Read the drawing's width, the plot's inline padding and the widest x label off the\n * layout. A hidden chart measures 0 and keeps its last reading rather than thin to\n * nothing; with no label to measure the estimate stays in charge.\n */\n private measure(): void {\n const box = this.svg().nativeElement.getBoundingClientRect();\n if (box.width <= 0) return;\n const inset = box.left - this.plot().nativeElement.getBoundingClientRect().left;\n const label = this.probe()?.nativeElement.getBoundingClientRect().width ?? 0;\n const last = this.measured();\n if (last?.width === box.width && last.inset === inset && last.label === label) return;\n this.measured.set({ width: box.width, inset, label });\n }\n\n /**\n * Place the readout clear of the markers it reads. Over the crosshair at the top of the\n * plot, as it always sat, while that covers none of them; else at the bottom, while that\n * covers none; else beside the crosshair at the top, on the side with more room, which\n * covers none of them as long as it fits there — every marker is on the crosshair. Where\n * each covers some, the one that covers fewest, in that order on a tie.\n *\n * Every candidate is worked out from the readout's own size and from how far inside the\n * drawing's edge it sits, which is the same at the top and, moved below, at the bottom —\n * so the choice never depends on where it is now, and settles in one pass.\n */\n private placeTooltip(points: readonly { readonly x: number; readonly y: number }[], tooltip: HTMLElement): void {\n const box = this.svg().nativeElement.getBoundingClientRect();\n const plot = this.plot().nativeElement.getBoundingClientRect();\n const rect = tooltip.getBoundingClientRect();\n if (box.height <= 0 || rect.height <= 0 || rect.width <= 0) return;\n const current = this.tooltipPlacement();\n const inset = current === 'below' ? box.bottom - rect.bottom : rect.top - box.top;\n const { width, height } = rect;\n // Every marker of one x is on the crosshair.\n const x = box.left + (points[0].x / this.vbW) * box.width;\n const ys = points.map(p => box.top + (p.y / this.vbH) * box.height);\n /** Held inside the plot, as the stylesheet's clamp holds it. */\n const across = (left: number): number => wrClamp(left, plot.left, plot.right - width);\n const top = box.top + inset;\n const candidates: readonly { placement: TooltipPlacement; left: number; top: number }[] = [\n { placement: 'top', left: across(x - width / 2), top },\n { placement: 'below', left: across(x - width / 2), top: box.bottom - inset - height },\n x - plot.left > plot.right - x\n ? { placement: 'left', left: across(x - BESIDE - width), top }\n : { placement: 'right', left: across(x + BESIDE), top },\n ];\n const covers = (c: { left: number; top: number }): number =>\n x + HOVER_RADIUS > c.left && x - HOVER_RADIUS < c.left + width\n ? ys.filter(y => y + HOVER_RADIUS > c.top && y - HOVER_RADIUS < c.top + height).length\n : 0;\n let best = candidates[0];\n let fewest = covers(best);\n for (const candidate of candidates.slice(1)) {\n if (fewest === 0) break;\n const count = covers(candidate);\n if (count < fewest) {\n best = candidate;\n fewest = count;\n }\n }\n if (best.placement !== current) this.tooltipPlacement.set(best.placement);\n }\n\n /**\n * The y-axis labels, top to bottom, in the reader's own language — and decided for\n * the AXIS, not one tick at a time (`useChartNumbers().ticks`).\n *\n * Compact, through `Intl` (`1.2K`, `3.4M`, `4 Mio.`, `5 тыс.`): the abbreviation used\n * to be a `k` from the catalog beside digits from `Intl`, which no locale's own\n * convention matched past the thousands, and `Intl` knows each one's units — German\n * abbreviates no thousands at all, Japanese counts in ten-thousands. Each tick gets\n * exactly the significant digits the STEP needs, and when abbreviating would make the\n * labels LONGER the whole axis is written in full instead, so no axis mixes `-1K`\n * with `-1,025`.\n */\n protected readonly tickLabels = computed<readonly string[]>(() =>\n this.numbers.ticks(\n this.yTicks().map(tick => tick.value),\n this.bounds().step\n )\n );\n\n /**\n * Each y label beside the y of its gridline, as a percentage of the drawing's height.\n * The stylesheet places a label from that number inside the plot's block padding, the\n * way the x labels are placed from `xPercent`, so a label meets its line at any height\n * whatever the labels around it measure.\n */\n protected readonly yAxis = computed(() => {\n const labels = this.tickLabels();\n return this.yTicks().map((tick, i) => ({ label: labels[i], y: (tick.y / this.vbH) * 100 }));\n });\n\n protected readonly viewBox = computed(() => `0 0 ${this.vbW} ${this.vbH}`);\n\n /**\n * The figures for `dataTable`: the plot's name as the caption, a column per series\n * shown and a row per x, headed as the tooltip heads it. Each cell is the series' own\n * value, stacked or not, written as the tooltip writes it, and empty on a hole. With\n * every series hidden there is nothing to tabulate, and no rows.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const series = this.visibleSeries();\n const labels = this.xLabels();\n const rows =\n series.length === 0\n ? []\n : Array.from({ length: this.pointCount() }, (_, i) => ({\n header: labels[i] ?? this.ordinals.format(i + 1),\n cells: series.map(s => {\n const value = s.data[i];\n return value === undefined || value === null ? '' : this.numbers.value(value);\n }),\n }));\n return { caption: this.resolvedAriaLabel(), columns: series.map(s => s.label), groups: [{ rows }] };\n });\n}\n\nexport type { WrLineSeries } from './types';\n","@let hovered = activeIndex();\n@if (showLegend() && resolvedSeries().length > 0) {\n <!-- Every row keys its series by the series' own dash rather than a solid block: a\n coloured square leaves the reader to match it to the LINE, and matching by colour\n is the step the patterns exist to remove. Rows are tracked by position, so two\n series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-line-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n ></ul>\n}\n\n<!-- Two columns: the y-axis labels at inline start, the drawing beside them, and the\n x labels under the drawing only, so their percentages are the drawing's. -->\n<div class=\"wr-line-chart__body\">\n @if (showGrid()) {\n <!-- The tick labels are HTML beside the drawing rather than `<text>` inside it: the\n drawing stretches with `preserveAspectRatio=\"none\"` and its type stretched with\n it. In flow, so the column is exactly as wide as the longest label; each one\n hands the stylesheet the y of its own gridline, as the x labels hand it their x.\n Hidden, as they were inside the plot's `img`: the plot's name is what is\n announced. -->\n <div class=\"wr-line-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yAxis(); track $index) {\n <span class=\"wr-line-chart__tick\" [style.--wr-line-chart-y]=\"tick.y\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-line-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n (mousemove)=\"onPointerMove($event)\"\n (mouseleave)=\"onPointerLeave()\"\n >\n <!-- Named, where it was the only unnamed element in the component. The legend\n swatch is an `<svg>` too now, so `querySelector('svg')` no longer means\n \"the chart\" — and a plot that nothing can address by name is one a\n consumer's stylesheet and a spec both have to reach by position. -->\n <svg #svg class=\"wr-line-chart__svg\" [attr.viewBox]=\"viewBox()\" preserveAspectRatio=\"none\">\n @if (showGrid()) {\n @for (tick of yTicks(); track tick.value) {\n <!-- The colour is the stylesheet's, from `--wr-line-chart-grid-color`, so forced\n colors can swap it for the system's own. -->\n <line\n class=\"wr-line-chart__grid-line\"\n x1=\"0\"\n [attr.x2]=\"vbW\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n stroke-width=\"1\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n <!-- Every fill before every line, so the lines and their dashes stay on top where\n the fills overlap and the series are still told apart by shape. The opacity is\n the stylesheet's, from `--wr-line-chart-area-opacity`. -->\n @for (area of areas(); track area.key) {\n <path class=\"wr-line-chart__area\" [attr.d]=\"area.d\" [attr.fill]=\"area.color\" stroke=\"none\" />\n }\n\n <!-- By position, not by label: two series may share one, and a duplicate key\n makes Angular re-create rows it cannot tell apart. Each is drawn at its\n plotted values, which under `stacked` are the tops of its band. Every path is\n built once per data change (`drawn`), so hovering rebuilds none of them. -->\n @for (s of drawn(); track s.index) {\n <path\n class=\"wr-line-chart__line\"\n [attr.d]=\"s.d\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n [attr.stroke-dasharray]=\"s.dash || null\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- Every dot of the series in one path, a subpath each, so a long series costs\n one element rather than one per point. A hole in the data gets no dot. A dot\n is a zero-length line with a round cap and a non-scaling stroke, which stays\n a 6px circle however the drawing stretches; a `<circle>` scaled with it, into\n a 3 × 5px oval on a phone and a 9 × 5px one at 1920px. -->\n @if (s.dots) {\n <path\n class=\"wr-line-chart__dot\"\n [attr.d]=\"s.dots\"\n fill=\"none\"\n [attr.stroke]=\"s.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <line\n class=\"wr-line-chart__crosshair\"\n [attr.x1]=\"pointX(hovered)\"\n [attr.x2]=\"pointX(hovered)\"\n y1=\"0\"\n [attr.y2]=\"vbH\"\n stroke-width=\"1\"\n stroke-dasharray=\"3 3\"\n vector-effect=\"non-scaling-stroke\"\n />\n <!-- A ring of the series' colour round a surface-coloured centre, drawn the way a\n dot is and for the same reason. The centre's colour is the stylesheet's, from\n `--wr-line-chart-hover-center`. -->\n @for (p of hoverPoints(); track p.index) {\n <path\n class=\"wr-line-chart__hover-dot\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n [attr.stroke]=\"p.color\"\n stroke-width=\"12\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n class=\"wr-line-chart__hover-dot-center\"\n [attr.d]=\"dotPath(p.x, p.y)\"\n fill=\"none\"\n stroke-width=\"8\"\n stroke-linecap=\"round\"\n vector-effect=\"non-scaling-stroke\"\n />\n }\n }\n </svg>\n\n @if (hovered !== null && hoverPoints().length > 0) {\n <!-- The layer covers the plot and is what the tooltip's `cqw` measures. It is out of\n flow, so the containment it turns on costs the plot's own sizing nothing. The\n tooltip takes the same `--wr-line-chart-x` the x labels take, and the same\n clamp: centred on its point, never past either end. At the top of the plot, or\n where that would cover a marker it reads, at the bottom (`--below`) or beside the\n crosshair (`--left`, `--right`). -->\n <div class=\"wr-line-chart__tooltip-layer\">\n <div\n #tooltip\n class=\"wr-line-chart__tooltip\"\n [class.wr-line-chart__tooltip--below]=\"tooltipPlacement() === 'below'\"\n [class.wr-line-chart__tooltip--left]=\"tooltipPlacement() === 'left'\"\n [class.wr-line-chart__tooltip--right]=\"tooltipPlacement() === 'right'\"\n [style.--wr-line-chart-x]=\"xPercent(hovered)\"\n >\n <div class=\"wr-line-chart__tooltip-label\">{{ hoverLabel() }}</div>\n @for (p of hoverPoints(); track p.index) {\n <div class=\"wr-line-chart__tooltip-row\">\n <span class=\"wr-line-chart__swatch\" [style.background]=\"p.color\"></span>\n <span class=\"wr-line-chart__tooltip-name\">{{ p.label }}</span>\n <span class=\"wr-line-chart__tooltip-value\">{{ p.text }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n @if (xLabels().length > 0) {\n <!-- The strip is as wide as the plot, and hands the stylesheet the distance between\n two printed labels; each label hands it the x of the point it names. Both are\n percentages of the drawing's width, so they track the drawing at any size: the\n stylesheet centres a label on its point and ellipsises it past its slot. Laying the\n labels out as equal centred flex slots instead is bar-chart geometry: only the\n middle label landed on its dot, and the outer ones sat up to half a column away.\n The hidden copy of every label, a line each, is what the room they need is\n measured against: it is as wide as the widest. -->\n <div class=\"wr-line-chart__x-labels\" [style.--wr-line-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-line-chart__x-probe\" aria-hidden=\"true\">{{ probeText() }}</span>\n @for (tick of xAxis().ticks; track tick.index) {\n <span class=\"wr-line-chart__x-label\" [style.--wr-line-chart-x]=\"tick.x\">{{ tick.label }}</span>\n }\n </div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AA8CA,MAAM,gBAAgB;AAGtB,MAAM,gBAAgB;AAGtB,MAAM,aAAa;AAGnB,MAAM,YAAY;AAGlB,MAAM,eAAe;AAMrB,MAAM,SAAS;AAwEf,IAAa,cAAb,MAAa,YAAW;CAKb,SAAS,MAA+B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAQ3C,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE9B,YAAY,YAAY,KAAK,WAAW,mBAAmB,YAAY;CACvE,YAAY,YAAY,KAAK,WAAW,uB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GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,KAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,OAAK,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEN,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEd,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEH,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -96,7 +96,7 @@ var WrMeterGroup = class WrMeterGroup {
|
|
|
96
96
|
});
|
|
97
97
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
98
98
|
minVersion: "12.0.0",
|
|
99
|
-
version: "22.2.
|
|
99
|
+
version: "22.2.6",
|
|
100
100
|
ngImport: i0,
|
|
101
101
|
type: WrMeterGroup,
|
|
102
102
|
deps: [],
|
|
@@ -104,7 +104,7 @@ var WrMeterGroup = class WrMeterGroup {
|
|
|
104
104
|
});
|
|
105
105
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
106
106
|
minVersion: "17.0.0",
|
|
107
|
-
version: "22.2.
|
|
107
|
+
version: "22.2.6",
|
|
108
108
|
type: WrMeterGroup,
|
|
109
109
|
isStandalone: true,
|
|
110
110
|
selector: "wr-meter-group",
|
|
@@ -191,7 +191,8 @@ var WrMeterGroup = class WrMeterGroup {
|
|
|
191
191
|
"items",
|
|
192
192
|
"toggleable",
|
|
193
193
|
"hiddenSeries",
|
|
194
|
-
"ariaLabel"
|
|
194
|
+
"ariaLabel",
|
|
195
|
+
"hiddenLabel"
|
|
195
196
|
],
|
|
196
197
|
outputs: ["hiddenSeriesChange", "toggled"]
|
|
197
198
|
}],
|
|
@@ -204,7 +205,7 @@ var WrMeterGroup = class WrMeterGroup {
|
|
|
204
205
|
};
|
|
205
206
|
i0.ɵɵngDeclareClassMetadata({
|
|
206
207
|
minVersion: "12.0.0",
|
|
207
|
-
version: "22.2.
|
|
208
|
+
version: "22.2.6",
|
|
208
209
|
ngImport: i0,
|
|
209
210
|
type: WrMeterGroup,
|
|
210
211
|
decorators: [{
|