@ojiepermana/angular 22.1.11 → 22.1.12
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 +373 -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,299 @@
|
|
|
1
|
-
|
|
1
|
+
import { arc } from 'd3-shape';
|
|
2
|
+
import { max } from 'd3-array';
|
|
3
|
+
import { readNumber, seriesColorVar, ChartContext, ChartThemeRadius, resolveChartStyle, ChartThemeSpace, resolveChartMargin, DEFAULT_POLAR_MARGIN_UNITS, setupPolarChart, ChartRovingFocus, ChartMarkFocus, ChartDataTable } from '@ojiepermana/angular/chart/core';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, input, output, computed, Component } from '@angular/core';
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
function computeRadialLayout(input) {
|
|
8
|
+
const { data, nameKey, valueKey, innerWidth, innerHeight, seriesKeys, hiddenSeriesKeys, trackPadding, startAngle, endAngle, cornerRadius, } = input;
|
|
9
|
+
const outerRadius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);
|
|
10
|
+
const centerX = innerWidth / 2;
|
|
11
|
+
const centerY = innerHeight / 2;
|
|
12
|
+
// `datumIndex` is carried through the filter, so a track keeps addressing the
|
|
13
|
+
// row it came from however many siblings the legend has hidden.
|
|
14
|
+
const entries = data
|
|
15
|
+
.map((datum, datumIndex) => ({
|
|
16
|
+
datum,
|
|
17
|
+
datumIndex,
|
|
18
|
+
seriesKey: seriesKeys?.[datumIndex] ?? String(datum[nameKey] ?? datumIndex),
|
|
19
|
+
}))
|
|
20
|
+
.filter((entry) => !hiddenSeriesKeys?.has(entry.seriesKey));
|
|
21
|
+
if (entries.length === 0 || outerRadius === 0) {
|
|
22
|
+
return { centerX, centerY, outerRadius, bars: [], maxValue: 0 };
|
|
23
|
+
}
|
|
24
|
+
const maxValue = input.maxValue ?? max(data, (d) => readNumber(d, valueKey)) ?? 1;
|
|
25
|
+
const trackCount = entries.length;
|
|
26
|
+
const safeTrackPadding = trackCount > 1
|
|
27
|
+
? Math.min(Math.max(trackPadding, 0), outerRadius / (trackCount - 1))
|
|
28
|
+
: Math.max(trackPadding, 0);
|
|
29
|
+
const availableRadius = Math.max(0, outerRadius - (trackCount - 1) * safeTrackPadding);
|
|
30
|
+
const trackThickness = availableRadius / trackCount;
|
|
31
|
+
const bars = entries.map((entry, i) => {
|
|
32
|
+
const { datum: d, datumIndex, seriesKey: key } = entry;
|
|
33
|
+
const inner = i * (trackThickness + safeTrackPadding);
|
|
34
|
+
const outer = inner + trackThickness;
|
|
35
|
+
const value = readNumber(d, valueKey);
|
|
36
|
+
const pct = maxValue === 0 ? 0 : value / maxValue;
|
|
37
|
+
const sweep = (endAngle - startAngle) * pct;
|
|
38
|
+
const valueEndAngle = startAngle + sweep;
|
|
39
|
+
const arcGen = arc()
|
|
40
|
+
.innerRadius(inner)
|
|
41
|
+
.outerRadius(outer)
|
|
42
|
+
.cornerRadius(cornerRadius);
|
|
43
|
+
return {
|
|
44
|
+
seriesKey: key,
|
|
45
|
+
name: String(d[nameKey] ?? key),
|
|
46
|
+
value,
|
|
47
|
+
datumIndex,
|
|
48
|
+
color: seriesColorVar(key),
|
|
49
|
+
arcPath: arcGen.startAngle(startAngle).endAngle(valueEndAngle)(null) ?? '',
|
|
50
|
+
backgroundPath: arcGen.startAngle(startAngle).endAngle(endAngle)(null) ?? '',
|
|
51
|
+
innerRadius: inner,
|
|
52
|
+
outerRadius: outer,
|
|
53
|
+
endAngle: valueEndAngle,
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
return { centerX, centerY, outerRadius, bars, maxValue };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const defaultRadialValueFormatter = (value) => `${value}`;
|
|
60
|
+
class RadialChart {
|
|
61
|
+
root = inject(ChartContext);
|
|
62
|
+
themeRadius = inject(ChartThemeRadius);
|
|
63
|
+
data = input.required(/* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
65
|
+
nameKey = input.required(/* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "nameKey" }] : /* istanbul ignore next */ []));
|
|
67
|
+
valueKey = input.required(/* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "valueKey" }] : /* istanbul ignore next */ []));
|
|
69
|
+
seriesKeys = input(undefined, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "seriesKeys" }] : /* istanbul ignore next */ []));
|
|
71
|
+
/**
|
|
72
|
+
* Presentational style of the chart.
|
|
73
|
+
*
|
|
74
|
+
* Replaces `styles`, which read like a CSS styles bag rather than a single
|
|
75
|
+
* variant. Named `styleVariant` and not `variant` because `ChartBar` already
|
|
76
|
+
* publishes a `variant` input for its grouped versus stacked axis, and one
|
|
77
|
+
* name cannot mean two things across the family.
|
|
78
|
+
*/
|
|
79
|
+
styleVariant = input(undefined, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "styleVariant" }] : /* istanbul ignore next */ []));
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated Use `styleVariant`. Still fully supported; when both are bound,
|
|
83
|
+
* `styleVariant` wins. Due for removal in the next major.
|
|
84
|
+
*/
|
|
85
|
+
styles = input('base', /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
87
|
+
/** The style actually in effect. Bind this, never `styles()`. */
|
|
88
|
+
chartStyle = resolveChartStyle(this.styleVariant, this.styles);
|
|
89
|
+
themeSpace = inject(ChartThemeSpace);
|
|
90
|
+
/**
|
|
91
|
+
* Plot gutters. Leave it unset and they follow the theme-space density
|
|
92
|
+
* axis; set it and your numbers win, unchanged, whatever the axis says.
|
|
93
|
+
*/
|
|
94
|
+
margin = input(null, /* @ts-ignore */
|
|
95
|
+
...(ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []));
|
|
96
|
+
/** The margin actually in effect. Bind this, never `margin()`. */
|
|
97
|
+
plotMargin = resolveChartMargin(this.margin, DEFAULT_POLAR_MARGIN_UNITS, this.themeSpace);
|
|
98
|
+
trackPadding = input(4, /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "trackPadding" }] : /* istanbul ignore next */ []));
|
|
100
|
+
cornerRadius = input(null, /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "cornerRadius" }] : /* istanbul ignore next */ []));
|
|
102
|
+
startAngle = input(-Math.PI / 2, /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "startAngle" }] : /* istanbul ignore next */ []));
|
|
104
|
+
endAngle = input((3 * Math.PI) / 2, /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "endAngle" }] : /* istanbul ignore next */ []));
|
|
106
|
+
maxValue = input(undefined, /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "maxValue" }] : /* istanbul ignore next */ []));
|
|
108
|
+
showTrack = input(true, /* @ts-ignore */
|
|
109
|
+
...(ngDevMode ? [{ debugName: "showTrack" }] : /* istanbul ignore next */ []));
|
|
110
|
+
showValueLabels = input(false, /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "showValueLabels" }] : /* istanbul ignore next */ []));
|
|
112
|
+
valueLabelFormat = input(defaultRadialValueFormatter, /* @ts-ignore */
|
|
113
|
+
...(ngDevMode ? [{ debugName: "valueLabelFormat" }] : /* istanbul ignore next */ []));
|
|
114
|
+
barClick = output();
|
|
115
|
+
resolvedCornerRadius = computed(() => this.cornerRadius() ?? this.themeRadius.px(), /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "resolvedCornerRadius" }] : /* istanbul ignore next */ []));
|
|
117
|
+
polar = setupPolarChart({ margin: () => this.plotMargin() });
|
|
118
|
+
layout = computed(() => computeRadialLayout({
|
|
119
|
+
data: this.data(),
|
|
120
|
+
nameKey: this.nameKey(),
|
|
121
|
+
valueKey: this.valueKey(),
|
|
122
|
+
seriesKeys: this.seriesKeys(),
|
|
123
|
+
hiddenSeriesKeys: this.root.hiddenSeries(),
|
|
124
|
+
innerWidth: this.polar.innerWidth(),
|
|
125
|
+
innerHeight: this.polar.innerHeight(),
|
|
126
|
+
trackPadding: this.trackPadding(),
|
|
127
|
+
startAngle: this.startAngle(),
|
|
128
|
+
endAngle: this.endAngle(),
|
|
129
|
+
cornerRadius: this.resolvedCornerRadius(),
|
|
130
|
+
maxValue: this.maxValue(),
|
|
131
|
+
}), /* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
133
|
+
ariaSummary = computed(() => `Radial bar chart, ${this.layout().bars.length} tracks.`, /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "ariaSummary" }] : /* istanbul ignore next */ []));
|
|
135
|
+
dataColumns = computed(() => [this.nameKey(), this.valueKey()], /* @ts-ignore */
|
|
136
|
+
...(ngDevMode ? [{ debugName: "dataColumns" }] : /* istanbul ignore next */ []));
|
|
137
|
+
barAriaLabel(b) {
|
|
138
|
+
return `${b.name}: ${b.value}`;
|
|
139
|
+
}
|
|
140
|
+
formatValueLabel(b) {
|
|
141
|
+
return this.valueLabelFormat()(b.value, b.name);
|
|
142
|
+
}
|
|
143
|
+
barLabelX(b) {
|
|
144
|
+
const radius = (b.innerRadius + b.outerRadius) / 2 + 10;
|
|
145
|
+
return Math.sin(b.endAngle) * radius;
|
|
146
|
+
}
|
|
147
|
+
barLabelY(b) {
|
|
148
|
+
const radius = (b.innerRadius + b.outerRadius) / 2 + 10;
|
|
149
|
+
return -Math.cos(b.endAngle) * radius;
|
|
150
|
+
}
|
|
151
|
+
barLabelAnchor(b) {
|
|
152
|
+
return this.barLabelX(b) >= 0 ? 'start' : 'end';
|
|
153
|
+
}
|
|
154
|
+
emitClick(b) {
|
|
155
|
+
this.barClick.emit({
|
|
156
|
+
seriesKey: b.seriesKey,
|
|
157
|
+
datumIndex: b.datumIndex,
|
|
158
|
+
// `category` is the shared name for what this family calls `name`; both are
|
|
159
|
+
// emitted so a handler written against either shape works.
|
|
160
|
+
category: b.name,
|
|
161
|
+
name: b.name,
|
|
162
|
+
value: b.value,
|
|
163
|
+
datum: this.data()[b.datumIndex],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RadialChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
167
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: RadialChart, isStandalone: true, selector: "ChartRadial", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, nameKey: { classPropertyName: "nameKey", publicName: "nameKey", isSignal: true, isRequired: true, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: true, transformFunction: null }, seriesKeys: { classPropertyName: "seriesKeys", publicName: "seriesKeys", 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 }, trackPadding: { classPropertyName: "trackPadding", publicName: "trackPadding", isSignal: true, isRequired: false, transformFunction: null }, cornerRadius: { classPropertyName: "cornerRadius", publicName: "cornerRadius", isSignal: true, isRequired: false, transformFunction: null }, startAngle: { classPropertyName: "startAngle", publicName: "startAngle", isSignal: true, isRequired: false, transformFunction: null }, endAngle: { classPropertyName: "endAngle", publicName: "endAngle", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, showTrack: { classPropertyName: "showTrack", publicName: "showTrack", 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 } }, outputs: { barClick: "barClick" }, host: { properties: { "attr.data-style": "chartStyle()" }, classAttribute: "relative block h-full w-full" }, ngImport: i0, template: `
|
|
168
|
+
<svg:svg
|
|
169
|
+
ChartRovingFocus
|
|
170
|
+
class="block h-full w-full overflow-visible"
|
|
171
|
+
[attr.viewBox]="polar.viewBox()"
|
|
172
|
+
preserveAspectRatio="xMidYMid meet"
|
|
173
|
+
role="img"
|
|
174
|
+
[attr.aria-label]="ariaSummary()"
|
|
175
|
+
>
|
|
176
|
+
<svg:g [attr.transform]="polar.innerTransform()">
|
|
177
|
+
<svg:g [attr.transform]="'translate(' + layout().centerX + ',' + layout().centerY + ')'">
|
|
178
|
+
@for (b of layout().bars; track b.seriesKey) {
|
|
179
|
+
@if (showTrack()) {
|
|
180
|
+
<svg:path class="chart-radial-track fill-muted" [attr.d]="b.backgroundPath" />
|
|
181
|
+
}
|
|
182
|
+
<svg:path
|
|
183
|
+
ChartMarkFocus
|
|
184
|
+
class="chart-radial-bar cursor-pointer transition-opacity hover:opacity-80"
|
|
185
|
+
[attr.d]="b.arcPath"
|
|
186
|
+
[attr.fill]="b.color"
|
|
187
|
+
[attr.aria-label]="barAriaLabel(b)"
|
|
188
|
+
role="img"
|
|
189
|
+
tabindex="0"
|
|
190
|
+
(click)="emitClick(b)"
|
|
191
|
+
(keydown.enter)="emitClick(b)"
|
|
192
|
+
(keydown.space)="emitClick(b); $event.preventDefault()"
|
|
193
|
+
(pointerenter)="polar.setActivePoint($event, b)"
|
|
194
|
+
(pointermove)="polar.setActivePoint($event, b)"
|
|
195
|
+
(pointerleave)="polar.clearActivePoint()"
|
|
196
|
+
(focus)="polar.setActivePoint($event, b)"
|
|
197
|
+
(blur)="polar.clearActivePoint()"
|
|
198
|
+
/>
|
|
199
|
+
@if (showValueLabels()) {
|
|
200
|
+
<svg:text
|
|
201
|
+
class="chart-radial-value pointer-events-none fill-muted-foreground text-2xs"
|
|
202
|
+
[attr.x]="barLabelX(b)"
|
|
203
|
+
[attr.y]="barLabelY(b)"
|
|
204
|
+
[attr.text-anchor]="barLabelAnchor(b)"
|
|
205
|
+
dominant-baseline="middle"
|
|
206
|
+
>
|
|
207
|
+
{{ formatValueLabel(b) }}
|
|
208
|
+
</svg:text>
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
</svg:g>
|
|
212
|
+
</svg:g>
|
|
213
|
+
</svg:svg>
|
|
214
|
+
<div class="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
215
|
+
<ng-content select="ChartRadialCenter" />
|
|
216
|
+
</div>
|
|
217
|
+
<ng-content select="ChartTooltip" />
|
|
218
|
+
<ng-content select="ChartLegend" />
|
|
219
|
+
<ChartDataTable
|
|
220
|
+
[data]="data()"
|
|
221
|
+
[columns]="dataColumns()"
|
|
222
|
+
[rowHeaderKey]="nameKey()"
|
|
223
|
+
[label]="ariaSummary()"
|
|
224
|
+
/>
|
|
225
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: ChartRovingFocus, selector: "svg[ChartRovingFocus]" }, { kind: "directive", type: ChartMarkFocus, selector: "[ChartMarkFocus]" }, { kind: "component", type: ChartDataTable, selector: "ChartDataTable", inputs: ["data", "columns", "label", "rowHeaderKey"] }] });
|
|
226
|
+
}
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RadialChart, decorators: [{
|
|
228
|
+
type: Component,
|
|
229
|
+
args: [{
|
|
230
|
+
selector: 'ChartRadial',
|
|
231
|
+
imports: [ChartRovingFocus, ChartMarkFocus, ChartDataTable],
|
|
232
|
+
host: { class: 'relative block h-full w-full', '[attr.data-style]': 'chartStyle()' },
|
|
233
|
+
template: `
|
|
234
|
+
<svg:svg
|
|
235
|
+
ChartRovingFocus
|
|
236
|
+
class="block h-full w-full overflow-visible"
|
|
237
|
+
[attr.viewBox]="polar.viewBox()"
|
|
238
|
+
preserveAspectRatio="xMidYMid meet"
|
|
239
|
+
role="img"
|
|
240
|
+
[attr.aria-label]="ariaSummary()"
|
|
241
|
+
>
|
|
242
|
+
<svg:g [attr.transform]="polar.innerTransform()">
|
|
243
|
+
<svg:g [attr.transform]="'translate(' + layout().centerX + ',' + layout().centerY + ')'">
|
|
244
|
+
@for (b of layout().bars; track b.seriesKey) {
|
|
245
|
+
@if (showTrack()) {
|
|
246
|
+
<svg:path class="chart-radial-track fill-muted" [attr.d]="b.backgroundPath" />
|
|
247
|
+
}
|
|
248
|
+
<svg:path
|
|
249
|
+
ChartMarkFocus
|
|
250
|
+
class="chart-radial-bar cursor-pointer transition-opacity hover:opacity-80"
|
|
251
|
+
[attr.d]="b.arcPath"
|
|
252
|
+
[attr.fill]="b.color"
|
|
253
|
+
[attr.aria-label]="barAriaLabel(b)"
|
|
254
|
+
role="img"
|
|
255
|
+
tabindex="0"
|
|
256
|
+
(click)="emitClick(b)"
|
|
257
|
+
(keydown.enter)="emitClick(b)"
|
|
258
|
+
(keydown.space)="emitClick(b); $event.preventDefault()"
|
|
259
|
+
(pointerenter)="polar.setActivePoint($event, b)"
|
|
260
|
+
(pointermove)="polar.setActivePoint($event, b)"
|
|
261
|
+
(pointerleave)="polar.clearActivePoint()"
|
|
262
|
+
(focus)="polar.setActivePoint($event, b)"
|
|
263
|
+
(blur)="polar.clearActivePoint()"
|
|
264
|
+
/>
|
|
265
|
+
@if (showValueLabels()) {
|
|
266
|
+
<svg:text
|
|
267
|
+
class="chart-radial-value pointer-events-none fill-muted-foreground text-2xs"
|
|
268
|
+
[attr.x]="barLabelX(b)"
|
|
269
|
+
[attr.y]="barLabelY(b)"
|
|
270
|
+
[attr.text-anchor]="barLabelAnchor(b)"
|
|
271
|
+
dominant-baseline="middle"
|
|
272
|
+
>
|
|
273
|
+
{{ formatValueLabel(b) }}
|
|
274
|
+
</svg:text>
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
</svg:g>
|
|
278
|
+
</svg:g>
|
|
279
|
+
</svg:svg>
|
|
280
|
+
<div class="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
281
|
+
<ng-content select="ChartRadialCenter" />
|
|
282
|
+
</div>
|
|
283
|
+
<ng-content select="ChartTooltip" />
|
|
284
|
+
<ng-content select="ChartLegend" />
|
|
285
|
+
<ChartDataTable
|
|
286
|
+
[data]="data()"
|
|
287
|
+
[columns]="dataColumns()"
|
|
288
|
+
[rowHeaderKey]="nameKey()"
|
|
289
|
+
[label]="ariaSummary()"
|
|
290
|
+
/>
|
|
291
|
+
`,
|
|
292
|
+
}]
|
|
293
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], nameKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "nameKey", required: true }] }], valueKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueKey", required: true }] }], seriesKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "seriesKeys", 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 }] }], trackPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackPadding", required: false }] }], cornerRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "cornerRadius", required: false }] }], startAngle: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAngle", required: false }] }], endAngle: [{ type: i0.Input, args: [{ isSignal: true, alias: "endAngle", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], showTrack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTrack", required: false }] }], showValueLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValueLabels", required: false }] }], valueLabelFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueLabelFormat", required: false }] }], barClick: [{ type: i0.Output, args: ["barClick"] }] } });
|
|
4
294
|
|
|
5
295
|
/**
|
|
6
296
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
297
|
+
*/
|
|
298
|
+
|
|
299
|
+
export { RadialChart, computeRadialLayout };
|
|
@@ -1,7 +1,310 @@
|
|
|
1
|
-
|
|
1
|
+
import { scaleLinear } from 'd3-scale';
|
|
2
|
+
import { extent } from 'd3-array';
|
|
3
|
+
import { readNumber, seriesColorVar, ChartContext, ScatterViewportContext, resolveChartStyle, ChartThemeSpace, resolveChartMargin, DEFAULT_CARTESIAN_MARGIN_UNITS, setupCartesianChart, ChartRovingFocus, ChartMarkFocus, ChartDataTable } from '@ojiepermana/angular/chart/core';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, input, output, computed, Component } from '@angular/core';
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
function nice(extent) {
|
|
8
|
+
const [lo, hi] = extent;
|
|
9
|
+
if (lo === undefined || hi === undefined)
|
|
10
|
+
return [0, 1];
|
|
11
|
+
if (lo === hi)
|
|
12
|
+
return [lo - 1, hi + 1];
|
|
13
|
+
return [lo, hi];
|
|
14
|
+
}
|
|
15
|
+
function resolveScatterDomains(input) {
|
|
16
|
+
const xValues = input.data.map((d) => readNumber(d, input.xKey));
|
|
17
|
+
const yValues = input.data.map((d) => readNumber(d, input.yKey));
|
|
18
|
+
return {
|
|
19
|
+
xDomain: (input.xDomain ?? nice(extent(xValues))),
|
|
20
|
+
yDomain: (input.yDomain ?? nice(extent(yValues))),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function computeScatterLayout(input) {
|
|
24
|
+
const { data, xKey, yKey, sizeKey, seriesKey, seriesKeys, innerWidth, innerHeight, minPointRadius, maxPointRadius, } = input;
|
|
25
|
+
const xValues = data.map((d) => readNumber(d, xKey));
|
|
26
|
+
const yValues = data.map((d) => readNumber(d, yKey));
|
|
27
|
+
const sizeValues = sizeKey ? data.map((d) => readNumber(d, sizeKey)) : [];
|
|
28
|
+
const { xDomain, yDomain } = resolveScatterDomains(input);
|
|
29
|
+
const xScale = scaleLinear()
|
|
30
|
+
.domain(xDomain)
|
|
31
|
+
.range([0, innerWidth]);
|
|
32
|
+
const yScale = scaleLinear()
|
|
33
|
+
.domain(yDomain)
|
|
34
|
+
.range([innerHeight, 0]);
|
|
35
|
+
let sizeScale = null;
|
|
36
|
+
if (sizeKey && sizeValues.length > 0) {
|
|
37
|
+
const [sLo, sHi] = extent(sizeValues);
|
|
38
|
+
sizeScale = scaleLinear()
|
|
39
|
+
.domain([sLo ?? 0, sHi ?? 1])
|
|
40
|
+
.range([minPointRadius, maxPointRadius]);
|
|
41
|
+
}
|
|
42
|
+
const fallbackKey = seriesKeys[0] ?? 'value';
|
|
43
|
+
const points = data.flatMap((d, i) => {
|
|
44
|
+
const key = seriesKey ? String(d[seriesKey] ?? fallbackKey) : fallbackKey;
|
|
45
|
+
const sz = sizeKey ? readNumber(d, sizeKey) : 0;
|
|
46
|
+
const rawX = xValues[i];
|
|
47
|
+
const rawY = yValues[i];
|
|
48
|
+
if (rawX < xDomain[0] || rawX > xDomain[1] || rawY < yDomain[0] || rawY > yDomain[1]) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
seriesKey: key,
|
|
54
|
+
color: seriesColorVar(key),
|
|
55
|
+
x: xScale(rawX),
|
|
56
|
+
y: yScale(rawY),
|
|
57
|
+
radius: sizeScale ? sizeScale(sz) : minPointRadius,
|
|
58
|
+
datumIndex: i,
|
|
59
|
+
rawX,
|
|
60
|
+
rawY,
|
|
61
|
+
rawSize: sz,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
});
|
|
65
|
+
return { points, xScale, yScale, xDomain, yDomain };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Scatter chart — one dot per datum. Both axes are linear; color can
|
|
70
|
+
* come from a fixed series key or per-row via `seriesKey` field. Point
|
|
71
|
+
* radius optionally scales with `sizeKey`.
|
|
72
|
+
*/
|
|
73
|
+
class ScatterChart {
|
|
74
|
+
root = inject(ChartContext);
|
|
75
|
+
viewport = inject(ScatterViewportContext);
|
|
76
|
+
data = input.required(/* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
78
|
+
xKey = input.required(/* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "xKey" }] : /* istanbul ignore next */ []));
|
|
80
|
+
yKey = input.required(/* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "yKey" }] : /* istanbul ignore next */ []));
|
|
82
|
+
/** Optional numeric field to drive point radius. */
|
|
83
|
+
sizeKey = input(undefined, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "sizeKey" }] : /* istanbul ignore next */ []));
|
|
85
|
+
/** Optional field on each datum used as color key. */
|
|
86
|
+
seriesKey = input(undefined, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "seriesKey" }] : /* istanbul ignore next */ []));
|
|
88
|
+
/**
|
|
89
|
+
* Presentational style of the chart.
|
|
90
|
+
*
|
|
91
|
+
* Replaces `styles`, which read like a CSS styles bag rather than a single
|
|
92
|
+
* variant. Named `styleVariant` and not `variant` because `ChartBar` already
|
|
93
|
+
* publishes a `variant` input for its grouped versus stacked axis, and one
|
|
94
|
+
* name cannot mean two things across the family.
|
|
95
|
+
*/
|
|
96
|
+
styleVariant = input(undefined, /* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [{ debugName: "styleVariant" }] : /* istanbul ignore next */ []));
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated Use `styleVariant`. Still fully supported; when both are bound,
|
|
100
|
+
* `styleVariant` wins. Due for removal in the next major.
|
|
101
|
+
*/
|
|
102
|
+
styles = input('base', /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
104
|
+
/** The style actually in effect. Bind this, never `styles()`. */
|
|
105
|
+
chartStyle = resolveChartStyle(this.styleVariant, this.styles);
|
|
106
|
+
themeSpace = inject(ChartThemeSpace);
|
|
107
|
+
/**
|
|
108
|
+
* Plot gutters. Leave it unset and they follow the theme-space density
|
|
109
|
+
* axis; set it and your numbers win, unchanged, whatever the axis says.
|
|
110
|
+
*/
|
|
111
|
+
margin = input(null, /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []));
|
|
113
|
+
/** The margin actually in effect. Bind this, never `margin()`. */
|
|
114
|
+
plotMargin = resolveChartMargin(this.margin, DEFAULT_CARTESIAN_MARGIN_UNITS, this.themeSpace);
|
|
115
|
+
minPointRadius = input(3, /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "minPointRadius" }] : /* istanbul ignore next */ []));
|
|
117
|
+
maxPointRadius = input(12, /* @ts-ignore */
|
|
118
|
+
...(ngDevMode ? [{ debugName: "maxPointRadius" }] : /* istanbul ignore next */ []));
|
|
119
|
+
xDomain = input(undefined, /* @ts-ignore */
|
|
120
|
+
...(ngDevMode ? [{ debugName: "xDomain" }] : /* istanbul ignore next */ []));
|
|
121
|
+
yDomain = input(undefined, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "yDomain" }] : /* istanbul ignore next */ []));
|
|
123
|
+
pointClick = output();
|
|
124
|
+
/**
|
|
125
|
+
* The shared cartesian scaffolding. Scatter uses the geometry, the layout
|
|
126
|
+
* effect, and the click plus active-point plus aria-label handlers; it has no
|
|
127
|
+
* `CartesianContext` of its own (it publishes to a `ScatterViewportContext`
|
|
128
|
+
* instead) and no index window, so it passes neither `cartesian` nor
|
|
129
|
+
* `viewport`.
|
|
130
|
+
*
|
|
131
|
+
* Declared before `layout` because the layout computed reads its geometry.
|
|
132
|
+
*/
|
|
133
|
+
cx = setupCartesianChart({
|
|
134
|
+
data: () => this.data(),
|
|
135
|
+
margin: () => this.plotMargin(),
|
|
136
|
+
publishLayout: (inner) => {
|
|
137
|
+
const domains = this.resolvedDomains();
|
|
138
|
+
const layout = this.layout();
|
|
139
|
+
this.viewport.innerWidth.set(inner.width);
|
|
140
|
+
this.viewport.innerHeight.set(inner.height);
|
|
141
|
+
this.viewport.fullXDomain.set(domains.xDomain);
|
|
142
|
+
this.viewport.fullYDomain.set(domains.yDomain);
|
|
143
|
+
this.viewport.xScale.set(layout.xScale);
|
|
144
|
+
this.viewport.yScale.set(layout.yScale);
|
|
145
|
+
},
|
|
146
|
+
click: {
|
|
147
|
+
emit: (event) => this.pointClick.emit(event),
|
|
148
|
+
payload: (point, datumIndex, datum) => ({
|
|
149
|
+
seriesKey: point.seriesKey,
|
|
150
|
+
datumIndex,
|
|
151
|
+
// A scatter point has no category of its own, so the shared fields carry
|
|
152
|
+
// the pair it does have: x as the label, y as the magnitude. `x` and `y`
|
|
153
|
+
// stay for handlers that want the raw numbers.
|
|
154
|
+
category: String(point.rawX),
|
|
155
|
+
value: point.rawY,
|
|
156
|
+
x: point.rawX,
|
|
157
|
+
y: point.rawY,
|
|
158
|
+
datum,
|
|
159
|
+
}),
|
|
160
|
+
},
|
|
161
|
+
ariaLabel: (point) => `${point.seriesKey}: x=${point.rawX}, y=${point.rawY}`,
|
|
162
|
+
});
|
|
163
|
+
resolvedDomains = computed(() => resolveScatterDomains({
|
|
164
|
+
data: this.data(),
|
|
165
|
+
xKey: this.xKey(),
|
|
166
|
+
yKey: this.yKey(),
|
|
167
|
+
xDomain: this.xDomain(),
|
|
168
|
+
yDomain: this.yDomain(),
|
|
169
|
+
}), /* @ts-ignore */
|
|
170
|
+
...(ngDevMode ? [{ debugName: "resolvedDomains" }] : /* istanbul ignore next */ []));
|
|
171
|
+
currentXDomain = computed(() => this.viewport.zoomXDomain() ?? this.resolvedDomains().xDomain, /* @ts-ignore */
|
|
172
|
+
...(ngDevMode ? [{ debugName: "currentXDomain" }] : /* istanbul ignore next */ []));
|
|
173
|
+
currentYDomain = computed(() => this.viewport.zoomYDomain() ?? this.resolvedDomains().yDomain, /* @ts-ignore */
|
|
174
|
+
...(ngDevMode ? [{ debugName: "currentYDomain" }] : /* istanbul ignore next */ []));
|
|
175
|
+
layout = computed(() => computeScatterLayout({
|
|
176
|
+
data: this.data(),
|
|
177
|
+
xKey: this.xKey(),
|
|
178
|
+
yKey: this.yKey(),
|
|
179
|
+
sizeKey: this.sizeKey(),
|
|
180
|
+
seriesKey: this.seriesKey(),
|
|
181
|
+
seriesKeys: this.root.visibleSeriesKeys(),
|
|
182
|
+
innerWidth: this.cx.innerWidth(),
|
|
183
|
+
innerHeight: this.cx.innerHeight(),
|
|
184
|
+
minPointRadius: this.minPointRadius(),
|
|
185
|
+
maxPointRadius: this.maxPointRadius(),
|
|
186
|
+
xDomain: this.currentXDomain(),
|
|
187
|
+
yDomain: this.currentYDomain(),
|
|
188
|
+
}), /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
190
|
+
clipPathId = computed(() => `${this.root.id()}-scatter-clip`, /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "clipPathId" }] : /* istanbul ignore next */ []));
|
|
192
|
+
ariaSummary = computed(() => `Scatter chart, ${this.data().length} points.`, /* @ts-ignore */
|
|
193
|
+
...(ngDevMode ? [{ debugName: "ariaSummary" }] : /* istanbul ignore next */ []));
|
|
194
|
+
dataColumns = computed(() => [this.xKey(), this.yKey()], /* @ts-ignore */
|
|
195
|
+
...(ngDevMode ? [{ debugName: "dataColumns" }] : /* istanbul ignore next */ []));
|
|
196
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ScatterChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ScatterChart, isStandalone: true, selector: "ChartScatter", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, xKey: { classPropertyName: "xKey", publicName: "xKey", isSignal: true, isRequired: true, transformFunction: null }, yKey: { classPropertyName: "yKey", publicName: "yKey", isSignal: true, isRequired: true, transformFunction: null }, sizeKey: { classPropertyName: "sizeKey", publicName: "sizeKey", isSignal: true, isRequired: false, transformFunction: null }, seriesKey: { classPropertyName: "seriesKey", publicName: "seriesKey", 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 }, minPointRadius: { classPropertyName: "minPointRadius", publicName: "minPointRadius", isSignal: true, isRequired: false, transformFunction: null }, maxPointRadius: { classPropertyName: "maxPointRadius", publicName: "maxPointRadius", isSignal: true, isRequired: false, transformFunction: null }, xDomain: { classPropertyName: "xDomain", publicName: "xDomain", isSignal: true, isRequired: false, transformFunction: null }, yDomain: { classPropertyName: "yDomain", publicName: "yDomain", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { properties: { "attr.data-style": "chartStyle()" }, classAttribute: "relative block h-full w-full" }, providers: [ScatterViewportContext], ngImport: i0, template: `
|
|
198
|
+
<svg:svg
|
|
199
|
+
ChartRovingFocus
|
|
200
|
+
class="block h-full w-full overflow-visible"
|
|
201
|
+
[attr.viewBox]="cx.viewBox()"
|
|
202
|
+
preserveAspectRatio="none"
|
|
203
|
+
role="img"
|
|
204
|
+
[attr.aria-label]="ariaSummary()"
|
|
205
|
+
>
|
|
206
|
+
<svg:defs>
|
|
207
|
+
<svg:clipPath [attr.id]="clipPathId()">
|
|
208
|
+
<svg:rect x="0" y="0" [attr.width]="cx.innerWidth()" [attr.height]="cx.innerHeight()" />
|
|
209
|
+
</svg:clipPath>
|
|
210
|
+
</svg:defs>
|
|
211
|
+
<svg:g [attr.transform]="cx.innerTransform()">
|
|
212
|
+
<!-- The brush hitbox is slotted first so it sits UNDER the points: it is
|
|
213
|
+
a hit-testable rect, and on top it swallowed every click, hover and
|
|
214
|
+
cursor affordance the points publish. -->
|
|
215
|
+
<ng-content select="svg:g[ChartBrush]" />
|
|
216
|
+
<svg:g class="chart-scatter" [attr.clip-path]="'url(#' + clipPathId() + ')'">
|
|
217
|
+
@for (p of layout().points; track p.datumIndex) {
|
|
218
|
+
<svg:circle
|
|
219
|
+
ChartMarkFocus
|
|
220
|
+
class="chart-scatter-point cursor-pointer transition-opacity hover:opacity-80"
|
|
221
|
+
[attr.cx]="p.x"
|
|
222
|
+
[attr.cy]="p.y"
|
|
223
|
+
[attr.r]="p.radius"
|
|
224
|
+
[attr.fill]="p.color"
|
|
225
|
+
[attr.aria-label]="cx.pointAriaLabel(p)"
|
|
226
|
+
role="img"
|
|
227
|
+
tabindex="0"
|
|
228
|
+
(pointerenter)="cx.setActivePoint($event, p)"
|
|
229
|
+
(pointermove)="cx.setActivePoint($event, p)"
|
|
230
|
+
(pointerleave)="cx.clearActivePoint()"
|
|
231
|
+
(focus)="cx.setActivePoint($event, p)"
|
|
232
|
+
(blur)="cx.clearActivePoint()"
|
|
233
|
+
(click)="cx.emitClick(p)"
|
|
234
|
+
(keydown.enter)="cx.emitClick(p)"
|
|
235
|
+
(keydown.space)="cx.emitClick(p); $event.preventDefault()"
|
|
236
|
+
/>
|
|
237
|
+
}
|
|
238
|
+
</svg:g>
|
|
239
|
+
</svg:g>
|
|
240
|
+
</svg:svg>
|
|
241
|
+
<ng-content select="ChartTooltip" />
|
|
242
|
+
<ng-content select="ChartLegend" />
|
|
243
|
+
<ng-content select="ChartZoomControls" />
|
|
244
|
+
<ChartDataTable [data]="data()" [columns]="dataColumns()" [label]="ariaSummary()" />
|
|
245
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: ChartRovingFocus, selector: "svg[ChartRovingFocus]" }, { kind: "directive", type: ChartMarkFocus, selector: "[ChartMarkFocus]" }, { kind: "component", type: ChartDataTable, selector: "ChartDataTable", inputs: ["data", "columns", "label", "rowHeaderKey"] }] });
|
|
246
|
+
}
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ScatterChart, decorators: [{
|
|
248
|
+
type: Component,
|
|
249
|
+
args: [{
|
|
250
|
+
selector: 'ChartScatter',
|
|
251
|
+
providers: [ScatterViewportContext],
|
|
252
|
+
imports: [ChartRovingFocus, ChartMarkFocus, ChartDataTable],
|
|
253
|
+
host: { class: 'relative block h-full w-full', '[attr.data-style]': 'chartStyle()' },
|
|
254
|
+
template: `
|
|
255
|
+
<svg:svg
|
|
256
|
+
ChartRovingFocus
|
|
257
|
+
class="block h-full w-full overflow-visible"
|
|
258
|
+
[attr.viewBox]="cx.viewBox()"
|
|
259
|
+
preserveAspectRatio="none"
|
|
260
|
+
role="img"
|
|
261
|
+
[attr.aria-label]="ariaSummary()"
|
|
262
|
+
>
|
|
263
|
+
<svg:defs>
|
|
264
|
+
<svg:clipPath [attr.id]="clipPathId()">
|
|
265
|
+
<svg:rect x="0" y="0" [attr.width]="cx.innerWidth()" [attr.height]="cx.innerHeight()" />
|
|
266
|
+
</svg:clipPath>
|
|
267
|
+
</svg:defs>
|
|
268
|
+
<svg:g [attr.transform]="cx.innerTransform()">
|
|
269
|
+
<!-- The brush hitbox is slotted first so it sits UNDER the points: it is
|
|
270
|
+
a hit-testable rect, and on top it swallowed every click, hover and
|
|
271
|
+
cursor affordance the points publish. -->
|
|
272
|
+
<ng-content select="svg:g[ChartBrush]" />
|
|
273
|
+
<svg:g class="chart-scatter" [attr.clip-path]="'url(#' + clipPathId() + ')'">
|
|
274
|
+
@for (p of layout().points; track p.datumIndex) {
|
|
275
|
+
<svg:circle
|
|
276
|
+
ChartMarkFocus
|
|
277
|
+
class="chart-scatter-point cursor-pointer transition-opacity hover:opacity-80"
|
|
278
|
+
[attr.cx]="p.x"
|
|
279
|
+
[attr.cy]="p.y"
|
|
280
|
+
[attr.r]="p.radius"
|
|
281
|
+
[attr.fill]="p.color"
|
|
282
|
+
[attr.aria-label]="cx.pointAriaLabel(p)"
|
|
283
|
+
role="img"
|
|
284
|
+
tabindex="0"
|
|
285
|
+
(pointerenter)="cx.setActivePoint($event, p)"
|
|
286
|
+
(pointermove)="cx.setActivePoint($event, p)"
|
|
287
|
+
(pointerleave)="cx.clearActivePoint()"
|
|
288
|
+
(focus)="cx.setActivePoint($event, p)"
|
|
289
|
+
(blur)="cx.clearActivePoint()"
|
|
290
|
+
(click)="cx.emitClick(p)"
|
|
291
|
+
(keydown.enter)="cx.emitClick(p)"
|
|
292
|
+
(keydown.space)="cx.emitClick(p); $event.preventDefault()"
|
|
293
|
+
/>
|
|
294
|
+
}
|
|
295
|
+
</svg:g>
|
|
296
|
+
</svg:g>
|
|
297
|
+
</svg:svg>
|
|
298
|
+
<ng-content select="ChartTooltip" />
|
|
299
|
+
<ng-content select="ChartLegend" />
|
|
300
|
+
<ng-content select="ChartZoomControls" />
|
|
301
|
+
<ChartDataTable [data]="data()" [columns]="dataColumns()" [label]="ariaSummary()" />
|
|
302
|
+
`,
|
|
303
|
+
}]
|
|
304
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], xKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "xKey", required: true }] }], yKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "yKey", required: true }] }], sizeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeKey", required: false }] }], seriesKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "seriesKey", 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 }] }], minPointRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "minPointRadius", required: false }] }], maxPointRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPointRadius", required: false }] }], xDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomain", required: false }] }], yDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomain", required: false }] }], pointClick: [{ type: i0.Output, args: ["pointClick"] }] } });
|
|
4
305
|
|
|
5
306
|
/**
|
|
6
307
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
308
|
+
*/
|
|
309
|
+
|
|
310
|
+
export { ScatterChart, computeScatterLayout, resolveScatterDomains };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { CHART_DATA_ATTRIBUTE, CHART_THEMES, CartesianContext, CategoricalViewportContext, ChartContainer, ChartContext, ChartStyle, DEFAULT_CARTESIAN_MARGIN, DEFAULT_POLAR_MARGIN, DEFAULT_RADAR_MARGIN, ScatterViewportContext, bandTicks, buildCartesianScales, buildChartCss, cloneLinear, computeAreaLayout, computeLineLayout, effectiveIndexRange, elementClientCenter, escapeCssIdent, indexRangeSize, isSafeCssColorValue, linearTicks, nearestCategoryIndex, normalizeIndexRange, normalizeNumericDomain, panIndexRange, panNumericDomain, pointToBandAdapter, provideCartesianFromLineLayout, resolveChartStyle, resolveSeriesColor, seriesColorVar, setupCartesianChart, sliceByIndexRange, xScale, yScale, zoomIndexRange, zoomNumericDomain } from '@ojiepermana/angular/chart/core';
|
|
2
|
+
export { ChartAxisX, ChartAxisY, ChartBrush, ChartCrosshair, ChartGrid, ChartLegend, ChartPointerTracker, ChartTooltip, ChartZoomControls, PieCenter, RadialCenter } from '@ojiepermana/angular/chart/primitives';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
* Public API of @ojiepermana/angular/chart
|
|
5
|
-
*
|
|
5
|
+
* Public API Surface of @ojiepermana/angular/chart
|
|
6
|
+
*
|
|
7
|
+
* Hanya core + primitives (kebutuhan bersama semua chart). Famili chart
|
|
8
|
+
* diimpor lewat entry point masing-masing, mis. `@ojiepermana/angular/chart/bar`,
|
|
9
|
+
* supaya aplikasi hanya membundel jenis chart yang dipakai.
|
|
10
|
+
*/
|
|
11
|
+
/*
|
|
12
|
+
* Re-export per nama (bukan `export *`): entry point ini menjadi modul shared
|
|
13
|
+
* native federation, dan esbuild tidak bisa meneruskan named export melalui
|
|
14
|
+
* `export *` dari modul external — konsumen akan gagal resolve saat runtime.
|
|
6
15
|
*/
|
|
7
16
|
|
|
8
17
|
/**
|