@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,425 @@
|
|
|
1
|
-
|
|
1
|
+
import { curveCardinalClosed, curveLinearClosed, lineRadial } from 'd3-shape';
|
|
2
|
+
import { max } from 'd3-array';
|
|
3
|
+
import { readNumber, seriesColorVar, ChartContext, resolveChartStyle, ChartThemeSpace, resolveChartMargin, DEFAULT_RADAR_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 computeRadarLayout(input) {
|
|
8
|
+
const { data, axisKey, seriesKeys, innerWidth, innerHeight, levels, curve, grid } = input;
|
|
9
|
+
const radius = Math.max(0, Math.min(innerWidth, innerHeight) / 2);
|
|
10
|
+
const centerX = innerWidth / 2;
|
|
11
|
+
const centerY = innerHeight / 2;
|
|
12
|
+
if (data.length === 0 || seriesKeys.length === 0 || radius === 0) {
|
|
13
|
+
return { centerX, centerY, radius, axes: [], levels: [], maxValue: 0, series: [], grid };
|
|
14
|
+
}
|
|
15
|
+
const maxValue = input.maxValue ?? max(data, (d) => max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 1;
|
|
16
|
+
const safeMaxValue = maxValue > 0 ? maxValue : 1;
|
|
17
|
+
const angleStep = (2 * Math.PI) / data.length;
|
|
18
|
+
const angleFor = (i) => i * angleStep - Math.PI / 2;
|
|
19
|
+
const axes = data.map((d, i) => {
|
|
20
|
+
const angle = angleFor(i);
|
|
21
|
+
return {
|
|
22
|
+
name: String(d[axisKey] ?? i),
|
|
23
|
+
angle,
|
|
24
|
+
x: Math.cos(angle) * radius,
|
|
25
|
+
y: Math.sin(angle) * radius,
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
const levelValues = Array.from({ length: levels }, (_, index) => {
|
|
29
|
+
const value = ((index + 1) / levels) * safeMaxValue;
|
|
30
|
+
const levelRadius = ((index + 1) / levels) * radius;
|
|
31
|
+
return {
|
|
32
|
+
value,
|
|
33
|
+
radius: levelRadius,
|
|
34
|
+
path: polygonPath(axes.map((axis) => ({
|
|
35
|
+
x: Math.cos(axis.angle) * levelRadius,
|
|
36
|
+
y: Math.sin(axis.angle) * levelRadius,
|
|
37
|
+
}))),
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const curveFactory = curve === 'cardinal' ? curveCardinalClosed : curveLinearClosed;
|
|
41
|
+
const radial = lineRadial()
|
|
42
|
+
.angle((point) => point.angle + Math.PI / 2)
|
|
43
|
+
.radius((point) => (point.value / safeMaxValue) * radius)
|
|
44
|
+
.curve(curveFactory);
|
|
45
|
+
const series = seriesKeys.map((seriesKey) => {
|
|
46
|
+
const points = data.map((datum, index) => {
|
|
47
|
+
const value = readNumber(datum, seriesKey);
|
|
48
|
+
const angle = angleFor(index);
|
|
49
|
+
const pointRadius = (value / safeMaxValue) * radius;
|
|
50
|
+
return {
|
|
51
|
+
axis: String(datum[axisKey] ?? index),
|
|
52
|
+
value,
|
|
53
|
+
x: Math.cos(angle) * pointRadius,
|
|
54
|
+
y: Math.sin(angle) * pointRadius,
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
seriesKey,
|
|
59
|
+
color: seriesColorVar(seriesKey),
|
|
60
|
+
path: radial(data.map((datum, index) => ({
|
|
61
|
+
angle: angleFor(index),
|
|
62
|
+
value: readNumber(datum, seriesKey),
|
|
63
|
+
}))) ?? '',
|
|
64
|
+
points,
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
centerX,
|
|
69
|
+
centerY,
|
|
70
|
+
radius,
|
|
71
|
+
axes,
|
|
72
|
+
levels: levelValues,
|
|
73
|
+
maxValue: safeMaxValue,
|
|
74
|
+
series,
|
|
75
|
+
grid,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function polygonPath(points) {
|
|
79
|
+
if (points.length === 0) {
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
const [first, ...rest] = points;
|
|
83
|
+
return `M ${first.x} ${first.y} ${rest.map((point) => `L ${point.x} ${point.y}`).join(' ')} Z`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
class RadarChart {
|
|
87
|
+
root = inject(ChartContext);
|
|
88
|
+
data = input.required(/* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
90
|
+
axisKey = input.required(/* @ts-ignore */
|
|
91
|
+
...(ngDevMode ? [{ debugName: "axisKey" }] : /* istanbul ignore next */ []));
|
|
92
|
+
/**
|
|
93
|
+
* Presentational style of the chart.
|
|
94
|
+
*
|
|
95
|
+
* Replaces `styles`, which read like a CSS styles bag rather than a single
|
|
96
|
+
* variant. Named `styleVariant` and not `variant` because `ChartBar` already
|
|
97
|
+
* publishes a `variant` input for its grouped versus stacked axis, and one
|
|
98
|
+
* name cannot mean two things across the family.
|
|
99
|
+
*/
|
|
100
|
+
styleVariant = input(undefined, /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "styleVariant" }] : /* istanbul ignore next */ []));
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated Use `styleVariant`. Still fully supported; when both are bound,
|
|
104
|
+
* `styleVariant` wins. Due for removal in the next major.
|
|
105
|
+
*/
|
|
106
|
+
styles = input('base', /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
108
|
+
/** The style actually in effect. Bind this, never `styles()`. */
|
|
109
|
+
chartStyle = resolveChartStyle(this.styleVariant, this.styles);
|
|
110
|
+
themeSpace = inject(ChartThemeSpace);
|
|
111
|
+
/**
|
|
112
|
+
* Plot gutters. Leave it unset and they follow the theme-space density
|
|
113
|
+
* axis; set it and your numbers win, unchanged, whatever the axis says.
|
|
114
|
+
*/
|
|
115
|
+
margin = input(null, /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []));
|
|
117
|
+
/** The margin actually in effect. Bind this, never `margin()`. */
|
|
118
|
+
plotMargin = resolveChartMargin(this.margin, DEFAULT_RADAR_MARGIN_UNITS, this.themeSpace);
|
|
119
|
+
curve = input('linear', /* @ts-ignore */
|
|
120
|
+
...(ngDevMode ? [{ debugName: "curve" }] : /* istanbul ignore next */ []));
|
|
121
|
+
levels = input(4, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "levels" }] : /* istanbul ignore next */ []));
|
|
123
|
+
maxValue = input(undefined, /* @ts-ignore */
|
|
124
|
+
...(ngDevMode ? [{ debugName: "maxValue" }] : /* istanbul ignore next */ []));
|
|
125
|
+
strokeWidth = input(2, /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []));
|
|
127
|
+
fillOpacity = input(0.2, /* @ts-ignore */
|
|
128
|
+
...(ngDevMode ? [{ debugName: "fillOpacity" }] : /* istanbul ignore next */ []));
|
|
129
|
+
showLabels = input(true, /* @ts-ignore */
|
|
130
|
+
...(ngDevMode ? [{ debugName: "showLabels" }] : /* istanbul ignore next */ []));
|
|
131
|
+
showDots = input(true, /* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [{ debugName: "showDots" }] : /* istanbul ignore next */ []));
|
|
133
|
+
dotRadius = input(3, /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "dotRadius" }] : /* istanbul ignore next */ []));
|
|
135
|
+
grid = input('circle', /* @ts-ignore */
|
|
136
|
+
...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
137
|
+
gridFilled = input(false, /* @ts-ignore */
|
|
138
|
+
...(ngDevMode ? [{ debugName: "gridFilled" }] : /* istanbul ignore next */ []));
|
|
139
|
+
showAxes = input(true, /* @ts-ignore */
|
|
140
|
+
...(ngDevMode ? [{ debugName: "showAxes" }] : /* istanbul ignore next */ []));
|
|
141
|
+
linesOnly = input(false, /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "linesOnly" }] : /* istanbul ignore next */ []));
|
|
143
|
+
/**
|
|
144
|
+
* Emitted when a dot is activated by pointer or keyboard. Radar was the one
|
|
145
|
+
* chart family a keyboard user could focus but never operate.
|
|
146
|
+
*/
|
|
147
|
+
pointClick = output();
|
|
148
|
+
polar = setupPolarChart({ margin: () => this.plotMargin() });
|
|
149
|
+
layout = computed(() => computeRadarLayout({
|
|
150
|
+
data: this.data(),
|
|
151
|
+
axisKey: this.axisKey(),
|
|
152
|
+
seriesKeys: this.root.visibleSeriesKeys(),
|
|
153
|
+
innerWidth: this.polar.innerWidth(),
|
|
154
|
+
innerHeight: this.polar.innerHeight(),
|
|
155
|
+
maxValue: this.maxValue(),
|
|
156
|
+
levels: this.levels(),
|
|
157
|
+
curve: this.curve(),
|
|
158
|
+
grid: this.grid(),
|
|
159
|
+
}), /* @ts-ignore */
|
|
160
|
+
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
161
|
+
ariaSummary = computed(() => {
|
|
162
|
+
const keys = this.root.visibleSeriesKeys();
|
|
163
|
+
return `Radar chart, ${this.data().length} axes, ${keys.length} series.`;
|
|
164
|
+
}, /* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "ariaSummary" }] : /* istanbul ignore next */ []));
|
|
166
|
+
dataColumns = computed(() => [
|
|
167
|
+
this.axisKey(),
|
|
168
|
+
...this.root.visibleSeriesKeys(),
|
|
169
|
+
], /* @ts-ignore */
|
|
170
|
+
...(ngDevMode ? [{ debugName: "dataColumns" }] : /* istanbul ignore next */ []));
|
|
171
|
+
gridFill() {
|
|
172
|
+
return this.gridFilled() ? 'hsl(var(--muted))' : 'none';
|
|
173
|
+
}
|
|
174
|
+
gridFillOpacity(levelIndex) {
|
|
175
|
+
return this.gridFilled() ? Math.max(0.06, 0.18 - levelIndex * 0.02) : null;
|
|
176
|
+
}
|
|
177
|
+
dotAriaLabel(seriesKey, p) {
|
|
178
|
+
const label = this.polar.seriesLabel(seriesKey);
|
|
179
|
+
return `${label} at ${p.axis}: ${p.value}`;
|
|
180
|
+
}
|
|
181
|
+
emitClick(seriesKey, point, datumIndex) {
|
|
182
|
+
this.pointClick.emit({
|
|
183
|
+
seriesKey,
|
|
184
|
+
datumIndex,
|
|
185
|
+
category: point.axis,
|
|
186
|
+
value: point.value,
|
|
187
|
+
datum: this.data()[datumIndex],
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RadarChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: RadarChart, isStandalone: true, selector: "ChartRadar", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, axisKey: { classPropertyName: "axisKey", publicName: "axisKey", isSignal: true, isRequired: true, 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 }, curve: { classPropertyName: "curve", publicName: "curve", isSignal: true, isRequired: false, transformFunction: null }, levels: { classPropertyName: "levels", publicName: "levels", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, fillOpacity: { classPropertyName: "fillOpacity", publicName: "fillOpacity", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, showDots: { classPropertyName: "showDots", publicName: "showDots", isSignal: true, isRequired: false, transformFunction: null }, dotRadius: { classPropertyName: "dotRadius", publicName: "dotRadius", isSignal: true, isRequired: false, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, gridFilled: { classPropertyName: "gridFilled", publicName: "gridFilled", isSignal: true, isRequired: false, transformFunction: null }, showAxes: { classPropertyName: "showAxes", publicName: "showAxes", isSignal: true, isRequired: false, transformFunction: null }, linesOnly: { classPropertyName: "linesOnly", publicName: "linesOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { properties: { "attr.data-style": "chartStyle()" }, classAttribute: "relative block h-full w-full" }, ngImport: i0, template: `
|
|
192
|
+
<svg:svg
|
|
193
|
+
ChartRovingFocus
|
|
194
|
+
class="block h-full w-full overflow-visible"
|
|
195
|
+
[attr.viewBox]="polar.viewBox()"
|
|
196
|
+
preserveAspectRatio="xMidYMid meet"
|
|
197
|
+
role="img"
|
|
198
|
+
[attr.aria-label]="ariaSummary()"
|
|
199
|
+
>
|
|
200
|
+
<svg:g [attr.transform]="polar.innerTransform()">
|
|
201
|
+
<svg:g
|
|
202
|
+
class="chart-radar"
|
|
203
|
+
[attr.transform]="'translate(' + layout().centerX + ',' + layout().centerY + ')'"
|
|
204
|
+
>
|
|
205
|
+
@if (layout().grid !== 'none') {
|
|
206
|
+
@for (level of layout().levels; track level.value; let levelIndex = $index) {
|
|
207
|
+
@if (layout().grid === 'circle') {
|
|
208
|
+
<svg:circle
|
|
209
|
+
class="chart-radar-level stroke-border"
|
|
210
|
+
[attr.fill]="gridFill()"
|
|
211
|
+
[attr.fill-opacity]="gridFillOpacity(levelIndex)"
|
|
212
|
+
stroke-dasharray="2 2"
|
|
213
|
+
cx="0"
|
|
214
|
+
cy="0"
|
|
215
|
+
[attr.r]="level.radius"
|
|
216
|
+
/>
|
|
217
|
+
} @else {
|
|
218
|
+
<svg:path
|
|
219
|
+
class="chart-radar-level stroke-border"
|
|
220
|
+
[attr.d]="level.path"
|
|
221
|
+
[attr.fill]="gridFill()"
|
|
222
|
+
[attr.fill-opacity]="gridFillOpacity(levelIndex)"
|
|
223
|
+
stroke-dasharray="2 2"
|
|
224
|
+
/>
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
@if (showAxes()) {
|
|
229
|
+
@for (axis of layout().axes; track axis.name) {
|
|
230
|
+
<svg:line
|
|
231
|
+
class="chart-radar-axis stroke-border"
|
|
232
|
+
x1="0"
|
|
233
|
+
y1="0"
|
|
234
|
+
[attr.x2]="axis.x"
|
|
235
|
+
[attr.y2]="axis.y"
|
|
236
|
+
/>
|
|
237
|
+
@if (showLabels()) {
|
|
238
|
+
<svg:text
|
|
239
|
+
class="chart-radar-axis-label fill-muted-foreground text-2xs"
|
|
240
|
+
text-anchor="middle"
|
|
241
|
+
dominant-baseline="middle"
|
|
242
|
+
[attr.x]="axis.x * 1.12"
|
|
243
|
+
[attr.y]="axis.y * 1.12"
|
|
244
|
+
>
|
|
245
|
+
{{ axis.name }}
|
|
246
|
+
</svg:text>
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
@for (s of layout().series; track s.seriesKey) {
|
|
251
|
+
<svg:path
|
|
252
|
+
class="chart-radar-series"
|
|
253
|
+
[attr.d]="s.path"
|
|
254
|
+
[attr.stroke]="s.color"
|
|
255
|
+
[attr.fill]="linesOnly() ? 'none' : s.color"
|
|
256
|
+
[attr.fill-opacity]="linesOnly() ? null : fillOpacity()"
|
|
257
|
+
[attr.stroke-width]="strokeWidth()"
|
|
258
|
+
stroke-linejoin="round"
|
|
259
|
+
/>
|
|
260
|
+
@if (showDots()) {
|
|
261
|
+
@for (p of s.points; track p.axis; let i = $index) {
|
|
262
|
+
<svg:circle
|
|
263
|
+
ChartMarkFocus
|
|
264
|
+
class="chart-radar-dot cursor-pointer"
|
|
265
|
+
[attr.cx]="p.x"
|
|
266
|
+
[attr.cy]="p.y"
|
|
267
|
+
[attr.r]="dotRadius()"
|
|
268
|
+
[attr.fill]="s.color"
|
|
269
|
+
tabindex="0"
|
|
270
|
+
[attr.aria-label]="dotAriaLabel(s.seriesKey, p)"
|
|
271
|
+
role="img"
|
|
272
|
+
(pointerenter)="
|
|
273
|
+
polar.setActivePoint($event, { seriesKey: s.seriesKey, datumIndex: i })
|
|
274
|
+
"
|
|
275
|
+
(pointermove)="
|
|
276
|
+
polar.setActivePoint($event, { seriesKey: s.seriesKey, datumIndex: i })
|
|
277
|
+
"
|
|
278
|
+
(pointerleave)="polar.clearActivePoint()"
|
|
279
|
+
(focus)="polar.setActivePoint($event, { seriesKey: s.seriesKey, datumIndex: i })"
|
|
280
|
+
(blur)="polar.clearActivePoint()"
|
|
281
|
+
(click)="emitClick(s.seriesKey, p, i)"
|
|
282
|
+
(keydown.enter)="emitClick(s.seriesKey, p, i)"
|
|
283
|
+
(keydown.space)="emitClick(s.seriesKey, p, i); $event.preventDefault()"
|
|
284
|
+
/>
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
</svg:g>
|
|
289
|
+
<ng-content />
|
|
290
|
+
</svg:g>
|
|
291
|
+
</svg:svg>
|
|
292
|
+
<ng-content select="ChartTooltip" />
|
|
293
|
+
<ng-content select="ChartLegend" />
|
|
294
|
+
<ChartDataTable
|
|
295
|
+
[data]="data()"
|
|
296
|
+
[columns]="dataColumns()"
|
|
297
|
+
[rowHeaderKey]="axisKey()"
|
|
298
|
+
[label]="ariaSummary()"
|
|
299
|
+
/>
|
|
300
|
+
`, 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"] }] });
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RadarChart, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{
|
|
305
|
+
selector: 'ChartRadar',
|
|
306
|
+
imports: [ChartRovingFocus, ChartMarkFocus, ChartDataTable],
|
|
307
|
+
host: { class: 'relative block h-full w-full', '[attr.data-style]': 'chartStyle()' },
|
|
308
|
+
template: `
|
|
309
|
+
<svg:svg
|
|
310
|
+
ChartRovingFocus
|
|
311
|
+
class="block h-full w-full overflow-visible"
|
|
312
|
+
[attr.viewBox]="polar.viewBox()"
|
|
313
|
+
preserveAspectRatio="xMidYMid meet"
|
|
314
|
+
role="img"
|
|
315
|
+
[attr.aria-label]="ariaSummary()"
|
|
316
|
+
>
|
|
317
|
+
<svg:g [attr.transform]="polar.innerTransform()">
|
|
318
|
+
<svg:g
|
|
319
|
+
class="chart-radar"
|
|
320
|
+
[attr.transform]="'translate(' + layout().centerX + ',' + layout().centerY + ')'"
|
|
321
|
+
>
|
|
322
|
+
@if (layout().grid !== 'none') {
|
|
323
|
+
@for (level of layout().levels; track level.value; let levelIndex = $index) {
|
|
324
|
+
@if (layout().grid === 'circle') {
|
|
325
|
+
<svg:circle
|
|
326
|
+
class="chart-radar-level stroke-border"
|
|
327
|
+
[attr.fill]="gridFill()"
|
|
328
|
+
[attr.fill-opacity]="gridFillOpacity(levelIndex)"
|
|
329
|
+
stroke-dasharray="2 2"
|
|
330
|
+
cx="0"
|
|
331
|
+
cy="0"
|
|
332
|
+
[attr.r]="level.radius"
|
|
333
|
+
/>
|
|
334
|
+
} @else {
|
|
335
|
+
<svg:path
|
|
336
|
+
class="chart-radar-level stroke-border"
|
|
337
|
+
[attr.d]="level.path"
|
|
338
|
+
[attr.fill]="gridFill()"
|
|
339
|
+
[attr.fill-opacity]="gridFillOpacity(levelIndex)"
|
|
340
|
+
stroke-dasharray="2 2"
|
|
341
|
+
/>
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
@if (showAxes()) {
|
|
346
|
+
@for (axis of layout().axes; track axis.name) {
|
|
347
|
+
<svg:line
|
|
348
|
+
class="chart-radar-axis stroke-border"
|
|
349
|
+
x1="0"
|
|
350
|
+
y1="0"
|
|
351
|
+
[attr.x2]="axis.x"
|
|
352
|
+
[attr.y2]="axis.y"
|
|
353
|
+
/>
|
|
354
|
+
@if (showLabels()) {
|
|
355
|
+
<svg:text
|
|
356
|
+
class="chart-radar-axis-label fill-muted-foreground text-2xs"
|
|
357
|
+
text-anchor="middle"
|
|
358
|
+
dominant-baseline="middle"
|
|
359
|
+
[attr.x]="axis.x * 1.12"
|
|
360
|
+
[attr.y]="axis.y * 1.12"
|
|
361
|
+
>
|
|
362
|
+
{{ axis.name }}
|
|
363
|
+
</svg:text>
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
@for (s of layout().series; track s.seriesKey) {
|
|
368
|
+
<svg:path
|
|
369
|
+
class="chart-radar-series"
|
|
370
|
+
[attr.d]="s.path"
|
|
371
|
+
[attr.stroke]="s.color"
|
|
372
|
+
[attr.fill]="linesOnly() ? 'none' : s.color"
|
|
373
|
+
[attr.fill-opacity]="linesOnly() ? null : fillOpacity()"
|
|
374
|
+
[attr.stroke-width]="strokeWidth()"
|
|
375
|
+
stroke-linejoin="round"
|
|
376
|
+
/>
|
|
377
|
+
@if (showDots()) {
|
|
378
|
+
@for (p of s.points; track p.axis; let i = $index) {
|
|
379
|
+
<svg:circle
|
|
380
|
+
ChartMarkFocus
|
|
381
|
+
class="chart-radar-dot cursor-pointer"
|
|
382
|
+
[attr.cx]="p.x"
|
|
383
|
+
[attr.cy]="p.y"
|
|
384
|
+
[attr.r]="dotRadius()"
|
|
385
|
+
[attr.fill]="s.color"
|
|
386
|
+
tabindex="0"
|
|
387
|
+
[attr.aria-label]="dotAriaLabel(s.seriesKey, p)"
|
|
388
|
+
role="img"
|
|
389
|
+
(pointerenter)="
|
|
390
|
+
polar.setActivePoint($event, { seriesKey: s.seriesKey, datumIndex: i })
|
|
391
|
+
"
|
|
392
|
+
(pointermove)="
|
|
393
|
+
polar.setActivePoint($event, { seriesKey: s.seriesKey, datumIndex: i })
|
|
394
|
+
"
|
|
395
|
+
(pointerleave)="polar.clearActivePoint()"
|
|
396
|
+
(focus)="polar.setActivePoint($event, { seriesKey: s.seriesKey, datumIndex: i })"
|
|
397
|
+
(blur)="polar.clearActivePoint()"
|
|
398
|
+
(click)="emitClick(s.seriesKey, p, i)"
|
|
399
|
+
(keydown.enter)="emitClick(s.seriesKey, p, i)"
|
|
400
|
+
(keydown.space)="emitClick(s.seriesKey, p, i); $event.preventDefault()"
|
|
401
|
+
/>
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
</svg:g>
|
|
406
|
+
<ng-content />
|
|
407
|
+
</svg:g>
|
|
408
|
+
</svg:svg>
|
|
409
|
+
<ng-content select="ChartTooltip" />
|
|
410
|
+
<ng-content select="ChartLegend" />
|
|
411
|
+
<ChartDataTable
|
|
412
|
+
[data]="data()"
|
|
413
|
+
[columns]="dataColumns()"
|
|
414
|
+
[rowHeaderKey]="axisKey()"
|
|
415
|
+
[label]="ariaSummary()"
|
|
416
|
+
/>
|
|
417
|
+
`,
|
|
418
|
+
}]
|
|
419
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], axisKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisKey", required: true }] }], 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 }] }], curve: [{ type: i0.Input, args: [{ isSignal: true, alias: "curve", required: false }] }], levels: [{ type: i0.Input, args: [{ isSignal: true, alias: "levels", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], fillOpacity: [{ type: i0.Input, args: [{ isSignal: true, alias: "fillOpacity", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], showDots: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDots", required: false }] }], dotRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "dotRadius", required: false }] }], grid: [{ type: i0.Input, args: [{ isSignal: true, alias: "grid", required: false }] }], gridFilled: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridFilled", required: false }] }], showAxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAxes", required: false }] }], linesOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "linesOnly", required: false }] }], pointClick: [{ type: i0.Output, args: ["pointClick"] }] } });
|
|
4
420
|
|
|
5
421
|
/**
|
|
6
422
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
423
|
+
*/
|
|
424
|
+
|
|
425
|
+
export { RadarChart, computeRadarLayout };
|