@ojiepermana/angular 22.1.11 → 22.1.13
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/README.md +32 -26
- 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 +137 -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 +147 -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 +25 -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/ojiepermana-angular-chart-area.mjs +289 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
- package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
- package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
- package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
- package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
- package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
- package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
- package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
- package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
- package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
- package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
- package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
- package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
- package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
- package/fesm2022/ojiepermana-angular-component.mjs +4 -4
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
- package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
- package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
- package/fesm2022/ojiepermana-angular.mjs +6 -11
- package/navigation/README.md +374 -0
- package/package.json +81 -20
- 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 +126 -0
- package/theme/component/settings/README.md +135 -0
- package/theme/layout/README.md +539 -0
- package/theme/page/README.md +453 -0
- package/theme/shell/README.md +340 -0
- package/theme/styles/README.md +178 -0
- package/theme/styles/css/base/components.css +553 -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 +165 -0
- package/theme/styles/css/base/theme.css +374 -0
- package/theme/styles/css/base/tokens.css +361 -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/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/ojiepermana-angular-chart-area.d.ts +76 -1
- package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
- package/types/ojiepermana-angular-chart-core.d.ts +811 -1
- package/types/ojiepermana-angular-chart-line.d.ts +75 -1
- package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
- package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
- package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
- package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
- package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
- package/types/ojiepermana-angular-chart.d.ts +2 -1
- package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
- package/types/ojiepermana-angular-component-alert.d.ts +42 -1
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
- package/types/ojiepermana-angular-component-badge.d.ts +24 -1
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
- package/types/ojiepermana-angular-component-button.d.ts +27 -1
- package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
- package/types/ojiepermana-angular-component-card.d.ts +69 -1
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
- package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
- package/types/ojiepermana-angular-component-command.d.ts +130 -1
- package/types/ojiepermana-angular-component-composer.d.ts +90 -1
- package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
- package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
- package/types/ojiepermana-angular-component-editor.d.ts +135 -1
- package/types/ojiepermana-angular-component-empty.d.ts +50 -1
- package/types/ojiepermana-angular-component-form.d.ts +159 -1
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
- package/types/ojiepermana-angular-component-icon.d.ts +89 -1
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
- package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
- package/types/ojiepermana-angular-component-input.d.ts +21 -1
- package/types/ojiepermana-angular-component-item.d.ts +93 -1
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
- package/types/ojiepermana-angular-component-label.d.ts +11 -1
- package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
- package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
- package/types/ojiepermana-angular-component-popover.d.ts +66 -1
- package/types/ojiepermana-angular-component-progress.d.ts +17 -1
- package/types/ojiepermana-angular-component-radio.d.ts +60 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
- package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
- package/types/ojiepermana-angular-component-select.d.ts +122 -1
- package/types/ojiepermana-angular-component-separator.d.ts +14 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
- package/types/ojiepermana-angular-component-slider.d.ts +83 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
- package/types/ojiepermana-angular-component-switch.d.ts +44 -1
- package/types/ojiepermana-angular-component-table.d.ts +57 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
- package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
- package/types/ojiepermana-angular-component-toast.d.ts +64 -1
- package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
- package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
- package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
- package/types/ojiepermana-angular-component-utils.d.ts +2 -1
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
- package/types/ojiepermana-angular-navigation.d.ts +507 -1
- package/types/ojiepermana-angular-sdk.d.ts +89 -1
- package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
- package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
- package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
- package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
- package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
- package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
- package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
- package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
- package/types/ojiepermana-angular-theme-page.d.ts +5 -1
- package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
- package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
- package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
- package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
- package/types/ojiepermana-angular-theme.d.ts +2 -1
- package/types/ojiepermana-angular.d.ts +5 -5
|
@@ -1,7 +1,726 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, input, output, computed, Component } from '@angular/core';
|
|
3
|
+
import { resolveSeriesColor, seriesColorVar, readNumber, zeroBaselineDomain, ChartContext, CartesianContext, ChartThemeRadius, resolveChartStyle, ChartThemeSpace, resolveChartMargin, DEFAULT_CARTESIAN_MARGIN_UNITS, setupCartesianChart, ChartRovingFocus, ChartMarkFocus, ChartDataTable } from '@ojiepermana/angular/chart/core';
|
|
4
|
+
import { scaleBand, scaleLinear } from 'd3-scale';
|
|
5
|
+
import { min, max } from 'd3-array';
|
|
6
|
+
import { stack } from 'd3-shape';
|
|
7
|
+
import { ChartPointerTracker } from '@ojiepermana/angular/chart/primitives';
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
function resolveBarColor(datum, seriesKey, colorKey) {
|
|
10
|
+
return resolveSeriesColor(colorKey ? datum[colorKey] : undefined, seriesColorVar(seriesKey));
|
|
11
|
+
}
|
|
12
|
+
function isActiveBar(datum, activeKey, activeValue) {
|
|
13
|
+
if (!activeKey || activeValue === undefined) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const value = datum[activeKey];
|
|
17
|
+
if (typeof value === 'number' && typeof activeValue === 'number') {
|
|
18
|
+
return value === activeValue;
|
|
19
|
+
}
|
|
20
|
+
return String(value ?? '') === String(activeValue);
|
|
21
|
+
}
|
|
22
|
+
/** Build all bar rectangles for the given config. */
|
|
23
|
+
function computeBarLayout(input) {
|
|
24
|
+
const { data, xKey, seriesKeys, variant, orientation, innerWidth, innerHeight, bandPadding, groupPadding, colorKey, activeKey, activeValue, } = input;
|
|
25
|
+
const categories = data.map((d) => String(d[xKey] ?? ''));
|
|
26
|
+
const isVertical = orientation === 'vertical';
|
|
27
|
+
const categoryScale = scaleBand()
|
|
28
|
+
.domain(categories)
|
|
29
|
+
.range(isVertical ? [0, innerWidth] : [0, innerHeight])
|
|
30
|
+
.padding(bandPadding);
|
|
31
|
+
const valueScale = scaleLinear();
|
|
32
|
+
if (variant === 'stacked' && seriesKeys.length > 0) {
|
|
33
|
+
return stackedLayout({
|
|
34
|
+
data,
|
|
35
|
+
xKey,
|
|
36
|
+
seriesKeys,
|
|
37
|
+
orientation,
|
|
38
|
+
innerWidth,
|
|
39
|
+
innerHeight,
|
|
40
|
+
categoryScale,
|
|
41
|
+
valueScale,
|
|
42
|
+
categories,
|
|
43
|
+
colorKey,
|
|
44
|
+
activeKey,
|
|
45
|
+
activeValue,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return groupedLayout({
|
|
49
|
+
data,
|
|
50
|
+
xKey,
|
|
51
|
+
seriesKeys,
|
|
52
|
+
orientation,
|
|
53
|
+
innerWidth,
|
|
54
|
+
innerHeight,
|
|
55
|
+
categoryScale,
|
|
56
|
+
valueScale,
|
|
57
|
+
groupPadding,
|
|
58
|
+
categories,
|
|
59
|
+
colorKey,
|
|
60
|
+
activeKey,
|
|
61
|
+
activeValue,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function groupedLayout(input) {
|
|
65
|
+
const { data, seriesKeys, orientation, innerWidth, innerHeight, categoryScale, valueScale, groupPadding, categories, colorKey, activeKey, activeValue, } = input;
|
|
66
|
+
const isVertical = orientation === 'vertical';
|
|
67
|
+
const minValue = min(data, (d) => min(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;
|
|
68
|
+
const maxValue = max(data, (d) => max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;
|
|
69
|
+
const [domainMin, domainMax] = zeroBaselineDomain(minValue, maxValue);
|
|
70
|
+
valueScale
|
|
71
|
+
.domain([domainMin, domainMax])
|
|
72
|
+
.nice()
|
|
73
|
+
.range(isVertical ? [innerHeight, 0] : [0, innerWidth]);
|
|
74
|
+
const baseline = valueScale(0);
|
|
75
|
+
const subScale = scaleBand()
|
|
76
|
+
.domain(seriesKeys)
|
|
77
|
+
.range([0, categoryScale.bandwidth()])
|
|
78
|
+
.padding(groupPadding);
|
|
79
|
+
const bars = [];
|
|
80
|
+
data.forEach((datum, datumIndex) => {
|
|
81
|
+
const category = categories[datumIndex];
|
|
82
|
+
const bandStart = categoryScale(category) ?? 0;
|
|
83
|
+
seriesKeys.forEach((seriesKey) => {
|
|
84
|
+
const value = readNumber(datum, seriesKey);
|
|
85
|
+
const sub = subScale(seriesKey) ?? 0;
|
|
86
|
+
const scaledValue = valueScale(value);
|
|
87
|
+
const color = resolveBarColor(datum, seriesKey, colorKey);
|
|
88
|
+
const active = isActiveBar(datum, activeKey, activeValue);
|
|
89
|
+
const rect = isVertical
|
|
90
|
+
? {
|
|
91
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
92
|
+
seriesKey,
|
|
93
|
+
datumIndex,
|
|
94
|
+
category,
|
|
95
|
+
value,
|
|
96
|
+
x: bandStart + sub,
|
|
97
|
+
y: Math.min(scaledValue, baseline),
|
|
98
|
+
width: subScale.bandwidth(),
|
|
99
|
+
height: Math.abs(baseline - scaledValue),
|
|
100
|
+
color,
|
|
101
|
+
active,
|
|
102
|
+
}
|
|
103
|
+
: {
|
|
104
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
105
|
+
seriesKey,
|
|
106
|
+
datumIndex,
|
|
107
|
+
category,
|
|
108
|
+
value,
|
|
109
|
+
x: Math.min(scaledValue, baseline),
|
|
110
|
+
y: bandStart + sub,
|
|
111
|
+
width: Math.abs(baseline - scaledValue),
|
|
112
|
+
height: subScale.bandwidth(),
|
|
113
|
+
color,
|
|
114
|
+
active,
|
|
115
|
+
};
|
|
116
|
+
bars.push(rect);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
return { bars, categoryScale, valueScale, categories };
|
|
120
|
+
}
|
|
121
|
+
function stackedLayout(input) {
|
|
122
|
+
const { data, seriesKeys, orientation, innerWidth, innerHeight, categoryScale, valueScale, categories, colorKey, activeKey, activeValue, } = input;
|
|
123
|
+
const isVertical = orientation === 'vertical';
|
|
124
|
+
const normalized = data.map((d) => {
|
|
125
|
+
const out = {};
|
|
126
|
+
for (const k of seriesKeys) {
|
|
127
|
+
out[k] = readNumber(d, k);
|
|
128
|
+
}
|
|
129
|
+
return out;
|
|
130
|
+
});
|
|
131
|
+
const series = stack().keys(seriesKeys)(normalized);
|
|
132
|
+
// Every layer is measured, not just the last one: a stack that runs below the
|
|
133
|
+
// baseline puts its extreme on whichever layer carries the negative values.
|
|
134
|
+
const minTotal = min(series, (layer) => min(layer, (p) => Math.min(p[0], p[1]))) ?? 0;
|
|
135
|
+
const maxTotal = max(series, (layer) => max(layer, (p) => Math.max(p[0], p[1]))) ?? 0;
|
|
136
|
+
const [domainMin, domainMax] = zeroBaselineDomain(minTotal, maxTotal);
|
|
137
|
+
valueScale
|
|
138
|
+
.domain([domainMin, domainMax])
|
|
139
|
+
.nice()
|
|
140
|
+
.range(isVertical ? [innerHeight, 0] : [0, innerWidth]);
|
|
141
|
+
const bars = [];
|
|
142
|
+
series.forEach((layer) => {
|
|
143
|
+
const seriesKey = layer.key;
|
|
144
|
+
layer.forEach((point, datumIndex) => {
|
|
145
|
+
const [lower, upper] = point;
|
|
146
|
+
const value = upper - lower;
|
|
147
|
+
const category = categories[datumIndex];
|
|
148
|
+
const bandStart = categoryScale(category) ?? 0;
|
|
149
|
+
const color = resolveBarColor(data[datumIndex], seriesKey, colorKey);
|
|
150
|
+
const active = isActiveBar(data[datumIndex], activeKey, activeValue);
|
|
151
|
+
// A negative segment stacks downward, so `upper` lands on the far side of
|
|
152
|
+
// the baseline from `lower`. Taking the near edge and the absolute span
|
|
153
|
+
// keeps the rectangle drawable whichever way round the pair sits.
|
|
154
|
+
const lowerCoord = valueScale(lower);
|
|
155
|
+
const upperCoord = valueScale(upper);
|
|
156
|
+
const span = Math.abs(upperCoord - lowerCoord);
|
|
157
|
+
const rect = isVertical
|
|
158
|
+
? {
|
|
159
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
160
|
+
seriesKey,
|
|
161
|
+
datumIndex,
|
|
162
|
+
category,
|
|
163
|
+
value,
|
|
164
|
+
x: bandStart,
|
|
165
|
+
y: Math.min(lowerCoord, upperCoord),
|
|
166
|
+
width: categoryScale.bandwidth(),
|
|
167
|
+
height: span,
|
|
168
|
+
color,
|
|
169
|
+
active,
|
|
170
|
+
}
|
|
171
|
+
: {
|
|
172
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
173
|
+
seriesKey,
|
|
174
|
+
datumIndex,
|
|
175
|
+
category,
|
|
176
|
+
value,
|
|
177
|
+
x: Math.min(lowerCoord, upperCoord),
|
|
178
|
+
y: bandStart,
|
|
179
|
+
width: span,
|
|
180
|
+
height: categoryScale.bandwidth(),
|
|
181
|
+
color,
|
|
182
|
+
active,
|
|
183
|
+
};
|
|
184
|
+
bars.push(rect);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
return { bars, categoryScale, valueScale, categories };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Hard cap so degenerate inputs (tiny `dotSize`) cannot explode the DOM. */
|
|
191
|
+
const MAX_ROWS_PER_COLUMN = 400;
|
|
192
|
+
const EDGE_TOLERANCE = 0.5;
|
|
193
|
+
/**
|
|
194
|
+
* Build the dot-matrix cells for the `dot` bar style.
|
|
195
|
+
*
|
|
196
|
+
* Cells tile a global grid anchored at the value baseline, so stacked
|
|
197
|
+
* segments snap to the same rows and never overlap. A bar fills every cell
|
|
198
|
+
* whose center lies inside its value range; bars too short to cover a center
|
|
199
|
+
* still claim the cell nearest their midpoint when it is free.
|
|
200
|
+
*/
|
|
201
|
+
function computeBarDotCells(input) {
|
|
202
|
+
const { bars, orientation, innerWidth, innerHeight, baseline, dotSize, dotGap } = input;
|
|
203
|
+
const isVertical = orientation === 'vertical';
|
|
204
|
+
const innerLength = isVertical ? innerHeight : innerWidth;
|
|
205
|
+
const track = [];
|
|
206
|
+
const values = [];
|
|
207
|
+
if (innerLength <= 0 || bars.length === 0) {
|
|
208
|
+
return { track, values };
|
|
209
|
+
}
|
|
210
|
+
const columns = groupColumns(bars, isVertical);
|
|
211
|
+
columns.forEach((column, columnIndex) => {
|
|
212
|
+
const cellLength = dotSize ?? column.thickness;
|
|
213
|
+
const step = cellLength + dotGap;
|
|
214
|
+
if (cellLength <= 0 || step <= EDGE_TOLERANCE) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
// Signed row index r anchored at the baseline: r = 0 is the first cell on
|
|
218
|
+
// the positive-value side, negative r tiles the negative side.
|
|
219
|
+
// `rowStart(r)` is the cell's lower main-axis coordinate (top edge for
|
|
220
|
+
// vertical, left edge for horizontal); `rowAt(c)` is the fractional row
|
|
221
|
+
// whose cell center sits at coordinate c.
|
|
222
|
+
const rowStart = (r) => isVertical ? baseline - r * step - cellLength : baseline + r * step;
|
|
223
|
+
const rowAt = (c) => isVertical ? (baseline - c - cellLength / 2) / step : (c - baseline - cellLength / 2) / step;
|
|
224
|
+
// Rows whose cell lies fully inside the plot area.
|
|
225
|
+
const rMin = Math.ceil(isVertical
|
|
226
|
+
? (baseline - innerLength - EDGE_TOLERANCE) / step
|
|
227
|
+
: (-baseline - EDGE_TOLERANCE) / step);
|
|
228
|
+
let rMax = Math.floor(isVertical
|
|
229
|
+
? (baseline - cellLength + EDGE_TOLERANCE) / step
|
|
230
|
+
: (innerLength - baseline - cellLength + EDGE_TOLERANCE) / step);
|
|
231
|
+
if (rMax - rMin + 1 > MAX_ROWS_PER_COLUMN) {
|
|
232
|
+
rMax = rMin + MAX_ROWS_PER_COLUMN - 1;
|
|
233
|
+
}
|
|
234
|
+
const cellRect = (r) => isVertical
|
|
235
|
+
? { x: column.pos, y: rowStart(r), width: column.thickness, height: cellLength }
|
|
236
|
+
: { x: rowStart(r), y: column.pos, width: cellLength, height: column.thickness };
|
|
237
|
+
for (let r = rMin; r <= rMax; r++) {
|
|
238
|
+
track.push({ key: `${columnIndex}:${r}`, ...cellRect(r) });
|
|
239
|
+
}
|
|
240
|
+
const usedRows = new Set();
|
|
241
|
+
for (const bar of column.bars) {
|
|
242
|
+
const barLength = isVertical ? bar.height : bar.width;
|
|
243
|
+
if (barLength <= EDGE_TOLERANCE) {
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
const barStart = isVertical ? bar.y : bar.x;
|
|
247
|
+
const barEnd = barStart + barLength;
|
|
248
|
+
// Rows whose cell center falls inside [barStart, barEnd] (± tolerance).
|
|
249
|
+
const rA = rowAt(barStart);
|
|
250
|
+
const rB = rowAt(barEnd);
|
|
251
|
+
const first = Math.max(Math.ceil(Math.min(rA, rB) - EDGE_TOLERANCE / step), rMin);
|
|
252
|
+
const last = Math.min(Math.floor(Math.max(rA, rB) + EDGE_TOLERANCE / step), rMax);
|
|
253
|
+
const rows = [];
|
|
254
|
+
for (let r = first; r <= last; r++) {
|
|
255
|
+
rows.push(r);
|
|
256
|
+
}
|
|
257
|
+
// Guarantee visibility: a non-zero bar shorter than one cell claims the
|
|
258
|
+
// row nearest its midpoint when that row is still free.
|
|
259
|
+
if (rows.length === 0) {
|
|
260
|
+
const r = Math.round(rowAt(barStart + barLength / 2));
|
|
261
|
+
if (r >= rMin && r <= rMax && !usedRows.has(r)) {
|
|
262
|
+
rows.push(r);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
for (const r of rows) {
|
|
266
|
+
if (usedRows.has(r)) {
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
usedRows.add(r);
|
|
270
|
+
values.push({
|
|
271
|
+
key: `${bar.key}:${r}`,
|
|
272
|
+
...cellRect(r),
|
|
273
|
+
seriesKey: bar.seriesKey,
|
|
274
|
+
datumIndex: bar.datumIndex,
|
|
275
|
+
color: bar.color,
|
|
276
|
+
active: bar.active,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
return { track, values };
|
|
282
|
+
}
|
|
283
|
+
/** Group bars sharing the same cross-axis band into one cell column. */
|
|
284
|
+
function groupColumns(bars, isVertical) {
|
|
285
|
+
const map = new Map();
|
|
286
|
+
for (const bar of bars) {
|
|
287
|
+
const pos = isVertical ? bar.x : bar.y;
|
|
288
|
+
const thickness = isVertical ? bar.width : bar.height;
|
|
289
|
+
if (thickness <= 0) {
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
const key = `${pos.toFixed(2)}:${thickness.toFixed(2)}`;
|
|
293
|
+
const existing = map.get(key);
|
|
294
|
+
if (existing) {
|
|
295
|
+
existing.bars.push(bar);
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
map.set(key, { pos, thickness, bars: [bar] });
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return [...map.values()];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const defaultBarValueFormatter = (value) => `${value}`;
|
|
305
|
+
/**
|
|
306
|
+
* Bar chart — composable within `<Chart>`.
|
|
307
|
+
*
|
|
308
|
+
* Layout variants (via inputs):
|
|
309
|
+
* - `orientation`: `'vertical'` (default) or `'horizontal'`
|
|
310
|
+
* - `variant`: `'grouped'` (default) or `'stacked'`
|
|
311
|
+
* - `styles`: `'base'` (default) or `'dot'` (dot-matrix cells)
|
|
312
|
+
*/
|
|
313
|
+
class BarChart {
|
|
314
|
+
root = inject(ChartContext);
|
|
315
|
+
cart = inject(CartesianContext);
|
|
316
|
+
themeRadius = inject(ChartThemeRadius);
|
|
317
|
+
data = input.required(/* @ts-ignore */
|
|
318
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
319
|
+
xKey = input.required(/* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "xKey" }] : /* istanbul ignore next */ []));
|
|
321
|
+
orientation = input('vertical', /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
323
|
+
variant = input('grouped', /* @ts-ignore */
|
|
324
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
325
|
+
/**
|
|
326
|
+
* Presentational style of the chart.
|
|
327
|
+
*
|
|
328
|
+
* Replaces `styles`, which read like a CSS styles bag rather than a single
|
|
329
|
+
* variant. Named `styleVariant` and not `variant` because `ChartBar` already
|
|
330
|
+
* publishes a `variant` input for its grouped versus stacked axis, and one
|
|
331
|
+
* name cannot mean two things across the family.
|
|
332
|
+
*/
|
|
333
|
+
styleVariant = input(undefined, /* @ts-ignore */
|
|
334
|
+
...(ngDevMode ? [{ debugName: "styleVariant" }] : /* istanbul ignore next */ []));
|
|
335
|
+
/**
|
|
336
|
+
* @deprecated Use `styleVariant`. Still fully supported; when both are bound,
|
|
337
|
+
* `styleVariant` wins. Due for removal in the next major.
|
|
338
|
+
*/
|
|
339
|
+
styles = input('base', /* @ts-ignore */
|
|
340
|
+
...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
341
|
+
/** The style actually in effect. Bind this, never `styles()`. */
|
|
342
|
+
chartStyle = resolveChartStyle(this.styleVariant, this.styles);
|
|
343
|
+
themeSpace = inject(ChartThemeSpace);
|
|
344
|
+
/**
|
|
345
|
+
* Plot gutters. Leave it unset and they follow the theme-space density
|
|
346
|
+
* axis; set it and your numbers win, unchanged, whatever the axis says.
|
|
347
|
+
*/
|
|
348
|
+
margin = input(null, /* @ts-ignore */
|
|
349
|
+
...(ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []));
|
|
350
|
+
/** The margin actually in effect. Bind this, never `margin()`. */
|
|
351
|
+
plotMargin = resolveChartMargin(this.margin, DEFAULT_CARTESIAN_MARGIN_UNITS, this.themeSpace);
|
|
352
|
+
bandPadding = input(0.2, /* @ts-ignore */
|
|
353
|
+
...(ngDevMode ? [{ debugName: "bandPadding" }] : /* istanbul ignore next */ []));
|
|
354
|
+
groupPadding = input(0.05, /* @ts-ignore */
|
|
355
|
+
...(ngDevMode ? [{ debugName: "groupPadding" }] : /* istanbul ignore next */ []));
|
|
356
|
+
cornerRadius = input(null, /* @ts-ignore */
|
|
357
|
+
...(ngDevMode ? [{ debugName: "cornerRadius" }] : /* istanbul ignore next */ []));
|
|
358
|
+
colorKey = input(undefined, /* @ts-ignore */
|
|
359
|
+
...(ngDevMode ? [{ debugName: "colorKey" }] : /* istanbul ignore next */ []));
|
|
360
|
+
activeKey = input(undefined, /* @ts-ignore */
|
|
361
|
+
...(ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []));
|
|
362
|
+
activeValue = input(undefined, /* @ts-ignore */
|
|
363
|
+
...(ngDevMode ? [{ debugName: "activeValue" }] : /* istanbul ignore next */ []));
|
|
364
|
+
showValueLabels = input(false, /* @ts-ignore */
|
|
365
|
+
...(ngDevMode ? [{ debugName: "showValueLabels" }] : /* istanbul ignore next */ []));
|
|
366
|
+
valueLabelFormat = input(defaultBarValueFormatter, /* @ts-ignore */
|
|
367
|
+
...(ngDevMode ? [{ debugName: "valueLabelFormat" }] : /* istanbul ignore next */ []));
|
|
368
|
+
/** Cell length along the value axis for the `dot` style; defaults to the bar thickness. */
|
|
369
|
+
dotSize = input(undefined, /* @ts-ignore */
|
|
370
|
+
...(ngDevMode ? [{ debugName: "dotSize" }] : /* istanbul ignore next */ []));
|
|
371
|
+
/** Gap between consecutive cells along the value axis for the `dot` style. */
|
|
372
|
+
dotGap = input(2, /* @ts-ignore */
|
|
373
|
+
...(ngDevMode ? [{ debugName: "dotGap" }] : /* istanbul ignore next */ []));
|
|
374
|
+
/** Corner radius of each `dot` cell. */
|
|
375
|
+
dotCornerRadius = input(null, /* @ts-ignore */
|
|
376
|
+
...(ngDevMode ? [{ debugName: "dotCornerRadius" }] : /* istanbul ignore next */ []));
|
|
377
|
+
/** Render the faint full-height cell track behind the `dot` values. */
|
|
378
|
+
showDotTrack = input(true, /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "showDotTrack" }] : /* istanbul ignore next */ []));
|
|
380
|
+
barClick = output();
|
|
381
|
+
/**
|
|
382
|
+
* The shared cartesian scaffolding: geometry, the layout effect, and the click
|
|
383
|
+
* plus active-point plus aria-label handlers. No `viewport` here, so the bar
|
|
384
|
+
* chart always renders its whole dataset and `resolveDatumIndex` is the
|
|
385
|
+
* identity.
|
|
386
|
+
*
|
|
387
|
+
* Declared before `layout` because the layout computed reads its geometry.
|
|
388
|
+
*/
|
|
389
|
+
cx = setupCartesianChart({
|
|
390
|
+
data: () => this.data(),
|
|
391
|
+
margin: () => this.plotMargin(),
|
|
392
|
+
cartesian: { context: this.cart, orientation: () => this.orientation() },
|
|
393
|
+
publishLayout: () => {
|
|
394
|
+
const layout = this.layout();
|
|
395
|
+
this.cart.categoryScale.set(layout.categoryScale);
|
|
396
|
+
this.cart.valueScale.set(layout.valueScale);
|
|
397
|
+
this.cart.categories.set(layout.categories);
|
|
398
|
+
},
|
|
399
|
+
click: {
|
|
400
|
+
emit: (event) => this.barClick.emit(event),
|
|
401
|
+
payload: (bar, datumIndex, datum) => ({
|
|
402
|
+
seriesKey: bar.seriesKey,
|
|
403
|
+
datumIndex,
|
|
404
|
+
category: bar.category,
|
|
405
|
+
value: bar.value,
|
|
406
|
+
datum,
|
|
407
|
+
}),
|
|
408
|
+
},
|
|
409
|
+
ariaLabel: (bar, label) => `${label} in ${bar.category}: ${bar.value}`,
|
|
410
|
+
});
|
|
411
|
+
/** Bar corner radius; an unset input follows the live theme-radius axis. */
|
|
412
|
+
resolvedCornerRadius = computed(() => this.cornerRadius() ?? this.themeRadius.px(), /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "resolvedCornerRadius" }] : /* istanbul ignore next */ []));
|
|
414
|
+
/** Dot-cell corner radius; an unset input follows the theme-radius axis (smaller, SVG clamps to half the cell). */
|
|
415
|
+
resolvedDotCornerRadius = computed(() => this.dotCornerRadius() ?? Math.min(this.themeRadius.px() * 0.5, 4), /* @ts-ignore */
|
|
416
|
+
...(ngDevMode ? [{ debugName: "resolvedDotCornerRadius" }] : /* istanbul ignore next */ []));
|
|
417
|
+
layout = computed(() => computeBarLayout({
|
|
418
|
+
data: this.data(),
|
|
419
|
+
xKey: this.xKey(),
|
|
420
|
+
seriesKeys: this.root.visibleSeriesKeys(),
|
|
421
|
+
variant: this.variant(),
|
|
422
|
+
orientation: this.orientation(),
|
|
423
|
+
innerWidth: this.cx.innerWidth(),
|
|
424
|
+
innerHeight: this.cx.innerHeight(),
|
|
425
|
+
bandPadding: this.bandPadding(),
|
|
426
|
+
groupPadding: this.groupPadding(),
|
|
427
|
+
colorKey: this.colorKey(),
|
|
428
|
+
activeKey: this.activeKey(),
|
|
429
|
+
activeValue: this.activeValue(),
|
|
430
|
+
}), /* @ts-ignore */
|
|
431
|
+
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
432
|
+
bars = computed(() => this.layout().bars, /* @ts-ignore */
|
|
433
|
+
...(ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []));
|
|
434
|
+
dotLayout = computed(() => {
|
|
435
|
+
if (this.chartStyle() !== 'dot') {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
const layout = this.layout();
|
|
439
|
+
return computeBarDotCells({
|
|
440
|
+
bars: layout.bars,
|
|
441
|
+
orientation: this.orientation(),
|
|
442
|
+
innerWidth: this.cx.innerWidth(),
|
|
443
|
+
innerHeight: this.cx.innerHeight(),
|
|
444
|
+
baseline: layout.valueScale(0),
|
|
445
|
+
dotSize: this.dotSize(),
|
|
446
|
+
dotGap: this.dotGap(),
|
|
447
|
+
});
|
|
448
|
+
}, /* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [{ debugName: "dotLayout" }] : /* istanbul ignore next */ []));
|
|
450
|
+
dotTrackCells = computed(() => this.showDotTrack() ? (this.dotLayout()?.track ?? []) : [], /* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [{ debugName: "dotTrackCells" }] : /* istanbul ignore next */ []));
|
|
452
|
+
dotValueCells = computed(() => this.dotLayout()?.values ?? [], /* @ts-ignore */
|
|
453
|
+
...(ngDevMode ? [{ debugName: "dotValueCells" }] : /* istanbul ignore next */ []));
|
|
454
|
+
ariaSummary = computed(() => {
|
|
455
|
+
const keys = this.root.visibleSeriesKeys();
|
|
456
|
+
const n = this.data().length;
|
|
457
|
+
return `Bar chart, ${n} categories, ${keys.length} series: ${keys.join(', ')}.`;
|
|
458
|
+
}, /* @ts-ignore */
|
|
459
|
+
...(ngDevMode ? [{ debugName: "ariaSummary" }] : /* istanbul ignore next */ []));
|
|
460
|
+
visibleSeriesKeys = computed(() => this.root.visibleSeriesKeys(), /* @ts-ignore */
|
|
461
|
+
...(ngDevMode ? [{ debugName: "visibleSeriesKeys" }] : /* istanbul ignore next */ []));
|
|
462
|
+
dataColumns = computed(() => [this.xKey(), ...this.visibleSeriesKeys()], /* @ts-ignore */
|
|
463
|
+
...(ngDevMode ? [{ debugName: "dataColumns" }] : /* istanbul ignore next */ []));
|
|
464
|
+
barOpacity(bar) {
|
|
465
|
+
return this.emphasisOpacity(bar.active);
|
|
466
|
+
}
|
|
467
|
+
dotCellOpacity(cell) {
|
|
468
|
+
return this.emphasisOpacity(cell.active);
|
|
469
|
+
}
|
|
470
|
+
/** In `dot` style the bar rect stays as an invisible interaction target. */
|
|
471
|
+
barFill(bar) {
|
|
472
|
+
return this.chartStyle() === 'dot' ? 'transparent' : bar.color;
|
|
473
|
+
}
|
|
474
|
+
emphasisOpacity(active) {
|
|
475
|
+
return this.activeKey() && this.activeValue() !== undefined ? (active ? 1 : 0.42) : 1;
|
|
476
|
+
}
|
|
477
|
+
formatValueLabel(bar) {
|
|
478
|
+
return this.valueLabelFormat()(bar.value);
|
|
479
|
+
}
|
|
480
|
+
barLabelX(bar) {
|
|
481
|
+
if (this.orientation() === 'vertical') {
|
|
482
|
+
return bar.x + bar.width / 2;
|
|
483
|
+
}
|
|
484
|
+
return bar.value >= 0 ? bar.x + bar.width + 6 : bar.x - 6;
|
|
485
|
+
}
|
|
486
|
+
barLabelY(bar) {
|
|
487
|
+
if (this.orientation() === 'vertical') {
|
|
488
|
+
return bar.value >= 0 ? bar.y - 8 : bar.y + bar.height + 10;
|
|
489
|
+
}
|
|
490
|
+
return bar.y + bar.height / 2;
|
|
491
|
+
}
|
|
492
|
+
barLabelAnchor(bar) {
|
|
493
|
+
if (this.orientation() === 'vertical') {
|
|
494
|
+
return 'middle';
|
|
495
|
+
}
|
|
496
|
+
return bar.value >= 0 ? 'start' : 'end';
|
|
497
|
+
}
|
|
498
|
+
onKeydown(event, index) {
|
|
499
|
+
const key = event.key;
|
|
500
|
+
let targetIndex = -1;
|
|
501
|
+
if (key === 'ArrowRight' || key === 'ArrowDown') {
|
|
502
|
+
targetIndex = index + 1;
|
|
503
|
+
}
|
|
504
|
+
else if (key === 'ArrowLeft' || key === 'ArrowUp') {
|
|
505
|
+
targetIndex = index - 1;
|
|
506
|
+
}
|
|
507
|
+
if (targetIndex >= 0 && targetIndex < this.bars().length) {
|
|
508
|
+
event.preventDefault();
|
|
509
|
+
const svgEl = event.currentTarget;
|
|
510
|
+
const parent = svgEl.parentElement;
|
|
511
|
+
if (parent) {
|
|
512
|
+
const rects = parent.querySelectorAll('.chart-bar');
|
|
513
|
+
const targetRect = rects[targetIndex];
|
|
514
|
+
if (targetRect) {
|
|
515
|
+
targetRect.focus();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BarChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
521
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: BarChart, isStandalone: true, selector: "ChartBar", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, xKey: { classPropertyName: "xKey", publicName: "xKey", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, styleVariant: { classPropertyName: "styleVariant", publicName: "styleVariant", isSignal: true, isRequired: false, transformFunction: null }, styles: { classPropertyName: "styles", publicName: "styles", isSignal: true, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: true, isRequired: false, transformFunction: null }, bandPadding: { classPropertyName: "bandPadding", publicName: "bandPadding", isSignal: true, isRequired: false, transformFunction: null }, groupPadding: { classPropertyName: "groupPadding", publicName: "groupPadding", isSignal: true, isRequired: false, transformFunction: null }, cornerRadius: { classPropertyName: "cornerRadius", publicName: "cornerRadius", isSignal: true, isRequired: false, transformFunction: null }, colorKey: { classPropertyName: "colorKey", publicName: "colorKey", isSignal: true, isRequired: false, transformFunction: null }, activeKey: { classPropertyName: "activeKey", publicName: "activeKey", isSignal: true, isRequired: false, transformFunction: null }, activeValue: { classPropertyName: "activeValue", publicName: "activeValue", isSignal: true, isRequired: false, transformFunction: null }, showValueLabels: { classPropertyName: "showValueLabels", publicName: "showValueLabels", isSignal: true, isRequired: false, transformFunction: null }, valueLabelFormat: { classPropertyName: "valueLabelFormat", publicName: "valueLabelFormat", isSignal: true, isRequired: false, transformFunction: null }, dotSize: { classPropertyName: "dotSize", publicName: "dotSize", isSignal: true, isRequired: false, transformFunction: null }, dotGap: { classPropertyName: "dotGap", publicName: "dotGap", isSignal: true, isRequired: false, transformFunction: null }, dotCornerRadius: { classPropertyName: "dotCornerRadius", publicName: "dotCornerRadius", isSignal: true, isRequired: false, transformFunction: null }, showDotTrack: { classPropertyName: "showDotTrack", publicName: "showDotTrack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { barClick: "barClick" }, host: { properties: { "attr.data-style": "chartStyle()" }, classAttribute: "relative block h-full w-full" }, providers: [CartesianContext], ngImport: i0, template: `
|
|
522
|
+
<svg:svg
|
|
523
|
+
ChartPointerTracker
|
|
524
|
+
ChartRovingFocus
|
|
525
|
+
class="block h-full w-full overflow-visible"
|
|
526
|
+
[attr.viewBox]="cx.viewBox()"
|
|
527
|
+
preserveAspectRatio="none"
|
|
528
|
+
role="img"
|
|
529
|
+
[attr.aria-label]="ariaSummary()"
|
|
530
|
+
>
|
|
531
|
+
<svg:g [attr.transform]="cx.innerTransform()">
|
|
532
|
+
<ng-content select="svg\\:g[ChartGrid]" />
|
|
533
|
+
<svg:g class="chart-bars">
|
|
534
|
+
@if (chartStyle() === 'dot') {
|
|
535
|
+
<svg:g class="chart-bar-dots" aria-hidden="true">
|
|
536
|
+
@for (cell of dotTrackCells(); track cell.key) {
|
|
537
|
+
<svg:rect
|
|
538
|
+
class="chart-bar-dot-track"
|
|
539
|
+
[attr.x]="cell.x"
|
|
540
|
+
[attr.y]="cell.y"
|
|
541
|
+
[attr.width]="cell.width"
|
|
542
|
+
[attr.height]="cell.height"
|
|
543
|
+
[attr.rx]="resolvedDotCornerRadius()"
|
|
544
|
+
[attr.ry]="resolvedDotCornerRadius()"
|
|
545
|
+
fill="hsl(var(--muted))"
|
|
546
|
+
/>
|
|
547
|
+
}
|
|
548
|
+
@for (cell of dotValueCells(); track cell.key) {
|
|
549
|
+
<svg:rect
|
|
550
|
+
class="chart-bar-dot-value"
|
|
551
|
+
[attr.x]="cell.x"
|
|
552
|
+
[attr.y]="cell.y"
|
|
553
|
+
[attr.width]="cell.width"
|
|
554
|
+
[attr.height]="cell.height"
|
|
555
|
+
[attr.rx]="resolvedDotCornerRadius()"
|
|
556
|
+
[attr.ry]="resolvedDotCornerRadius()"
|
|
557
|
+
[attr.fill]="cell.color"
|
|
558
|
+
[attr.opacity]="dotCellOpacity(cell)"
|
|
559
|
+
/>
|
|
560
|
+
}
|
|
561
|
+
</svg:g>
|
|
562
|
+
}
|
|
563
|
+
@for (bar of bars(); track bar.key; let idx = $index) {
|
|
564
|
+
<svg:rect
|
|
565
|
+
ChartMarkFocus
|
|
566
|
+
class="chart-bar cursor-pointer transition-opacity hover:opacity-80"
|
|
567
|
+
[attr.x]="bar.x"
|
|
568
|
+
[attr.y]="bar.y"
|
|
569
|
+
[attr.width]="bar.width"
|
|
570
|
+
[attr.height]="bar.height"
|
|
571
|
+
[attr.rx]="resolvedCornerRadius()"
|
|
572
|
+
[attr.ry]="resolvedCornerRadius()"
|
|
573
|
+
[attr.fill]="barFill(bar)"
|
|
574
|
+
[attr.opacity]="barOpacity(bar)"
|
|
575
|
+
[attr.stroke]="bar.active ? 'hsl(var(--foreground))' : null"
|
|
576
|
+
[attr.stroke-width]="bar.active ? 1.5 : null"
|
|
577
|
+
[attr.aria-label]="cx.pointAriaLabel(bar)"
|
|
578
|
+
role="img"
|
|
579
|
+
tabindex="0"
|
|
580
|
+
(focus)="cx.setActivePoint($event, bar)"
|
|
581
|
+
(blur)="cx.clearActivePoint()"
|
|
582
|
+
(click)="cx.emitClick(bar)"
|
|
583
|
+
(keydown.enter)="cx.emitClick(bar)"
|
|
584
|
+
(keydown.space)="cx.emitClick(bar); $event.preventDefault()"
|
|
585
|
+
(keydown)="onKeydown($event, idx)"
|
|
586
|
+
/>
|
|
587
|
+
@if (showValueLabels() && bar.height > 0 && bar.width > 0) {
|
|
588
|
+
<svg:text
|
|
589
|
+
class="chart-bar-value pointer-events-none fill-muted-foreground text-2xs"
|
|
590
|
+
[attr.x]="barLabelX(bar)"
|
|
591
|
+
[attr.y]="barLabelY(bar)"
|
|
592
|
+
[attr.text-anchor]="barLabelAnchor(bar)"
|
|
593
|
+
dominant-baseline="middle"
|
|
594
|
+
>
|
|
595
|
+
{{ formatValueLabel(bar) }}
|
|
596
|
+
</svg:text>
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
</svg:g>
|
|
600
|
+
<ng-content select="svg\\:g[ChartAxisX]" />
|
|
601
|
+
<ng-content select="svg\\:g[ChartAxisY]" />
|
|
602
|
+
<ng-content select="svg\\:g[ChartCrosshair]" />
|
|
603
|
+
<ng-content />
|
|
604
|
+
</svg:g>
|
|
605
|
+
</svg:svg>
|
|
606
|
+
<ng-content select="ChartTooltip" />
|
|
607
|
+
<ng-content select="ChartLegend" />
|
|
608
|
+
|
|
609
|
+
<ChartDataTable
|
|
610
|
+
[data]="data()"
|
|
611
|
+
[columns]="dataColumns()"
|
|
612
|
+
[rowHeaderKey]="xKey()"
|
|
613
|
+
[label]="ariaSummary()"
|
|
614
|
+
/>
|
|
615
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: ChartPointerTracker, selector: "svg:svg[ChartPointerTracker]" }, { kind: "directive", type: ChartRovingFocus, selector: "svg[ChartRovingFocus]" }, { kind: "directive", type: ChartMarkFocus, selector: "[ChartMarkFocus]" }, { kind: "component", type: ChartDataTable, selector: "ChartDataTable", inputs: ["data", "columns", "label", "rowHeaderKey"] }] });
|
|
616
|
+
}
|
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BarChart, decorators: [{
|
|
618
|
+
type: Component,
|
|
619
|
+
args: [{
|
|
620
|
+
selector: 'ChartBar',
|
|
621
|
+
providers: [CartesianContext],
|
|
622
|
+
imports: [ChartPointerTracker, ChartRovingFocus, ChartMarkFocus, ChartDataTable],
|
|
623
|
+
host: { class: 'relative block h-full w-full', '[attr.data-style]': 'chartStyle()' },
|
|
624
|
+
template: `
|
|
625
|
+
<svg:svg
|
|
626
|
+
ChartPointerTracker
|
|
627
|
+
ChartRovingFocus
|
|
628
|
+
class="block h-full w-full overflow-visible"
|
|
629
|
+
[attr.viewBox]="cx.viewBox()"
|
|
630
|
+
preserveAspectRatio="none"
|
|
631
|
+
role="img"
|
|
632
|
+
[attr.aria-label]="ariaSummary()"
|
|
633
|
+
>
|
|
634
|
+
<svg:g [attr.transform]="cx.innerTransform()">
|
|
635
|
+
<ng-content select="svg\\:g[ChartGrid]" />
|
|
636
|
+
<svg:g class="chart-bars">
|
|
637
|
+
@if (chartStyle() === 'dot') {
|
|
638
|
+
<svg:g class="chart-bar-dots" aria-hidden="true">
|
|
639
|
+
@for (cell of dotTrackCells(); track cell.key) {
|
|
640
|
+
<svg:rect
|
|
641
|
+
class="chart-bar-dot-track"
|
|
642
|
+
[attr.x]="cell.x"
|
|
643
|
+
[attr.y]="cell.y"
|
|
644
|
+
[attr.width]="cell.width"
|
|
645
|
+
[attr.height]="cell.height"
|
|
646
|
+
[attr.rx]="resolvedDotCornerRadius()"
|
|
647
|
+
[attr.ry]="resolvedDotCornerRadius()"
|
|
648
|
+
fill="hsl(var(--muted))"
|
|
649
|
+
/>
|
|
650
|
+
}
|
|
651
|
+
@for (cell of dotValueCells(); track cell.key) {
|
|
652
|
+
<svg:rect
|
|
653
|
+
class="chart-bar-dot-value"
|
|
654
|
+
[attr.x]="cell.x"
|
|
655
|
+
[attr.y]="cell.y"
|
|
656
|
+
[attr.width]="cell.width"
|
|
657
|
+
[attr.height]="cell.height"
|
|
658
|
+
[attr.rx]="resolvedDotCornerRadius()"
|
|
659
|
+
[attr.ry]="resolvedDotCornerRadius()"
|
|
660
|
+
[attr.fill]="cell.color"
|
|
661
|
+
[attr.opacity]="dotCellOpacity(cell)"
|
|
662
|
+
/>
|
|
663
|
+
}
|
|
664
|
+
</svg:g>
|
|
665
|
+
}
|
|
666
|
+
@for (bar of bars(); track bar.key; let idx = $index) {
|
|
667
|
+
<svg:rect
|
|
668
|
+
ChartMarkFocus
|
|
669
|
+
class="chart-bar cursor-pointer transition-opacity hover:opacity-80"
|
|
670
|
+
[attr.x]="bar.x"
|
|
671
|
+
[attr.y]="bar.y"
|
|
672
|
+
[attr.width]="bar.width"
|
|
673
|
+
[attr.height]="bar.height"
|
|
674
|
+
[attr.rx]="resolvedCornerRadius()"
|
|
675
|
+
[attr.ry]="resolvedCornerRadius()"
|
|
676
|
+
[attr.fill]="barFill(bar)"
|
|
677
|
+
[attr.opacity]="barOpacity(bar)"
|
|
678
|
+
[attr.stroke]="bar.active ? 'hsl(var(--foreground))' : null"
|
|
679
|
+
[attr.stroke-width]="bar.active ? 1.5 : null"
|
|
680
|
+
[attr.aria-label]="cx.pointAriaLabel(bar)"
|
|
681
|
+
role="img"
|
|
682
|
+
tabindex="0"
|
|
683
|
+
(focus)="cx.setActivePoint($event, bar)"
|
|
684
|
+
(blur)="cx.clearActivePoint()"
|
|
685
|
+
(click)="cx.emitClick(bar)"
|
|
686
|
+
(keydown.enter)="cx.emitClick(bar)"
|
|
687
|
+
(keydown.space)="cx.emitClick(bar); $event.preventDefault()"
|
|
688
|
+
(keydown)="onKeydown($event, idx)"
|
|
689
|
+
/>
|
|
690
|
+
@if (showValueLabels() && bar.height > 0 && bar.width > 0) {
|
|
691
|
+
<svg:text
|
|
692
|
+
class="chart-bar-value pointer-events-none fill-muted-foreground text-2xs"
|
|
693
|
+
[attr.x]="barLabelX(bar)"
|
|
694
|
+
[attr.y]="barLabelY(bar)"
|
|
695
|
+
[attr.text-anchor]="barLabelAnchor(bar)"
|
|
696
|
+
dominant-baseline="middle"
|
|
697
|
+
>
|
|
698
|
+
{{ formatValueLabel(bar) }}
|
|
699
|
+
</svg:text>
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
</svg:g>
|
|
703
|
+
<ng-content select="svg\\:g[ChartAxisX]" />
|
|
704
|
+
<ng-content select="svg\\:g[ChartAxisY]" />
|
|
705
|
+
<ng-content select="svg\\:g[ChartCrosshair]" />
|
|
706
|
+
<ng-content />
|
|
707
|
+
</svg:g>
|
|
708
|
+
</svg:svg>
|
|
709
|
+
<ng-content select="ChartTooltip" />
|
|
710
|
+
<ng-content select="ChartLegend" />
|
|
711
|
+
|
|
712
|
+
<ChartDataTable
|
|
713
|
+
[data]="data()"
|
|
714
|
+
[columns]="dataColumns()"
|
|
715
|
+
[rowHeaderKey]="xKey()"
|
|
716
|
+
[label]="ariaSummary()"
|
|
717
|
+
/>
|
|
718
|
+
`,
|
|
719
|
+
}]
|
|
720
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], xKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "xKey", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], styleVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleVariant", required: false }] }], styles: [{ type: i0.Input, args: [{ isSignal: true, alias: "styles", required: false }] }], margin: [{ type: i0.Input, args: [{ isSignal: true, alias: "margin", required: false }] }], bandPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "bandPadding", required: false }] }], groupPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupPadding", required: false }] }], cornerRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "cornerRadius", required: false }] }], colorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorKey", required: false }] }], activeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeKey", required: false }] }], activeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeValue", required: false }] }], showValueLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValueLabels", required: false }] }], valueLabelFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueLabelFormat", required: false }] }], dotSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "dotSize", required: false }] }], dotGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "dotGap", required: false }] }], dotCornerRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "dotCornerRadius", required: false }] }], showDotTrack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDotTrack", required: false }] }], barClick: [{ type: i0.Output, args: ["barClick"] }] } });
|
|
4
721
|
|
|
5
722
|
/**
|
|
6
723
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
724
|
+
*/
|
|
725
|
+
|
|
726
|
+
export { BarChart, computeBarDotCells, computeBarLayout };
|