@gi-base/ui 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +32 -2
- package/dist/chunks/badge.vue_vue_type_style_index_0_lang-CY33mp7-.mjs +63 -0
- package/dist/chunks/button.vue_vue_type_style_index_0_lang-R3M50qg6.mjs +261 -0
- package/dist/chunks/card.vue_vue_type_style_index_0_lang-D8ofADym.mjs +140 -0
- package/dist/chunks/chart-card-CkzKgoNn.mjs +4 -0
- package/dist/chunks/chart-card.vue_vue_type_style_index_0_lang-O3dB4zv4.mjs +111 -0
- package/dist/chunks/chart-pxel8ocW.mjs +4 -0
- package/dist/chunks/chart.vue_vue_type_style_index_0_lang-Dt4-6E5R.mjs +1512 -0
- package/dist/chunks/context-ft3Pl675.mjs +4 -0
- package/dist/chunks/dialog.vue_vue_type_style_index_0_lang-DjG-cRmI.mjs +285 -0
- package/dist/chunks/icon.vue_vue_type_style_index_0_lang-CupFXcqv.mjs +93 -0
- package/dist/chunks/index-BQJqnh5l.mjs +181 -0
- package/dist/chunks/index-D0dJjV1u.mjs +127 -0
- package/dist/chunks/overlay.vue_vue_type_style_index_0_lang-BbOIddAC.mjs +58 -0
- package/dist/chunks/select.vue_vue_type_style_index_0_lang-CTXa4r_r.mjs +774 -0
- package/dist/chunks/sub-menu.vue_vue_type_script_setup_true_lang-D7eESzZS.mjs +775 -0
- package/dist/chunks/tag.vue_vue_type_style_index_0_lang-DEpBCkCG.mjs +146 -0
- package/dist/chunks/useClickOutside-C1JC115M.mjs +27 -0
- package/dist/chunks/useFloating-D4y_Ynh2.mjs +1067 -0
- package/dist/chunks/z-index-DpEcb64l.mjs +6 -0
- package/dist/components/affix/index.d.ts +134 -0
- package/dist/components/affix/index.mjs +62 -0
- package/dist/components/affix/src/affix.d.ts +32 -0
- package/dist/components/affix/src/affix.vue.d.ts +83 -0
- package/dist/components/ai/index.d.ts +1472 -0
- package/dist/components/ai/index.mjs +1107 -0
- package/dist/components/ai/src/console.vue.d.ts +23 -0
- package/dist/components/ai/src/cursor.vue.d.ts +59 -0
- package/dist/components/ai/src/focus-ring.vue.d.ts +77 -0
- package/dist/components/ai/src/ghost-input.vue.d.ts +74 -0
- package/dist/components/ai/src/guide.vue.d.ts +41 -0
- package/dist/components/ai/src/interact-lock.vue.d.ts +65 -0
- package/dist/components/ai/src/page-renderer.d.ts +62 -0
- package/dist/components/ai/src/page-renderer.vue.d.ts +50 -0
- package/dist/components/ai/src/progress.vue.d.ts +70 -0
- package/dist/components/ai/src/provider.vue.d.ts +61 -0
- package/dist/components/ai/src/review-panel.vue.d.ts +69 -0
- package/dist/components/ai/src/spotlight.vue.d.ts +78 -0
- package/dist/components/ai/src/step-tip.vue.d.ts +87 -0
- package/dist/components/ai/src/summary-panel.vue.d.ts +66 -0
- package/dist/components/ai/src/target.d.ts +33 -0
- package/dist/components/ai/src/useAi.d.ts +11 -0
- package/dist/components/alert/index.d.ts +178 -0
- package/dist/components/alert/index.mjs +92 -0
- package/dist/components/alert/src/alert.d.ts +45 -0
- package/dist/components/alert/src/alert.vue.d.ts +112 -0
- package/dist/components/anchor/index.d.ts +203 -0
- package/dist/components/anchor/index.mjs +118 -0
- package/dist/components/anchor/src/anchor-link.vue.d.ts +39 -0
- package/dist/components/anchor/src/anchor.d.ts +48 -0
- package/dist/components/anchor/src/anchor.vue.d.ts +98 -0
- package/dist/components/app-shell/index.d.ts +352 -0
- package/dist/components/app-shell/index.mjs +229 -0
- package/dist/components/app-shell/src/app-shell.d.ts +99 -0
- package/dist/components/app-shell/src/app-shell.vue.d.ts +213 -0
- package/dist/components/autocomplete/index.d.ts +330 -0
- package/dist/components/autocomplete/index.mjs +166 -0
- package/dist/components/autocomplete/src/autocomplete.d.ts +83 -0
- package/dist/components/autocomplete/src/autocomplete.vue.d.ts +204 -0
- package/dist/components/avatar/index.d.ts +215 -0
- package/dist/components/avatar/index.mjs +99 -0
- package/dist/components/avatar/src/avatar-group.vue.d.ts +48 -0
- package/dist/components/avatar/src/avatar.d.ts +48 -0
- package/dist/components/avatar/src/avatar.vue.d.ts +96 -0
- package/dist/components/backtop/index.d.ts +124 -0
- package/dist/components/backtop/index.mjs +80 -0
- package/dist/components/backtop/src/backtop.d.ts +31 -0
- package/dist/components/backtop/src/backtop.vue.d.ts +78 -0
- package/dist/components/badge/index.d.ts +177 -0
- package/dist/components/badge/index.mjs +7 -0
- package/dist/components/badge/src/badge.d.ts +46 -0
- package/dist/components/badge/src/badge.vue.d.ts +112 -0
- package/dist/components/breadcrumb/index.d.ts +148 -0
- package/dist/components/breadcrumb/index.mjs +98 -0
- package/dist/components/breadcrumb/src/breadcrumb-item.vue.d.ts +51 -0
- package/dist/components/breadcrumb/src/breadcrumb.d.ts +46 -0
- package/dist/components/breadcrumb/src/breadcrumb.vue.d.ts +47 -0
- package/dist/components/button/index.d.ts +460 -0
- package/dist/components/button/index.mjs +7 -0
- package/dist/components/button/src/button.d.ts +144 -0
- package/dist/components/button/src/button.vue.d.ts +270 -0
- package/dist/components/button-group/index.d.ts +94 -0
- package/dist/components/button-group/index.mjs +49 -0
- package/dist/components/button-group/src/button-group.d.ts +27 -0
- package/dist/components/button-group/src/button-group.vue.d.ts +62 -0
- package/dist/components/button-group/src/context.d.ts +7 -0
- package/dist/components/calendar/index.d.ts +151 -0
- package/dist/components/calendar/index.mjs +199 -0
- package/dist/components/calendar/src/calendar.d.ts +35 -0
- package/dist/components/calendar/src/calendar.vue.d.ts +96 -0
- package/dist/components/card/index.d.ts +230 -0
- package/dist/components/card/index.mjs +7 -0
- package/dist/components/card/src/card.d.ts +67 -0
- package/dist/components/card/src/card.vue.d.ts +148 -0
- package/dist/components/carousel/index.d.ts +300 -0
- package/dist/components/carousel/index.mjs +166 -0
- package/dist/components/carousel/src/carousel-item.vue.d.ts +17 -0
- package/dist/components/carousel/src/carousel.d.ts +71 -0
- package/dist/components/carousel/src/carousel.vue.d.ts +171 -0
- package/dist/components/cascader/index.d.ts +322 -0
- package/dist/components/cascader/index.mjs +177 -0
- package/dist/components/cascader/src/cascader.d.ts +87 -0
- package/dist/components/cascader/src/cascader.vue.d.ts +182 -0
- package/dist/components/chart/index.d.ts +605 -0
- package/dist/components/chart/index.mjs +20 -0
- package/dist/components/chart/src/chart-option.d.ts +62 -0
- package/dist/components/chart/src/chart.d.ts +186 -0
- package/dist/components/chart/src/chart.vue.d.ts +341 -0
- package/dist/components/chart-card/index.d.ts +638 -0
- package/dist/components/chart-card/index.mjs +7 -0
- package/dist/components/chart-card/src/chart-card.d.ts +167 -0
- package/dist/components/chart-card/src/chart-card.vue.d.ts +387 -0
- package/dist/components/check-tag/index.d.ts +181 -0
- package/dist/components/check-tag/index.mjs +92 -0
- package/dist/components/check-tag/src/check-tag.d.ts +49 -0
- package/dist/components/check-tag/src/check-tag.vue.d.ts +111 -0
- package/dist/components/checkbox/constants.d.ts +20 -0
- package/dist/components/checkbox/index.d.ts +340 -0
- package/dist/components/checkbox/index.mjs +6 -0
- package/dist/components/checkbox/src/checkbox.d.ts +100 -0
- package/dist/components/checkbox/src/checkbox.vue.d.ts +207 -0
- package/dist/components/checkbox-group/index.d.ts +249 -0
- package/dist/components/checkbox-group/index.mjs +108 -0
- package/dist/components/checkbox-group/src/checkbox-group.d.ts +84 -0
- package/dist/components/checkbox-group/src/checkbox-group.vue.d.ts +153 -0
- package/dist/components/col/index.d.ts +213 -0
- package/dist/components/col/index.mjs +82 -0
- package/dist/components/col/src/col.d.ts +74 -0
- package/dist/components/col/src/col.vue.d.ts +133 -0
- package/dist/components/collapse/index.d.ts +249 -0
- package/dist/components/collapse/index.mjs +231 -0
- package/dist/components/collapse/src/collapse-item.vue.d.ts +80 -0
- package/dist/components/collapse/src/collapse.d.ts +82 -0
- package/dist/components/collapse/src/collapse.vue.d.ts +75 -0
- package/dist/components/color-picker/index.d.ts +212 -0
- package/dist/components/color-picker/index.mjs +274 -0
- package/dist/components/color-picker/src/color-picker.d.ts +53 -0
- package/dist/components/color-picker/src/color-picker.vue.d.ts +118 -0
- package/dist/components/config-provider/index.d.ts +153 -0
- package/dist/components/config-provider/index.mjs +56 -0
- package/dist/components/config-provider/src/config-provider.d.ts +34 -0
- package/dist/components/config-provider/src/config-provider.vue.d.ts +94 -0
- package/dist/components/container/index.d.ts +424 -0
- package/dist/components/container/index.mjs +246 -0
- package/dist/components/container/src/aside.d.ts +19 -0
- package/dist/components/container/src/aside.vue.d.ts +49 -0
- package/dist/components/container/src/container.d.ts +23 -0
- package/dist/components/container/src/container.vue.d.ts +49 -0
- package/dist/components/container/src/footer.d.ts +14 -0
- package/dist/components/container/src/footer.vue.d.ts +38 -0
- package/dist/components/container/src/header.d.ts +43 -0
- package/dist/components/container/src/header.vue.d.ts +89 -0
- package/dist/components/container/src/main.d.ts +24 -0
- package/dist/components/container/src/main.vue.d.ts +56 -0
- package/dist/components/countdown/index.d.ts +140 -0
- package/dist/components/countdown/index.mjs +55 -0
- package/dist/components/countdown/src/countdown.d.ts +35 -0
- package/dist/components/countdown/src/countdown.vue.d.ts +74 -0
- package/dist/components/crud/index.d.ts +1424 -0
- package/dist/components/crud/index.mjs +1728 -0
- package/dist/components/crud/src/crud-dialog.vue.d.ts +675 -0
- package/dist/components/crud/src/crud-field-control.vue.d.ts +15 -0
- package/dist/components/crud/src/crud-pagination.vue.d.ts +18 -0
- package/dist/components/crud/src/crud-search.vue.d.ts +40 -0
- package/dist/components/crud/src/crud-table.vue.d.ts +106 -0
- package/dist/components/crud/src/crud-toolbar.vue.d.ts +55 -0
- package/dist/components/crud/src/crud.d.ts +180 -0
- package/dist/components/crud/src/crud.vue.d.ts +1756 -0
- package/dist/components/crud/src/types.d.ts +266 -0
- package/dist/components/crud/src/useCrud.d.ts +27 -0
- package/dist/components/date-picker/index.d.ts +557 -0
- package/dist/components/date-picker/index.mjs +865 -0
- package/dist/components/date-picker/src/date-panel.vue.d.ts +55 -0
- package/dist/components/date-picker/src/date-picker.d.ts +160 -0
- package/dist/components/date-picker/src/date-picker.vue.d.ts +335 -0
- package/dist/components/date-picker/src/date-utils.d.ts +26 -0
- package/dist/components/descriptions/index.d.ts +272 -0
- package/dist/components/descriptions/index.mjs +94 -0
- package/dist/components/descriptions/src/descriptions-item.vue.d.ts +79 -0
- package/dist/components/descriptions/src/descriptions.d.ts +67 -0
- package/dist/components/descriptions/src/descriptions.vue.d.ts +98 -0
- package/dist/components/dialog/index.d.ts +547 -0
- package/dist/components/dialog/index.mjs +10 -0
- package/dist/components/dialog/src/dialog.d.ts +132 -0
- package/dist/components/dialog/src/dialog.vue.d.ts +319 -0
- package/dist/components/divider/index.d.ts +93 -0
- package/dist/components/divider/index.mjs +38 -0
- package/dist/components/divider/src/divider.d.ts +24 -0
- package/dist/components/divider/src/divider.vue.d.ts +62 -0
- package/dist/components/drawer/index.d.ts +449 -0
- package/dist/components/drawer/index.mjs +233 -0
- package/dist/components/drawer/src/drawer.d.ts +108 -0
- package/dist/components/drawer/src/drawer.vue.d.ts +249 -0
- package/dist/components/dropdown/index.d.ts +445 -0
- package/dist/components/dropdown/index.mjs +192 -0
- package/dist/components/dropdown/src/dropdown-item.vue.d.ts +56 -0
- package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +17 -0
- package/dist/components/dropdown/src/dropdown.d.ts +102 -0
- package/dist/components/dropdown/src/dropdown.vue.d.ts +208 -0
- package/dist/components/empty/index.d.ts +103 -0
- package/dist/components/empty/index.mjs +67 -0
- package/dist/components/empty/src/empty.d.ts +25 -0
- package/dist/components/empty/src/empty.vue.d.ts +67 -0
- package/dist/components/empty/src/presets.d.ts +3 -0
- package/dist/components/footer-bar/index.d.ts +119 -0
- package/dist/components/footer-bar/index.mjs +100 -0
- package/dist/components/footer-bar/src/footer-bar.d.ts +41 -0
- package/dist/components/footer-bar/src/footer-bar.vue.d.ts +76 -0
- package/dist/components/form/index.d.ts +626 -0
- package/dist/components/form/index.mjs +675 -0
- package/dist/components/form/src/constants.d.ts +17 -0
- package/dist/components/form/src/form-item.vue.d.ts +168 -0
- package/dist/components/form/src/form.d.ts +177 -0
- package/dist/components/form/src/form.vue.d.ts +218 -0
- package/dist/components/form/src/types.d.ts +91 -0
- package/dist/components/icon/index.d.ts +150 -0
- package/dist/components/icon/index.mjs +7 -0
- package/dist/components/icon/src/icon.d.ts +54 -0
- package/dist/components/icon/src/icon.vue.d.ts +94 -0
- package/dist/components/image/index.d.ts +328 -0
- package/dist/components/image/index.mjs +101 -0
- package/dist/components/image/src/image.d.ts +80 -0
- package/dist/components/image/src/image.vue.d.ts +194 -0
- package/dist/components/image-viewer/index.d.ts +344 -0
- package/dist/components/image-viewer/index.mjs +305 -0
- package/dist/components/image-viewer/src/image-viewer.d.ts +88 -0
- package/dist/components/image-viewer/src/image-viewer.vue.d.ts +189 -0
- package/dist/components/infinite-scroll/index.d.ts +4 -0
- package/dist/components/infinite-scroll/index.mjs +35 -0
- package/dist/components/input/index.d.ts +550 -0
- package/dist/components/input/index.mjs +298 -0
- package/dist/components/input/src/input.d.ts +133 -0
- package/dist/components/input/src/input.vue.d.ts +327 -0
- package/dist/components/input-otp/index.d.ts +203 -0
- package/dist/components/input-otp/index.mjs +94 -0
- package/dist/components/input-otp/src/input-otp.d.ts +51 -0
- package/dist/components/input-otp/src/input-otp.vue.d.ts +109 -0
- package/dist/components/input-tag/index.d.ts +357 -0
- package/dist/components/input-tag/index.mjs +205 -0
- package/dist/components/input-tag/src/input-tag.d.ts +91 -0
- package/dist/components/input-tag/src/input-tag.vue.d.ts +201 -0
- package/dist/components/layout/index.d.ts +91 -0
- package/dist/components/layout/index.mjs +181 -0
- package/dist/components/layout/src/layout-executor.d.ts +24 -0
- package/dist/components/layout/src/layout-executor.vue.d.ts +62 -0
- package/dist/components/layout/src/layout.d.ts +60 -0
- package/dist/components/link/index.d.ts +162 -0
- package/dist/components/link/index.mjs +102 -0
- package/dist/components/link/src/link.d.ts +44 -0
- package/dist/components/link/src/link.vue.d.ts +103 -0
- package/dist/components/loading/index.d.ts +11 -0
- package/dist/components/loading/index.mjs +167 -0
- package/dist/components/loading/src/directive.d.ts +5 -0
- package/dist/components/loading/src/loading.d.ts +67 -0
- package/dist/components/loading/src/loading.vue.d.ts +40 -0
- package/dist/components/loading/src/service.d.ts +11 -0
- package/dist/components/mention/index.d.ts +211 -0
- package/dist/components/mention/index.mjs +126 -0
- package/dist/components/mention/src/mention.d.ts +50 -0
- package/dist/components/mention/src/mention.vue.d.ts +114 -0
- package/dist/components/menu/index.d.ts +814 -0
- package/dist/components/menu/index.mjs +50 -0
- package/dist/components/menu/src/menu-item-group.vue.d.ts +30 -0
- package/dist/components/menu/src/menu-item.vue.d.ts +72 -0
- package/dist/components/menu/src/menu.d.ts +294 -0
- package/dist/components/menu/src/menu.vue.d.ts +263 -0
- package/dist/components/menu/src/sub-menu.vue.d.ts +154 -0
- package/dist/components/message-box/index.d.ts +16 -0
- package/dist/components/message-box/index.mjs +288 -0
- package/dist/components/message-box/src/message-box.d.ts +171 -0
- package/dist/components/message-box/src/message-box.vue.d.ts +69 -0
- package/dist/components/message-box/src/service.d.ts +12 -0
- package/dist/components/notice/index.d.ts +252 -0
- package/dist/components/notice/index.mjs +307 -0
- package/dist/components/notice/src/notice.d.ts +79 -0
- package/dist/components/notice/src/notice.vue.d.ts +137 -0
- package/dist/components/notice/src/service.d.ts +34 -0
- package/dist/components/notification/index.d.ts +5 -0
- package/dist/components/notification/index.mjs +131 -0
- package/dist/components/notification/src/notification-item.vue.d.ts +28 -0
- package/dist/components/notification/src/notification.d.ts +26 -0
- package/dist/components/notification/src/service.d.ts +3 -0
- package/dist/components/number/index.d.ts +400 -0
- package/dist/components/number/index.mjs +257 -0
- package/dist/components/number/src/number.d.ts +114 -0
- package/dist/components/number/src/number.vue.d.ts +227 -0
- package/dist/components/overlay/index.d.ts +124 -0
- package/dist/components/overlay/index.mjs +7 -0
- package/dist/components/overlay/src/overlay.vue.d.ts +70 -0
- package/dist/components/page-header/index.d.ts +83 -0
- package/dist/components/page-header/index.mjs +79 -0
- package/dist/components/page-header/src/page-header.d.ts +17 -0
- package/dist/components/page-header/src/page-header.vue.d.ts +55 -0
- package/dist/components/pagination/index.d.ts +390 -0
- package/dist/components/pagination/index.mjs +195 -0
- package/dist/components/pagination/src/pagination.d.ts +101 -0
- package/dist/components/pagination/src/pagination.vue.d.ts +232 -0
- package/dist/components/popconfirm/index.d.ts +1146 -0
- package/dist/components/popconfirm/index.mjs +130 -0
- package/dist/components/popconfirm/src/popconfirm.d.ts +82 -0
- package/dist/components/popconfirm/src/popconfirm.vue.d.ts +1855 -0
- package/dist/components/popover/index.d.ts +873 -0
- package/dist/components/popover/index.mjs +110 -0
- package/dist/components/popover/src/popover.d.ts +85 -0
- package/dist/components/popover/src/popover.vue.d.ts +1271 -0
- package/dist/components/progress/index.d.ts +254 -0
- package/dist/components/progress/index.mjs +120 -0
- package/dist/components/progress/src/progress.d.ts +68 -0
- package/dist/components/progress/src/progress.vue.d.ts +146 -0
- package/dist/components/radio/constants.d.ts +17 -0
- package/dist/components/radio/index.d.ts +233 -0
- package/dist/components/radio/index.mjs +6 -0
- package/dist/components/radio/src/radio.d.ts +65 -0
- package/dist/components/radio/src/radio.vue.d.ts +143 -0
- package/dist/components/radio-group/index.d.ts +235 -0
- package/dist/components/radio-group/index.mjs +91 -0
- package/dist/components/radio-group/src/radio-group.d.ts +77 -0
- package/dist/components/radio-group/src/radio-group.vue.d.ts +144 -0
- package/dist/components/rate/index.d.ts +320 -0
- package/dist/components/rate/index.mjs +115 -0
- package/dist/components/rate/src/rate.d.ts +84 -0
- package/dist/components/rate/src/rate.vue.d.ts +182 -0
- package/dist/components/result/index.d.ts +91 -0
- package/dist/components/result/index.mjs +74 -0
- package/dist/components/result/src/result.d.ts +21 -0
- package/dist/components/result/src/result.vue.d.ts +62 -0
- package/dist/components/rolling-notice/index.d.ts +187 -0
- package/dist/components/rolling-notice/index.mjs +176 -0
- package/dist/components/rolling-notice/src/rolling-notice.d.ts +57 -0
- package/dist/components/rolling-notice/src/rolling-notice.vue.d.ts +102 -0
- package/dist/components/row/index.d.ts +105 -0
- package/dist/components/row/index.mjs +64 -0
- package/dist/components/row/src/row.d.ts +33 -0
- package/dist/components/row/src/row.vue.d.ts +69 -0
- package/dist/components/scrollbar/index.d.ts +386 -0
- package/dist/components/scrollbar/index.mjs +235 -0
- package/dist/components/scrollbar/src/scrollbar.d.ts +101 -0
- package/dist/components/scrollbar/src/scrollbar.vue.d.ts +237 -0
- package/dist/components/segmented/index.d.ts +252 -0
- package/dist/components/segmented/index.mjs +177 -0
- package/dist/components/segmented/src/segmented.d.ts +88 -0
- package/dist/components/segmented/src/segmented.vue.d.ts +159 -0
- package/dist/components/select/index.d.ts +1107 -0
- package/dist/components/select/index.mjs +36 -0
- package/dist/components/select/src/constants.d.ts +34 -0
- package/dist/components/select/src/option-group.vue.d.ts +39 -0
- package/dist/components/select/src/option.vue.d.ts +56 -0
- package/dist/components/select/src/remote.d.ts +6 -0
- package/dist/components/select/src/select.d.ts +336 -0
- package/dist/components/select/src/select.vue.d.ts +583 -0
- package/dist/components/select-virtual/index.d.ts +884 -0
- package/dist/components/select-virtual/index.mjs +18 -0
- package/dist/components/select-virtual/src/select-virtual.vue.d.ts +522 -0
- package/dist/components/sidebar/index.d.ts +279 -0
- package/dist/components/sidebar/index.mjs +283 -0
- package/dist/components/sidebar/src/sidebar.d.ts +106 -0
- package/dist/components/sidebar/src/sidebar.vue.d.ts +170 -0
- package/dist/components/skeleton/index.d.ts +186 -0
- package/dist/components/skeleton/index.mjs +87 -0
- package/dist/components/skeleton/src/skeleton-item.vue.d.ts +58 -0
- package/dist/components/skeleton/src/skeleton.d.ts +43 -0
- package/dist/components/skeleton/src/skeleton.vue.d.ts +66 -0
- package/dist/components/slider/index.d.ts +282 -0
- package/dist/components/slider/index.mjs +190 -0
- package/dist/components/slider/src/slider.d.ts +73 -0
- package/dist/components/slider/src/slider.vue.d.ts +159 -0
- package/dist/components/space/index.d.ts +164 -0
- package/dist/components/space/index.mjs +132 -0
- package/dist/components/space/src/space.d.ts +55 -0
- package/dist/components/space/src/space.vue.d.ts +92 -0
- package/dist/components/sparkline/index.d.ts +219 -0
- package/dist/components/sparkline/index.mjs +109 -0
- package/dist/components/sparkline/src/sparkline.d.ts +57 -0
- package/dist/components/sparkline/src/sparkline.vue.d.ts +124 -0
- package/dist/components/splitter/index.d.ts +263 -0
- package/dist/components/splitter/index.mjs +299 -0
- package/dist/components/splitter/src/context.d.ts +35 -0
- package/dist/components/splitter/src/split-panel.vue.d.ts +87 -0
- package/dist/components/splitter/src/splitter.d.ts +64 -0
- package/dist/components/splitter/src/splitter.vue.d.ts +79 -0
- package/dist/components/statistic/index.d.ts +207 -0
- package/dist/components/statistic/index.mjs +92 -0
- package/dist/components/statistic/src/statistic.d.ts +52 -0
- package/dist/components/statistic/src/statistic.vue.d.ts +131 -0
- package/dist/components/steps/index.d.ts +271 -0
- package/dist/components/steps/index.mjs +128 -0
- package/dist/components/steps/src/step.vue.d.ts +73 -0
- package/dist/components/steps/src/steps.d.ts +65 -0
- package/dist/components/steps/src/steps.vue.d.ts +104 -0
- package/dist/components/switch/index.d.ts +426 -0
- package/dist/components/switch/index.mjs +214 -0
- package/dist/components/switch/src/switch.d.ts +129 -0
- package/dist/components/switch/src/switch.vue.d.ts +244 -0
- package/dist/components/table/index.d.ts +1709 -0
- package/dist/components/table/index.mjs +1304 -0
- package/dist/components/table/src/table-column.vue.d.ts +341 -0
- package/dist/components/table/src/table.d.ts +564 -0
- package/dist/components/table/src/table.vue.d.ts +623 -0
- package/dist/components/table-v2/index.d.ts +302 -0
- package/dist/components/table-v2/index.mjs +147 -0
- package/dist/components/table-v2/src/table-v2.d.ts +89 -0
- package/dist/components/table-v2/src/table-v2.vue.d.ts +165 -0
- package/dist/components/tabs/index.d.ts +355 -0
- package/dist/components/tabs/index.mjs +278 -0
- package/dist/components/tabs/src/tab-pane.vue.d.ts +76 -0
- package/dist/components/tabs/src/tabs.d.ts +113 -0
- package/dist/components/tabs/src/tabs.vue.d.ts +147 -0
- package/dist/components/tag/index.d.ts +323 -0
- package/dist/components/tag/index.mjs +7 -0
- package/dist/components/tag/src/tag.d.ts +88 -0
- package/dist/components/tag/src/tag.vue.d.ts +194 -0
- package/dist/components/text/index.d.ts +138 -0
- package/dist/components/text/index.mjs +66 -0
- package/dist/components/text/src/text.d.ts +45 -0
- package/dist/components/text/src/text.vue.d.ts +89 -0
- package/dist/components/textarea/index.d.ts +417 -0
- package/dist/components/textarea/index.mjs +189 -0
- package/dist/components/textarea/src/textarea.d.ts +97 -0
- package/dist/components/textarea/src/textarea.vue.d.ts +231 -0
- package/dist/components/time-picker/index.d.ts +216 -0
- package/dist/components/time-picker/index.mjs +228 -0
- package/dist/components/time-picker/src/time-picker.d.ts +53 -0
- package/dist/components/time-picker/src/time-picker.vue.d.ts +120 -0
- package/dist/components/time-select/index.d.ts +188 -0
- package/dist/components/time-select/index.mjs +124 -0
- package/dist/components/time-select/src/time-select.d.ts +46 -0
- package/dist/components/time-select/src/time-select.vue.d.ts +104 -0
- package/dist/components/timeline/index.d.ts +206 -0
- package/dist/components/timeline/index.mjs +81 -0
- package/dist/components/timeline/src/timeline-item.vue.d.ts +107 -0
- package/dist/components/timeline/src/timeline.d.ts +49 -0
- package/dist/components/timeline/src/timeline.vue.d.ts +29 -0
- package/dist/components/toast/index.d.ts +8 -0
- package/dist/components/toast/index.mjs +170 -0
- package/dist/components/toast/src/service.d.ts +4 -0
- package/dist/components/toast/src/toast-item.vue.d.ts +37 -0
- package/dist/components/toast/src/toast.d.ts +48 -0
- package/dist/components/tooltip/index.d.ts +636 -0
- package/dist/components/tooltip/index.mjs +342 -0
- package/dist/components/tooltip/src/tooltip.d.ts +197 -0
- package/dist/components/tooltip/src/tooltip.vue.d.ts +383 -0
- package/dist/components/tour/index.d.ts +337 -0
- package/dist/components/tour/index.mjs +180 -0
- package/dist/components/tour/src/tour.d.ts +91 -0
- package/dist/components/tour/src/tour.vue.d.ts +203 -0
- package/dist/components/transfer/index.d.ts +319 -0
- package/dist/components/transfer/index.mjs +298 -0
- package/dist/components/transfer/src/transfer.d.ts +79 -0
- package/dist/components/transfer/src/transfer.vue.d.ts +190 -0
- package/dist/components/tree/index.d.ts +536 -0
- package/dist/components/tree/index.mjs +312 -0
- package/dist/components/tree/src/tree-node.vue.d.ts +25 -0
- package/dist/components/tree/src/tree.d.ts +136 -0
- package/dist/components/tree/src/tree.vue.d.ts +298 -0
- package/dist/components/tree-select/index.d.ts +683 -0
- package/dist/components/tree-select/index.mjs +599 -0
- package/dist/components/tree-select/src/tree-select.d.ts +229 -0
- package/dist/components/tree-select/src/tree-select.vue.d.ts +390 -0
- package/dist/components/tree-v2/index.d.ts +255 -0
- package/dist/components/tree-v2/index.mjs +149 -0
- package/dist/components/tree-v2/src/tree-v2.d.ts +63 -0
- package/dist/components/tree-v2/src/tree-v2.vue.d.ts +139 -0
- package/dist/components/upload/index.d.ts +736 -0
- package/dist/components/upload/index.mjs +616 -0
- package/dist/components/upload/src/upload.d.ts +233 -0
- package/dist/components/upload/src/upload.vue.d.ts +421 -0
- package/dist/components/virtual-list/index.d.ts +159 -0
- package/dist/components/virtual-list/index.mjs +89 -0
- package/dist/components/virtual-list/src/virtual-list.d.ts +38 -0
- package/dist/components/virtual-list/src/virtual-list.vue.d.ts +103 -0
- package/dist/components/watermark/index.d.ts +264 -0
- package/dist/components/watermark/index.mjs +72 -0
- package/dist/components/watermark/src/watermark.d.ts +67 -0
- package/dist/components/watermark/src/watermark.vue.d.ts +164 -0
- package/dist/hooks/useClickOutside.d.ts +12 -0
- package/dist/hooks/useFloating.d.ts +49 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.mjs +396 -0
- package/dist/style.css +1 -0
- package/dist/utils/form.d.ts +51 -0
- package/dist/utils/z-index.d.ts +9 -0
- package/package.json +61 -3
|
@@ -0,0 +1,1512 @@
|
|
|
1
|
+
import { defineComponent as He, ref as he, shallowRef as Le, computed as te, watch as pe, onMounted as Ge, onBeforeUnmount as Ve, openBlock as ke, createElementBlock as ze, normalizeStyle as _e, normalizeClass as Ae, unref as be, withDirectives as Ue, createElementVNode as Ze, vShow as Xe, toDisplayString as Ke, createCommentVNode as Ye } from "vue";
|
|
2
|
+
import { use as Je, init as Qe } from "echarts/core";
|
|
3
|
+
import { LineChart as et, BarChart as tt, PieChart as at, ScatterChart as rt, EffectScatterChart as nt, RadarChart as ot, MapChart as it, TreeChart as st, TreemapChart as lt, SunburstChart as ct, BoxplotChart as ut, CandlestickChart as dt, ChordChart as ht, HeatmapChart as ft, GaugeChart as mt, FunnelChart as gt, LinesChart as yt, ParallelChart as pt, SankeyChart as bt, ThemeRiverChart as xt, GraphChart as vt, PictorialBarChart as St, CustomChart as At } from "echarts/charts";
|
|
4
|
+
import { GridComponent as Ct, PolarComponent as Mt, GeoComponent as wt, SingleAxisComponent as Lt, ParallelComponent as kt, CalendarComponent as zt, GraphicComponent as Nt, ToolboxComponent as Ot, TooltipComponent as Rt, AxisPointerComponent as Tt, BrushComponent as $t, TitleComponent as Bt, TimelineComponent as Dt, MarkPointComponent as Ft, MarkLineComponent as It, MatrixComponent as jt, MarkAreaComponent as Wt, LegendComponent as Pt, DataZoomComponent as qt, VisualMapComponent as Et, AriaComponent as Ht, DatasetComponent as Gt, TransformComponent as Vt } from "echarts/components";
|
|
5
|
+
import { Bar3DChart as _t, Line3DChart as Ut, Scatter3DChart as Zt, Lines3DChart as Xt, SurfaceChart as Kt } from "echarts-gl/charts";
|
|
6
|
+
import { Grid3DComponent as Yt, GlobeComponent as Jt } from "echarts-gl/components";
|
|
7
|
+
import { CanvasRenderer as Qt, SVGRenderer as ea } from "echarts/renderers";
|
|
8
|
+
import { useNamespace as ta, useAiTarget as aa } from "@gi-base/utils";
|
|
9
|
+
const xe = [
|
|
10
|
+
"line",
|
|
11
|
+
"bar",
|
|
12
|
+
"pie",
|
|
13
|
+
"donut",
|
|
14
|
+
"area",
|
|
15
|
+
"scatter",
|
|
16
|
+
"effectScatter",
|
|
17
|
+
"radar",
|
|
18
|
+
"heatmap",
|
|
19
|
+
"gauge",
|
|
20
|
+
"funnel",
|
|
21
|
+
"tree",
|
|
22
|
+
"treemap",
|
|
23
|
+
"sunburst",
|
|
24
|
+
"boxplot",
|
|
25
|
+
"candlestick",
|
|
26
|
+
"graph",
|
|
27
|
+
"sankey",
|
|
28
|
+
"themeRiver",
|
|
29
|
+
"parallel",
|
|
30
|
+
"pictorialBar",
|
|
31
|
+
"map",
|
|
32
|
+
"custom",
|
|
33
|
+
"lines",
|
|
34
|
+
"calendar",
|
|
35
|
+
"matrix",
|
|
36
|
+
"chord",
|
|
37
|
+
"bar3D",
|
|
38
|
+
"line3D",
|
|
39
|
+
"scatter3D",
|
|
40
|
+
"surface",
|
|
41
|
+
"capsuleBar",
|
|
42
|
+
"bevelBar",
|
|
43
|
+
"pie3D",
|
|
44
|
+
"liquid"
|
|
45
|
+
], De = [
|
|
46
|
+
"var(--gi-color-primary, #2b8cf6)",
|
|
47
|
+
"var(--gi-color-success, #12b76a)",
|
|
48
|
+
"var(--gi-color-warning, #f79009)",
|
|
49
|
+
"var(--gi-color-danger, #f04438)",
|
|
50
|
+
"#7c3aed",
|
|
51
|
+
"#0ea5e9",
|
|
52
|
+
"#14b8a6",
|
|
53
|
+
"#f59e0b"
|
|
54
|
+
], ra = {
|
|
55
|
+
/** 图表类型 */
|
|
56
|
+
type: {
|
|
57
|
+
type: String,
|
|
58
|
+
values: xe,
|
|
59
|
+
default: "line"
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* 数据快捷入口:
|
|
63
|
+
* - `{ categories, series }` 接口直出结构;
|
|
64
|
+
* - 行数组 `[{ 名称: 'A', 营收: 10 }, ...]`,首列作分类、其余数值列作系列。
|
|
65
|
+
*/
|
|
66
|
+
data: {
|
|
67
|
+
type: [Object, Array],
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
/** 横轴分类;饼图时作为扇区名称 */
|
|
71
|
+
categories: { type: Array, default: () => [] },
|
|
72
|
+
/** 数据系列;饼图取第一条系列的值 */
|
|
73
|
+
series: { type: Array, default: () => [] },
|
|
74
|
+
height: { type: [Number, String], default: 280 },
|
|
75
|
+
colors: { type: Array, default: () => De },
|
|
76
|
+
showLegend: { type: Boolean, default: !0 },
|
|
77
|
+
showAxis: { type: Boolean, default: !0 },
|
|
78
|
+
showGrid: { type: Boolean, default: !0 },
|
|
79
|
+
showTooltip: { type: Boolean, default: !0 },
|
|
80
|
+
smooth: { type: Boolean, default: !0 },
|
|
81
|
+
area: { type: Boolean, default: !1 },
|
|
82
|
+
/** 数值格式化,用于轴、提示与中心汇总 */
|
|
83
|
+
valueFormatter: {
|
|
84
|
+
type: Function,
|
|
85
|
+
default: void 0
|
|
86
|
+
},
|
|
87
|
+
/** 原生 ECharts 配置:与简写配置深合并,同名项以 option 为准 */
|
|
88
|
+
option: { type: Object, default: void 0 },
|
|
89
|
+
/** ECharts 主题:字符串主题名或主题对象 */
|
|
90
|
+
theme: { type: [String, Object], default: "" },
|
|
91
|
+
/** 渲染器:canvas(默认)或 svg */
|
|
92
|
+
renderer: {
|
|
93
|
+
type: String,
|
|
94
|
+
values: ["canvas", "svg"],
|
|
95
|
+
default: "canvas"
|
|
96
|
+
},
|
|
97
|
+
/** 容器尺寸变化时自动 resize */
|
|
98
|
+
autoResize: { type: Boolean, default: !0 },
|
|
99
|
+
/** setOption 的合并策略:true 表示不合并、整体替换 */
|
|
100
|
+
notMerge: { type: Boolean, default: !1 },
|
|
101
|
+
/** 加载遮罩 */
|
|
102
|
+
loading: { type: Boolean, default: !1 },
|
|
103
|
+
/** 禁用 AI 写入 */
|
|
104
|
+
disabled: { type: Boolean, default: !1 },
|
|
105
|
+
/** 数据集:ECharts dataset,series 可用 encode 映射字段 */
|
|
106
|
+
dataset: { type: [Object, Array], default: void 0 },
|
|
107
|
+
/** 数据区域缩放:true 显示内置+滑块,或传原生 dataZoom 配置 */
|
|
108
|
+
dataZoom: {
|
|
109
|
+
type: [Boolean, Object, Array],
|
|
110
|
+
default: !1
|
|
111
|
+
},
|
|
112
|
+
/** 图形组件:原生 graphic 配置,用于标题块、标注、水印等 */
|
|
113
|
+
graphic: { type: [Object, Array], default: void 0 },
|
|
114
|
+
/** 日历坐标系配置(type=calendar 时生效) */
|
|
115
|
+
calendar: { type: Object, default: void 0 },
|
|
116
|
+
/** 矩阵坐标系配置(type=matrix 时生效) */
|
|
117
|
+
matrix: { type: Object, default: void 0 },
|
|
118
|
+
/** 图表背景色;传深色会自动切换轴/文字为浅色,适配深色大屏 */
|
|
119
|
+
background: { type: String, default: "" },
|
|
120
|
+
/** 3D 饼图厚度(像素),默认按半径自动推导 */
|
|
121
|
+
depth: { type: Number, default: 0 },
|
|
122
|
+
/** 水球图球体间距(像素) */
|
|
123
|
+
liquidGap: { type: Number, default: 16 },
|
|
124
|
+
/** 懒初始化:进入可视区才创建 ECharts 实例,离屏图表零开销 */
|
|
125
|
+
lazy: { type: Boolean, default: !1 },
|
|
126
|
+
/** 页面不可见时暂停重绘,回到前台再补一次 */
|
|
127
|
+
pauseOnHidden: { type: Boolean, default: !0 },
|
|
128
|
+
emptyText: { type: String, default: "暂无数据" },
|
|
129
|
+
ariaLabel: { type: String, default: "数据图表" },
|
|
130
|
+
aiTarget: { type: String, default: "" }
|
|
131
|
+
};
|
|
132
|
+
function me(e) {
|
|
133
|
+
return Number.isFinite(e) ? Math.abs(e) >= 1e4 ? `${(e / 1e4).toFixed(1)}万` : String(Number(e.toFixed(2))) : "0";
|
|
134
|
+
}
|
|
135
|
+
const na = {
|
|
136
|
+
palette: ["#2b8cf6", "#12b76a", "#f79009", "#f04438", "#7c3aed", "#0ea5e9", "#14b8a6", "#f59e0b"],
|
|
137
|
+
text: "#1f2733",
|
|
138
|
+
textSecondary: "#5c6675",
|
|
139
|
+
border: "#e8ecf1",
|
|
140
|
+
bg: "#ffffff",
|
|
141
|
+
fontFamily: "inherit"
|
|
142
|
+
};
|
|
143
|
+
function Ne() {
|
|
144
|
+
if (typeof window > "u" || typeof document > "u") return na;
|
|
145
|
+
const e = getComputedStyle(document.documentElement), l = (h, n) => e.getPropertyValue(h).trim() || n;
|
|
146
|
+
return {
|
|
147
|
+
palette: [
|
|
148
|
+
l("--gi-color-primary", "#2b8cf6"),
|
|
149
|
+
l("--gi-color-success", "#12b76a"),
|
|
150
|
+
l("--gi-color-warning", "#f79009"),
|
|
151
|
+
l("--gi-color-danger", "#f04438"),
|
|
152
|
+
"#7c3aed",
|
|
153
|
+
"#0ea5e9",
|
|
154
|
+
"#14b8a6",
|
|
155
|
+
"#f59e0b"
|
|
156
|
+
],
|
|
157
|
+
text: l("--gi-text-primary", "#1f2733"),
|
|
158
|
+
textSecondary: l("--gi-text-secondary", "#5c6675"),
|
|
159
|
+
border: l("--gi-border-light", "#e8ecf1"),
|
|
160
|
+
bg: l("--gi-bg-base", "#ffffff"),
|
|
161
|
+
fontFamily: l("--gi-font-family", "inherit")
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function X(e, l, h) {
|
|
165
|
+
const n = l.palette[h % l.palette.length];
|
|
166
|
+
if (!e) return n;
|
|
167
|
+
const u = e.match(/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/);
|
|
168
|
+
return !u || typeof window > "u" ? e : getComputedStyle(document.documentElement).getPropertyValue(u[1]).trim() || (u[2] ? u[2].trim() : n);
|
|
169
|
+
}
|
|
170
|
+
function Fe(e, l) {
|
|
171
|
+
if (typeof e != "string") return l;
|
|
172
|
+
const h = e.trim().match(/^#([0-9a-fA-F]{6})$/);
|
|
173
|
+
if (!h) return l;
|
|
174
|
+
const n = h[1];
|
|
175
|
+
return [0, 2, 4].map((u) => parseInt(n.slice(u, u + 2), 16));
|
|
176
|
+
}
|
|
177
|
+
function Ie(e, l, h) {
|
|
178
|
+
const n = Fe(e, [43, 140, 246]), u = (r) => Math.round(n[r] + (l[r] - n[r]) * h);
|
|
179
|
+
return `rgb(${u(0)}, ${u(1)}, ${u(2)})`;
|
|
180
|
+
}
|
|
181
|
+
function H(e, l = 0.4) {
|
|
182
|
+
return Ie(e, [255, 255, 255], l);
|
|
183
|
+
}
|
|
184
|
+
function K(e, l = 0.4) {
|
|
185
|
+
return Ie(e, [0, 0, 0], l);
|
|
186
|
+
}
|
|
187
|
+
function oa(e, l, h) {
|
|
188
|
+
return {
|
|
189
|
+
type: "linear",
|
|
190
|
+
x: 0,
|
|
191
|
+
y: 0,
|
|
192
|
+
x2: 1,
|
|
193
|
+
y2: 0,
|
|
194
|
+
colorStops: [
|
|
195
|
+
{ offset: 0, color: e },
|
|
196
|
+
{ offset: 0.28, color: l },
|
|
197
|
+
{ offset: 0.5, color: H(l, 0.35) },
|
|
198
|
+
{ offset: 0.72, color: l },
|
|
199
|
+
{ offset: 1, color: h }
|
|
200
|
+
]
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function fe(e, l) {
|
|
204
|
+
return {
|
|
205
|
+
type: "linear",
|
|
206
|
+
x: 0,
|
|
207
|
+
y: 0,
|
|
208
|
+
x2: 0,
|
|
209
|
+
y2: 1,
|
|
210
|
+
colorStops: [
|
|
211
|
+
{ offset: 0, color: e },
|
|
212
|
+
{ offset: 1, color: l }
|
|
213
|
+
]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function ia(e) {
|
|
217
|
+
if (!e || e === "transparent") return !1;
|
|
218
|
+
const l = e.trim().match(/^#([0-9a-fA-F]{6})$/);
|
|
219
|
+
if (l) {
|
|
220
|
+
const n = [0, 2, 4].map((u) => parseInt(l[1].slice(u, u + 2), 16));
|
|
221
|
+
return (n[0] * 299 + n[1] * 587 + n[2] * 114) / 1e3 < 150;
|
|
222
|
+
}
|
|
223
|
+
const h = e.match(/rgba?\((\d+)[,\s]+(\d+)[,\s]+(\d+)/);
|
|
224
|
+
return h ? (Number(h[1]) * 299 + Number(h[2]) * 587 + Number(h[3]) * 114) / 1e3 < 150 : !1;
|
|
225
|
+
}
|
|
226
|
+
function le(e, l) {
|
|
227
|
+
return (e.valueFormatter ?? me)(Number(l ?? 0));
|
|
228
|
+
}
|
|
229
|
+
function sa(e, l) {
|
|
230
|
+
return (Array.isArray(e) ? e : [e]).some((n) => n && n.type === l);
|
|
231
|
+
}
|
|
232
|
+
const Oe = (e) => e === "area" ? "line" : e === "donut" ? "pie" : e, la = /* @__PURE__ */ new Set(["line", "area", "bar", "scatter", "effectScatter", "pictorialBar", "boxplot", "candlestick"]), Re = /* @__PURE__ */ new Set(["pie", "donut", "funnel"]), Te = /* @__PURE__ */ new Set(["tree", "treemap", "sunburst", "graph", "sankey", "themeRiver", "parallel", "map", "custom"]), ca = /* @__PURE__ */ new Set(["line3D", "scatter3D", "surface"]);
|
|
233
|
+
function ua(e) {
|
|
234
|
+
if (!e.length) return { categories: [], series: [] };
|
|
235
|
+
const l = e[0] ?? {}, h = Object.keys(l), n = h.find((r) => typeof l[r] == "string") ?? h[0], u = h.filter((r) => r !== n);
|
|
236
|
+
return {
|
|
237
|
+
categories: e.map((r) => String(r[n] ?? "")),
|
|
238
|
+
series: u.map((r) => ({
|
|
239
|
+
name: r,
|
|
240
|
+
data: e.map((A) => Number(A[r] ?? 0))
|
|
241
|
+
}))
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
function we(e) {
|
|
245
|
+
const l = e.data, h = Array.isArray(l) ? l.length ? ua(l) : {} : l ?? {}, n = h.categories ?? e.categories, u = h.series ?? e.series, r = Math.max(0, ...u.map((A) => (A.data ?? []).length));
|
|
246
|
+
return {
|
|
247
|
+
categories: n.length ? n : Array.from({ length: r }, (A, i) => i + 1),
|
|
248
|
+
series: u
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function ve(e) {
|
|
252
|
+
const l = [];
|
|
253
|
+
return e.forEach((h) => {
|
|
254
|
+
if (typeof h == "number" && Number.isFinite(h)) l.push(h);
|
|
255
|
+
else if (Array.isArray(h))
|
|
256
|
+
h.forEach((n) => {
|
|
257
|
+
typeof n == "number" && Number.isFinite(n) && l.push(n);
|
|
258
|
+
});
|
|
259
|
+
else if (h && typeof h == "object" && "value" in h) {
|
|
260
|
+
const n = h.value;
|
|
261
|
+
typeof n == "number" && Number.isFinite(n) && l.push(n);
|
|
262
|
+
}
|
|
263
|
+
}), l;
|
|
264
|
+
}
|
|
265
|
+
function da(e) {
|
|
266
|
+
if (!e.length) return 0;
|
|
267
|
+
const l = [...e].sort((n, u) => n - u), h = Math.floor(l.length / 2);
|
|
268
|
+
return l.length % 2 ? l[h] : (l[h - 1] + l[h]) / 2;
|
|
269
|
+
}
|
|
270
|
+
function je(e) {
|
|
271
|
+
const { categories: l, series: h } = we(e), n = h.map((u) => {
|
|
272
|
+
const r = ve(u.data), A = r.reduce((M, I) => M + I, 0), i = r[0] ?? 0, C = r[r.length - 1] ?? 0;
|
|
273
|
+
return {
|
|
274
|
+
name: u.name,
|
|
275
|
+
count: r.length,
|
|
276
|
+
sum: A,
|
|
277
|
+
avg: r.length ? A / r.length : 0,
|
|
278
|
+
max: r.length ? Math.max(...r) : 0,
|
|
279
|
+
min: r.length ? Math.min(...r) : 0,
|
|
280
|
+
median: da(r),
|
|
281
|
+
first: i,
|
|
282
|
+
last: C,
|
|
283
|
+
growthRate: i === 0 ? null : (C - i) / Math.abs(i) * 100
|
|
284
|
+
};
|
|
285
|
+
});
|
|
286
|
+
return {
|
|
287
|
+
type: e.type,
|
|
288
|
+
categoriesCount: l.length,
|
|
289
|
+
seriesCount: h.length,
|
|
290
|
+
series: n,
|
|
291
|
+
total: n.reduce((u, r) => u + r.sum, 0)
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
function Ce(e) {
|
|
295
|
+
const l = je(e);
|
|
296
|
+
if (!l.series.length) return "图表暂无数据。";
|
|
297
|
+
const h = [...l.series].sort((r, A) => A.sum - r.sum)[0], n = l.series.filter((r) => r.growthRate !== null).sort((r, A) => Math.abs(A.growthRate ?? 0) - Math.abs(r.growthRate ?? 0))[0], u = [
|
|
298
|
+
`${l.type} 图共 ${l.seriesCount} 个系列、${l.categoriesCount} 个分类,合计 ${me(l.total)}。`,
|
|
299
|
+
`贡献最大的是「${h.name}」(${me(h.sum)},均值 ${me(h.avg)},峰值 ${me(h.max)})。`
|
|
300
|
+
];
|
|
301
|
+
return (n == null ? void 0 : n.growthRate) !== null && n && u.push(
|
|
302
|
+
`变化最明显的是「${n.name}」,首尾${n.growthRate >= 0 ? "增长" : "下降"} ${Math.abs(n.growthRate).toFixed(1)}%。`
|
|
303
|
+
), u.join("");
|
|
304
|
+
}
|
|
305
|
+
function Me(e, l, h, n, u, r, A = 40) {
|
|
306
|
+
const i = [], C = Math.max(2, Math.ceil(Math.abs(r - u) / (Math.PI / 24)));
|
|
307
|
+
for (let M = 0; M <= C; M += 1) {
|
|
308
|
+
const I = u + (r - u) * M / C;
|
|
309
|
+
i.push([e + h * Math.cos(I), l + n * Math.sin(I)]);
|
|
310
|
+
}
|
|
311
|
+
return i;
|
|
312
|
+
}
|
|
313
|
+
function ha(e) {
|
|
314
|
+
const l = Math.max(0, Number(e) || 0);
|
|
315
|
+
return Math.min(1, l > 1 ? l / 100 : l);
|
|
316
|
+
}
|
|
317
|
+
function fa(e, l, h) {
|
|
318
|
+
if (!e.showTooltip) return { show: !1 };
|
|
319
|
+
const n = {
|
|
320
|
+
confine: !0,
|
|
321
|
+
backgroundColor: l.bg,
|
|
322
|
+
borderColor: l.border,
|
|
323
|
+
textStyle: { color: l.text, fontSize: 12 }
|
|
324
|
+
};
|
|
325
|
+
return h ? {
|
|
326
|
+
...n,
|
|
327
|
+
trigger: "item",
|
|
328
|
+
formatter: (u) => {
|
|
329
|
+
const r = u.value, A = Array.isArray(r) ? r[r.length - 1] : r, i = typeof u.percent == "number" ? `(${u.percent}%)` : "";
|
|
330
|
+
return `${u.name}<br/>${u.marker}${le(e, A)}${i}`;
|
|
331
|
+
}
|
|
332
|
+
} : {
|
|
333
|
+
...n,
|
|
334
|
+
trigger: "axis",
|
|
335
|
+
axisPointer: { type: "shadow" },
|
|
336
|
+
formatter: (u) => {
|
|
337
|
+
var C;
|
|
338
|
+
const r = Array.isArray(u) ? u : [u], A = ((C = r[0]) == null ? void 0 : C.axisValueLabel) ?? "", i = r.map(
|
|
339
|
+
(M) => `${M.marker}${M.seriesName}<span style="float:right;margin-left:16px">${le(e, M.value)}</span>`
|
|
340
|
+
);
|
|
341
|
+
return [A, ...i].join("<br/>");
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function $e(e, l, h) {
|
|
346
|
+
var ge, Q, ce, ue, ae, Y;
|
|
347
|
+
const { categories: n, series: u } = we(e), r = e.type, A = ia(e.background || "");
|
|
348
|
+
A && (l = {
|
|
349
|
+
...l,
|
|
350
|
+
text: "#eaf2ff",
|
|
351
|
+
textSecondary: "#9db2d2",
|
|
352
|
+
border: "rgba(255,255,255,0.12)",
|
|
353
|
+
bg: e.background || "#0b1220"
|
|
354
|
+
});
|
|
355
|
+
const i = l, M = (e.colors.length ? e.colors : De).map((t, g) => X(t, i, g)), I = Re.has(r) || r === "gauge" || r === "radar" || r === "pie3D" || r === "liquid" || Te.has(r), o = {
|
|
356
|
+
backgroundColor: e.background || "transparent",
|
|
357
|
+
textStyle: {
|
|
358
|
+
fontFamily: i.fontFamily,
|
|
359
|
+
color: i.text
|
|
360
|
+
},
|
|
361
|
+
color: M,
|
|
362
|
+
animationDuration: 360,
|
|
363
|
+
animationDurationUpdate: 240,
|
|
364
|
+
aria: { enabled: !0, label: { description: e.ariaLabel || "数据图表" } },
|
|
365
|
+
tooltip: fa(e, i, I),
|
|
366
|
+
legend: e.showLegend ? {
|
|
367
|
+
show: !0,
|
|
368
|
+
bottom: 0,
|
|
369
|
+
icon: "circle",
|
|
370
|
+
itemWidth: 8,
|
|
371
|
+
itemHeight: 8,
|
|
372
|
+
itemGap: 16,
|
|
373
|
+
textStyle: { color: i.textSecondary, fontSize: 12 }
|
|
374
|
+
} : { show: !1 },
|
|
375
|
+
grid: {
|
|
376
|
+
left: e.showAxis ? 48 : 12,
|
|
377
|
+
right: 16,
|
|
378
|
+
top: e.showAxis ? 16 : 12,
|
|
379
|
+
bottom: (e.showAxis ? 32 : 16) + (e.showLegend ? 26 : 0),
|
|
380
|
+
containLabel: !1
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
if (e.dataset && (o.dataset = e.dataset), e.graphic && (o.graphic = e.graphic), e.dataZoom && (o.dataZoom = Array.isArray(e.dataZoom) ? e.dataZoom : e.dataZoom === !0 ? [
|
|
384
|
+
{ type: "inside", filterMode: "none" },
|
|
385
|
+
{ type: "slider", bottom: 4, height: 14, filterMode: "none" }
|
|
386
|
+
] : e.dataZoom, sa(o.dataZoom, "slider") && (o.grid = { ...o.grid, bottom: Number(o.grid.bottom) + 30 }, (ge = o.legend) != null && ge.show && (o.legend = { ...o.legend, bottom: 20 }))), r === "chord") {
|
|
387
|
+
const t = u[0] ?? { name: "", data: [] }, g = t.nodes ?? t.data ?? [], d = t.edges ?? t.links ?? [];
|
|
388
|
+
return o.legend = { show: !1 }, o.series = [
|
|
389
|
+
{
|
|
390
|
+
type: "chord",
|
|
391
|
+
name: t.name || "关系",
|
|
392
|
+
data: g,
|
|
393
|
+
edges: d,
|
|
394
|
+
label: { color: i.textSecondary, fontSize: 11 },
|
|
395
|
+
lineStyle: { color: "source", opacity: 0.7 },
|
|
396
|
+
itemStyle: { borderColor: i.bg, borderWidth: 1 }
|
|
397
|
+
}
|
|
398
|
+
], o;
|
|
399
|
+
}
|
|
400
|
+
if (r === "calendar") {
|
|
401
|
+
const t = (((Q = u[0]) == null ? void 0 : Q.data) ?? []).map((m) => Array.isArray(m) ? [String(m[0]), Number(m[m.length - 1])] : null).filter((m) => !!m), g = t.map((m) => m[0]).sort(), d = t.map((m) => m[1]);
|
|
402
|
+
return o.legend = { show: (u.length > 1, !1) }, o.calendar = e.calendar ?? {
|
|
403
|
+
range: g.length ? [g[0], g[g.length - 1]] : void 0,
|
|
404
|
+
orient: "horizontal",
|
|
405
|
+
cellSize: ["auto", 14],
|
|
406
|
+
top: 20,
|
|
407
|
+
left: 40,
|
|
408
|
+
right: 20,
|
|
409
|
+
bottom: 48,
|
|
410
|
+
itemStyle: { color: i.bg, borderWidth: 1, borderColor: i.border },
|
|
411
|
+
splitLine: { lineStyle: { color: i.border } },
|
|
412
|
+
dayLabel: { color: i.textSecondary },
|
|
413
|
+
monthLabel: { color: i.textSecondary },
|
|
414
|
+
yearLabel: { color: i.textSecondary }
|
|
415
|
+
}, o.visualMap = {
|
|
416
|
+
min: d.length ? Math.min(...d) : 0,
|
|
417
|
+
max: d.length ? Math.max(...d) : 1,
|
|
418
|
+
calculable: !0,
|
|
419
|
+
orient: "horizontal",
|
|
420
|
+
left: "center",
|
|
421
|
+
bottom: 0,
|
|
422
|
+
itemWidth: 10,
|
|
423
|
+
itemHeight: 70,
|
|
424
|
+
inRange: { color: ["#e8f1ff", M[0]] },
|
|
425
|
+
textStyle: { color: i.textSecondary, fontSize: 10 }
|
|
426
|
+
}, o.series = [
|
|
427
|
+
{
|
|
428
|
+
type: "heatmap",
|
|
429
|
+
name: ((ce = u[0]) == null ? void 0 : ce.name) ?? "活跃度",
|
|
430
|
+
coordinateSystem: "calendar",
|
|
431
|
+
data: t,
|
|
432
|
+
label: { show: !1 },
|
|
433
|
+
itemStyle: { borderColor: i.bg, borderWidth: 1 }
|
|
434
|
+
}
|
|
435
|
+
], o;
|
|
436
|
+
}
|
|
437
|
+
if (r === "matrix") {
|
|
438
|
+
const t = u.flatMap((s) => s.data ?? []).filter(
|
|
439
|
+
(s) => Array.isArray(s) && s.length >= 3 && s.every((p) => typeof p == "number")
|
|
440
|
+
), d = [...new Set(t.map((s) => s[1]))].sort((s, p) => s - p).map((s) => {
|
|
441
|
+
var p;
|
|
442
|
+
return ((p = u[s]) == null ? void 0 : p.name) || `第${s + 1}行`;
|
|
443
|
+
});
|
|
444
|
+
o.legend = { show: !1 }, o.matrix = e.matrix ?? {
|
|
445
|
+
x: { data: n.map((s) => String(s)) },
|
|
446
|
+
y: { data: d },
|
|
447
|
+
left: 72,
|
|
448
|
+
right: 20,
|
|
449
|
+
top: 24,
|
|
450
|
+
bottom: 44,
|
|
451
|
+
dividerLineStyle: { color: i.border },
|
|
452
|
+
backgroundStyle: { color: "transparent" },
|
|
453
|
+
label: { color: i.textSecondary }
|
|
454
|
+
};
|
|
455
|
+
const m = t.length ? Math.min(...t.map((s) => s[2])) : 0, f = t.length ? Math.max(...t.map((s) => s[2])) : 1, b = (s) => {
|
|
456
|
+
const p = f === m ? 0 : (s - m) / (f - m), S = [232, 241, 255], V = Fe(M[0], S), N = (k) => Math.round(S[k] + (V[k] - S[k]) * p);
|
|
457
|
+
return `rgb(${N(0)}, ${N(1)}, ${N(2)})`;
|
|
458
|
+
};
|
|
459
|
+
return o.visualMap = {
|
|
460
|
+
show: !0,
|
|
461
|
+
min: m,
|
|
462
|
+
max: f,
|
|
463
|
+
calculable: !1,
|
|
464
|
+
orient: "horizontal",
|
|
465
|
+
left: "center",
|
|
466
|
+
bottom: 0,
|
|
467
|
+
itemWidth: 10,
|
|
468
|
+
itemHeight: 80,
|
|
469
|
+
inRange: { color: ["#e8f1ff", M[0]] },
|
|
470
|
+
textStyle: { color: i.textSecondary, fontSize: 10 }
|
|
471
|
+
}, o.series = [
|
|
472
|
+
{
|
|
473
|
+
type: "heatmap",
|
|
474
|
+
name: ((ue = u[0]) == null ? void 0 : ue.name) ?? "矩阵",
|
|
475
|
+
coordinateSystem: "matrix",
|
|
476
|
+
matrixIndex: 0,
|
|
477
|
+
data: t.map((s) => ({
|
|
478
|
+
value: [s[0], s[1], s[2]],
|
|
479
|
+
itemStyle: { color: b(s[2]) }
|
|
480
|
+
})),
|
|
481
|
+
label: { show: !1 },
|
|
482
|
+
itemStyle: { borderColor: i.bg, borderWidth: 1 }
|
|
483
|
+
}
|
|
484
|
+
], o;
|
|
485
|
+
}
|
|
486
|
+
if (ca.has(r))
|
|
487
|
+
return o.legend = { show: !1 }, o.grid3D = {
|
|
488
|
+
boxWidth: 110,
|
|
489
|
+
boxDepth: 90,
|
|
490
|
+
boxHeight: 72,
|
|
491
|
+
left: 24,
|
|
492
|
+
right: 24,
|
|
493
|
+
top: 12,
|
|
494
|
+
bottom: 12,
|
|
495
|
+
light: {
|
|
496
|
+
main: { intensity: 1.2, shadow: !0, alpha: 40, beta: 30 },
|
|
497
|
+
ambient: { intensity: 0.35 }
|
|
498
|
+
},
|
|
499
|
+
viewControl: r === "bar3D" ? { autoRotate: !1, distance: 190, alpha: 12, beta: 24, projection: "perspective" } : { autoRotate: !1, distance: 165, alpha: 20, beta: 33, projection: "perspective" }
|
|
500
|
+
}, o.xAxis3D = {
|
|
501
|
+
type: "category",
|
|
502
|
+
data: n.map((t) => String(t)),
|
|
503
|
+
axisLabel: { color: i.textSecondary },
|
|
504
|
+
axisLine: { lineStyle: { color: i.border } },
|
|
505
|
+
splitLine: { lineStyle: { color: i.border } }
|
|
506
|
+
}, o.yAxis3D = { type: "value", axisLabel: { color: i.textSecondary }, splitLine: { lineStyle: { color: i.border } } }, o.zAxis3D = { type: "value", axisLabel: { color: i.textSecondary }, splitLine: { lineStyle: { color: i.border } } }, o.series = u.map((t, g) => ({
|
|
507
|
+
type: Oe(r),
|
|
508
|
+
name: t.name,
|
|
509
|
+
data: t.data,
|
|
510
|
+
shading: "lambert",
|
|
511
|
+
itemStyle: { color: t.color ? X(t.color, i, g) : M[g % M.length], opacity: 0.9 },
|
|
512
|
+
emphasis: { itemStyle: { color: M[(g + 1) % M.length] } },
|
|
513
|
+
...se(t, ["name", "data", "color"])
|
|
514
|
+
})), o;
|
|
515
|
+
if (r === "lines") {
|
|
516
|
+
const t = M[0], g = u.flatMap(
|
|
517
|
+
(f) => (f.data ?? []).flatMap((b) => Array.isArray(b) ? b : (b == null ? void 0 : b.coords) ?? [])
|
|
518
|
+
), d = g.map((f) => Number(f == null ? void 0 : f[0])).filter(Number.isFinite), m = g.map((f) => Number(f == null ? void 0 : f[1])).filter(Number.isFinite);
|
|
519
|
+
return o.xAxis = {
|
|
520
|
+
type: "value",
|
|
521
|
+
show: e.showAxis,
|
|
522
|
+
min: d.length ? Math.min(...d) : void 0,
|
|
523
|
+
max: d.length ? Math.max(...d) : void 0,
|
|
524
|
+
axisLabel: { color: i.textSecondary }
|
|
525
|
+
}, o.yAxis = {
|
|
526
|
+
type: "value",
|
|
527
|
+
show: e.showAxis,
|
|
528
|
+
min: m.length ? Math.min(...m) : void 0,
|
|
529
|
+
max: m.length ? Math.max(...m) : void 0,
|
|
530
|
+
axisLabel: { color: i.textSecondary }
|
|
531
|
+
}, o.grid = { ...o.grid, left: 40, right: 24, top: 20, bottom: 40 }, o.series = u.map((f, b) => ({
|
|
532
|
+
type: "lines",
|
|
533
|
+
name: f.name,
|
|
534
|
+
coordinateSystem: "cartesian2d",
|
|
535
|
+
// ECharts 6 直角坐标系下的 lines 用「坐标数组」而非 geo 的 { coords } 结构
|
|
536
|
+
data: (f.data ?? []).map((s) => Array.isArray(s) ? s : (s == null ? void 0 : s.coords) ?? []),
|
|
537
|
+
polyline: !0,
|
|
538
|
+
lineStyle: { color: X(f.color, i, b) || t, width: 1.5, opacity: 0.55, curveness: 0.2 },
|
|
539
|
+
effect: { show: !0, period: 4, trailLength: 0.7, symbol: "circle", symbolSize: 4, color: X(f.color, i, b) },
|
|
540
|
+
...se(f, ["name", "data", "color"])
|
|
541
|
+
})), o;
|
|
542
|
+
}
|
|
543
|
+
if (r === "pie3D") {
|
|
544
|
+
const t = u[0], g = ((t == null ? void 0 : t.data) ?? []).map((s, p) => {
|
|
545
|
+
const S = s && typeof s == "object" ? s : null;
|
|
546
|
+
return {
|
|
547
|
+
name: (S == null ? void 0 : S.name) ?? String(n[p] ?? p + 1),
|
|
548
|
+
value: Math.max(0, Number((S == null ? void 0 : S.value) ?? s) || 0),
|
|
549
|
+
color: X((S == null ? void 0 : S.color) ?? (t == null ? void 0 : t.color), i, p)
|
|
550
|
+
};
|
|
551
|
+
}), d = g.reduce((s, p) => s + p.value, 0) || 1;
|
|
552
|
+
let m = -Math.PI / 2;
|
|
553
|
+
const f = g.map((s) => {
|
|
554
|
+
const p = s.value / d * Math.PI * 2, S = m;
|
|
555
|
+
return m += p, { ...s, from: S, to: m, ratio: s.value / d, percent: s.value / d * 100 };
|
|
556
|
+
}), b = [...f].sort((s, p) => Math.sin((s.from + s.to) / 2) - Math.sin((p.from + p.to) / 2));
|
|
557
|
+
return o.legend = { show: !1 }, o.series = [
|
|
558
|
+
{
|
|
559
|
+
type: "custom",
|
|
560
|
+
coordinateSystem: "none",
|
|
561
|
+
name: (t == null ? void 0 : t.name) ?? "占比",
|
|
562
|
+
data: b.map((s) => ({ name: s.name, value: s.value, itemStyle: { color: s.color } })),
|
|
563
|
+
renderItem: (s, p) => {
|
|
564
|
+
const S = b[Number(s.dataIndex ?? 0)];
|
|
565
|
+
if (!S) return null;
|
|
566
|
+
const V = p.getWidth(), N = p.getHeight(), k = e.depth > 0 ? e.depth : Math.max(18, Math.min(42, N * 0.11)), B = V / 2, D = N / 2 - k * 0.5, y = Math.min(V * 0.25, N * 0.34), F = y * 0.46, j = Me(B, D, y, F, S.from, S.to), re = Me(B, D + k, y, F, S.from, S.to), L = (S.from + S.to) / 2, _ = S.color, q = [...j, ...re.slice().reverse()], O = [[B, D], ...j], x = Math.cos(L), E = Math.sin(L), R = B + y * 1.42 * x, T = E > 0.1 ? D + F * 1.15 + k + 20 : D + F * 1.32 * E - 4, J = B + y * Math.cos(L), $ = D + F * Math.sin(L) + (E > 0.1 ? k * 0.6 : 0), w = R + (x >= 0 ? -16 : 16), z = [];
|
|
567
|
+
return s.dataIndex === 0 && f.forEach((W) => {
|
|
568
|
+
const ne = Me(B, D + k, y, F, W.from, W.to);
|
|
569
|
+
z.push({
|
|
570
|
+
type: "polygon",
|
|
571
|
+
silent: !0,
|
|
572
|
+
shape: { points: [[B, D + k], ...ne] },
|
|
573
|
+
style: { fill: K(W.color, 0.26) }
|
|
574
|
+
});
|
|
575
|
+
}), z.push({
|
|
576
|
+
type: "polygon",
|
|
577
|
+
silent: !0,
|
|
578
|
+
shape: { points: q },
|
|
579
|
+
style: {
|
|
580
|
+
fill: fe(H(_, A ? 0 : 0.08), K(_, 0.2))
|
|
581
|
+
}
|
|
582
|
+
}), z.push({
|
|
583
|
+
type: "polygon",
|
|
584
|
+
shape: { points: O },
|
|
585
|
+
style: {
|
|
586
|
+
fill: fe(H(_, 0.22), _)
|
|
587
|
+
}
|
|
588
|
+
}), z.push({
|
|
589
|
+
type: "polyline",
|
|
590
|
+
silent: !0,
|
|
591
|
+
shape: { points: [[J, $], [w, T], [R, T]] },
|
|
592
|
+
style: {
|
|
593
|
+
fill: "none",
|
|
594
|
+
stroke: A ? "rgba(255,255,255,0.28)" : "rgba(90,110,135,0.45)",
|
|
595
|
+
lineWidth: 1
|
|
596
|
+
}
|
|
597
|
+
}), z.push({
|
|
598
|
+
type: "text",
|
|
599
|
+
style: {
|
|
600
|
+
x: R + (Math.cos(L) >= 0 ? 6 : -6),
|
|
601
|
+
y: T,
|
|
602
|
+
text: `{v|${S.percent.toFixed(0)}%}
|
|
603
|
+
{n|${S.name}}`,
|
|
604
|
+
rich: {
|
|
605
|
+
v: { fill: A ? "#ffffff" : i.text, fontSize: 15, fontWeight: 700, lineHeight: 20 },
|
|
606
|
+
n: { fill: _, fontSize: 12, lineHeight: 18 }
|
|
607
|
+
},
|
|
608
|
+
align: Math.cos(L) >= 0 ? "left" : "right",
|
|
609
|
+
verticalAlign: "middle"
|
|
610
|
+
}
|
|
611
|
+
}), { type: "group", children: z };
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
], o;
|
|
615
|
+
}
|
|
616
|
+
if (r === "liquid") {
|
|
617
|
+
const t = u.flatMap(
|
|
618
|
+
(d, m) => (d.data ?? []).map((f, b) => {
|
|
619
|
+
const s = f && typeof f == "object" ? f : null;
|
|
620
|
+
return {
|
|
621
|
+
name: (s == null ? void 0 : s.name) ?? String(n[b] ?? d.name ?? ""),
|
|
622
|
+
value: ha((s == null ? void 0 : s.value) ?? f),
|
|
623
|
+
color: s != null && s.color ? X(s.color, i, 0) : M[(m + b) % M.length]
|
|
624
|
+
};
|
|
625
|
+
})
|
|
626
|
+
), g = t.map(
|
|
627
|
+
(d, m) => h != null && h.values && h.values.length === t.length ? h.values[m] : d.value
|
|
628
|
+
);
|
|
629
|
+
return o.legend = { show: !1 }, o.grid = { ...o.grid, show: !1 }, o.tooltip = {
|
|
630
|
+
...o.tooltip,
|
|
631
|
+
show: e.showTooltip,
|
|
632
|
+
trigger: "item",
|
|
633
|
+
formatter: (d) => {
|
|
634
|
+
var b;
|
|
635
|
+
const m = t[Number(d.dataIndex ?? 0)];
|
|
636
|
+
if (!m) return "";
|
|
637
|
+
const f = Number(((b = d.value) == null ? void 0 : b[1]) ?? m.value);
|
|
638
|
+
return `${m.name}<br/>${Math.round(f * 100)}%`;
|
|
639
|
+
}
|
|
640
|
+
}, o.series = [
|
|
641
|
+
{
|
|
642
|
+
type: "custom",
|
|
643
|
+
coordinateSystem: "none",
|
|
644
|
+
name: "水球",
|
|
645
|
+
tooltip: { show: e.showTooltip },
|
|
646
|
+
// 把相位与当前水位写进 data,让 ECharts 在每帧 diff 时真正触发重绘
|
|
647
|
+
data: t.map((d, m) => ({ name: d.name, value: [(h == null ? void 0 : h.phase) ?? 0, g[m]] })),
|
|
648
|
+
renderItem: (d, m) => {
|
|
649
|
+
const f = Number(d.dataIndex ?? 0), b = t[f];
|
|
650
|
+
if (!b) return null;
|
|
651
|
+
const s = g[f], p = (h == null ? void 0 : h.phase) ?? 0, S = t.length || 1, V = m.getWidth(), N = m.getHeight(), k = V / S, B = k * (f + 0.5), D = N / 2, y = Math.max(
|
|
652
|
+
18,
|
|
653
|
+
Math.min(N * 0.34, (k - e.liquidGap) / 2 - 2, 120)
|
|
654
|
+
), F = y - y * 2 * s, j = (L, _) => {
|
|
655
|
+
const q = [];
|
|
656
|
+
for (let x = 0; x <= 48; x += 1) {
|
|
657
|
+
const E = -y + y * 2 * x / 48, R = F + Math.sin(E / y * Math.PI * 3 + L + p * 0.9) * _;
|
|
658
|
+
q.push([E, R]);
|
|
659
|
+
}
|
|
660
|
+
return q.push([y, y], [-y, y]), q;
|
|
661
|
+
}, re = fe(H(b.color, 0.55), K(b.color, 0.15));
|
|
662
|
+
return {
|
|
663
|
+
type: "group",
|
|
664
|
+
x: B,
|
|
665
|
+
y: D,
|
|
666
|
+
children: [
|
|
667
|
+
{
|
|
668
|
+
type: "circle",
|
|
669
|
+
silent: !0,
|
|
670
|
+
shape: { cx: 0, cy: 0, r: y },
|
|
671
|
+
style: {
|
|
672
|
+
fill: A ? "rgba(8, 22, 44, 0.92)" : "rgba(255, 255, 255, 0.98)",
|
|
673
|
+
stroke: b.color,
|
|
674
|
+
lineWidth: 7,
|
|
675
|
+
shadowBlur: 18,
|
|
676
|
+
shadowColor: `${b.color}66`
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
type: "circle",
|
|
681
|
+
silent: !0,
|
|
682
|
+
shape: { cx: 0, cy: 0, r: y - 5 },
|
|
683
|
+
style: { fill: A ? "#071528" : "#f3f8ff" }
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
type: "group",
|
|
687
|
+
clipPath: { type: "circle", shape: { cx: 0, cy: 0, r: y - 4 } },
|
|
688
|
+
children: [
|
|
689
|
+
{
|
|
690
|
+
type: "polygon",
|
|
691
|
+
silent: !0,
|
|
692
|
+
shape: { points: j(1.6, y * 0.05) },
|
|
693
|
+
style: { fill: H(b.color, 0.45), opacity: 0.5 }
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
type: "polygon",
|
|
697
|
+
silent: !0,
|
|
698
|
+
shape: { points: j(0, y * 0.06) },
|
|
699
|
+
style: { fill: re }
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
type: "circle",
|
|
705
|
+
silent: !0,
|
|
706
|
+
shape: { cx: 0, cy: 0, r: y },
|
|
707
|
+
style: {
|
|
708
|
+
fill: "transparent",
|
|
709
|
+
stroke: H(b.color, 0.35),
|
|
710
|
+
lineWidth: 1.5,
|
|
711
|
+
opacity: 0.5
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
type: "text",
|
|
716
|
+
style: {
|
|
717
|
+
x: 0,
|
|
718
|
+
y: 0,
|
|
719
|
+
text: `${Math.round(s * 100)}%`,
|
|
720
|
+
fill: A ? "#ffffff" : i.text,
|
|
721
|
+
fontSize: Math.max(14, Math.round(y * 0.5)),
|
|
722
|
+
fontWeight: 700,
|
|
723
|
+
align: "center",
|
|
724
|
+
verticalAlign: "middle",
|
|
725
|
+
shadowBlur: 8,
|
|
726
|
+
shadowColor: A ? "rgba(0,0,0,0.35)" : "rgba(255,255,255,0.65)"
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
// 透明命中层:补满整个玻璃球,hover 任意位置都能触发 tooltip
|
|
731
|
+
type: "circle",
|
|
732
|
+
shape: { cx: 0, cy: 0, r: y },
|
|
733
|
+
style: { fill: "rgba(255,255,255,0.001)" }
|
|
734
|
+
}
|
|
735
|
+
]
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
], o;
|
|
740
|
+
}
|
|
741
|
+
if (Re.has(r)) {
|
|
742
|
+
const t = u[0], g = ((t == null ? void 0 : t.data) ?? []).map((f, b) => {
|
|
743
|
+
const s = f && typeof f == "object" ? f : null;
|
|
744
|
+
return {
|
|
745
|
+
name: (s == null ? void 0 : s.name) ?? String(n[b] ?? b + 1),
|
|
746
|
+
value: Math.max(0, Number((s == null ? void 0 : s.value) ?? f) || 0),
|
|
747
|
+
itemStyle: { color: M[b % M.length] }
|
|
748
|
+
};
|
|
749
|
+
}), d = g.reduce((f, b) => f + b.value, 0), m = r === "donut";
|
|
750
|
+
return r === "funnel" ? (u.length <= 1 && (o.legend = { show: !1 }), o.series = [
|
|
751
|
+
{
|
|
752
|
+
type: "funnel",
|
|
753
|
+
name: (t == null ? void 0 : t.name) ?? "转化",
|
|
754
|
+
data: g,
|
|
755
|
+
left: "12%",
|
|
756
|
+
right: "12%",
|
|
757
|
+
top: e.showLegend ? 24 : 16,
|
|
758
|
+
bottom: e.showLegend ? 32 : 16,
|
|
759
|
+
minSize: "12%",
|
|
760
|
+
gap: 2,
|
|
761
|
+
label: { position: "inside", color: "#fff" },
|
|
762
|
+
itemStyle: { borderColor: i.bg, borderWidth: 1 }
|
|
763
|
+
}
|
|
764
|
+
], o) : (o.series = [
|
|
765
|
+
{
|
|
766
|
+
type: "pie",
|
|
767
|
+
name: (t == null ? void 0 : t.name) ?? "占比",
|
|
768
|
+
data: g,
|
|
769
|
+
radius: m ? ["54%", "76%"] : ["0%", "72%"],
|
|
770
|
+
center: ["50%", "50%"],
|
|
771
|
+
label: { show: !0, color: i.textSecondary, formatter: "{b} {d}%" },
|
|
772
|
+
labelLine: { lineStyle: { color: i.border } },
|
|
773
|
+
itemStyle: { borderColor: i.bg, borderWidth: 2 }
|
|
774
|
+
}
|
|
775
|
+
], m && (o.title = {
|
|
776
|
+
text: le(e, d),
|
|
777
|
+
subtext: "总计",
|
|
778
|
+
left: "center",
|
|
779
|
+
top: "44%",
|
|
780
|
+
textStyle: { color: i.text, fontSize: 18, fontWeight: 500 },
|
|
781
|
+
subtextStyle: { color: i.textSecondary, fontSize: 12 }
|
|
782
|
+
}), o);
|
|
783
|
+
}
|
|
784
|
+
if (r === "radar") {
|
|
785
|
+
const t = Math.max(1, ...u.flatMap((g) => ve(g.data)));
|
|
786
|
+
return o.legend = { ...o.legend, bottom: void 0, top: 4, left: "center" }, o.radar = {
|
|
787
|
+
indicator: n.map((g) => ({ name: String(g), max: t })),
|
|
788
|
+
center: ["50%", e.showLegend ? "54%" : "52%"],
|
|
789
|
+
radius: e.showLegend ? "56%" : "62%",
|
|
790
|
+
axisName: { color: i.textSecondary },
|
|
791
|
+
splitLine: { lineStyle: { color: i.border } },
|
|
792
|
+
splitArea: { show: !1 }
|
|
793
|
+
}, o.series = u.map((g, d) => ({
|
|
794
|
+
type: "radar",
|
|
795
|
+
name: g.name,
|
|
796
|
+
data: [{ name: g.name, value: ve(g.data) }],
|
|
797
|
+
lineStyle: { color: X(g.color, i, d), width: 2 },
|
|
798
|
+
itemStyle: { color: X(g.color, i, d) },
|
|
799
|
+
areaStyle: g.area ? { opacity: 0.12 } : void 0,
|
|
800
|
+
...se(g, ["name", "data", "color", "area"])
|
|
801
|
+
})), o;
|
|
802
|
+
}
|
|
803
|
+
if (r === "gauge") {
|
|
804
|
+
const t = u[0], g = ve((t == null ? void 0 : t.data) ?? [])[0] ?? 0;
|
|
805
|
+
return o.legend = { show: !1 }, o.series = [
|
|
806
|
+
{
|
|
807
|
+
type: "gauge",
|
|
808
|
+
name: (t == null ? void 0 : t.name) ?? "指标",
|
|
809
|
+
center: ["50%", e.showLegend ? "48%" : "52%"],
|
|
810
|
+
radius: "72%",
|
|
811
|
+
progress: { show: !0, width: 10 },
|
|
812
|
+
axisLine: { lineStyle: { width: 10, color: [[1, i.border]] } },
|
|
813
|
+
splitNumber: 5,
|
|
814
|
+
axisLabel: { color: i.textSecondary, fontSize: 10, distance: -36 },
|
|
815
|
+
axisTick: { show: !1 },
|
|
816
|
+
splitLine: { length: 8, lineStyle: { color: i.border } },
|
|
817
|
+
pointer: { width: 4, itemStyle: { color: "auto" } },
|
|
818
|
+
title: { show: !1 },
|
|
819
|
+
detail: {
|
|
820
|
+
valueAnimation: !0,
|
|
821
|
+
formatter: (d) => le(e, d),
|
|
822
|
+
color: i.text,
|
|
823
|
+
fontSize: 20
|
|
824
|
+
},
|
|
825
|
+
data: [{ name: (t == null ? void 0 : t.name) ?? "指标", value: g }],
|
|
826
|
+
...se(t ?? { name: "", data: [] }, ["name", "data"])
|
|
827
|
+
}
|
|
828
|
+
], o;
|
|
829
|
+
}
|
|
830
|
+
if (Te.has(r))
|
|
831
|
+
return u.length <= 1 && (o.legend = { show: !1 }), o.series = u.map((t) => {
|
|
832
|
+
const g = t.data, d = {
|
|
833
|
+
type: Oe(r),
|
|
834
|
+
name: t.name,
|
|
835
|
+
data: g,
|
|
836
|
+
...se(t, ["name", "data", "color", "type", "smooth", "area", "stack", "yAxisIndex"])
|
|
837
|
+
};
|
|
838
|
+
return r === "graph" && (d.layout = d.layout ?? "circular", d.roam = d.roam ?? !0, d.label = d.label ?? { show: !0, position: "right", color: i.textSecondary, fontSize: 11 }, d.lineStyle = d.lineStyle ?? { color: i.border, curveness: 0.12 }, d.edgeLabel = { show: !1 }), r === "treemap" && (d.breadcrumb = d.breadcrumb ?? { show: !1 }, d.itemStyle = d.itemStyle ?? { borderColor: i.bg, borderWidth: 2, gapWidth: 2 }), r === "tree" && (d.roam = d.roam ?? !0, d.label = d.label ?? { color: i.textSecondary }, d.lineStyle = d.lineStyle ?? { color: i.border }), r === "parallel" && (o.parallelAxis = n.map((m, f) => ({
|
|
839
|
+
dim: f,
|
|
840
|
+
name: String(m),
|
|
841
|
+
lineStyle: { color: i.border }
|
|
842
|
+
})), o.parallel = o.parallel ?? { left: 48, right: 48, top: 32, bottom: 32 }), d;
|
|
843
|
+
}), o;
|
|
844
|
+
if (r === "heatmap") {
|
|
845
|
+
const t = (((ae = u[0]) == null ? void 0 : ae.data) ?? []).filter(
|
|
846
|
+
(g) => Array.isArray(g) && g.length >= 3 && g.every((d) => typeof d == "number")
|
|
847
|
+
);
|
|
848
|
+
if (t.length) {
|
|
849
|
+
u.length <= 1 && (o.legend = { show: !1 });
|
|
850
|
+
const g = [...new Set(t.map((f) => f[0]))].map((f) => String(n[f] ?? f)), d = [...new Set(t.map((f) => f[1]))].map((f) => `第${f + 1}行`), m = t.map((f) => f[2]);
|
|
851
|
+
return o.xAxis = { type: "category", data: g, splitArea: { show: !0 } }, o.yAxis = { type: "category", data: d, splitArea: { show: !0 } }, o.grid = {
|
|
852
|
+
...o.grid,
|
|
853
|
+
right: 72,
|
|
854
|
+
top: 12,
|
|
855
|
+
bottom: e.showLegend ? 30 : 12
|
|
856
|
+
}, o.visualMap = {
|
|
857
|
+
min: Math.min(...m),
|
|
858
|
+
max: Math.max(...m),
|
|
859
|
+
calculable: !0,
|
|
860
|
+
orient: "vertical",
|
|
861
|
+
right: 4,
|
|
862
|
+
top: "middle",
|
|
863
|
+
itemWidth: 10,
|
|
864
|
+
itemHeight: 90,
|
|
865
|
+
inRange: { color: ["#e8f1ff", M[0]] },
|
|
866
|
+
textStyle: { color: i.textSecondary, fontSize: 10 }
|
|
867
|
+
}, o.series = [
|
|
868
|
+
{
|
|
869
|
+
type: "heatmap",
|
|
870
|
+
name: ((Y = u[0]) == null ? void 0 : Y.name) ?? "密度",
|
|
871
|
+
data: t.map((f) => [f[0], f[1], f[2]]),
|
|
872
|
+
label: { show: !1 },
|
|
873
|
+
itemStyle: { borderColor: i.bg, borderWidth: 1 }
|
|
874
|
+
}
|
|
875
|
+
], o;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
if (o.xAxis = {
|
|
879
|
+
type: "category",
|
|
880
|
+
// dataset 模式下分类轴由 dataset 提供,避免空 data 覆盖映射
|
|
881
|
+
data: e.dataset ? void 0 : n,
|
|
882
|
+
boundaryGap: r !== "line" && r !== "area",
|
|
883
|
+
axisLine: { show: e.showAxis, lineStyle: { color: i.border } },
|
|
884
|
+
axisTick: { show: !1 },
|
|
885
|
+
axisLabel: { show: e.showAxis, color: i.textSecondary, fontSize: 11, hideOverlap: !0 }
|
|
886
|
+
}, o.yAxis = {
|
|
887
|
+
type: "value",
|
|
888
|
+
axisLine: { show: !1 },
|
|
889
|
+
axisTick: { show: !1 },
|
|
890
|
+
axisLabel: {
|
|
891
|
+
show: e.showAxis,
|
|
892
|
+
color: i.textSecondary,
|
|
893
|
+
fontSize: 11,
|
|
894
|
+
formatter: (t) => le(e, t)
|
|
895
|
+
},
|
|
896
|
+
splitLine: { show: e.showGrid, lineStyle: { color: i.border } }
|
|
897
|
+
}, r === "capsuleBar" || r === "bar3D" || r === "bevelBar") {
|
|
898
|
+
const t = Math.max(1, u.length), g = u.map(
|
|
899
|
+
(s) => (s.data ?? []).map((p) => Array.isArray(p) ? Number(p[p.length - 1]) || 0 : Number(p) || 0)
|
|
900
|
+
), d = u.map(
|
|
901
|
+
(s) => (s.data ?? []).map((p, S) => Array.isArray(p) && p.length >= 3 ? Number(p[0]) : S)
|
|
902
|
+
), m = Math.max(1, ...g.flat()), f = r === "bevelBar", b = r === "bar3D";
|
|
903
|
+
return o.yAxis.max = m, o.yAxis.splitNumber = 6, o.grid = {
|
|
904
|
+
...o.grid,
|
|
905
|
+
left: e.showAxis ? 56 : 18,
|
|
906
|
+
right: 24,
|
|
907
|
+
top: f ? 28 : 24,
|
|
908
|
+
bottom: (e.showLegend && r === "capsuleBar" ? 38 : 30) + (e.showAxis ? 8 : 0)
|
|
909
|
+
}, r !== "capsuleBar" && (o.legend = { show: !1 }), o.series = u.map((s, p) => {
|
|
910
|
+
const S = s.color ? X(s.color, i, p) : M[p % M.length];
|
|
911
|
+
return {
|
|
912
|
+
type: "custom",
|
|
913
|
+
name: s.name,
|
|
914
|
+
coordinateSystem: "cartesian2d",
|
|
915
|
+
encode: { x: 0, y: 1 },
|
|
916
|
+
data: g[p].map((V, N) => [d[p][N], V]),
|
|
917
|
+
renderItem: (V, N) => {
|
|
918
|
+
var ne;
|
|
919
|
+
const k = Number(V.dataIndex ?? 0), B = (ne = s.data) == null ? void 0 : ne[k], D = B && typeof B == "object" ? B : null, y = D != null && D.color ? X(D.color, i, k) : f ? M[k % M.length] : S, F = g[p][k] ?? 0, j = d[p][k] ?? k, re = Number(N.size([1, 0])[0]) || 40, L = Math.min(b ? 16 : 24, Math.max(10, re / (t + 0.9))), _ = (p - (t - 1) / 2) * (L + 8), q = N.coord([j, 0])[0] + _, O = N.coord([j, 0])[1], x = N.coord([j, F])[1], E = N.coord([j, m])[1], R = Math.max(4, L * 0.26), T = Math.max(3, L * 0.3), J = 7, $ = q - L / 2, w = q + L / 2, z = [], W = (G) => [
|
|
920
|
+
{ type: "polygon", silent: !0, shape: { points: [[$, G], [w, G], [w, O], [$, O]] }, style: { fill: H(y, 0.78) } },
|
|
921
|
+
{ type: "polygon", silent: !0, shape: { points: [[w, G], [w + R, G - T], [w + R, O - T], [w, O]] }, style: { fill: H(y, 0.64) } },
|
|
922
|
+
{ type: "polygon", silent: !0, shape: { points: [[$, G], [w, G], [w + R, G - T], [$ + R, G - T]] }, style: { fill: H(y, 0.86) } }
|
|
923
|
+
];
|
|
924
|
+
if (f && z.push(...W(E)), r === "capsuleBar")
|
|
925
|
+
z.push({
|
|
926
|
+
type: "ellipse",
|
|
927
|
+
silent: !0,
|
|
928
|
+
shape: { cx: q, cy: O, rx: L / 2, ry: L * 0.16 },
|
|
929
|
+
style: { fill: K(y, 0.5) }
|
|
930
|
+
}), z.push({
|
|
931
|
+
type: "rect",
|
|
932
|
+
shape: { x: $, y: x, width: L, height: Math.max(0, O - x) },
|
|
933
|
+
style: {
|
|
934
|
+
fill: oa(K(y, 0.42), y, K(y, 0.34))
|
|
935
|
+
}
|
|
936
|
+
}), z.push({
|
|
937
|
+
type: "rect",
|
|
938
|
+
silent: !0,
|
|
939
|
+
shape: { x: $ + L * 0.14, y: x + 4, width: L * 0.1, height: Math.max(0, O - x - 8), r: L * 0.05 },
|
|
940
|
+
style: { fill: "rgba(255,255,255,0.28)" }
|
|
941
|
+
}), z.push({
|
|
942
|
+
type: "ellipse",
|
|
943
|
+
shape: { cx: q, cy: x, rx: L / 2, ry: L * 0.18 },
|
|
944
|
+
style: { fill: H(y, 0.72) }
|
|
945
|
+
}), z.push({
|
|
946
|
+
type: "ellipse",
|
|
947
|
+
shape: { cx: q - L * 0.12, cy: x, rx: L * 0.2, ry: L * 0.06 },
|
|
948
|
+
style: { fill: "rgba(255,255,255,0.55)" }
|
|
949
|
+
});
|
|
950
|
+
else if (b)
|
|
951
|
+
z.push(...W(O)), z.push({
|
|
952
|
+
type: "polygon",
|
|
953
|
+
shape: { points: [[$, x], [w, x], [w, O], [$, O]] },
|
|
954
|
+
style: {
|
|
955
|
+
fill: fe(H(y, 0.28), K(y, 0.22))
|
|
956
|
+
}
|
|
957
|
+
}), z.push({
|
|
958
|
+
type: "polygon",
|
|
959
|
+
silent: !0,
|
|
960
|
+
shape: { points: [[w, x], [w + R, x - T], [w + R, O - T], [w, O]] },
|
|
961
|
+
style: { fill: K(y, 0.45) }
|
|
962
|
+
}), z.push({
|
|
963
|
+
type: "polygon",
|
|
964
|
+
silent: !0,
|
|
965
|
+
shape: { points: [[$, x], [w, x], [w + R, x - T], [$ + R, x - T]] },
|
|
966
|
+
style: { fill: H(y, 0.42) }
|
|
967
|
+
});
|
|
968
|
+
else {
|
|
969
|
+
const G = x - T;
|
|
970
|
+
z.push({
|
|
971
|
+
type: "polygon",
|
|
972
|
+
shape: {
|
|
973
|
+
points: [[$, x], [w, x - J], [w, O], [$, O]]
|
|
974
|
+
},
|
|
975
|
+
style: { fill: fe(H(y, 0.38), K(y, 0.28)) }
|
|
976
|
+
}), z.push({
|
|
977
|
+
type: "polygon",
|
|
978
|
+
silent: !0,
|
|
979
|
+
shape: {
|
|
980
|
+
points: [
|
|
981
|
+
[w, x - J],
|
|
982
|
+
[w + R, x - J - T],
|
|
983
|
+
[w + R, O - T],
|
|
984
|
+
[w, O]
|
|
985
|
+
]
|
|
986
|
+
},
|
|
987
|
+
style: { fill: K(y, 0.4) }
|
|
988
|
+
}), z.push({
|
|
989
|
+
type: "polygon",
|
|
990
|
+
silent: !0,
|
|
991
|
+
shape: {
|
|
992
|
+
points: [
|
|
993
|
+
[$, x],
|
|
994
|
+
[w, x - J],
|
|
995
|
+
[w + R, x - J - T],
|
|
996
|
+
[$ + R, G]
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
style: { fill: H(y, 0.52) }
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
return f && z.push({
|
|
1003
|
+
type: "text",
|
|
1004
|
+
style: {
|
|
1005
|
+
x: q,
|
|
1006
|
+
y: Math.max(16, x - J - 12),
|
|
1007
|
+
text: le(e, F),
|
|
1008
|
+
fill: K(y, 0.3),
|
|
1009
|
+
fontSize: 13,
|
|
1010
|
+
fontWeight: 600,
|
|
1011
|
+
align: "center",
|
|
1012
|
+
verticalAlign: "middle"
|
|
1013
|
+
}
|
|
1014
|
+
}), { type: "group", children: z };
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
}), o;
|
|
1018
|
+
}
|
|
1019
|
+
return (u.some((t) => t.type === "scatter" || t.type === "effectScatter") || r === "scatter" || r === "effectScatter") && (o.tooltip = { ...o.tooltip, trigger: "item" }, o.xAxis.boundaryGap = !0), o.series = u.map((t, g) => {
|
|
1020
|
+
const d = t.type && la.has(t.type) ? t.type : r, m = X(t.color, i, g), f = {
|
|
1021
|
+
name: t.name,
|
|
1022
|
+
data: (t.data ?? []).length || !e.dataset ? t.data : void 0,
|
|
1023
|
+
stack: t.stack,
|
|
1024
|
+
yAxisIndex: t.yAxisIndex,
|
|
1025
|
+
...se(t, ["name", "data", "color", "type", "smooth", "area", "stack", "yAxisIndex"])
|
|
1026
|
+
};
|
|
1027
|
+
if (d === "bar")
|
|
1028
|
+
return {
|
|
1029
|
+
...f,
|
|
1030
|
+
type: "bar",
|
|
1031
|
+
barMaxWidth: 28,
|
|
1032
|
+
itemStyle: { color: m, borderRadius: [3, 3, 0, 0] },
|
|
1033
|
+
emphasis: { itemStyle: { opacity: 0.86 } }
|
|
1034
|
+
};
|
|
1035
|
+
if (d === "pictorialBar")
|
|
1036
|
+
return {
|
|
1037
|
+
...f,
|
|
1038
|
+
type: "pictorialBar",
|
|
1039
|
+
symbol: "roundRect",
|
|
1040
|
+
symbolSize: [14, 28],
|
|
1041
|
+
symbolPosition: "end",
|
|
1042
|
+
itemStyle: { color: m }
|
|
1043
|
+
};
|
|
1044
|
+
if (d === "scatter" || d === "effectScatter")
|
|
1045
|
+
return {
|
|
1046
|
+
...f,
|
|
1047
|
+
type: d,
|
|
1048
|
+
symbolSize: 8,
|
|
1049
|
+
itemStyle: { color: m },
|
|
1050
|
+
rippleEffect: d === "effectScatter" ? { scale: 3 } : void 0
|
|
1051
|
+
};
|
|
1052
|
+
if (d === "candlestick" || d === "boxplot")
|
|
1053
|
+
return {
|
|
1054
|
+
...f,
|
|
1055
|
+
type: d,
|
|
1056
|
+
itemStyle: { color: m, color0: i.border, borderColor: m }
|
|
1057
|
+
};
|
|
1058
|
+
const b = d === "area" || e.area || t.area;
|
|
1059
|
+
return {
|
|
1060
|
+
...f,
|
|
1061
|
+
type: "line",
|
|
1062
|
+
smooth: t.smooth ?? e.smooth,
|
|
1063
|
+
showSymbol: (t.data ?? []).length <= 24,
|
|
1064
|
+
symbolSize: 6,
|
|
1065
|
+
lineStyle: { color: m, width: 2 },
|
|
1066
|
+
itemStyle: { color: m },
|
|
1067
|
+
areaStyle: b ? { color: m, opacity: 0.12 } : void 0
|
|
1068
|
+
};
|
|
1069
|
+
}), o;
|
|
1070
|
+
}
|
|
1071
|
+
function se(e, l) {
|
|
1072
|
+
const h = {};
|
|
1073
|
+
return Object.keys(e).forEach((n) => {
|
|
1074
|
+
l.includes(n) || (h[n] = e[n]);
|
|
1075
|
+
}), h;
|
|
1076
|
+
}
|
|
1077
|
+
const Be = (e) => Object.prototype.toString.call(e) === "[object Object]";
|
|
1078
|
+
function Se(e, l) {
|
|
1079
|
+
if (!l) return e;
|
|
1080
|
+
const h = Array.isArray(e) ? [...e] : { ...e };
|
|
1081
|
+
return Object.keys(l).forEach((n) => {
|
|
1082
|
+
const u = l[n];
|
|
1083
|
+
if (u === void 0) return;
|
|
1084
|
+
const r = h[n];
|
|
1085
|
+
Be(r) && Be(u) ? h[n] = Se(r, u) : h[n] = u;
|
|
1086
|
+
}), h;
|
|
1087
|
+
}
|
|
1088
|
+
const ma = ["data-ai-target", "aria-label"], Ca = /* @__PURE__ */ He({
|
|
1089
|
+
name: "GiChart",
|
|
1090
|
+
__name: "chart",
|
|
1091
|
+
props: ra,
|
|
1092
|
+
emits: ["series-click", "legend-change", "ready", "rendered"],
|
|
1093
|
+
setup(e, { expose: l, emit: h }) {
|
|
1094
|
+
Je([
|
|
1095
|
+
et,
|
|
1096
|
+
tt,
|
|
1097
|
+
at,
|
|
1098
|
+
rt,
|
|
1099
|
+
nt,
|
|
1100
|
+
ot,
|
|
1101
|
+
it,
|
|
1102
|
+
st,
|
|
1103
|
+
lt,
|
|
1104
|
+
ct,
|
|
1105
|
+
ut,
|
|
1106
|
+
dt,
|
|
1107
|
+
ht,
|
|
1108
|
+
ft,
|
|
1109
|
+
mt,
|
|
1110
|
+
gt,
|
|
1111
|
+
yt,
|
|
1112
|
+
pt,
|
|
1113
|
+
bt,
|
|
1114
|
+
xt,
|
|
1115
|
+
vt,
|
|
1116
|
+
St,
|
|
1117
|
+
At,
|
|
1118
|
+
Ct,
|
|
1119
|
+
Mt,
|
|
1120
|
+
wt,
|
|
1121
|
+
Lt,
|
|
1122
|
+
kt,
|
|
1123
|
+
zt,
|
|
1124
|
+
Nt,
|
|
1125
|
+
Ot,
|
|
1126
|
+
Rt,
|
|
1127
|
+
Tt,
|
|
1128
|
+
$t,
|
|
1129
|
+
Bt,
|
|
1130
|
+
Dt,
|
|
1131
|
+
Ft,
|
|
1132
|
+
It,
|
|
1133
|
+
jt,
|
|
1134
|
+
Wt,
|
|
1135
|
+
Pt,
|
|
1136
|
+
qt,
|
|
1137
|
+
Et,
|
|
1138
|
+
Ht,
|
|
1139
|
+
Gt,
|
|
1140
|
+
Vt,
|
|
1141
|
+
Qt,
|
|
1142
|
+
ea,
|
|
1143
|
+
// 3D(echarts-gl)
|
|
1144
|
+
_t,
|
|
1145
|
+
Ut,
|
|
1146
|
+
Zt,
|
|
1147
|
+
Xt,
|
|
1148
|
+
Kt,
|
|
1149
|
+
Yt,
|
|
1150
|
+
Jt
|
|
1151
|
+
]);
|
|
1152
|
+
const n = e, u = h, r = ta("chart"), A = he(), i = he(), C = Le(), M = he(Ne()), I = Le(null), o = te(() => ({
|
|
1153
|
+
height: typeof n.height == "number" ? `${n.height}px` : n.height
|
|
1154
|
+
})), P = te(() => {
|
|
1155
|
+
const a = we(n), c = {
|
|
1156
|
+
...n,
|
|
1157
|
+
data: void 0,
|
|
1158
|
+
categories: a.categories,
|
|
1159
|
+
series: a.series
|
|
1160
|
+
}, v = I.value;
|
|
1161
|
+
return v ? {
|
|
1162
|
+
...c,
|
|
1163
|
+
...v.type ? { type: v.type } : {},
|
|
1164
|
+
...v.categories ? { categories: v.categories } : {},
|
|
1165
|
+
...v.series ? { series: v.series } : {}
|
|
1166
|
+
} : c;
|
|
1167
|
+
}), ge = te(() => P.value.type === "pie" || P.value.type === "donut"), Q = te(() => ({
|
|
1168
|
+
type: P.value.type,
|
|
1169
|
+
categories: P.value.categories,
|
|
1170
|
+
series: P.value.series
|
|
1171
|
+
})), ce = te(() => {
|
|
1172
|
+
var U, ee, oe, Z;
|
|
1173
|
+
const a = ((U = N.value) == null ? void 0 : U.series) ?? ((ee = n.option) == null ? void 0 : ee.series);
|
|
1174
|
+
if (Array.isArray(a) && a.length) return !0;
|
|
1175
|
+
const c = ((oe = N.value) == null ? void 0 : oe.dataset) ?? n.dataset;
|
|
1176
|
+
if (c && (Array.isArray(c) ? c.length : Object.keys(c).length)) return !0;
|
|
1177
|
+
const v = Q.value.series;
|
|
1178
|
+
return v.length ? ge.value ? (((Z = v[0]) == null ? void 0 : Z.data) ?? []).some((ie) => {
|
|
1179
|
+
const Ee = ie && typeof ie == "object" ? ie.value : ie;
|
|
1180
|
+
return Math.max(0, Number(Ee) || 0) > 0;
|
|
1181
|
+
}) : v.some((ie) => Array.isArray(ie.data) && ie.data.length > 0) : !1;
|
|
1182
|
+
}), ue = he(0), ae = he([]);
|
|
1183
|
+
let Y = 0, t = [], g = [], d = 0, m = 0;
|
|
1184
|
+
function f() {
|
|
1185
|
+
return Q.value.series.flatMap(
|
|
1186
|
+
(a) => (a.data ?? []).map((c) => {
|
|
1187
|
+
const v = Math.max(0, Number(c && typeof c == "object" ? c.value : c) || 0);
|
|
1188
|
+
return Math.min(1, v > 1 ? v / 100 : v);
|
|
1189
|
+
})
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
function b(a, c) {
|
|
1193
|
+
return a.length === c.length && a.every((v, U) => Math.abs(v - c[U]) < 5e-4);
|
|
1194
|
+
}
|
|
1195
|
+
function s(a) {
|
|
1196
|
+
if (P.value.type !== "liquid") {
|
|
1197
|
+
Y = 0;
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
const c = f();
|
|
1201
|
+
b(g, c) || (t = ae.value.length === c.length ? [...ae.value] : c.map(() => 0), g = [...c], d = a);
|
|
1202
|
+
const v = Math.min(1, (a - d) / 700), U = 1 - Math.pow(1 - v, 3);
|
|
1203
|
+
ae.value = t.map((ee, oe) => ee + ((g[oe] ?? ee) - ee) * U), ue.value = a / 1e3 * 1.8, a - m > 32 && (m = a, j()), Y = requestAnimationFrame(s);
|
|
1204
|
+
}
|
|
1205
|
+
function p() {
|
|
1206
|
+
Y || (m = 0, Y = requestAnimationFrame(s));
|
|
1207
|
+
}
|
|
1208
|
+
function S() {
|
|
1209
|
+
Y && cancelAnimationFrame(Y), Y = 0;
|
|
1210
|
+
}
|
|
1211
|
+
const V = te(
|
|
1212
|
+
() => $e(
|
|
1213
|
+
P.value,
|
|
1214
|
+
M.value,
|
|
1215
|
+
P.value.type === "liquid" ? { phase: ue.value, values: ae.value } : void 0
|
|
1216
|
+
)
|
|
1217
|
+
), N = te(() => {
|
|
1218
|
+
const a = I.value;
|
|
1219
|
+
if (!a) return null;
|
|
1220
|
+
if (a.option && !a.type && !a.series && !a.categories) return a.option;
|
|
1221
|
+
const c = $e(P.value, M.value);
|
|
1222
|
+
return a.option ? Se(c, a.option) : c;
|
|
1223
|
+
}), k = te(
|
|
1224
|
+
() => Se(
|
|
1225
|
+
Se(V.value, n.option),
|
|
1226
|
+
N.value
|
|
1227
|
+
)
|
|
1228
|
+
);
|
|
1229
|
+
let B = 0, D = !1, y = !1;
|
|
1230
|
+
function F() {
|
|
1231
|
+
const a = C.value;
|
|
1232
|
+
if (!a) return;
|
|
1233
|
+
const c = k.value;
|
|
1234
|
+
n.notMerge ? a.setOption(c, { notMerge: !0, lazyUpdate: !0 }) : a.setOption(c, {
|
|
1235
|
+
notMerge: !1,
|
|
1236
|
+
lazyUpdate: !0,
|
|
1237
|
+
replaceMerge: [
|
|
1238
|
+
"series",
|
|
1239
|
+
"xAxis",
|
|
1240
|
+
"yAxis",
|
|
1241
|
+
"legend",
|
|
1242
|
+
"title",
|
|
1243
|
+
"geo",
|
|
1244
|
+
"radar",
|
|
1245
|
+
"visualMap",
|
|
1246
|
+
"parallel",
|
|
1247
|
+
"parallelAxis"
|
|
1248
|
+
]
|
|
1249
|
+
}), u("rendered", a);
|
|
1250
|
+
}
|
|
1251
|
+
function j() {
|
|
1252
|
+
if (!(B || !C.value)) {
|
|
1253
|
+
if (D) {
|
|
1254
|
+
y = !0;
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
B = requestAnimationFrame(() => {
|
|
1258
|
+
B = 0, F(), y = !1;
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
function re(a) {
|
|
1263
|
+
const c = Number((a == null ? void 0 : a.seriesIndex) ?? 0), v = Q.value.series[c];
|
|
1264
|
+
v && u("series-click", v, Number((a == null ? void 0 : a.dataIndex) ?? 0), a);
|
|
1265
|
+
}
|
|
1266
|
+
function L(a) {
|
|
1267
|
+
const c = (a == null ? void 0 : a.selected) ?? {}, v = Object.keys(c).filter((U) => !c[U]);
|
|
1268
|
+
u("legend-change", v);
|
|
1269
|
+
}
|
|
1270
|
+
function _(a) {
|
|
1271
|
+
a.off("click"), a.off("legendselectchanged"), a.on("click", re), a.on("legendselectchanged", L);
|
|
1272
|
+
}
|
|
1273
|
+
let q = !1;
|
|
1274
|
+
function O() {
|
|
1275
|
+
var a;
|
|
1276
|
+
typeof window > "u" || !i.value || (q = !0, (a = C.value) == null || a.dispose(), C.value = Qe(i.value, n.theme || void 0, { renderer: n.renderer }), _(C.value), n.loading && C.value.showLoading("default", { maskColor: "transparent", text: "" }), F(), u("ready", C.value));
|
|
1277
|
+
}
|
|
1278
|
+
let x, E = 0, R = 0, T = 0;
|
|
1279
|
+
function J() {
|
|
1280
|
+
const a = i.value;
|
|
1281
|
+
if (!a || !C.value) return;
|
|
1282
|
+
const c = a.clientWidth, v = a.clientHeight;
|
|
1283
|
+
Math.abs(c - R) < 1 && Math.abs(v - T) < 1 || (R = c, T = v, C.value.resize());
|
|
1284
|
+
}
|
|
1285
|
+
function $() {
|
|
1286
|
+
E || (E = requestAnimationFrame(() => {
|
|
1287
|
+
E = 0, J();
|
|
1288
|
+
}));
|
|
1289
|
+
}
|
|
1290
|
+
let w;
|
|
1291
|
+
function z() {
|
|
1292
|
+
typeof MutationObserver > "u" || typeof document > "u" || (w = new MutationObserver(() => {
|
|
1293
|
+
M.value = Ne(), j();
|
|
1294
|
+
}), w.observe(document.documentElement, {
|
|
1295
|
+
attributes: !0,
|
|
1296
|
+
attributeFilter: ["class", "data-theme", "style"]
|
|
1297
|
+
}));
|
|
1298
|
+
}
|
|
1299
|
+
pe(k, j), pe(
|
|
1300
|
+
() => P.value.type,
|
|
1301
|
+
(a) => {
|
|
1302
|
+
a === "liquid" ? p() : S();
|
|
1303
|
+
},
|
|
1304
|
+
{ immediate: !0 }
|
|
1305
|
+
), pe(
|
|
1306
|
+
() => n.loading,
|
|
1307
|
+
(a) => {
|
|
1308
|
+
C.value && (a ? C.value.showLoading("default", { maskColor: "transparent", text: "" }) : C.value.hideLoading());
|
|
1309
|
+
}
|
|
1310
|
+
), pe(
|
|
1311
|
+
() => [n.renderer, n.theme],
|
|
1312
|
+
() => {
|
|
1313
|
+
O(), $();
|
|
1314
|
+
}
|
|
1315
|
+
);
|
|
1316
|
+
let W;
|
|
1317
|
+
function ne() {
|
|
1318
|
+
var a, c;
|
|
1319
|
+
q || (O(), R = ((a = i.value) == null ? void 0 : a.clientWidth) ?? 0, T = ((c = i.value) == null ? void 0 : c.clientHeight) ?? 0, n.autoResize && typeof ResizeObserver < "u" && A.value && (x = new ResizeObserver($), x.observe(A.value)), z());
|
|
1320
|
+
}
|
|
1321
|
+
function G() {
|
|
1322
|
+
if (n.pauseOnHidden) {
|
|
1323
|
+
if (document.hidden) {
|
|
1324
|
+
D = !0;
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
D = !1, y ? j() : $();
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
Ge(() => {
|
|
1331
|
+
n.lazy && typeof IntersectionObserver < "u" && A.value ? (W = new IntersectionObserver(
|
|
1332
|
+
(a) => {
|
|
1333
|
+
a.some((c) => c.isIntersecting) && (W == null || W.disconnect(), W = void 0, ne());
|
|
1334
|
+
},
|
|
1335
|
+
{ rootMargin: "200px" }
|
|
1336
|
+
), W.observe(A.value)) : ne(), n.pauseOnHidden && typeof document < "u" && document.addEventListener("visibilitychange", G);
|
|
1337
|
+
}), Ve(() => {
|
|
1338
|
+
var a;
|
|
1339
|
+
S(), B && cancelAnimationFrame(B), E && cancelAnimationFrame(E), x == null || x.disconnect(), w == null || w.disconnect(), W == null || W.disconnect(), n.pauseOnHidden && typeof document < "u" && document.removeEventListener("visibilitychange", G), (a = C.value) == null || a.dispose(), C.value = void 0;
|
|
1340
|
+
});
|
|
1341
|
+
function ye() {
|
|
1342
|
+
return je(P.value);
|
|
1343
|
+
}
|
|
1344
|
+
function de() {
|
|
1345
|
+
var c;
|
|
1346
|
+
const a = Q.value;
|
|
1347
|
+
return {
|
|
1348
|
+
type: a.type,
|
|
1349
|
+
categories: a.categories,
|
|
1350
|
+
series: a.series,
|
|
1351
|
+
stats: ye(),
|
|
1352
|
+
summary: Ce(P.value),
|
|
1353
|
+
option: ((c = C.value) == null ? void 0 : c.getOption()) ?? k.value
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
function We(a) {
|
|
1357
|
+
return !a || typeof a != "object" ? { ok: !1, reason: "invalidAction", message: "value 需为 { type, categories, series, option } 之一" } : (I.value = a, F(), { ok: !0, data: de() });
|
|
1358
|
+
}
|
|
1359
|
+
function Pe(a, c) {
|
|
1360
|
+
var U, ee, oe;
|
|
1361
|
+
const v = C.value;
|
|
1362
|
+
if (!v) return { ok: !1, reason: "failed", message: "图表尚未初始化" };
|
|
1363
|
+
switch (a) {
|
|
1364
|
+
case "set-option": {
|
|
1365
|
+
const Z = c == null ? void 0 : c.option;
|
|
1366
|
+
return Z ? (I.value = { option: Z }, F(), { ok: !0, data: de() }) : { ok: !1, reason: "invalidAction", message: "缺少 payload.option" };
|
|
1367
|
+
}
|
|
1368
|
+
case "set-type": {
|
|
1369
|
+
const Z = c == null ? void 0 : c.type;
|
|
1370
|
+
return xe.includes(Z) ? (I.value = { ...I.value ?? {}, type: Z }, F(), { ok: !0, data: de() }) : { ok: !1, reason: "invalidAction", message: `type 仅支持 ${xe.join(" / ")}` };
|
|
1371
|
+
}
|
|
1372
|
+
case "set-series":
|
|
1373
|
+
return I.value = {
|
|
1374
|
+
type: (c == null ? void 0 : c.type) ?? ((U = I.value) == null ? void 0 : U.type) ?? n.type,
|
|
1375
|
+
categories: (c == null ? void 0 : c.categories) ?? Q.value.categories,
|
|
1376
|
+
series: (c == null ? void 0 : c.series) ?? Q.value.series
|
|
1377
|
+
}, F(), { ok: !0, data: de() };
|
|
1378
|
+
case "highlight":
|
|
1379
|
+
case "downplay":
|
|
1380
|
+
return (c == null ? void 0 : c.dataIndex) === void 0 ? { ok: !1, reason: "invalidAction", message: "缺少 payload.dataIndex" } : (v.dispatchAction({
|
|
1381
|
+
type: a,
|
|
1382
|
+
seriesIndex: Number(c.seriesIndex ?? 0),
|
|
1383
|
+
dataIndex: Number(c.dataIndex)
|
|
1384
|
+
}), { ok: !0 });
|
|
1385
|
+
case "toggle-legend": {
|
|
1386
|
+
const Z = c == null ? void 0 : c.name;
|
|
1387
|
+
return typeof Z != "string" ? { ok: !1, reason: "invalidAction", message: "缺少 payload.name" } : (v.dispatchAction({ type: "legendToggleSelect", name: Z }), { ok: !0 });
|
|
1388
|
+
}
|
|
1389
|
+
case "stats":
|
|
1390
|
+
return ye();
|
|
1391
|
+
case "describe":
|
|
1392
|
+
return { text: Ce(P.value), stats: ye() };
|
|
1393
|
+
case "resize":
|
|
1394
|
+
return v.resize(), { ok: !0, data: { width: (ee = i.value) == null ? void 0 : ee.clientWidth, height: (oe = i.value) == null ? void 0 : oe.clientHeight } };
|
|
1395
|
+
case "export":
|
|
1396
|
+
return {
|
|
1397
|
+
ok: !0,
|
|
1398
|
+
data: {
|
|
1399
|
+
dataUrl: v.getDataURL({
|
|
1400
|
+
type: (c == null ? void 0 : c.type) ?? "png",
|
|
1401
|
+
pixelRatio: Number((c == null ? void 0 : c.pixelRatio) ?? 2),
|
|
1402
|
+
backgroundColor: (c == null ? void 0 : c.backgroundColor) ?? M.value.bg
|
|
1403
|
+
})
|
|
1404
|
+
}
|
|
1405
|
+
};
|
|
1406
|
+
case "clear":
|
|
1407
|
+
return I.value = null, F(), { ok: !0 };
|
|
1408
|
+
default:
|
|
1409
|
+
return { ok: !1, reason: "unsupported", message: `未知命令:${a}` };
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
function qe() {
|
|
1413
|
+
return {
|
|
1414
|
+
entity: "chart",
|
|
1415
|
+
type: { enum: xe, default: "line" },
|
|
1416
|
+
data: {
|
|
1417
|
+
categories: "string | number[],饼图时作为扇区名称",
|
|
1418
|
+
series: "ChartSeries[]:{ name, data: number[], color?, type?: line|bar|area, smooth?, area? }",
|
|
1419
|
+
option: "原生 EChartsOption,与简写配置深合并,同名项优先",
|
|
1420
|
+
data: "{ categories, series } 快捷入口,等价于 categories + series"
|
|
1421
|
+
},
|
|
1422
|
+
commands: [
|
|
1423
|
+
"set-option",
|
|
1424
|
+
"set-type",
|
|
1425
|
+
"set-series",
|
|
1426
|
+
"stats",
|
|
1427
|
+
"describe",
|
|
1428
|
+
"highlight",
|
|
1429
|
+
"downplay",
|
|
1430
|
+
"toggle-legend",
|
|
1431
|
+
"resize",
|
|
1432
|
+
"export",
|
|
1433
|
+
"clear"
|
|
1434
|
+
],
|
|
1435
|
+
sample: {
|
|
1436
|
+
type: "bar",
|
|
1437
|
+
categories: ["1月", "2月"],
|
|
1438
|
+
series: [{ name: "营收", data: [12, 18] }]
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
return aa({
|
|
1443
|
+
code: n.aiTarget,
|
|
1444
|
+
entity: "chart",
|
|
1445
|
+
getValue: de,
|
|
1446
|
+
setValue: (a) => We(a),
|
|
1447
|
+
execute: Pe,
|
|
1448
|
+
getSchema: qe,
|
|
1449
|
+
isEnabled: () => !n.disabled,
|
|
1450
|
+
isVisible: () => !!A.value
|
|
1451
|
+
}), l({
|
|
1452
|
+
chart: C,
|
|
1453
|
+
getStats: ye,
|
|
1454
|
+
describe: () => Ce(P.value),
|
|
1455
|
+
getOption: () => {
|
|
1456
|
+
var a;
|
|
1457
|
+
return (a = C.value) == null ? void 0 : a.getOption();
|
|
1458
|
+
},
|
|
1459
|
+
setOption: (a, c) => {
|
|
1460
|
+
var v;
|
|
1461
|
+
return (v = C.value) == null ? void 0 : v.setOption(a, c);
|
|
1462
|
+
},
|
|
1463
|
+
resize: () => {
|
|
1464
|
+
var a;
|
|
1465
|
+
return (a = C.value) == null ? void 0 : a.resize();
|
|
1466
|
+
},
|
|
1467
|
+
dispatchAction: (a) => {
|
|
1468
|
+
var c;
|
|
1469
|
+
return (c = C.value) == null ? void 0 : c.dispatchAction(a);
|
|
1470
|
+
},
|
|
1471
|
+
getDataURL: (a) => {
|
|
1472
|
+
var c;
|
|
1473
|
+
return (c = C.value) == null ? void 0 : c.getDataURL(a);
|
|
1474
|
+
},
|
|
1475
|
+
clear: () => {
|
|
1476
|
+
var a;
|
|
1477
|
+
I.value = null, (a = C.value) == null || a.clear(), j();
|
|
1478
|
+
}
|
|
1479
|
+
}), (a, c) => (ke(), ze("div", {
|
|
1480
|
+
ref_key: "rootRef",
|
|
1481
|
+
ref: A,
|
|
1482
|
+
class: Ae([be(r).b(), be(r).bm(a.type)]),
|
|
1483
|
+
style: _e(o.value),
|
|
1484
|
+
"data-ai-target": a.aiTarget || void 0,
|
|
1485
|
+
role: "img",
|
|
1486
|
+
"aria-label": a.ariaLabel
|
|
1487
|
+
}, [
|
|
1488
|
+
Ue(Ze("div", {
|
|
1489
|
+
ref_key: "chartRef",
|
|
1490
|
+
ref: i,
|
|
1491
|
+
class: Ae(be(r).be("canvas"))
|
|
1492
|
+
}, null, 2), [
|
|
1493
|
+
[Xe, ce.value]
|
|
1494
|
+
]),
|
|
1495
|
+
ce.value ? Ye("", !0) : (ke(), ze("div", {
|
|
1496
|
+
key: 0,
|
|
1497
|
+
class: Ae(be(r).be("empty"))
|
|
1498
|
+
}, Ke(a.emptyText), 3))
|
|
1499
|
+
], 14, ma));
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
export {
|
|
1503
|
+
Ca as _,
|
|
1504
|
+
De as a,
|
|
1505
|
+
$e as b,
|
|
1506
|
+
ra as c,
|
|
1507
|
+
xe as d,
|
|
1508
|
+
Ce as e,
|
|
1509
|
+
Se as m,
|
|
1510
|
+
Ne as r,
|
|
1511
|
+
je as s
|
|
1512
|
+
};
|