@edsis/angular 22.1.3 → 22.2.8
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/LICENSE +21 -0
- package/README.md +87 -399
- package/SECURITY.md +18 -0
- package/SUPPORT.md +15 -0
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +125 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +146 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +52 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/edsis-angular-chart-area.mjs +508 -0
- package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
- package/fesm2022/edsis-angular-chart-core.mjs +1282 -0
- package/fesm2022/edsis-angular-chart-line.mjs +544 -0
- package/fesm2022/edsis-angular-chart-pie.mjs +524 -0
- package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
- package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
- package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
- package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
- package/fesm2022/edsis-angular-chart.mjs +3 -0
- package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
- package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
- package/fesm2022/edsis-angular-component-alert.mjs +268 -0
- package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
- package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
- package/fesm2022/edsis-angular-component-badge.mjs +111 -0
- package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
- package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
- package/fesm2022/edsis-angular-component-button.mjs +155 -0
- package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
- package/fesm2022/edsis-angular-component-card.mjs +460 -0
- package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
- package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
- package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
- package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
- package/fesm2022/edsis-angular-component-command.mjs +815 -0
- package/fesm2022/edsis-angular-component-composer.mjs +840 -0
- package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
- package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
- package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
- package/fesm2022/edsis-angular-component-drawer.mjs +2 -0
- package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
- package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
- package/fesm2022/edsis-angular-component-empty.mjs +351 -0
- package/fesm2022/edsis-angular-component-form.mjs +821 -0
- package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
- package/fesm2022/edsis-angular-component-icon.mjs +253 -0
- package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
- package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
- package/fesm2022/edsis-angular-component-input.mjs +87 -0
- package/fesm2022/edsis-angular-component-item.mjs +720 -0
- package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
- package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
- package/fesm2022/edsis-angular-component-label.mjs +82 -0
- package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
- package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
- package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
- package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
- package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
- package/fesm2022/edsis-angular-component-popover.mjs +292 -0
- package/fesm2022/edsis-angular-component-progress.mjs +184 -0
- package/fesm2022/edsis-angular-component-radio.mjs +491 -0
- package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
- package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
- package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
- package/fesm2022/edsis-angular-component-select.mjs +743 -0
- package/fesm2022/edsis-angular-component-separator.mjs +102 -0
- package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
- package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
- package/fesm2022/edsis-angular-component-slider.mjs +676 -0
- package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
- package/fesm2022/edsis-angular-component-switch.mjs +361 -0
- package/fesm2022/edsis-angular-component-table.mjs +446 -0
- package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
- package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
- package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
- package/fesm2022/edsis-angular-component-toast.mjs +231 -0
- package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
- package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
- package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
- package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
- package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
- package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
- package/fesm2022/edsis-angular-component-utils.mjs +2 -0
- package/fesm2022/edsis-angular-component.mjs +0 -0
- package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
- package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
- package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-BWWWaUgy.mjs +234 -0
- package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-Bx2bxTID.mjs +834 -0
- package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-Duzt1ffz.mjs +823 -0
- package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-cJ8Q1vM6.mjs +670 -0
- package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-CDQ1wt2_.mjs +689 -0
- package/fesm2022/edsis-angular-navigation-navigation-item.component-C1VzerJp.mjs +1522 -0
- package/fesm2022/edsis-angular-navigation-navigation-list.component-BPYLfrID.mjs +346 -0
- package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
- package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
- package/fesm2022/edsis-angular-navigation.mjs +3338 -0
- package/fesm2022/edsis-angular-sdk.mjs +100 -0
- package/fesm2022/edsis-angular-theme-component-settings.mjs +1877 -0
- package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
- package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
- package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
- package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
- package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
- package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
- package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
- package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
- package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
- package/fesm2022/edsis-angular-theme-page.mjs +7 -0
- package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
- package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
- package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
- package/fesm2022/edsis-angular-theme-styles.mjs +572 -0
- package/fesm2022/edsis-angular-theme.mjs +0 -0
- package/fesm2022/edsis-angular.mjs +5 -8
- package/navigation/README.md +576 -0
- package/package.json +477 -52
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +120 -0
- package/theme/component/settings/README.md +154 -0
- package/theme/layout/README.md +604 -0
- package/theme/page/README.md +505 -0
- package/theme/shell/README.md +344 -0
- package/theme/styles/README.md +202 -0
- package/theme/styles/css/base/components.css +577 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +208 -0
- package/theme/styles/css/base/theme.css +353 -0
- package/theme/styles/css/base/tokens.css +388 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/fonts.css +85 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/edsis-angular-chart-area.d.ts +139 -0
- package/types/edsis-angular-chart-bar.d.ts +291 -0
- package/types/edsis-angular-chart-core.d.ts +822 -0
- package/types/edsis-angular-chart-line.d.ts +148 -0
- package/types/edsis-angular-chart-pie.d.ts +202 -0
- package/types/edsis-angular-chart-primitives.d.ts +360 -0
- package/types/edsis-angular-chart-radar.d.ts +198 -0
- package/types/edsis-angular-chart-radial.d.ts +187 -0
- package/types/edsis-angular-chart-scatter.d.ts +181 -0
- package/types/edsis-angular-chart.d.ts +3 -0
- package/types/edsis-angular-component-accordion.d.ts +139 -0
- package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
- package/types/edsis-angular-component-alert.d.ts +72 -0
- package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
- package/types/edsis-angular-component-avatar.d.ts +111 -0
- package/types/edsis-angular-component-badge.d.ts +36 -0
- package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
- package/types/edsis-angular-component-button-group.d.ts +50 -0
- package/types/edsis-angular-component-button.d.ts +44 -0
- package/types/edsis-angular-component-calendar.d.ts +150 -0
- package/types/edsis-angular-component-card.d.ts +123 -0
- package/types/edsis-angular-component-carousel.d.ts +155 -0
- package/types/edsis-angular-component-checkbox.d.ts +100 -0
- package/types/edsis-angular-component-collapsible.d.ts +68 -0
- package/types/edsis-angular-component-combobox.d.ts +105 -0
- package/types/edsis-angular-component-command.d.ts +215 -0
- package/types/edsis-angular-component-composer.d.ts +190 -0
- package/types/edsis-angular-component-context-menu.d.ts +64 -0
- package/types/edsis-angular-component-date-picker.d.ts +199 -0
- package/types/edsis-angular-component-dialog.d.ts +231 -0
- package/types/edsis-angular-component-drawer.d.ts +2 -0
- package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
- package/types/edsis-angular-component-editor.d.ts +234 -0
- package/types/edsis-angular-component-empty.d.ts +85 -0
- package/types/edsis-angular-component-form.d.ts +223 -0
- package/types/edsis-angular-component-hover-card.d.ts +133 -0
- package/types/edsis-angular-component-icon.d.ts +90 -0
- package/types/edsis-angular-component-input-group.d.ts +98 -0
- package/types/edsis-angular-component-input-otp.d.ts +249 -0
- package/types/edsis-angular-component-input.d.ts +31 -0
- package/types/edsis-angular-component-item.d.ts +169 -0
- package/types/edsis-angular-component-kanban.d.ts +165 -0
- package/types/edsis-angular-component-kbd.d.ts +25 -0
- package/types/edsis-angular-component-label.d.ts +19 -0
- package/types/edsis-angular-component-menubar.d.ts +123 -0
- package/types/edsis-angular-component-native-select.d.ts +39 -0
- package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
- package/types/edsis-angular-component-pagination.d.ts +83 -0
- package/types/edsis-angular-component-pillbox.d.ts +380 -0
- package/types/edsis-angular-component-popover.d.ts +96 -0
- package/types/edsis-angular-component-progress.d.ts +45 -0
- package/types/edsis-angular-component-radio.d.ts +137 -0
- package/types/edsis-angular-component-resizable.d.ts +166 -0
- package/types/edsis-angular-component-scroll-area.d.ts +37 -0
- package/types/edsis-angular-component-segmented-control.d.ts +102 -0
- package/types/edsis-angular-component-select.d.ts +138 -0
- package/types/edsis-angular-component-separator.d.ts +26 -0
- package/types/edsis-angular-component-sheet.d.ts +240 -0
- package/types/edsis-angular-component-skeleton.d.ts +13 -0
- package/types/edsis-angular-component-slider.d.ts +148 -0
- package/types/edsis-angular-component-spinner.d.ts +31 -0
- package/types/edsis-angular-component-switch.d.ts +101 -0
- package/types/edsis-angular-component-table.d.ts +109 -0
- package/types/edsis-angular-component-tabs.d.ts +183 -0
- package/types/edsis-angular-component-textarea.d.ts +27 -0
- package/types/edsis-angular-component-timeline.d.ts +146 -0
- package/types/edsis-angular-component-toast.d.ts +60 -0
- package/types/edsis-angular-component-toggle-group.d.ts +161 -0
- package/types/edsis-angular-component-toggle.d.ts +47 -0
- package/types/edsis-angular-component-tooltip.d.ts +233 -0
- package/types/edsis-angular-component-utils-core.d.ts +175 -0
- package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
- package/types/edsis-angular-component-utils-scale.d.ts +27 -0
- package/types/edsis-angular-component-utils.d.ts +2 -0
- package/types/edsis-angular-component.d.ts +1 -0
- package/types/edsis-angular-navigation-core.d.ts +55 -0
- package/types/edsis-angular-navigation-icon.d.ts +9 -0
- package/types/edsis-angular-navigation-service.d.ts +121 -0
- package/types/edsis-angular-navigation-types.d.ts +185 -0
- package/types/edsis-angular-navigation.d.ts +862 -0
- package/types/edsis-angular-sdk.d.ts +87 -0
- package/types/edsis-angular-theme-component-settings.d.ts +205 -0
- package/types/edsis-angular-theme-layout-services.d.ts +143 -0
- package/types/edsis-angular-theme-layout-types.d.ts +36 -0
- package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
- package/types/edsis-angular-theme-layout.d.ts +218 -0
- package/types/edsis-angular-theme-page-core.d.ts +151 -0
- package/types/edsis-angular-theme-page-filter.d.ts +127 -0
- package/types/edsis-angular-theme-page-overview.d.ts +28 -0
- package/types/edsis-angular-theme-page-root.d.ts +172 -0
- package/types/edsis-angular-theme-page-side.d.ts +90 -0
- package/types/edsis-angular-theme-page-slots.d.ts +61 -0
- package/types/edsis-angular-theme-page.d.ts +7 -0
- package/types/edsis-angular-theme-shell-services.d.ts +188 -0
- package/types/edsis-angular-theme-shell-types.d.ts +102 -0
- package/types/edsis-angular-theme-shell.d.ts +178 -0
- package/types/edsis-angular-theme-styles.d.ts +295 -0
- package/types/edsis-angular-theme.d.ts +1 -0
- package/types/edsis-angular.d.ts +5 -2
- package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
- package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
- package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
- package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
- package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
- package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
- package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
- package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
- package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
- package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
- package/fesm2022/edsis-angular.mjs.map +0 -1
- package/types/edsis-angular-block-shell.d.ts +0 -190
- package/types/edsis-angular-block-themes.d.ts +0 -94
- package/types/edsis-angular-module-auth.d.ts +0 -533
- package/types/edsis-angular-platform-mfe.d.ts +0 -126
- package/types/edsis-angular-services-runtime.d.ts +0 -118
|
@@ -0,0 +1,1282 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, DestroyRef, Directive, ElementRef, NgZone, PLATFORM_ID, Renderer2, Service, afterNextRender, computed, effect, inject, input, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { DOCUMENT, isPlatformBrowser } from "@angular/common";
|
|
4
|
+
import { scaleBand, scaleLinear, scalePoint } from "d3-scale";
|
|
5
|
+
import { max, min } from "d3-array";
|
|
6
|
+
import { area, curveLinear, curveMonotoneX, curveStep, line, stack, stackOffsetExpand } from "d3-shape";
|
|
7
|
+
const CHART_DATA_ATTRIBUTE = "data-chart";
|
|
8
|
+
const CHART_THEMES = [{
|
|
9
|
+
key: "light",
|
|
10
|
+
selector: ""
|
|
11
|
+
}, {
|
|
12
|
+
key: "dark",
|
|
13
|
+
selector: "[data-mode=\"dark\"]"
|
|
14
|
+
}];
|
|
15
|
+
const CSS_CONTEXT_BREAKERS = /[;{}<>@\\"']|\/\*|\*\//;
|
|
16
|
+
const CSS_COLOR_CHARACTERS = /^[a-zA-Z0-9#%.,+\-_()/ ]+$/;
|
|
17
|
+
const ALLOWED_COLOR_FUNCTIONS = /* @__PURE__ */ new Set([
|
|
18
|
+
"rgb",
|
|
19
|
+
"rgba",
|
|
20
|
+
"hsl",
|
|
21
|
+
"hsla",
|
|
22
|
+
"hwb",
|
|
23
|
+
"lab",
|
|
24
|
+
"lch",
|
|
25
|
+
"oklab",
|
|
26
|
+
"oklch",
|
|
27
|
+
"color",
|
|
28
|
+
"color-mix",
|
|
29
|
+
"light-dark",
|
|
30
|
+
"var"
|
|
31
|
+
]);
|
|
32
|
+
function isSafeCssColorValue(value) {
|
|
33
|
+
const trimmed = value.trim();
|
|
34
|
+
if (!trimmed || trimmed.length > 200) return false;
|
|
35
|
+
if (CSS_CONTEXT_BREAKERS.test(trimmed)) return false;
|
|
36
|
+
if (!CSS_COLOR_CHARACTERS.test(trimmed)) return false;
|
|
37
|
+
let depth = 0;
|
|
38
|
+
for (const character of trimmed) if (character === "(") depth += 1;
|
|
39
|
+
else if (character === ")") {
|
|
40
|
+
depth -= 1;
|
|
41
|
+
if (depth < 0) return false;
|
|
42
|
+
}
|
|
43
|
+
if (depth !== 0) return false;
|
|
44
|
+
for (const match of trimmed.matchAll(/([a-zA-Z][a-zA-Z0-9-]*)\s*\(/g)) if (!ALLOWED_COLOR_FUNCTIONS.has(match[1].toLowerCase())) return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
function buildChartCss(chartId, config) {
|
|
48
|
+
const entries = Object.entries(config).filter(([, cfg]) => cfg.color || cfg.theme);
|
|
49
|
+
if (entries.length === 0) return "";
|
|
50
|
+
const scopeId = escapeCssIdent(chartId);
|
|
51
|
+
return CHART_THEMES.map(({ key, selector }) => {
|
|
52
|
+
const vars = entries.map(([seriesKey, cfg]) => {
|
|
53
|
+
const value = cfg.theme?.[key] ?? cfg.color;
|
|
54
|
+
if (!value || !isSafeCssColorValue(value)) return "";
|
|
55
|
+
return ` --color-${escapeCssIdent(seriesKey)}: ${value.trim()};`;
|
|
56
|
+
}).filter(Boolean).join("\n");
|
|
57
|
+
if (!vars) return "";
|
|
58
|
+
return `${selector ? `${selector} [${CHART_DATA_ATTRIBUTE}="${scopeId}"]` : `[${CHART_DATA_ATTRIBUTE}="${scopeId}"]`} {\n${vars}\n}`;
|
|
59
|
+
}).filter(Boolean).join("\n");
|
|
60
|
+
}
|
|
61
|
+
const CSS_IDENT_CHARACTERS = /^[a-zA-Z0-9_-]*$/;
|
|
62
|
+
const CSS_IDENT_FINGERPRINTED = /_h[0-9a-f]{8}$/;
|
|
63
|
+
function escapeCssIdent(input) {
|
|
64
|
+
if (CSS_IDENT_CHARACTERS.test(input) && !CSS_IDENT_FINGERPRINTED.test(input)) return input;
|
|
65
|
+
return `${input.replace(/[^a-zA-Z0-9_-]/g, "_")}_h${fingerprint(input)}`;
|
|
66
|
+
}
|
|
67
|
+
function fingerprint(input) {
|
|
68
|
+
let hash = 2166136261;
|
|
69
|
+
for (let index = 0; index < input.length; index += 1) {
|
|
70
|
+
hash ^= input.charCodeAt(index);
|
|
71
|
+
hash = Math.imul(hash, 16777619);
|
|
72
|
+
}
|
|
73
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
74
|
+
}
|
|
75
|
+
function seriesColorVar(seriesKey) {
|
|
76
|
+
return `var(--color-${escapeCssIdent(seriesKey)})`;
|
|
77
|
+
}
|
|
78
|
+
function resolveSeriesColor(raw, fallback) {
|
|
79
|
+
if (typeof raw !== "string" || raw.length === 0) return fallback;
|
|
80
|
+
if (raw.startsWith("var(") || raw.startsWith("#") || raw.startsWith("rgb") || raw.startsWith("hsl") || raw.includes("(")) return raw;
|
|
81
|
+
return seriesColorVar(raw);
|
|
82
|
+
}
|
|
83
|
+
var ChartContext = class ChartContext {
|
|
84
|
+
id = signal("", ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
85
|
+
config = signal({}, ...ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []);
|
|
86
|
+
dimensions = signal({
|
|
87
|
+
width: 0,
|
|
88
|
+
height: 0
|
|
89
|
+
}, ...ngDevMode ? [{ debugName: "dimensions" }] : /* istanbul ignore next */ []);
|
|
90
|
+
activePoint = signal(null, ...ngDevMode ? [{ debugName: "activePoint" }] : /* istanbul ignore next */ []);
|
|
91
|
+
hiddenSeries = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "hiddenSeries" }] : /* istanbul ignore next */ []);
|
|
92
|
+
seriesKeys = computed(() => Object.keys(this.config()), ...ngDevMode ? [{ debugName: "seriesKeys" }] : /* istanbul ignore next */ []);
|
|
93
|
+
visibleSeriesKeys = computed(() => {
|
|
94
|
+
const hidden = this.hiddenSeries();
|
|
95
|
+
return this.seriesKeys().filter((k) => !hidden.has(k));
|
|
96
|
+
}, ...ngDevMode ? [{ debugName: "visibleSeriesKeys" }] : /* istanbul ignore next */ []);
|
|
97
|
+
toggleSeries(key) {
|
|
98
|
+
this.hiddenSeries.update((set) => {
|
|
99
|
+
const next = new Set(set);
|
|
100
|
+
if (next.has(key)) next.delete(key);
|
|
101
|
+
else next.add(key);
|
|
102
|
+
return next;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
106
|
+
minVersion: "12.0.0",
|
|
107
|
+
version: "22.2.3",
|
|
108
|
+
ngImport: i0,
|
|
109
|
+
type: ChartContext,
|
|
110
|
+
deps: [],
|
|
111
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
112
|
+
});
|
|
113
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
114
|
+
minVersion: "22.0.0",
|
|
115
|
+
version: "22.2.3",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: ChartContext,
|
|
118
|
+
autoProvided: false
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
122
|
+
minVersion: "12.0.0",
|
|
123
|
+
version: "22.2.3",
|
|
124
|
+
ngImport: i0,
|
|
125
|
+
type: ChartContext,
|
|
126
|
+
decorators: [{
|
|
127
|
+
type: Service,
|
|
128
|
+
args: [{ autoProvided: false }]
|
|
129
|
+
}]
|
|
130
|
+
});
|
|
131
|
+
function nearestCategoryIndex(ctx, localX, localY) {
|
|
132
|
+
const scale = ctx.categoryScale();
|
|
133
|
+
const categories = ctx.categories();
|
|
134
|
+
if (!scale || categories.length === 0) return -1;
|
|
135
|
+
const pointerAlong = ctx.orientation() === "vertical" ? localX : localY;
|
|
136
|
+
const bandwidth = scale.bandwidth();
|
|
137
|
+
const step = scale.step?.() ?? bandwidth;
|
|
138
|
+
let bestIndex = -1;
|
|
139
|
+
let bestDelta = Infinity;
|
|
140
|
+
for (let i = 0; i < categories.length; i++) {
|
|
141
|
+
const center = (scale(categories[i]) ?? 0) + bandwidth / 2;
|
|
142
|
+
const delta = Math.abs(pointerAlong - center);
|
|
143
|
+
if (delta < bestDelta) {
|
|
144
|
+
bestDelta = delta;
|
|
145
|
+
bestIndex = i;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (bestDelta > step) return -1;
|
|
149
|
+
return bestIndex;
|
|
150
|
+
}
|
|
151
|
+
function elementClientCenter(target) {
|
|
152
|
+
const el = target;
|
|
153
|
+
if (!el || typeof el.getBoundingClientRect !== "function") return null;
|
|
154
|
+
const rect = el.getBoundingClientRect();
|
|
155
|
+
return {
|
|
156
|
+
clientX: rect.left + rect.width / 2,
|
|
157
|
+
clientY: rect.top + rect.height / 2
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function activationClientPoint(event) {
|
|
161
|
+
return event instanceof PointerEvent ? {
|
|
162
|
+
clientX: event.clientX,
|
|
163
|
+
clientY: event.clientY
|
|
164
|
+
} : elementClientCenter(event.currentTarget ?? event.target);
|
|
165
|
+
}
|
|
166
|
+
function clamp(value, min, max) {
|
|
167
|
+
return Math.min(max, Math.max(min, value));
|
|
168
|
+
}
|
|
169
|
+
function normalizeIndexRange(start, end, maxCount) {
|
|
170
|
+
if (maxCount <= 0) return null;
|
|
171
|
+
return {
|
|
172
|
+
startIndex: clamp(Math.floor(Math.min(start, end)), 0, maxCount - 1),
|
|
173
|
+
endIndex: clamp(Math.floor(Math.max(start, end)), 0, maxCount - 1)
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function effectiveIndexRange(range, maxCount) {
|
|
177
|
+
if (maxCount <= 0) return null;
|
|
178
|
+
return range ? normalizeIndexRange(range.startIndex, range.endIndex, maxCount) : {
|
|
179
|
+
startIndex: 0,
|
|
180
|
+
endIndex: maxCount - 1
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
function indexRangeSize(range, maxCount) {
|
|
184
|
+
const effective = effectiveIndexRange(range, maxCount);
|
|
185
|
+
return effective ? effective.endIndex - effective.startIndex + 1 : 0;
|
|
186
|
+
}
|
|
187
|
+
function sliceByIndexRange(data, range) {
|
|
188
|
+
if (!range) return data;
|
|
189
|
+
return data.slice(range.startIndex, range.endIndex + 1);
|
|
190
|
+
}
|
|
191
|
+
function zoomIndexRange(current, maxCount, anchorIndex, factor) {
|
|
192
|
+
const base = effectiveIndexRange(current, maxCount);
|
|
193
|
+
if (!base) return null;
|
|
194
|
+
const currentSize = base.endIndex - base.startIndex + 1;
|
|
195
|
+
const nextSize = clamp(Math.round(currentSize * factor), 2, maxCount);
|
|
196
|
+
if (nextSize >= maxCount) return null;
|
|
197
|
+
const boundedAnchor = clamp(anchorIndex, base.startIndex, base.endIndex);
|
|
198
|
+
const ratio = currentSize <= 1 ? .5 : (boundedAnchor - base.startIndex) / (currentSize - 1);
|
|
199
|
+
let start = Math.round(boundedAnchor - ratio * (nextSize - 1));
|
|
200
|
+
start = clamp(start, 0, maxCount - nextSize);
|
|
201
|
+
return {
|
|
202
|
+
startIndex: start,
|
|
203
|
+
endIndex: start + nextSize - 1
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function panIndexRange(current, maxCount, deltaSteps) {
|
|
207
|
+
const base = effectiveIndexRange(current, maxCount);
|
|
208
|
+
if (!base) return null;
|
|
209
|
+
const size = base.endIndex - base.startIndex + 1;
|
|
210
|
+
if (size >= maxCount) return null;
|
|
211
|
+
const start = clamp(base.startIndex + deltaSteps, 0, maxCount - size);
|
|
212
|
+
return {
|
|
213
|
+
startIndex: start,
|
|
214
|
+
endIndex: start + size - 1
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function zeroBaselineDomain(minValue, maxValue) {
|
|
218
|
+
const min = Math.min(0, minValue);
|
|
219
|
+
const max = Math.max(0, maxValue);
|
|
220
|
+
return min === max ? [min, max + 1] : [min, max];
|
|
221
|
+
}
|
|
222
|
+
function normalizeNumericDomain(a, b) {
|
|
223
|
+
if (a === b) return [a - 1, b + 1];
|
|
224
|
+
return a < b ? [a, b] : [b, a];
|
|
225
|
+
}
|
|
226
|
+
function zoomNumericDomain(current, full, anchor, factor) {
|
|
227
|
+
const currentWidth = current[1] - current[0];
|
|
228
|
+
const fullWidth = full[1] - full[0];
|
|
229
|
+
const nextWidth = clamp(currentWidth * factor, fullWidth / 50, fullWidth);
|
|
230
|
+
if (nextWidth >= fullWidth) return full;
|
|
231
|
+
let start = anchor - (currentWidth === 0 ? .5 : (anchor - current[0]) / currentWidth) * nextWidth;
|
|
232
|
+
start = clamp(start, full[0], full[1] - nextWidth);
|
|
233
|
+
return [start, start + nextWidth];
|
|
234
|
+
}
|
|
235
|
+
function panNumericDomain(current, full, delta) {
|
|
236
|
+
const width = current[1] - current[0];
|
|
237
|
+
const start = clamp(current[0] + delta, full[0], full[1] - width);
|
|
238
|
+
return [start, start + width];
|
|
239
|
+
}
|
|
240
|
+
function setupCartesianChart(options) {
|
|
241
|
+
const root = inject(ChartContext);
|
|
242
|
+
const innerWidth = computed(() => Math.max(0, root.dimensions().width - options.margin().left - options.margin().right), ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []);
|
|
243
|
+
const innerHeight = computed(() => Math.max(0, root.dimensions().height - options.margin().top - options.margin().bottom), ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []);
|
|
244
|
+
const viewBox = computed(() => {
|
|
245
|
+
const { width, height } = root.dimensions();
|
|
246
|
+
return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;
|
|
247
|
+
}, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []);
|
|
248
|
+
const innerTransform = computed(() => `translate(${options.margin().left},${options.margin().top})`, ...ngDevMode ? [{ debugName: "innerTransform" }] : /* istanbul ignore next */ []);
|
|
249
|
+
const windowRange = computed(() => options.viewport ? effectiveIndexRange(options.viewport.zoomRange(), options.data().length) : null, ...ngDevMode ? [{ debugName: "windowRange" }] : /* istanbul ignore next */ []);
|
|
250
|
+
const visibleStartIndex = computed(() => windowRange()?.startIndex ?? 0, ...ngDevMode ? [{ debugName: "visibleStartIndex" }] : /* istanbul ignore next */ []);
|
|
251
|
+
const visibleData = computed(() => options.viewport ? sliceByIndexRange(options.data(), windowRange()) : options.data(), ...ngDevMode ? [{ debugName: "visibleData" }] : /* istanbul ignore next */ []);
|
|
252
|
+
const resolveDatumIndex = (mark) => visibleStartIndex() + mark.datumIndex;
|
|
253
|
+
const seriesLabel = (seriesKey) => root.config()[seriesKey]?.label ?? seriesKey;
|
|
254
|
+
effect(() => {
|
|
255
|
+
options.viewport?.dataCount.set(options.data().length);
|
|
256
|
+
const cartesian = options.cartesian;
|
|
257
|
+
if (cartesian) {
|
|
258
|
+
cartesian.context.orientation.set(cartesian.orientation());
|
|
259
|
+
cartesian.context.margin.set(options.margin());
|
|
260
|
+
cartesian.context.innerWidth.set(innerWidth());
|
|
261
|
+
cartesian.context.innerHeight.set(innerHeight());
|
|
262
|
+
}
|
|
263
|
+
options.publishLayout?.({
|
|
264
|
+
width: innerWidth(),
|
|
265
|
+
height: innerHeight()
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
return {
|
|
269
|
+
innerWidth,
|
|
270
|
+
innerHeight,
|
|
271
|
+
viewBox,
|
|
272
|
+
innerTransform,
|
|
273
|
+
visibleStartIndex,
|
|
274
|
+
visibleData,
|
|
275
|
+
resolveDatumIndex,
|
|
276
|
+
seriesLabel,
|
|
277
|
+
pointAriaLabel: (mark) => options.ariaLabel(mark, seriesLabel(mark.seriesKey)),
|
|
278
|
+
emitClick: (mark) => {
|
|
279
|
+
const datumIndex = resolveDatumIndex(mark);
|
|
280
|
+
options.click.emit(options.click.payload(mark, datumIndex, options.data()[datumIndex]));
|
|
281
|
+
},
|
|
282
|
+
setActivePoint: (event, mark) => {
|
|
283
|
+
const center = activationClientPoint(event);
|
|
284
|
+
root.activePoint.set({
|
|
285
|
+
index: mark.datumIndex,
|
|
286
|
+
datumIndex: resolveDatumIndex(mark),
|
|
287
|
+
seriesKey: mark.seriesKey,
|
|
288
|
+
clientX: center?.clientX,
|
|
289
|
+
clientY: center?.clientY
|
|
290
|
+
});
|
|
291
|
+
},
|
|
292
|
+
clearActivePoint: () => root.activePoint.set(null)
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function setupPolarChart(options) {
|
|
296
|
+
const root = inject(ChartContext);
|
|
297
|
+
return {
|
|
298
|
+
innerWidth: computed(() => Math.max(0, root.dimensions().width - options.margin().left - options.margin().right), ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []),
|
|
299
|
+
innerHeight: computed(() => Math.max(0, root.dimensions().height - options.margin().top - options.margin().bottom), ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []),
|
|
300
|
+
viewBox: computed(() => {
|
|
301
|
+
const { width, height } = root.dimensions();
|
|
302
|
+
return `0 0 ${Math.max(0, width)} ${Math.max(0, height)}`;
|
|
303
|
+
}, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []),
|
|
304
|
+
innerTransform: computed(() => `translate(${options.margin().left},${options.margin().top})`, ...ngDevMode ? [{ debugName: "innerTransform" }] : /* istanbul ignore next */ []),
|
|
305
|
+
seriesLabel: (seriesKey) => root.config()[seriesKey]?.label ?? seriesKey,
|
|
306
|
+
setActivePoint: (event, mark) => {
|
|
307
|
+
const location = activationClientPoint(event);
|
|
308
|
+
root.activePoint.set({
|
|
309
|
+
index: mark.datumIndex,
|
|
310
|
+
datumIndex: mark.datumIndex,
|
|
311
|
+
seriesKey: mark.seriesKey,
|
|
312
|
+
clientX: location?.clientX,
|
|
313
|
+
clientY: location?.clientY
|
|
314
|
+
});
|
|
315
|
+
},
|
|
316
|
+
clearActivePoint: () => root.activePoint.set(null)
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
var ChartStyle = class ChartStyle {
|
|
320
|
+
ctx = inject(ChartContext);
|
|
321
|
+
host = inject(ElementRef);
|
|
322
|
+
renderer = inject(Renderer2);
|
|
323
|
+
styleEl = null;
|
|
324
|
+
css = computed(() => buildChartCss(this.ctx.id(), this.ctx.config()), ...ngDevMode ? [{ debugName: "css" }] : /* istanbul ignore next */ []);
|
|
325
|
+
constructor() {
|
|
326
|
+
effect(() => {
|
|
327
|
+
const css = this.css();
|
|
328
|
+
if (!this.styleEl) {
|
|
329
|
+
this.styleEl = this.renderer.createElement("style");
|
|
330
|
+
this.renderer.appendChild(this.host.nativeElement, this.styleEl);
|
|
331
|
+
}
|
|
332
|
+
this.styleEl.textContent = css;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
336
|
+
minVersion: "12.0.0",
|
|
337
|
+
version: "22.2.3",
|
|
338
|
+
ngImport: i0,
|
|
339
|
+
type: ChartStyle,
|
|
340
|
+
deps: [],
|
|
341
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
342
|
+
});
|
|
343
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
344
|
+
minVersion: "14.0.0",
|
|
345
|
+
version: "22.2.3",
|
|
346
|
+
type: ChartStyle,
|
|
347
|
+
isStandalone: true,
|
|
348
|
+
selector: "ChartStyle",
|
|
349
|
+
ngImport: i0,
|
|
350
|
+
template: "",
|
|
351
|
+
isInline: true
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
355
|
+
minVersion: "12.0.0",
|
|
356
|
+
version: "22.2.3",
|
|
357
|
+
ngImport: i0,
|
|
358
|
+
type: ChartStyle,
|
|
359
|
+
decorators: [{
|
|
360
|
+
type: Component,
|
|
361
|
+
args: [{
|
|
362
|
+
selector: "ChartStyle",
|
|
363
|
+
template: ""
|
|
364
|
+
}]
|
|
365
|
+
}],
|
|
366
|
+
ctorParameters: () => []
|
|
367
|
+
});
|
|
368
|
+
function resolveChartStyle(styleVariant, styles) {
|
|
369
|
+
return computed(() => styleVariant() ?? styles());
|
|
370
|
+
}
|
|
371
|
+
let chartIdCounter = 0;
|
|
372
|
+
var ChartContainer = class ChartContainer {
|
|
373
|
+
ctx = inject(ChartContext);
|
|
374
|
+
zone = inject(NgZone);
|
|
375
|
+
platformId = inject(PLATFORM_ID);
|
|
376
|
+
destroyRef = inject(DestroyRef);
|
|
377
|
+
areaRef = viewChild.required("area", ...ngDevMode ? [{ debugName: "areaRef" }] : /* istanbul ignore next */ []);
|
|
378
|
+
config = input.required(...ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []);
|
|
379
|
+
aspect = input("aspect-video", ...ngDevMode ? [{ debugName: "aspect" }] : /* istanbul ignore next */ []);
|
|
380
|
+
areaClass = computed(() => `relative flex ${this.aspect()} w-full justify-center`, ...ngDevMode ? [{ debugName: "areaClass" }] : /* istanbul ignore next */ []);
|
|
381
|
+
chartId = input(null, ...ngDevMode ? [{ debugName: "chartId" }] : /* istanbul ignore next */ []);
|
|
382
|
+
constructor() {
|
|
383
|
+
const autoId = `chart-${++chartIdCounter}`;
|
|
384
|
+
effect(() => {
|
|
385
|
+
this.ctx.id.set(this.chartId() ?? autoId);
|
|
386
|
+
});
|
|
387
|
+
effect(() => {
|
|
388
|
+
this.ctx.config.set(this.config());
|
|
389
|
+
});
|
|
390
|
+
if (isPlatformBrowser(this.platformId)) afterNextRender(() => this.observeSize());
|
|
391
|
+
}
|
|
392
|
+
observeSize() {
|
|
393
|
+
const el = this.areaRef().nativeElement;
|
|
394
|
+
if (typeof ResizeObserver === "undefined") {
|
|
395
|
+
const rect = el.getBoundingClientRect();
|
|
396
|
+
this.ctx.dimensions.set({
|
|
397
|
+
width: rect.width,
|
|
398
|
+
height: rect.height
|
|
399
|
+
});
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
const observer = new ResizeObserver((entries) => {
|
|
403
|
+
for (const entry of entries) {
|
|
404
|
+
const { width, height } = entry.contentRect;
|
|
405
|
+
this.zone.run(() => this.ctx.dimensions.set({
|
|
406
|
+
width,
|
|
407
|
+
height
|
|
408
|
+
}));
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
observer.observe(el);
|
|
412
|
+
this.destroyRef.onDestroy(() => observer.disconnect());
|
|
413
|
+
}
|
|
414
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
415
|
+
minVersion: "12.0.0",
|
|
416
|
+
version: "22.2.3",
|
|
417
|
+
ngImport: i0,
|
|
418
|
+
type: ChartContainer,
|
|
419
|
+
deps: [],
|
|
420
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
421
|
+
});
|
|
422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
423
|
+
minVersion: "17.2.0",
|
|
424
|
+
version: "22.2.3",
|
|
425
|
+
type: ChartContainer,
|
|
426
|
+
isStandalone: true,
|
|
427
|
+
selector: "Chart",
|
|
428
|
+
inputs: {
|
|
429
|
+
config: {
|
|
430
|
+
classPropertyName: "config",
|
|
431
|
+
publicName: "config",
|
|
432
|
+
isSignal: true,
|
|
433
|
+
isRequired: true,
|
|
434
|
+
transformFunction: null
|
|
435
|
+
},
|
|
436
|
+
aspect: {
|
|
437
|
+
classPropertyName: "aspect",
|
|
438
|
+
publicName: "aspect",
|
|
439
|
+
isSignal: true,
|
|
440
|
+
isRequired: false,
|
|
441
|
+
transformFunction: null
|
|
442
|
+
},
|
|
443
|
+
chartId: {
|
|
444
|
+
classPropertyName: "chartId",
|
|
445
|
+
publicName: "chartId",
|
|
446
|
+
isSignal: true,
|
|
447
|
+
isRequired: false,
|
|
448
|
+
transformFunction: null
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
host: {
|
|
452
|
+
properties: { "attr.data-chart": "ctx.id()" },
|
|
453
|
+
classAttribute: "relative flex flex-col text-xs"
|
|
454
|
+
},
|
|
455
|
+
providers: [ChartContext],
|
|
456
|
+
viewQueries: [{
|
|
457
|
+
propertyName: "areaRef",
|
|
458
|
+
first: true,
|
|
459
|
+
predicate: ["area"],
|
|
460
|
+
descendants: true,
|
|
461
|
+
isSignal: true
|
|
462
|
+
}],
|
|
463
|
+
ngImport: i0,
|
|
464
|
+
template: `
|
|
465
|
+
<ChartStyle />
|
|
466
|
+
<div #area data-chart-area [class]="areaClass()">
|
|
467
|
+
<ng-content />
|
|
468
|
+
</div>
|
|
469
|
+
<ng-content select="ChartLegend" />
|
|
470
|
+
`,
|
|
471
|
+
isInline: true,
|
|
472
|
+
dependencies: [{
|
|
473
|
+
kind: "component",
|
|
474
|
+
type: ChartStyle,
|
|
475
|
+
selector: "ChartStyle"
|
|
476
|
+
}]
|
|
477
|
+
});
|
|
478
|
+
};
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
480
|
+
minVersion: "12.0.0",
|
|
481
|
+
version: "22.2.3",
|
|
482
|
+
ngImport: i0,
|
|
483
|
+
type: ChartContainer,
|
|
484
|
+
decorators: [{
|
|
485
|
+
type: Component,
|
|
486
|
+
args: [{
|
|
487
|
+
selector: "Chart",
|
|
488
|
+
providers: [ChartContext],
|
|
489
|
+
imports: [ChartStyle],
|
|
490
|
+
host: {
|
|
491
|
+
"[attr.data-chart]": "ctx.id()",
|
|
492
|
+
class: "relative flex flex-col text-xs"
|
|
493
|
+
},
|
|
494
|
+
template: `
|
|
495
|
+
<ChartStyle />
|
|
496
|
+
<div #area data-chart-area [class]="areaClass()">
|
|
497
|
+
<ng-content />
|
|
498
|
+
</div>
|
|
499
|
+
<ng-content select="ChartLegend" />
|
|
500
|
+
`
|
|
501
|
+
}]
|
|
502
|
+
}],
|
|
503
|
+
ctorParameters: () => [],
|
|
504
|
+
propDecorators: {
|
|
505
|
+
areaRef: [{
|
|
506
|
+
type: i0.ViewChild,
|
|
507
|
+
args: ["area", { isSignal: true }]
|
|
508
|
+
}],
|
|
509
|
+
config: [{
|
|
510
|
+
type: i0.Input,
|
|
511
|
+
args: [{
|
|
512
|
+
isSignal: true,
|
|
513
|
+
alias: "config",
|
|
514
|
+
required: true
|
|
515
|
+
}]
|
|
516
|
+
}],
|
|
517
|
+
aspect: [{
|
|
518
|
+
type: i0.Input,
|
|
519
|
+
args: [{
|
|
520
|
+
isSignal: true,
|
|
521
|
+
alias: "aspect",
|
|
522
|
+
required: false
|
|
523
|
+
}]
|
|
524
|
+
}],
|
|
525
|
+
chartId: [{
|
|
526
|
+
type: i0.Input,
|
|
527
|
+
args: [{
|
|
528
|
+
isSignal: true,
|
|
529
|
+
alias: "chartId",
|
|
530
|
+
required: false
|
|
531
|
+
}]
|
|
532
|
+
}]
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
var ChartDataTable = class ChartDataTable {
|
|
536
|
+
data = input.required(...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
537
|
+
columns = input.required(...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
538
|
+
label = input("Chart data", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
539
|
+
rowHeaderKey = input(null, ...ngDevMode ? [{ debugName: "rowHeaderKey" }] : /* istanbul ignore next */ []);
|
|
540
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
541
|
+
minVersion: "12.0.0",
|
|
542
|
+
version: "22.2.3",
|
|
543
|
+
ngImport: i0,
|
|
544
|
+
type: ChartDataTable,
|
|
545
|
+
deps: [],
|
|
546
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
547
|
+
});
|
|
548
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
549
|
+
minVersion: "17.0.0",
|
|
550
|
+
version: "22.2.3",
|
|
551
|
+
type: ChartDataTable,
|
|
552
|
+
isStandalone: true,
|
|
553
|
+
selector: "ChartDataTable",
|
|
554
|
+
inputs: {
|
|
555
|
+
data: {
|
|
556
|
+
classPropertyName: "data",
|
|
557
|
+
publicName: "data",
|
|
558
|
+
isSignal: true,
|
|
559
|
+
isRequired: true,
|
|
560
|
+
transformFunction: null
|
|
561
|
+
},
|
|
562
|
+
columns: {
|
|
563
|
+
classPropertyName: "columns",
|
|
564
|
+
publicName: "columns",
|
|
565
|
+
isSignal: true,
|
|
566
|
+
isRequired: true,
|
|
567
|
+
transformFunction: null
|
|
568
|
+
},
|
|
569
|
+
label: {
|
|
570
|
+
classPropertyName: "label",
|
|
571
|
+
publicName: "label",
|
|
572
|
+
isSignal: true,
|
|
573
|
+
isRequired: false,
|
|
574
|
+
transformFunction: null
|
|
575
|
+
},
|
|
576
|
+
rowHeaderKey: {
|
|
577
|
+
classPropertyName: "rowHeaderKey",
|
|
578
|
+
publicName: "rowHeaderKey",
|
|
579
|
+
isSignal: true,
|
|
580
|
+
isRequired: false,
|
|
581
|
+
transformFunction: null
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
ngImport: i0,
|
|
585
|
+
template: `
|
|
586
|
+
<table class="sr-only" [attr.aria-label]="label()">
|
|
587
|
+
<thead>
|
|
588
|
+
<tr>
|
|
589
|
+
@for (column of columns(); track column) {
|
|
590
|
+
<th scope="col">{{ column }}</th>
|
|
591
|
+
}
|
|
592
|
+
</tr>
|
|
593
|
+
</thead>
|
|
594
|
+
<tbody>
|
|
595
|
+
@for (row of data(); track $index) {
|
|
596
|
+
<tr>
|
|
597
|
+
@for (column of columns(); track column) {
|
|
598
|
+
@if (column === rowHeaderKey()) {
|
|
599
|
+
<th scope="row">{{ row[column] }}</th>
|
|
600
|
+
} @else {
|
|
601
|
+
<td>{{ row[column] }}</td>
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
</tr>
|
|
605
|
+
}
|
|
606
|
+
</tbody>
|
|
607
|
+
</table>
|
|
608
|
+
`,
|
|
609
|
+
isInline: true
|
|
610
|
+
});
|
|
611
|
+
};
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
613
|
+
minVersion: "12.0.0",
|
|
614
|
+
version: "22.2.3",
|
|
615
|
+
ngImport: i0,
|
|
616
|
+
type: ChartDataTable,
|
|
617
|
+
decorators: [{
|
|
618
|
+
type: Component,
|
|
619
|
+
args: [{
|
|
620
|
+
selector: "ChartDataTable",
|
|
621
|
+
template: `
|
|
622
|
+
<table class="sr-only" [attr.aria-label]="label()">
|
|
623
|
+
<thead>
|
|
624
|
+
<tr>
|
|
625
|
+
@for (column of columns(); track column) {
|
|
626
|
+
<th scope="col">{{ column }}</th>
|
|
627
|
+
}
|
|
628
|
+
</tr>
|
|
629
|
+
</thead>
|
|
630
|
+
<tbody>
|
|
631
|
+
@for (row of data(); track $index) {
|
|
632
|
+
<tr>
|
|
633
|
+
@for (column of columns(); track column) {
|
|
634
|
+
@if (column === rowHeaderKey()) {
|
|
635
|
+
<th scope="row">{{ row[column] }}</th>
|
|
636
|
+
} @else {
|
|
637
|
+
<td>{{ row[column] }}</td>
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
</tr>
|
|
641
|
+
}
|
|
642
|
+
</tbody>
|
|
643
|
+
</table>
|
|
644
|
+
`
|
|
645
|
+
}]
|
|
646
|
+
}],
|
|
647
|
+
propDecorators: {
|
|
648
|
+
data: [{
|
|
649
|
+
type: i0.Input,
|
|
650
|
+
args: [{
|
|
651
|
+
isSignal: true,
|
|
652
|
+
alias: "data",
|
|
653
|
+
required: true
|
|
654
|
+
}]
|
|
655
|
+
}],
|
|
656
|
+
columns: [{
|
|
657
|
+
type: i0.Input,
|
|
658
|
+
args: [{
|
|
659
|
+
isSignal: true,
|
|
660
|
+
alias: "columns",
|
|
661
|
+
required: true
|
|
662
|
+
}]
|
|
663
|
+
}],
|
|
664
|
+
label: [{
|
|
665
|
+
type: i0.Input,
|
|
666
|
+
args: [{
|
|
667
|
+
isSignal: true,
|
|
668
|
+
alias: "label",
|
|
669
|
+
required: false
|
|
670
|
+
}]
|
|
671
|
+
}],
|
|
672
|
+
rowHeaderKey: [{
|
|
673
|
+
type: i0.Input,
|
|
674
|
+
args: [{
|
|
675
|
+
isSignal: true,
|
|
676
|
+
alias: "rowHeaderKey",
|
|
677
|
+
required: false
|
|
678
|
+
}]
|
|
679
|
+
}]
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
var ChartRovingFocus = class ChartRovingFocus {
|
|
683
|
+
host = inject(ElementRef);
|
|
684
|
+
destroyRef = inject(DestroyRef);
|
|
685
|
+
activeMark = null;
|
|
686
|
+
constructor() {
|
|
687
|
+
afterNextRender(() => {
|
|
688
|
+
this.syncTabStops(this.marks());
|
|
689
|
+
if (typeof MutationObserver === "undefined") return;
|
|
690
|
+
const observer = new MutationObserver(() => this.syncTabStops(this.marks()));
|
|
691
|
+
observer.observe(this.host.nativeElement, {
|
|
692
|
+
childList: true,
|
|
693
|
+
subtree: true
|
|
694
|
+
});
|
|
695
|
+
this.destroyRef.onDestroy(() => observer.disconnect());
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
onFocusIn(event) {
|
|
699
|
+
const target = event.target;
|
|
700
|
+
if (!(target instanceof Element) || !this.marks().includes(target)) return;
|
|
701
|
+
this.activeMark = target;
|
|
702
|
+
this.syncTabStops(this.marks());
|
|
703
|
+
}
|
|
704
|
+
onKeydown(event) {
|
|
705
|
+
const marks = this.marks();
|
|
706
|
+
const target = event.target;
|
|
707
|
+
const currentIndex = target instanceof Element ? marks.indexOf(target) : -1;
|
|
708
|
+
if (currentIndex < 0 || marks.length < 2) return;
|
|
709
|
+
let targetIndex = null;
|
|
710
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (currentIndex + 1) % marks.length;
|
|
711
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (currentIndex - 1 + marks.length) % marks.length;
|
|
712
|
+
else if (event.key === "Home") targetIndex = 0;
|
|
713
|
+
else if (event.key === "End") targetIndex = marks.length - 1;
|
|
714
|
+
if (targetIndex === null) return;
|
|
715
|
+
event.preventDefault();
|
|
716
|
+
const next = marks[targetIndex];
|
|
717
|
+
this.activeMark = next;
|
|
718
|
+
this.syncTabStops(marks);
|
|
719
|
+
next.focus();
|
|
720
|
+
}
|
|
721
|
+
marks() {
|
|
722
|
+
return Array.from(this.host.nativeElement.querySelectorAll("[role=\"img\"][tabindex]"));
|
|
723
|
+
}
|
|
724
|
+
syncTabStops(marks) {
|
|
725
|
+
if (marks.length === 0) {
|
|
726
|
+
this.activeMark = null;
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
const active = this.activeMark && marks.includes(this.activeMark) ? this.activeMark : marks[0];
|
|
730
|
+
this.activeMark = active;
|
|
731
|
+
for (const mark of marks) mark.setAttribute("tabindex", mark === active ? "0" : "-1");
|
|
732
|
+
}
|
|
733
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
734
|
+
minVersion: "12.0.0",
|
|
735
|
+
version: "22.2.3",
|
|
736
|
+
ngImport: i0,
|
|
737
|
+
type: ChartRovingFocus,
|
|
738
|
+
deps: [],
|
|
739
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
740
|
+
});
|
|
741
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
742
|
+
minVersion: "14.0.0",
|
|
743
|
+
version: "22.2.3",
|
|
744
|
+
type: ChartRovingFocus,
|
|
745
|
+
isStandalone: true,
|
|
746
|
+
selector: "svg[ChartRovingFocus]",
|
|
747
|
+
host: { listeners: {
|
|
748
|
+
"focusin": "onFocusIn($event)",
|
|
749
|
+
"keydown": "onKeydown($event)"
|
|
750
|
+
} },
|
|
751
|
+
ngImport: i0
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
755
|
+
minVersion: "12.0.0",
|
|
756
|
+
version: "22.2.3",
|
|
757
|
+
ngImport: i0,
|
|
758
|
+
type: ChartRovingFocus,
|
|
759
|
+
decorators: [{
|
|
760
|
+
type: Directive,
|
|
761
|
+
args: [{
|
|
762
|
+
selector: "svg[ChartRovingFocus]",
|
|
763
|
+
host: {
|
|
764
|
+
"(focusin)": "onFocusIn($event)",
|
|
765
|
+
"(keydown)": "onKeydown($event)"
|
|
766
|
+
}
|
|
767
|
+
}]
|
|
768
|
+
}],
|
|
769
|
+
ctorParameters: () => []
|
|
770
|
+
});
|
|
771
|
+
var ChartMarkFocus = class ChartMarkFocus {
|
|
772
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
773
|
+
minVersion: "12.0.0",
|
|
774
|
+
version: "22.2.3",
|
|
775
|
+
ngImport: i0,
|
|
776
|
+
type: ChartMarkFocus,
|
|
777
|
+
deps: [],
|
|
778
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
779
|
+
});
|
|
780
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
781
|
+
minVersion: "14.0.0",
|
|
782
|
+
version: "22.2.3",
|
|
783
|
+
type: ChartMarkFocus,
|
|
784
|
+
isStandalone: true,
|
|
785
|
+
selector: "[ChartMarkFocus]",
|
|
786
|
+
host: { classAttribute: "outline-none focus-visible:stroke-ring focus-visible:stroke-2" },
|
|
787
|
+
ngImport: i0
|
|
788
|
+
});
|
|
789
|
+
};
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
791
|
+
minVersion: "12.0.0",
|
|
792
|
+
version: "22.2.3",
|
|
793
|
+
ngImport: i0,
|
|
794
|
+
type: ChartMarkFocus,
|
|
795
|
+
decorators: [{
|
|
796
|
+
type: Directive,
|
|
797
|
+
args: [{
|
|
798
|
+
selector: "[ChartMarkFocus]",
|
|
799
|
+
host: { class: "outline-none focus-visible:stroke-ring focus-visible:stroke-2" }
|
|
800
|
+
}]
|
|
801
|
+
}]
|
|
802
|
+
});
|
|
803
|
+
const DEFAULT_CARTESIAN_MARGIN = {
|
|
804
|
+
top: 8,
|
|
805
|
+
right: 8,
|
|
806
|
+
bottom: 24,
|
|
807
|
+
left: 40
|
|
808
|
+
};
|
|
809
|
+
const DEFAULT_POLAR_MARGIN = {
|
|
810
|
+
top: 8,
|
|
811
|
+
right: 8,
|
|
812
|
+
bottom: 8,
|
|
813
|
+
left: 8
|
|
814
|
+
};
|
|
815
|
+
const DEFAULT_RADAR_MARGIN = {
|
|
816
|
+
top: 24,
|
|
817
|
+
right: 24,
|
|
818
|
+
bottom: 24,
|
|
819
|
+
left: 24
|
|
820
|
+
};
|
|
821
|
+
const DEFAULT_CARTESIAN_MARGIN_UNITS = {
|
|
822
|
+
top: 2,
|
|
823
|
+
right: 2,
|
|
824
|
+
bottom: 6,
|
|
825
|
+
left: 10
|
|
826
|
+
};
|
|
827
|
+
const DEFAULT_POLAR_MARGIN_UNITS = {
|
|
828
|
+
top: 2,
|
|
829
|
+
right: 2,
|
|
830
|
+
bottom: 2,
|
|
831
|
+
left: 2
|
|
832
|
+
};
|
|
833
|
+
const DEFAULT_RADAR_MARGIN_UNITS = {
|
|
834
|
+
top: 6,
|
|
835
|
+
right: 6,
|
|
836
|
+
bottom: 6,
|
|
837
|
+
left: 6
|
|
838
|
+
};
|
|
839
|
+
var CartesianContext = class CartesianContext {
|
|
840
|
+
innerWidth = signal(0, ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []);
|
|
841
|
+
innerHeight = signal(0, ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []);
|
|
842
|
+
margin = signal(DEFAULT_CARTESIAN_MARGIN, ...ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []);
|
|
843
|
+
orientation = signal("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
844
|
+
categoryScale = signal(null, ...ngDevMode ? [{ debugName: "categoryScale" }] : /* istanbul ignore next */ []);
|
|
845
|
+
valueScale = signal(null, ...ngDevMode ? [{ debugName: "valueScale" }] : /* istanbul ignore next */ []);
|
|
846
|
+
categories = signal([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
|
|
847
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
848
|
+
minVersion: "12.0.0",
|
|
849
|
+
version: "22.2.3",
|
|
850
|
+
ngImport: i0,
|
|
851
|
+
type: CartesianContext,
|
|
852
|
+
deps: [],
|
|
853
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
854
|
+
});
|
|
855
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
856
|
+
minVersion: "22.0.0",
|
|
857
|
+
version: "22.2.3",
|
|
858
|
+
ngImport: i0,
|
|
859
|
+
type: CartesianContext,
|
|
860
|
+
autoProvided: false
|
|
861
|
+
});
|
|
862
|
+
};
|
|
863
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
864
|
+
minVersion: "12.0.0",
|
|
865
|
+
version: "22.2.3",
|
|
866
|
+
ngImport: i0,
|
|
867
|
+
type: CartesianContext,
|
|
868
|
+
decorators: [{
|
|
869
|
+
type: Service,
|
|
870
|
+
args: [{ autoProvided: false }]
|
|
871
|
+
}]
|
|
872
|
+
});
|
|
873
|
+
function xScale(ctx) {
|
|
874
|
+
return computed(() => ctx.orientation() === "vertical" ? ctx.categoryScale() : ctx.valueScale());
|
|
875
|
+
}
|
|
876
|
+
function yScale(ctx) {
|
|
877
|
+
return computed(() => ctx.orientation() === "vertical" ? ctx.valueScale() : ctx.categoryScale());
|
|
878
|
+
}
|
|
879
|
+
function resolveChartMargin(margin, units, space) {
|
|
880
|
+
return computed(() => {
|
|
881
|
+
const explicit = margin();
|
|
882
|
+
if (explicit) return explicit;
|
|
883
|
+
return {
|
|
884
|
+
top: space.scale(units.top),
|
|
885
|
+
right: space.scale(units.right),
|
|
886
|
+
bottom: space.scale(units.bottom),
|
|
887
|
+
left: space.scale(units.left)
|
|
888
|
+
};
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
var CategoricalViewportContext = class CategoricalViewportContext {
|
|
892
|
+
dataCount = signal(0, ...ngDevMode ? [{ debugName: "dataCount" }] : /* istanbul ignore next */ []);
|
|
893
|
+
brushRange = signal(null, ...ngDevMode ? [{ debugName: "brushRange" }] : /* istanbul ignore next */ []);
|
|
894
|
+
zoomRange = signal(null, ...ngDevMode ? [{ debugName: "zoomRange" }] : /* istanbul ignore next */ []);
|
|
895
|
+
hasZoom = computed(() => {
|
|
896
|
+
const range = this.zoomRange();
|
|
897
|
+
const count = this.dataCount();
|
|
898
|
+
return !!range && count > 0 && (range.startIndex > 0 || range.endIndex < count - 1);
|
|
899
|
+
}, ...ngDevMode ? [{ debugName: "hasZoom" }] : /* istanbul ignore next */ []);
|
|
900
|
+
resetZoom() {
|
|
901
|
+
this.brushRange.set(null);
|
|
902
|
+
this.zoomRange.set(null);
|
|
903
|
+
}
|
|
904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
905
|
+
minVersion: "12.0.0",
|
|
906
|
+
version: "22.2.3",
|
|
907
|
+
ngImport: i0,
|
|
908
|
+
type: CategoricalViewportContext,
|
|
909
|
+
deps: [],
|
|
910
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
911
|
+
});
|
|
912
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
913
|
+
minVersion: "22.0.0",
|
|
914
|
+
version: "22.2.3",
|
|
915
|
+
ngImport: i0,
|
|
916
|
+
type: CategoricalViewportContext,
|
|
917
|
+
autoProvided: false
|
|
918
|
+
});
|
|
919
|
+
};
|
|
920
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
921
|
+
minVersion: "12.0.0",
|
|
922
|
+
version: "22.2.3",
|
|
923
|
+
ngImport: i0,
|
|
924
|
+
type: CategoricalViewportContext,
|
|
925
|
+
decorators: [{
|
|
926
|
+
type: Service,
|
|
927
|
+
args: [{ autoProvided: false }]
|
|
928
|
+
}]
|
|
929
|
+
});
|
|
930
|
+
var ScatterViewportContext = class ScatterViewportContext {
|
|
931
|
+
innerWidth = signal(0, ...ngDevMode ? [{ debugName: "innerWidth" }] : /* istanbul ignore next */ []);
|
|
932
|
+
innerHeight = signal(0, ...ngDevMode ? [{ debugName: "innerHeight" }] : /* istanbul ignore next */ []);
|
|
933
|
+
fullXDomain = signal(null, ...ngDevMode ? [{ debugName: "fullXDomain" }] : /* istanbul ignore next */ []);
|
|
934
|
+
fullYDomain = signal(null, ...ngDevMode ? [{ debugName: "fullYDomain" }] : /* istanbul ignore next */ []);
|
|
935
|
+
zoomXDomain = signal(null, ...ngDevMode ? [{ debugName: "zoomXDomain" }] : /* istanbul ignore next */ []);
|
|
936
|
+
zoomYDomain = signal(null, ...ngDevMode ? [{ debugName: "zoomYDomain" }] : /* istanbul ignore next */ []);
|
|
937
|
+
xScale = signal(null, ...ngDevMode ? [{ debugName: "xScale" }] : /* istanbul ignore next */ []);
|
|
938
|
+
yScale = signal(null, ...ngDevMode ? [{ debugName: "yScale" }] : /* istanbul ignore next */ []);
|
|
939
|
+
hasZoom = computed(() => this.zoomXDomain() !== null || this.zoomYDomain() !== null, ...ngDevMode ? [{ debugName: "hasZoom" }] : /* istanbul ignore next */ []);
|
|
940
|
+
resetZoom() {
|
|
941
|
+
this.zoomXDomain.set(null);
|
|
942
|
+
this.zoomYDomain.set(null);
|
|
943
|
+
}
|
|
944
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
945
|
+
minVersion: "12.0.0",
|
|
946
|
+
version: "22.2.3",
|
|
947
|
+
ngImport: i0,
|
|
948
|
+
type: ScatterViewportContext,
|
|
949
|
+
deps: [],
|
|
950
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
951
|
+
});
|
|
952
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
953
|
+
minVersion: "22.0.0",
|
|
954
|
+
version: "22.2.3",
|
|
955
|
+
ngImport: i0,
|
|
956
|
+
type: ScatterViewportContext,
|
|
957
|
+
autoProvided: false
|
|
958
|
+
});
|
|
959
|
+
};
|
|
960
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
961
|
+
minVersion: "12.0.0",
|
|
962
|
+
version: "22.2.3",
|
|
963
|
+
ngImport: i0,
|
|
964
|
+
type: ScatterViewportContext,
|
|
965
|
+
decorators: [{
|
|
966
|
+
type: Service,
|
|
967
|
+
args: [{ autoProvided: false }]
|
|
968
|
+
}]
|
|
969
|
+
});
|
|
970
|
+
function bandTicks(scale) {
|
|
971
|
+
const half = scale.bandwidth() / 2;
|
|
972
|
+
return scale.domain().map((value) => ({
|
|
973
|
+
value,
|
|
974
|
+
offset: (scale(value) ?? 0) + half,
|
|
975
|
+
label: value
|
|
976
|
+
}));
|
|
977
|
+
}
|
|
978
|
+
function linearTicks(scale, count = 5, formatter = (v) => String(v)) {
|
|
979
|
+
return scale.ticks(count).map((value) => ({
|
|
980
|
+
value,
|
|
981
|
+
offset: scale(value),
|
|
982
|
+
label: formatter(value)
|
|
983
|
+
}));
|
|
984
|
+
}
|
|
985
|
+
function readNumber(datum, key) {
|
|
986
|
+
const raw = datum[key];
|
|
987
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return raw;
|
|
988
|
+
if (typeof raw === "string") {
|
|
989
|
+
const parsed = Number(raw);
|
|
990
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
991
|
+
}
|
|
992
|
+
return 0;
|
|
993
|
+
}
|
|
994
|
+
function curveFor(curve) {
|
|
995
|
+
switch (curve) {
|
|
996
|
+
case "monotone": return curveMonotoneX;
|
|
997
|
+
case "step": return curveStep;
|
|
998
|
+
default: return curveLinear;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
function buildCartesianScales(input) {
|
|
1002
|
+
const { data, xKey, seriesKeys, orientation, innerWidth, innerHeight } = input;
|
|
1003
|
+
const isVertical = orientation === "vertical";
|
|
1004
|
+
const categories = data.map((d) => String(d[xKey] ?? ""));
|
|
1005
|
+
const categoryScale = scalePoint().domain(categories).range(isVertical ? [0, innerWidth] : [0, innerHeight]).padding(0);
|
|
1006
|
+
const [domainMin, domainMax] = zeroBaselineDomain(min(data, (d) => min(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0, max(data, (d) => max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0);
|
|
1007
|
+
return {
|
|
1008
|
+
categories,
|
|
1009
|
+
categoryScale,
|
|
1010
|
+
valueScale: scaleLinear().domain([domainMin, domainMax]).nice().range(isVertical ? [innerHeight, 0] : [0, innerWidth])
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
function computeLineLayout(input) {
|
|
1014
|
+
const { data, seriesKeys, orientation, curve } = input;
|
|
1015
|
+
const { categories, categoryScale, valueScale } = buildCartesianScales(input);
|
|
1016
|
+
const isVertical = orientation === "vertical";
|
|
1017
|
+
const allPoints = [];
|
|
1018
|
+
const series = [];
|
|
1019
|
+
for (const seriesKey of seriesKeys) {
|
|
1020
|
+
const points = data.map((d, datumIndex) => {
|
|
1021
|
+
const value = readNumber(d, seriesKey);
|
|
1022
|
+
const category = categories[datumIndex];
|
|
1023
|
+
const c = categoryScale(category) ?? 0;
|
|
1024
|
+
const v = valueScale(value);
|
|
1025
|
+
return {
|
|
1026
|
+
seriesKey,
|
|
1027
|
+
datumIndex,
|
|
1028
|
+
category,
|
|
1029
|
+
value,
|
|
1030
|
+
x: isVertical ? c : v,
|
|
1031
|
+
y: isVertical ? v : c
|
|
1032
|
+
};
|
|
1033
|
+
});
|
|
1034
|
+
allPoints.push(...points);
|
|
1035
|
+
const generator = line().x((p) => p.x).y((p) => p.y).curve(curveFor(curve));
|
|
1036
|
+
series.push({
|
|
1037
|
+
seriesKey,
|
|
1038
|
+
color: seriesColorVar(seriesKey),
|
|
1039
|
+
linePath: generator(points) ?? "",
|
|
1040
|
+
points
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
return {
|
|
1044
|
+
series,
|
|
1045
|
+
points: allPoints,
|
|
1046
|
+
categoryScale,
|
|
1047
|
+
valueScale,
|
|
1048
|
+
categories
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
function computeAreaLayout(input) {
|
|
1052
|
+
if (input.stacked && input.seriesKeys.length > 0) return computeStackedArea(input);
|
|
1053
|
+
return computeSingleArea(input);
|
|
1054
|
+
}
|
|
1055
|
+
function computeSingleArea(input) {
|
|
1056
|
+
const { data, seriesKeys, orientation, curve } = input;
|
|
1057
|
+
const { categories, categoryScale, valueScale } = buildCartesianScales(input);
|
|
1058
|
+
const isVertical = orientation === "vertical";
|
|
1059
|
+
const baseline = isVertical ? valueScale(0) : valueScale(0);
|
|
1060
|
+
const allPoints = [];
|
|
1061
|
+
const series = [];
|
|
1062
|
+
for (const seriesKey of seriesKeys) {
|
|
1063
|
+
const points = data.map((d, datumIndex) => {
|
|
1064
|
+
const value = readNumber(d, seriesKey);
|
|
1065
|
+
const category = categories[datumIndex];
|
|
1066
|
+
const c = categoryScale(category) ?? 0;
|
|
1067
|
+
const v = valueScale(value);
|
|
1068
|
+
return {
|
|
1069
|
+
seriesKey,
|
|
1070
|
+
datumIndex,
|
|
1071
|
+
category,
|
|
1072
|
+
value,
|
|
1073
|
+
x: isVertical ? c : v,
|
|
1074
|
+
y: isVertical ? v : c
|
|
1075
|
+
};
|
|
1076
|
+
});
|
|
1077
|
+
allPoints.push(...points);
|
|
1078
|
+
const lineGen = line().x((p) => p.x).y((p) => p.y).curve(curveFor(curve));
|
|
1079
|
+
const areaGen = isVertical ? area().x((p) => p.x).y0(baseline).y1((p) => p.y).curve(curveFor(curve)) : area().y((p) => p.y).x0(baseline).x1((p) => p.x).curve(curveFor(curve));
|
|
1080
|
+
series.push({
|
|
1081
|
+
seriesKey,
|
|
1082
|
+
color: seriesColorVar(seriesKey),
|
|
1083
|
+
linePath: lineGen(points) ?? "",
|
|
1084
|
+
areaPath: areaGen(points) ?? "",
|
|
1085
|
+
points
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
return {
|
|
1089
|
+
series,
|
|
1090
|
+
points: allPoints,
|
|
1091
|
+
categoryScale,
|
|
1092
|
+
valueScale,
|
|
1093
|
+
categories,
|
|
1094
|
+
stacked: false
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
function computeStackedArea(input) {
|
|
1098
|
+
const { data, seriesKeys, orientation, innerWidth, innerHeight, xKey, curve, expanded } = input;
|
|
1099
|
+
const isVertical = orientation === "vertical";
|
|
1100
|
+
const categories = data.map((d) => String(d[xKey] ?? ""));
|
|
1101
|
+
const categoryScale = scalePoint().domain(categories).range(isVertical ? [0, innerWidth] : [0, innerHeight]).padding(0);
|
|
1102
|
+
const normalized = data.map((d) => {
|
|
1103
|
+
const out = {};
|
|
1104
|
+
for (const k of seriesKeys) out[k] = readNumber(d, k);
|
|
1105
|
+
return out;
|
|
1106
|
+
});
|
|
1107
|
+
const stackGenerator = stack().keys(seriesKeys);
|
|
1108
|
+
if (expanded) stackGenerator.offset(stackOffsetExpand);
|
|
1109
|
+
const stackSeries = stackGenerator(normalized);
|
|
1110
|
+
const [domainMin, domainMax] = zeroBaselineDomain(expanded ? 0 : min(stackSeries, (layer) => min(layer, (p) => Math.min(p[0], p[1]))) ?? 0, expanded ? 1 : max(stackSeries, (layer) => max(layer, (p) => Math.max(p[0], p[1]))) ?? 0);
|
|
1111
|
+
const valueScale = scaleLinear().domain([domainMin, domainMax]).range(isVertical ? [innerHeight, 0] : [0, innerWidth]);
|
|
1112
|
+
if (!expanded) valueScale.nice();
|
|
1113
|
+
const allPoints = [];
|
|
1114
|
+
return {
|
|
1115
|
+
series: stackSeries.map((layer) => {
|
|
1116
|
+
const seriesKey = layer.key;
|
|
1117
|
+
const points = layer.map((p, datumIndex) => {
|
|
1118
|
+
const category = categories[datumIndex];
|
|
1119
|
+
const c = categoryScale(category) ?? 0;
|
|
1120
|
+
const upper = valueScale(p[1]);
|
|
1121
|
+
return {
|
|
1122
|
+
seriesKey,
|
|
1123
|
+
datumIndex,
|
|
1124
|
+
category,
|
|
1125
|
+
value: p[1] - p[0],
|
|
1126
|
+
x: isVertical ? c : upper,
|
|
1127
|
+
y: isVertical ? upper : c
|
|
1128
|
+
};
|
|
1129
|
+
});
|
|
1130
|
+
allPoints.push(...points);
|
|
1131
|
+
const lineGen = line().x(([x]) => x).y(([, y]) => y).curve(curveFor(curve));
|
|
1132
|
+
const areaGen = isVertical ? area().x(([x]) => x).y0(([, , y0]) => y0).y1(([, y1]) => y1).curve(curveFor(curve)) : area().y(([x]) => x).x0(([, , x0]) => x0).x1(([, x1]) => x1).curve(curveFor(curve));
|
|
1133
|
+
const tuples = layer.map((p, i) => {
|
|
1134
|
+
return [
|
|
1135
|
+
categoryScale(categories[i]) ?? 0,
|
|
1136
|
+
valueScale(p[1]),
|
|
1137
|
+
valueScale(p[0])
|
|
1138
|
+
];
|
|
1139
|
+
});
|
|
1140
|
+
return {
|
|
1141
|
+
seriesKey,
|
|
1142
|
+
color: seriesColorVar(seriesKey),
|
|
1143
|
+
linePath: lineGen(tuples) ?? "",
|
|
1144
|
+
areaPath: areaGen(tuples) ?? "",
|
|
1145
|
+
points
|
|
1146
|
+
};
|
|
1147
|
+
}),
|
|
1148
|
+
points: allPoints,
|
|
1149
|
+
categoryScale,
|
|
1150
|
+
valueScale,
|
|
1151
|
+
categories,
|
|
1152
|
+
stacked: true
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
function pointToBandAdapter(pointScale, range) {
|
|
1156
|
+
const half = pointScale.step() / 2;
|
|
1157
|
+
const extended = [range[0] - half, range[1] + half];
|
|
1158
|
+
return scaleBand().domain(pointScale.domain()).range(extended).padding(0);
|
|
1159
|
+
}
|
|
1160
|
+
function cloneLinear(scale) {
|
|
1161
|
+
return scaleLinear().domain(scale.domain()).range(scale.range());
|
|
1162
|
+
}
|
|
1163
|
+
function provideCartesianFromLineLayout(ctx, layout, orientation, innerWidth, innerHeight) {
|
|
1164
|
+
const range = orientation === "vertical" ? [0, innerWidth] : [0, innerHeight];
|
|
1165
|
+
ctx.orientation.set(orientation);
|
|
1166
|
+
ctx.innerWidth.set(innerWidth);
|
|
1167
|
+
ctx.innerHeight.set(innerHeight);
|
|
1168
|
+
ctx.categoryScale.set(pointToBandAdapter(layout.categoryScale, range));
|
|
1169
|
+
ctx.valueScale.set(cloneLinear(layout.valueScale));
|
|
1170
|
+
ctx.categories.set(layout.categories);
|
|
1171
|
+
}
|
|
1172
|
+
const FALLBACK_RADIUS_PX = 6;
|
|
1173
|
+
var ChartThemeRadius = class ChartThemeRadius {
|
|
1174
|
+
document = inject(DOCUMENT, { optional: true });
|
|
1175
|
+
basePx = signal(this.readBasePx(), ...ngDevMode ? [{ debugName: "basePx" }] : /* istanbul ignore next */ []);
|
|
1176
|
+
px = this.basePx.asReadonly();
|
|
1177
|
+
constructor() {
|
|
1178
|
+
const root = this.document?.documentElement;
|
|
1179
|
+
const view = this.document?.defaultView;
|
|
1180
|
+
if (!root || !view || typeof view.MutationObserver !== "function") return;
|
|
1181
|
+
const observer = new view.MutationObserver(() => this.basePx.set(this.readBasePx()));
|
|
1182
|
+
observer.observe(root, {
|
|
1183
|
+
attributes: true,
|
|
1184
|
+
attributeFilter: ["theme-radius"]
|
|
1185
|
+
});
|
|
1186
|
+
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
1187
|
+
}
|
|
1188
|
+
readBasePx() {
|
|
1189
|
+
const root = this.document?.documentElement;
|
|
1190
|
+
const view = this.document?.defaultView;
|
|
1191
|
+
if (!root || !view) return FALLBACK_RADIUS_PX;
|
|
1192
|
+
const raw = view.getComputedStyle(root).getPropertyValue("--radius").trim();
|
|
1193
|
+
return this.toPx(raw, view, root) ?? FALLBACK_RADIUS_PX;
|
|
1194
|
+
}
|
|
1195
|
+
toPx(value, view, root) {
|
|
1196
|
+
if (!value) return null;
|
|
1197
|
+
if (value.includes("infinity")) return 9999;
|
|
1198
|
+
const numeric = Number.parseFloat(value);
|
|
1199
|
+
if (!Number.isFinite(numeric)) return null;
|
|
1200
|
+
if (value.endsWith("rem")) return numeric * (Number.parseFloat(view.getComputedStyle(root).fontSize) || 16);
|
|
1201
|
+
return numeric;
|
|
1202
|
+
}
|
|
1203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1204
|
+
minVersion: "12.0.0",
|
|
1205
|
+
version: "22.2.3",
|
|
1206
|
+
ngImport: i0,
|
|
1207
|
+
type: ChartThemeRadius,
|
|
1208
|
+
deps: [],
|
|
1209
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
1210
|
+
});
|
|
1211
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
1212
|
+
minVersion: "22.0.0",
|
|
1213
|
+
version: "22.2.3",
|
|
1214
|
+
ngImport: i0,
|
|
1215
|
+
type: ChartThemeRadius
|
|
1216
|
+
});
|
|
1217
|
+
};
|
|
1218
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1219
|
+
minVersion: "12.0.0",
|
|
1220
|
+
version: "22.2.3",
|
|
1221
|
+
ngImport: i0,
|
|
1222
|
+
type: ChartThemeRadius,
|
|
1223
|
+
decorators: [{ type: Service }],
|
|
1224
|
+
ctorParameters: () => []
|
|
1225
|
+
});
|
|
1226
|
+
const FALLBACK_SPACING_PX = 4;
|
|
1227
|
+
var ChartThemeSpace = class ChartThemeSpace {
|
|
1228
|
+
document = inject(DOCUMENT, { optional: true });
|
|
1229
|
+
unitPx = signal(this.readUnitPx(), ...ngDevMode ? [{ debugName: "unitPx" }] : /* istanbul ignore next */ []);
|
|
1230
|
+
px = this.unitPx.asReadonly();
|
|
1231
|
+
constructor() {
|
|
1232
|
+
const root = this.document?.documentElement;
|
|
1233
|
+
const view = this.document?.defaultView;
|
|
1234
|
+
if (!root || !view || typeof view.MutationObserver !== "function") return;
|
|
1235
|
+
const observer = new view.MutationObserver(() => this.unitPx.set(this.readUnitPx()));
|
|
1236
|
+
observer.observe(root, {
|
|
1237
|
+
attributes: true,
|
|
1238
|
+
attributeFilter: ["theme-space"]
|
|
1239
|
+
});
|
|
1240
|
+
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
1241
|
+
}
|
|
1242
|
+
scale(units) {
|
|
1243
|
+
return units * this.unitPx();
|
|
1244
|
+
}
|
|
1245
|
+
readUnitPx() {
|
|
1246
|
+
const root = this.document?.documentElement;
|
|
1247
|
+
const view = this.document?.defaultView;
|
|
1248
|
+
if (!root || !view) return FALLBACK_SPACING_PX;
|
|
1249
|
+
const raw = view.getComputedStyle(root).getPropertyValue("--spacing-base").trim();
|
|
1250
|
+
return this.toPx(raw, view, root) ?? FALLBACK_SPACING_PX;
|
|
1251
|
+
}
|
|
1252
|
+
toPx(value, view, root) {
|
|
1253
|
+
if (!value) return null;
|
|
1254
|
+
const numeric = Number.parseFloat(value);
|
|
1255
|
+
if (!Number.isFinite(numeric)) return null;
|
|
1256
|
+
if (value.endsWith("rem")) return numeric * (Number.parseFloat(view.getComputedStyle(root).fontSize) || 16);
|
|
1257
|
+
return numeric;
|
|
1258
|
+
}
|
|
1259
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1260
|
+
minVersion: "12.0.0",
|
|
1261
|
+
version: "22.2.3",
|
|
1262
|
+
ngImport: i0,
|
|
1263
|
+
type: ChartThemeSpace,
|
|
1264
|
+
deps: [],
|
|
1265
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
1266
|
+
});
|
|
1267
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
1268
|
+
minVersion: "22.0.0",
|
|
1269
|
+
version: "22.2.3",
|
|
1270
|
+
ngImport: i0,
|
|
1271
|
+
type: ChartThemeSpace
|
|
1272
|
+
});
|
|
1273
|
+
};
|
|
1274
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1275
|
+
minVersion: "12.0.0",
|
|
1276
|
+
version: "22.2.3",
|
|
1277
|
+
ngImport: i0,
|
|
1278
|
+
type: ChartThemeSpace,
|
|
1279
|
+
decorators: [{ type: Service }],
|
|
1280
|
+
ctorParameters: () => []
|
|
1281
|
+
});
|
|
1282
|
+
export { CHART_DATA_ATTRIBUTE, CHART_THEMES, CartesianContext, CategoricalViewportContext, ChartContainer, ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartStyle, ChartThemeRadius, ChartThemeSpace, DEFAULT_CARTESIAN_MARGIN, DEFAULT_CARTESIAN_MARGIN_UNITS, DEFAULT_POLAR_MARGIN, DEFAULT_POLAR_MARGIN_UNITS, DEFAULT_RADAR_MARGIN, DEFAULT_RADAR_MARGIN_UNITS, ScatterViewportContext, activationClientPoint, bandTicks, buildCartesianScales, buildChartCss, cloneLinear, computeAreaLayout, computeLineLayout, effectiveIndexRange, elementClientCenter, escapeCssIdent, indexRangeSize, isSafeCssColorValue, linearTicks, nearestCategoryIndex, normalizeIndexRange, normalizeNumericDomain, panIndexRange, panNumericDomain, pointToBandAdapter, provideCartesianFromLineLayout, readNumber, resolveChartMargin, resolveChartStyle, resolveSeriesColor, seriesColorVar, setupCartesianChart, setupPolarChart, sliceByIndexRange, xScale, yScale, zeroBaselineDomain, zoomIndexRange, zoomNumericDomain };
|