@ojiepermana/angular 22.1.14 → 22.2.0
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 +8 -6
- package/SUPPORT.md +3 -3
- package/chart/README.md +1 -1
- package/component/README.md +2 -2
- package/component/calendar/README.md +3 -15
- package/component/drawer/README.md +1 -2
- package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
- package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
- package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
- package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
- package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
- package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
- package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
- package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
- package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -5
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
- package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
- package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
- package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
- package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
- package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
- package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
- package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
- package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
- package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
- package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
- package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
- package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
- package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
- package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
- package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
- package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
- package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
- package/fesm2022/ojiepermana-angular-component.mjs +0 -10
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -737
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1719 -552
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
- package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
- package/fesm2022/ojiepermana-angular.mjs +5 -24
- package/navigation/README.md +1 -1
- package/package.json +16 -12
- package/sdk/README.md +1 -1
- package/sdk/src/writer/index.js +2 -2
- package/theme/README.md +1 -1
- package/theme/layout/README.md +2 -4
- package/theme/page/README.md +50 -0
- package/theme/styles/README.md +10 -10
- package/theme/styles/css/base/prefers-dark.css +1 -1
- package/theme/styles/css/base/status.css +1 -1
- package/theme/styles/css/color/amber.css +1 -1
- package/theme/styles/css/color/blue.css +1 -1
- package/theme/styles/css/color/cyan.css +1 -1
- package/theme/styles/css/color/emerald.css +1 -1
- package/theme/styles/css/color/fuchsia.css +1 -1
- package/theme/styles/css/color/green.css +1 -1
- package/theme/styles/css/color/indigo.css +1 -1
- package/theme/styles/css/color/lime.css +1 -1
- package/theme/styles/css/color/orange.css +1 -1
- package/theme/styles/css/color/pink.css +1 -1
- package/theme/styles/css/color/purple.css +1 -1
- package/theme/styles/css/color/red.css +1 -1
- package/theme/styles/css/color/rose.css +1 -1
- package/theme/styles/css/color/sky.css +1 -1
- package/theme/styles/css/color/teal.css +1 -1
- package/theme/styles/css/color/violet.css +1 -1
- package/theme/styles/css/color/yellow.css +1 -1
- package/theme/styles/css/neutral/gray.css +1 -1
- package/theme/styles/css/neutral/mauve.css +1 -1
- package/theme/styles/css/neutral/mist.css +1 -1
- package/theme/styles/css/neutral/neutral.css +1 -1
- package/theme/styles/css/neutral/olive.css +1 -1
- package/theme/styles/css/neutral/slate.css +1 -1
- package/theme/styles/css/neutral/stone.css +1 -1
- package/theme/styles/css/neutral/taupe.css +1 -1
- package/theme/styles/css/neutral/zinc.css +1 -1
- package/types/ojiepermana-angular-chart-area.d.ts +126 -63
- package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
- package/types/ojiepermana-angular-chart-core.d.ts +409 -398
- package/types/ojiepermana-angular-chart-line.d.ts +141 -68
- package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
- package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
- package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
- package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
- package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
- package/types/ojiepermana-angular-chart.d.ts +3 -2
- package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
- package/types/ojiepermana-angular-component-alert.d.ts +69 -39
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
- package/types/ojiepermana-angular-component-badge.d.ts +36 -24
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
- package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
- package/types/ojiepermana-angular-component-button.d.ts +44 -27
- package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
- package/types/ojiepermana-angular-component-card.d.ts +112 -63
- package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
- package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
- package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
- package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
- package/types/ojiepermana-angular-component-command.d.ts +206 -121
- package/types/ojiepermana-angular-component-composer.d.ts +184 -84
- package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
- package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
- package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
- package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
- package/types/ojiepermana-angular-component-editor.d.ts +215 -117
- package/types/ojiepermana-angular-component-empty.d.ts +80 -45
- package/types/ojiepermana-angular-component-form.d.ts +185 -121
- package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
- package/types/ojiepermana-angular-component-icon.d.ts +87 -57
- package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
- package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
- package/types/ojiepermana-angular-component-input.d.ts +27 -17
- package/types/ojiepermana-angular-component-item.d.ts +160 -84
- package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
- package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
- package/types/ojiepermana-angular-component-label.d.ts +19 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
- package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
- package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
- package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
- package/types/ojiepermana-angular-component-popover.d.ts +94 -64
- package/types/ojiepermana-angular-component-progress.d.ts +45 -17
- package/types/ojiepermana-angular-component-radio.d.ts +129 -53
- package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
- package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
- package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
- package/types/ojiepermana-angular-component-select.d.ts +94 -77
- package/types/ojiepermana-angular-component-separator.d.ts +26 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
- package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
- package/types/ojiepermana-angular-component-slider.d.ts +140 -75
- package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
- package/types/ojiepermana-angular-component-switch.d.ts +97 -40
- package/types/ojiepermana-angular-component-table.d.ts +102 -50
- package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
- package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
- package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
- package/types/ojiepermana-angular-component-toast.d.ts +51 -55
- package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
- package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
- package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
- package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
- package/types/ojiepermana-angular-component-utils.d.ts +2 -2
- package/types/ojiepermana-angular-component.d.ts +1 -2
- package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
- package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
- package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
- package/types/ojiepermana-angular-navigation-types.d.ts +121 -125
- package/types/ojiepermana-angular-navigation.d.ts +663 -374
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
- package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
- package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +399 -187
- package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
- package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
- package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
- package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
- package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
- package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
- package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
- package/types/ojiepermana-angular-theme-page.d.ts +7 -5
- package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
- package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
- package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
- package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
- package/types/ojiepermana-angular-theme.d.ts +1 -2
- package/types/ojiepermana-angular.d.ts +5 -5
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
|
@@ -1,524 +1,547 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { scaleBand, scaleLinear } from
|
|
5
|
-
import {
|
|
6
|
-
import { stack } from
|
|
7
|
-
import { ChartPointerTracker } from
|
|
8
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, computed, inject, input, output } from "@angular/core";
|
|
3
|
+
import { CartesianContext, ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartThemeRadius, ChartThemeSpace, DEFAULT_CARTESIAN_MARGIN_UNITS, readNumber, resolveChartMargin, resolveChartStyle, resolveSeriesColor, seriesColorVar, setupCartesianChart, zeroBaselineDomain } from "@ojiepermana/angular/chart/core";
|
|
4
|
+
import { scaleBand, scaleLinear } from "d3-scale";
|
|
5
|
+
import { max, min } from "d3-array";
|
|
6
|
+
import { stack } from "d3-shape";
|
|
7
|
+
import { ChartPointerTracker } from "@ojiepermana/angular/chart/primitives";
|
|
9
8
|
function resolveBarColor(datum, seriesKey, colorKey) {
|
|
10
|
-
|
|
9
|
+
return resolveSeriesColor(colorKey ? datum[colorKey] : void 0, seriesColorVar(seriesKey));
|
|
11
10
|
}
|
|
12
11
|
function isActiveBar(datum, activeKey, activeValue) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (typeof value === 'number' && typeof activeValue === 'number') {
|
|
18
|
-
return value === activeValue;
|
|
19
|
-
}
|
|
20
|
-
return String(value ?? '') === String(activeValue);
|
|
12
|
+
if (!activeKey || activeValue === void 0) return false;
|
|
13
|
+
const value = datum[activeKey];
|
|
14
|
+
if (typeof value === "number" && typeof activeValue === "number") return value === activeValue;
|
|
15
|
+
return String(value ?? "") === String(activeValue);
|
|
21
16
|
}
|
|
22
|
-
/** Build all bar rectangles for the given config. */
|
|
23
17
|
function computeBarLayout(input) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
categories,
|
|
59
|
-
colorKey,
|
|
60
|
-
activeKey,
|
|
61
|
-
activeValue,
|
|
62
|
-
});
|
|
18
|
+
const { data, xKey, seriesKeys, variant, orientation, innerWidth, innerHeight, bandPadding, groupPadding, colorKey, activeKey, activeValue } = input;
|
|
19
|
+
const categories = data.map((d) => String(d[xKey] ?? ""));
|
|
20
|
+
const isVertical = orientation === "vertical";
|
|
21
|
+
const categoryScale = scaleBand().domain(categories).range(isVertical ? [0, innerWidth] : [0, innerHeight]).padding(bandPadding);
|
|
22
|
+
const valueScale = scaleLinear();
|
|
23
|
+
if (variant === "stacked" && seriesKeys.length > 0) return stackedLayout({
|
|
24
|
+
data,
|
|
25
|
+
xKey,
|
|
26
|
+
seriesKeys,
|
|
27
|
+
orientation,
|
|
28
|
+
innerWidth,
|
|
29
|
+
innerHeight,
|
|
30
|
+
categoryScale,
|
|
31
|
+
valueScale,
|
|
32
|
+
categories,
|
|
33
|
+
colorKey,
|
|
34
|
+
activeKey,
|
|
35
|
+
activeValue
|
|
36
|
+
});
|
|
37
|
+
return groupedLayout({
|
|
38
|
+
data,
|
|
39
|
+
xKey,
|
|
40
|
+
seriesKeys,
|
|
41
|
+
orientation,
|
|
42
|
+
innerWidth,
|
|
43
|
+
innerHeight,
|
|
44
|
+
categoryScale,
|
|
45
|
+
valueScale,
|
|
46
|
+
groupPadding,
|
|
47
|
+
categories,
|
|
48
|
+
colorKey,
|
|
49
|
+
activeKey,
|
|
50
|
+
activeValue
|
|
51
|
+
});
|
|
63
52
|
}
|
|
64
53
|
function groupedLayout(input) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
return { bars, categoryScale, valueScale, categories };
|
|
54
|
+
const { data, seriesKeys, orientation, innerWidth, innerHeight, categoryScale, valueScale, groupPadding, categories, colorKey, activeKey, activeValue } = input;
|
|
55
|
+
const isVertical = orientation === "vertical";
|
|
56
|
+
const minValue = min(data, (d) => min(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;
|
|
57
|
+
const maxValue = max(data, (d) => max(seriesKeys, (k) => readNumber(d, k)) ?? 0) ?? 0;
|
|
58
|
+
const [domainMin, domainMax] = zeroBaselineDomain(minValue, maxValue);
|
|
59
|
+
valueScale.domain([domainMin, domainMax]).nice().range(isVertical ? [innerHeight, 0] : [0, innerWidth]);
|
|
60
|
+
const baseline = valueScale(0);
|
|
61
|
+
const subScale = scaleBand().domain(seriesKeys).range([0, categoryScale.bandwidth()]).padding(groupPadding);
|
|
62
|
+
const bars = [];
|
|
63
|
+
data.forEach((datum, datumIndex) => {
|
|
64
|
+
const category = categories[datumIndex];
|
|
65
|
+
const bandStart = categoryScale(category) ?? 0;
|
|
66
|
+
seriesKeys.forEach((seriesKey) => {
|
|
67
|
+
const value = readNumber(datum, seriesKey);
|
|
68
|
+
const sub = subScale(seriesKey) ?? 0;
|
|
69
|
+
const scaledValue = valueScale(value);
|
|
70
|
+
const color = resolveBarColor(datum, seriesKey, colorKey);
|
|
71
|
+
const active = isActiveBar(datum, activeKey, activeValue);
|
|
72
|
+
const rect = isVertical ? {
|
|
73
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
74
|
+
seriesKey,
|
|
75
|
+
datumIndex,
|
|
76
|
+
category,
|
|
77
|
+
value,
|
|
78
|
+
x: bandStart + sub,
|
|
79
|
+
y: Math.min(scaledValue, baseline),
|
|
80
|
+
width: subScale.bandwidth(),
|
|
81
|
+
height: Math.abs(baseline - scaledValue),
|
|
82
|
+
color,
|
|
83
|
+
active
|
|
84
|
+
} : {
|
|
85
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
86
|
+
seriesKey,
|
|
87
|
+
datumIndex,
|
|
88
|
+
category,
|
|
89
|
+
value,
|
|
90
|
+
x: Math.min(scaledValue, baseline),
|
|
91
|
+
y: bandStart + sub,
|
|
92
|
+
width: Math.abs(baseline - scaledValue),
|
|
93
|
+
height: subScale.bandwidth(),
|
|
94
|
+
color,
|
|
95
|
+
active
|
|
96
|
+
};
|
|
97
|
+
bars.push(rect);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
return {
|
|
101
|
+
bars,
|
|
102
|
+
categoryScale,
|
|
103
|
+
valueScale,
|
|
104
|
+
categories
|
|
105
|
+
};
|
|
120
106
|
}
|
|
121
107
|
function stackedLayout(input) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
color,
|
|
182
|
-
active,
|
|
183
|
-
};
|
|
184
|
-
bars.push(rect);
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
return { bars, categoryScale, valueScale, categories };
|
|
108
|
+
const { data, seriesKeys, orientation, innerWidth, innerHeight, categoryScale, valueScale, categories, colorKey, activeKey, activeValue } = input;
|
|
109
|
+
const isVertical = orientation === "vertical";
|
|
110
|
+
const normalized = data.map((d) => {
|
|
111
|
+
const out = {};
|
|
112
|
+
for (const k of seriesKeys) out[k] = readNumber(d, k);
|
|
113
|
+
return out;
|
|
114
|
+
});
|
|
115
|
+
const series = stack().keys(seriesKeys)(normalized);
|
|
116
|
+
const minTotal = min(series, (layer) => min(layer, (p) => Math.min(p[0], p[1]))) ?? 0;
|
|
117
|
+
const maxTotal = max(series, (layer) => max(layer, (p) => Math.max(p[0], p[1]))) ?? 0;
|
|
118
|
+
const [domainMin, domainMax] = zeroBaselineDomain(minTotal, maxTotal);
|
|
119
|
+
valueScale.domain([domainMin, domainMax]).nice().range(isVertical ? [innerHeight, 0] : [0, innerWidth]);
|
|
120
|
+
const bars = [];
|
|
121
|
+
series.forEach((layer) => {
|
|
122
|
+
const seriesKey = layer.key;
|
|
123
|
+
layer.forEach((point, datumIndex) => {
|
|
124
|
+
const [lower, upper] = point;
|
|
125
|
+
const value = upper - lower;
|
|
126
|
+
const category = categories[datumIndex];
|
|
127
|
+
const bandStart = categoryScale(category) ?? 0;
|
|
128
|
+
const color = resolveBarColor(data[datumIndex], seriesKey, colorKey);
|
|
129
|
+
const active = isActiveBar(data[datumIndex], activeKey, activeValue);
|
|
130
|
+
const lowerCoord = valueScale(lower);
|
|
131
|
+
const upperCoord = valueScale(upper);
|
|
132
|
+
const span = Math.abs(upperCoord - lowerCoord);
|
|
133
|
+
const rect = isVertical ? {
|
|
134
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
135
|
+
seriesKey,
|
|
136
|
+
datumIndex,
|
|
137
|
+
category,
|
|
138
|
+
value,
|
|
139
|
+
x: bandStart,
|
|
140
|
+
y: Math.min(lowerCoord, upperCoord),
|
|
141
|
+
width: categoryScale.bandwidth(),
|
|
142
|
+
height: span,
|
|
143
|
+
color,
|
|
144
|
+
active
|
|
145
|
+
} : {
|
|
146
|
+
key: `${datumIndex}-${seriesKey}`,
|
|
147
|
+
seriesKey,
|
|
148
|
+
datumIndex,
|
|
149
|
+
category,
|
|
150
|
+
value,
|
|
151
|
+
x: Math.min(lowerCoord, upperCoord),
|
|
152
|
+
y: bandStart,
|
|
153
|
+
width: span,
|
|
154
|
+
height: categoryScale.bandwidth(),
|
|
155
|
+
color,
|
|
156
|
+
active
|
|
157
|
+
};
|
|
158
|
+
bars.push(rect);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
bars,
|
|
163
|
+
categoryScale,
|
|
164
|
+
valueScale,
|
|
165
|
+
categories
|
|
166
|
+
};
|
|
188
167
|
}
|
|
189
|
-
|
|
190
|
-
/** Hard cap so degenerate inputs (tiny `dotSize`) cannot explode the DOM. */
|
|
191
168
|
const MAX_ROWS_PER_COLUMN = 400;
|
|
192
|
-
const EDGE_TOLERANCE =
|
|
193
|
-
/**
|
|
194
|
-
* Build the dot-matrix cells for the `dot` bar style.
|
|
195
|
-
*
|
|
196
|
-
* Cells tile a global grid anchored at the value baseline, so stacked
|
|
197
|
-
* segments snap to the same rows and never overlap. A bar fills every cell
|
|
198
|
-
* whose center lies inside its value range; bars too short to cover a center
|
|
199
|
-
* still claim the cell nearest their midpoint when it is free.
|
|
200
|
-
*/
|
|
169
|
+
const EDGE_TOLERANCE = .5;
|
|
201
170
|
function computeBarDotCells(input) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
usedRows.add(r);
|
|
270
|
-
values.push({
|
|
271
|
-
key: `${bar.key}:${r}`,
|
|
272
|
-
...cellRect(r),
|
|
273
|
-
seriesKey: bar.seriesKey,
|
|
274
|
-
datumIndex: bar.datumIndex,
|
|
275
|
-
color: bar.color,
|
|
276
|
-
active: bar.active,
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
return { track, values };
|
|
171
|
+
const { bars, orientation, innerWidth, innerHeight, baseline, dotSize, dotGap } = input;
|
|
172
|
+
const isVertical = orientation === "vertical";
|
|
173
|
+
const innerLength = isVertical ? innerHeight : innerWidth;
|
|
174
|
+
const track = [];
|
|
175
|
+
const values = [];
|
|
176
|
+
if (innerLength <= 0 || bars.length === 0) return {
|
|
177
|
+
track,
|
|
178
|
+
values
|
|
179
|
+
};
|
|
180
|
+
groupColumns(bars, isVertical).forEach((column, columnIndex) => {
|
|
181
|
+
const cellLength = dotSize ?? column.thickness;
|
|
182
|
+
const step = cellLength + dotGap;
|
|
183
|
+
if (cellLength <= 0 || step <= EDGE_TOLERANCE) return;
|
|
184
|
+
const rowStart = (r) => isVertical ? baseline - r * step - cellLength : baseline + r * step;
|
|
185
|
+
const rowAt = (c) => isVertical ? (baseline - c - cellLength / 2) / step : (c - baseline - cellLength / 2) / step;
|
|
186
|
+
const rMin = Math.ceil(isVertical ? (baseline - innerLength - EDGE_TOLERANCE) / step : (-baseline - EDGE_TOLERANCE) / step);
|
|
187
|
+
let rMax = Math.floor(isVertical ? (baseline - cellLength + EDGE_TOLERANCE) / step : (innerLength - baseline - cellLength + EDGE_TOLERANCE) / step);
|
|
188
|
+
if (rMax - rMin + 1 > MAX_ROWS_PER_COLUMN) rMax = rMin + MAX_ROWS_PER_COLUMN - 1;
|
|
189
|
+
const cellRect = (r) => isVertical ? {
|
|
190
|
+
x: column.pos,
|
|
191
|
+
y: rowStart(r),
|
|
192
|
+
width: column.thickness,
|
|
193
|
+
height: cellLength
|
|
194
|
+
} : {
|
|
195
|
+
x: rowStart(r),
|
|
196
|
+
y: column.pos,
|
|
197
|
+
width: cellLength,
|
|
198
|
+
height: column.thickness
|
|
199
|
+
};
|
|
200
|
+
for (let r = rMin; r <= rMax; r++) track.push({
|
|
201
|
+
key: `${columnIndex}:${r}`,
|
|
202
|
+
...cellRect(r)
|
|
203
|
+
});
|
|
204
|
+
const usedRows = /* @__PURE__ */ new Set();
|
|
205
|
+
for (const bar of column.bars) {
|
|
206
|
+
const barLength = isVertical ? bar.height : bar.width;
|
|
207
|
+
if (barLength <= EDGE_TOLERANCE) continue;
|
|
208
|
+
const barStart = isVertical ? bar.y : bar.x;
|
|
209
|
+
const barEnd = barStart + barLength;
|
|
210
|
+
const rA = rowAt(barStart);
|
|
211
|
+
const rB = rowAt(barEnd);
|
|
212
|
+
const first = Math.max(Math.ceil(Math.min(rA, rB) - EDGE_TOLERANCE / step), rMin);
|
|
213
|
+
const last = Math.min(Math.floor(Math.max(rA, rB) + EDGE_TOLERANCE / step), rMax);
|
|
214
|
+
const rows = [];
|
|
215
|
+
for (let r = first; r <= last; r++) rows.push(r);
|
|
216
|
+
if (rows.length === 0) {
|
|
217
|
+
const r = Math.round(rowAt(barStart + barLength / 2));
|
|
218
|
+
if (r >= rMin && r <= rMax && !usedRows.has(r)) rows.push(r);
|
|
219
|
+
}
|
|
220
|
+
for (const r of rows) {
|
|
221
|
+
if (usedRows.has(r)) continue;
|
|
222
|
+
usedRows.add(r);
|
|
223
|
+
values.push({
|
|
224
|
+
key: `${bar.key}:${r}`,
|
|
225
|
+
...cellRect(r),
|
|
226
|
+
seriesKey: bar.seriesKey,
|
|
227
|
+
datumIndex: bar.datumIndex,
|
|
228
|
+
color: bar.color,
|
|
229
|
+
active: bar.active
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
return {
|
|
235
|
+
track,
|
|
236
|
+
values
|
|
237
|
+
};
|
|
282
238
|
}
|
|
283
|
-
/** Group bars sharing the same cross-axis band into one cell column. */
|
|
284
239
|
function groupColumns(bars, isVertical) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
return [...map.values()];
|
|
240
|
+
const map = /* @__PURE__ */ new Map();
|
|
241
|
+
for (const bar of bars) {
|
|
242
|
+
const pos = isVertical ? bar.x : bar.y;
|
|
243
|
+
const thickness = isVertical ? bar.width : bar.height;
|
|
244
|
+
if (thickness <= 0) continue;
|
|
245
|
+
const key = `${pos.toFixed(2)}:${thickness.toFixed(2)}`;
|
|
246
|
+
const existing = map.get(key);
|
|
247
|
+
if (existing) existing.bars.push(bar);
|
|
248
|
+
else map.set(key, {
|
|
249
|
+
pos,
|
|
250
|
+
thickness,
|
|
251
|
+
bars: [bar]
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return [...map.values()];
|
|
302
255
|
}
|
|
303
|
-
|
|
304
256
|
const defaultBarValueFormatter = (value) => `${value}`;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
257
|
+
var BarChart = class BarChart {
|
|
258
|
+
root = inject(ChartContext);
|
|
259
|
+
cart = inject(CartesianContext);
|
|
260
|
+
themeRadius = inject(ChartThemeRadius);
|
|
261
|
+
data = input.required(...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
262
|
+
xKey = input.required(...ngDevMode ? [{ debugName: "xKey" }] : /* istanbul ignore next */ []);
|
|
263
|
+
orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
264
|
+
variant = input("grouped", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
265
|
+
styleVariant = input(void 0, ...ngDevMode ? [{ debugName: "styleVariant" }] : /* istanbul ignore next */ []);
|
|
266
|
+
styles = input("base", ...ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []);
|
|
267
|
+
chartStyle = resolveChartStyle(this.styleVariant, this.styles);
|
|
268
|
+
themeSpace = inject(ChartThemeSpace);
|
|
269
|
+
margin = input(null, ...ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []);
|
|
270
|
+
plotMargin = resolveChartMargin(this.margin, DEFAULT_CARTESIAN_MARGIN_UNITS, this.themeSpace);
|
|
271
|
+
bandPadding = input(.2, ...ngDevMode ? [{ debugName: "bandPadding" }] : /* istanbul ignore next */ []);
|
|
272
|
+
groupPadding = input(.05, ...ngDevMode ? [{ debugName: "groupPadding" }] : /* istanbul ignore next */ []);
|
|
273
|
+
cornerRadius = input(null, ...ngDevMode ? [{ debugName: "cornerRadius" }] : /* istanbul ignore next */ []);
|
|
274
|
+
colorKey = input(void 0, ...ngDevMode ? [{ debugName: "colorKey" }] : /* istanbul ignore next */ []);
|
|
275
|
+
activeKey = input(void 0, ...ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []);
|
|
276
|
+
activeValue = input(void 0, ...ngDevMode ? [{ debugName: "activeValue" }] : /* istanbul ignore next */ []);
|
|
277
|
+
showValueLabels = input(false, ...ngDevMode ? [{ debugName: "showValueLabels" }] : /* istanbul ignore next */ []);
|
|
278
|
+
valueLabelFormat = input(defaultBarValueFormatter, ...ngDevMode ? [{ debugName: "valueLabelFormat" }] : /* istanbul ignore next */ []);
|
|
279
|
+
dotSize = input(void 0, ...ngDevMode ? [{ debugName: "dotSize" }] : /* istanbul ignore next */ []);
|
|
280
|
+
dotGap = input(2, ...ngDevMode ? [{ debugName: "dotGap" }] : /* istanbul ignore next */ []);
|
|
281
|
+
dotCornerRadius = input(null, ...ngDevMode ? [{ debugName: "dotCornerRadius" }] : /* istanbul ignore next */ []);
|
|
282
|
+
showDotTrack = input(true, ...ngDevMode ? [{ debugName: "showDotTrack" }] : /* istanbul ignore next */ []);
|
|
283
|
+
barClick = output();
|
|
284
|
+
cx = setupCartesianChart({
|
|
285
|
+
data: () => this.data(),
|
|
286
|
+
margin: () => this.plotMargin(),
|
|
287
|
+
cartesian: {
|
|
288
|
+
context: this.cart,
|
|
289
|
+
orientation: () => this.orientation()
|
|
290
|
+
},
|
|
291
|
+
publishLayout: () => {
|
|
292
|
+
const layout = this.layout();
|
|
293
|
+
this.cart.categoryScale.set(layout.categoryScale);
|
|
294
|
+
this.cart.valueScale.set(layout.valueScale);
|
|
295
|
+
this.cart.categories.set(layout.categories);
|
|
296
|
+
},
|
|
297
|
+
click: {
|
|
298
|
+
emit: (event) => this.barClick.emit(event),
|
|
299
|
+
payload: (bar, datumIndex, datum) => ({
|
|
300
|
+
seriesKey: bar.seriesKey,
|
|
301
|
+
datumIndex,
|
|
302
|
+
category: bar.category,
|
|
303
|
+
value: bar.value,
|
|
304
|
+
datum
|
|
305
|
+
})
|
|
306
|
+
},
|
|
307
|
+
ariaLabel: (bar, label) => `${label} in ${bar.category}: ${bar.value}`
|
|
308
|
+
});
|
|
309
|
+
resolvedCornerRadius = computed(() => this.cornerRadius() ?? this.themeRadius.px(), ...ngDevMode ? [{ debugName: "resolvedCornerRadius" }] : /* istanbul ignore next */ []);
|
|
310
|
+
resolvedDotCornerRadius = computed(() => this.dotCornerRadius() ?? Math.min(this.themeRadius.px() * .5, 4), ...ngDevMode ? [{ debugName: "resolvedDotCornerRadius" }] : /* istanbul ignore next */ []);
|
|
311
|
+
layout = computed(() => computeBarLayout({
|
|
312
|
+
data: this.data(),
|
|
313
|
+
xKey: this.xKey(),
|
|
314
|
+
seriesKeys: this.root.visibleSeriesKeys(),
|
|
315
|
+
variant: this.variant(),
|
|
316
|
+
orientation: this.orientation(),
|
|
317
|
+
innerWidth: this.cx.innerWidth(),
|
|
318
|
+
innerHeight: this.cx.innerHeight(),
|
|
319
|
+
bandPadding: this.bandPadding(),
|
|
320
|
+
groupPadding: this.groupPadding(),
|
|
321
|
+
colorKey: this.colorKey(),
|
|
322
|
+
activeKey: this.activeKey(),
|
|
323
|
+
activeValue: this.activeValue()
|
|
324
|
+
}), ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
325
|
+
bars = computed(() => this.layout().bars, ...ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []);
|
|
326
|
+
dotLayout = computed(() => {
|
|
327
|
+
if (this.chartStyle() !== "dot") return null;
|
|
328
|
+
const layout = this.layout();
|
|
329
|
+
return computeBarDotCells({
|
|
330
|
+
bars: layout.bars,
|
|
331
|
+
orientation: this.orientation(),
|
|
332
|
+
innerWidth: this.cx.innerWidth(),
|
|
333
|
+
innerHeight: this.cx.innerHeight(),
|
|
334
|
+
baseline: layout.valueScale(0),
|
|
335
|
+
dotSize: this.dotSize(),
|
|
336
|
+
dotGap: this.dotGap()
|
|
337
|
+
});
|
|
338
|
+
}, ...ngDevMode ? [{ debugName: "dotLayout" }] : /* istanbul ignore next */ []);
|
|
339
|
+
dotTrackCells = computed(() => this.showDotTrack() ? this.dotLayout()?.track ?? [] : [], ...ngDevMode ? [{ debugName: "dotTrackCells" }] : /* istanbul ignore next */ []);
|
|
340
|
+
dotValueCells = computed(() => this.dotLayout()?.values ?? [], ...ngDevMode ? [{ debugName: "dotValueCells" }] : /* istanbul ignore next */ []);
|
|
341
|
+
ariaSummary = computed(() => {
|
|
342
|
+
const keys = this.root.visibleSeriesKeys();
|
|
343
|
+
return `Bar chart, ${this.data().length} categories, ${keys.length} series: ${keys.join(", ")}.`;
|
|
344
|
+
}, ...ngDevMode ? [{ debugName: "ariaSummary" }] : /* istanbul ignore next */ []);
|
|
345
|
+
visibleSeriesKeys = computed(() => this.root.visibleSeriesKeys(), ...ngDevMode ? [{ debugName: "visibleSeriesKeys" }] : /* istanbul ignore next */ []);
|
|
346
|
+
dataColumns = computed(() => [this.xKey(), ...this.visibleSeriesKeys()], ...ngDevMode ? [{ debugName: "dataColumns" }] : /* istanbul ignore next */ []);
|
|
347
|
+
barOpacity(bar) {
|
|
348
|
+
return this.emphasisOpacity(bar.active);
|
|
349
|
+
}
|
|
350
|
+
dotCellOpacity(cell) {
|
|
351
|
+
return this.emphasisOpacity(cell.active);
|
|
352
|
+
}
|
|
353
|
+
barFill(bar) {
|
|
354
|
+
return this.chartStyle() === "dot" ? "transparent" : bar.color;
|
|
355
|
+
}
|
|
356
|
+
emphasisOpacity(active) {
|
|
357
|
+
return this.activeKey() && this.activeValue() !== void 0 ? active ? 1 : .42 : 1;
|
|
358
|
+
}
|
|
359
|
+
formatValueLabel(bar) {
|
|
360
|
+
return this.valueLabelFormat()(bar.value);
|
|
361
|
+
}
|
|
362
|
+
barLabelX(bar) {
|
|
363
|
+
if (this.orientation() === "vertical") return bar.x + bar.width / 2;
|
|
364
|
+
return bar.value >= 0 ? bar.x + bar.width + 6 : bar.x - 6;
|
|
365
|
+
}
|
|
366
|
+
barLabelY(bar) {
|
|
367
|
+
if (this.orientation() === "vertical") return bar.value >= 0 ? bar.y - 8 : bar.y + bar.height + 10;
|
|
368
|
+
return bar.y + bar.height / 2;
|
|
369
|
+
}
|
|
370
|
+
barLabelAnchor(bar) {
|
|
371
|
+
if (this.orientation() === "vertical") return "middle";
|
|
372
|
+
return bar.value >= 0 ? "start" : "end";
|
|
373
|
+
}
|
|
374
|
+
onKeydown(event, index) {
|
|
375
|
+
const key = event.key;
|
|
376
|
+
let targetIndex = -1;
|
|
377
|
+
if (key === "ArrowRight" || key === "ArrowDown") targetIndex = index + 1;
|
|
378
|
+
else if (key === "ArrowLeft" || key === "ArrowUp") targetIndex = index - 1;
|
|
379
|
+
if (targetIndex >= 0 && targetIndex < this.bars().length) {
|
|
380
|
+
event.preventDefault();
|
|
381
|
+
const parent = event.currentTarget.parentElement;
|
|
382
|
+
if (parent) {
|
|
383
|
+
const targetRect = parent.querySelectorAll(".chart-bar")[targetIndex];
|
|
384
|
+
if (targetRect) targetRect.focus();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
389
|
+
minVersion: "12.0.0",
|
|
390
|
+
version: "22.2.0",
|
|
391
|
+
ngImport: i0,
|
|
392
|
+
type: BarChart,
|
|
393
|
+
deps: [],
|
|
394
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
395
|
+
});
|
|
396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
397
|
+
minVersion: "17.0.0",
|
|
398
|
+
version: "22.2.0",
|
|
399
|
+
type: BarChart,
|
|
400
|
+
isStandalone: true,
|
|
401
|
+
selector: "ChartBar",
|
|
402
|
+
inputs: {
|
|
403
|
+
data: {
|
|
404
|
+
classPropertyName: "data",
|
|
405
|
+
publicName: "data",
|
|
406
|
+
isSignal: true,
|
|
407
|
+
isRequired: true,
|
|
408
|
+
transformFunction: null
|
|
409
|
+
},
|
|
410
|
+
xKey: {
|
|
411
|
+
classPropertyName: "xKey",
|
|
412
|
+
publicName: "xKey",
|
|
413
|
+
isSignal: true,
|
|
414
|
+
isRequired: true,
|
|
415
|
+
transformFunction: null
|
|
416
|
+
},
|
|
417
|
+
orientation: {
|
|
418
|
+
classPropertyName: "orientation",
|
|
419
|
+
publicName: "orientation",
|
|
420
|
+
isSignal: true,
|
|
421
|
+
isRequired: false,
|
|
422
|
+
transformFunction: null
|
|
423
|
+
},
|
|
424
|
+
variant: {
|
|
425
|
+
classPropertyName: "variant",
|
|
426
|
+
publicName: "variant",
|
|
427
|
+
isSignal: true,
|
|
428
|
+
isRequired: false,
|
|
429
|
+
transformFunction: null
|
|
430
|
+
},
|
|
431
|
+
styleVariant: {
|
|
432
|
+
classPropertyName: "styleVariant",
|
|
433
|
+
publicName: "styleVariant",
|
|
434
|
+
isSignal: true,
|
|
435
|
+
isRequired: false,
|
|
436
|
+
transformFunction: null
|
|
437
|
+
},
|
|
438
|
+
styles: {
|
|
439
|
+
classPropertyName: "styles",
|
|
440
|
+
publicName: "styles",
|
|
441
|
+
isSignal: true,
|
|
442
|
+
isRequired: false,
|
|
443
|
+
transformFunction: null
|
|
444
|
+
},
|
|
445
|
+
margin: {
|
|
446
|
+
classPropertyName: "margin",
|
|
447
|
+
publicName: "margin",
|
|
448
|
+
isSignal: true,
|
|
449
|
+
isRequired: false,
|
|
450
|
+
transformFunction: null
|
|
451
|
+
},
|
|
452
|
+
bandPadding: {
|
|
453
|
+
classPropertyName: "bandPadding",
|
|
454
|
+
publicName: "bandPadding",
|
|
455
|
+
isSignal: true,
|
|
456
|
+
isRequired: false,
|
|
457
|
+
transformFunction: null
|
|
458
|
+
},
|
|
459
|
+
groupPadding: {
|
|
460
|
+
classPropertyName: "groupPadding",
|
|
461
|
+
publicName: "groupPadding",
|
|
462
|
+
isSignal: true,
|
|
463
|
+
isRequired: false,
|
|
464
|
+
transformFunction: null
|
|
465
|
+
},
|
|
466
|
+
cornerRadius: {
|
|
467
|
+
classPropertyName: "cornerRadius",
|
|
468
|
+
publicName: "cornerRadius",
|
|
469
|
+
isSignal: true,
|
|
470
|
+
isRequired: false,
|
|
471
|
+
transformFunction: null
|
|
472
|
+
},
|
|
473
|
+
colorKey: {
|
|
474
|
+
classPropertyName: "colorKey",
|
|
475
|
+
publicName: "colorKey",
|
|
476
|
+
isSignal: true,
|
|
477
|
+
isRequired: false,
|
|
478
|
+
transformFunction: null
|
|
479
|
+
},
|
|
480
|
+
activeKey: {
|
|
481
|
+
classPropertyName: "activeKey",
|
|
482
|
+
publicName: "activeKey",
|
|
483
|
+
isSignal: true,
|
|
484
|
+
isRequired: false,
|
|
485
|
+
transformFunction: null
|
|
486
|
+
},
|
|
487
|
+
activeValue: {
|
|
488
|
+
classPropertyName: "activeValue",
|
|
489
|
+
publicName: "activeValue",
|
|
490
|
+
isSignal: true,
|
|
491
|
+
isRequired: false,
|
|
492
|
+
transformFunction: null
|
|
493
|
+
},
|
|
494
|
+
showValueLabels: {
|
|
495
|
+
classPropertyName: "showValueLabels",
|
|
496
|
+
publicName: "showValueLabels",
|
|
497
|
+
isSignal: true,
|
|
498
|
+
isRequired: false,
|
|
499
|
+
transformFunction: null
|
|
500
|
+
},
|
|
501
|
+
valueLabelFormat: {
|
|
502
|
+
classPropertyName: "valueLabelFormat",
|
|
503
|
+
publicName: "valueLabelFormat",
|
|
504
|
+
isSignal: true,
|
|
505
|
+
isRequired: false,
|
|
506
|
+
transformFunction: null
|
|
507
|
+
},
|
|
508
|
+
dotSize: {
|
|
509
|
+
classPropertyName: "dotSize",
|
|
510
|
+
publicName: "dotSize",
|
|
511
|
+
isSignal: true,
|
|
512
|
+
isRequired: false,
|
|
513
|
+
transformFunction: null
|
|
514
|
+
},
|
|
515
|
+
dotGap: {
|
|
516
|
+
classPropertyName: "dotGap",
|
|
517
|
+
publicName: "dotGap",
|
|
518
|
+
isSignal: true,
|
|
519
|
+
isRequired: false,
|
|
520
|
+
transformFunction: null
|
|
521
|
+
},
|
|
522
|
+
dotCornerRadius: {
|
|
523
|
+
classPropertyName: "dotCornerRadius",
|
|
524
|
+
publicName: "dotCornerRadius",
|
|
525
|
+
isSignal: true,
|
|
526
|
+
isRequired: false,
|
|
527
|
+
transformFunction: null
|
|
528
|
+
},
|
|
529
|
+
showDotTrack: {
|
|
530
|
+
classPropertyName: "showDotTrack",
|
|
531
|
+
publicName: "showDotTrack",
|
|
532
|
+
isSignal: true,
|
|
533
|
+
isRequired: false,
|
|
534
|
+
transformFunction: null
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
outputs: { barClick: "barClick" },
|
|
538
|
+
host: {
|
|
539
|
+
properties: { "attr.data-style": "chartStyle()" },
|
|
540
|
+
classAttribute: "relative block h-full w-full"
|
|
541
|
+
},
|
|
542
|
+
providers: [CartesianContext],
|
|
543
|
+
ngImport: i0,
|
|
544
|
+
template: `
|
|
522
545
|
<svg:svg
|
|
523
546
|
ChartPointerTracker
|
|
524
547
|
ChartRovingFocus
|
|
@@ -612,16 +635,59 @@ class BarChart {
|
|
|
612
635
|
[rowHeaderKey]="xKey()"
|
|
613
636
|
[label]="ariaSummary()"
|
|
614
637
|
/>
|
|
615
|
-
`,
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
638
|
+
`,
|
|
639
|
+
isInline: true,
|
|
640
|
+
dependencies: [
|
|
641
|
+
{
|
|
642
|
+
kind: "directive",
|
|
643
|
+
type: ChartPointerTracker,
|
|
644
|
+
selector: "svg:svg[ChartPointerTracker]"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
kind: "directive",
|
|
648
|
+
type: ChartRovingFocus,
|
|
649
|
+
selector: "svg[ChartRovingFocus]"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
kind: "directive",
|
|
653
|
+
type: ChartMarkFocus,
|
|
654
|
+
selector: "[ChartMarkFocus]"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
kind: "component",
|
|
658
|
+
type: ChartDataTable,
|
|
659
|
+
selector: "ChartDataTable",
|
|
660
|
+
inputs: [
|
|
661
|
+
"data",
|
|
662
|
+
"columns",
|
|
663
|
+
"label",
|
|
664
|
+
"rowHeaderKey"
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
]
|
|
668
|
+
});
|
|
669
|
+
};
|
|
670
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
671
|
+
minVersion: "12.0.0",
|
|
672
|
+
version: "22.2.0",
|
|
673
|
+
ngImport: i0,
|
|
674
|
+
type: BarChart,
|
|
675
|
+
decorators: [{
|
|
676
|
+
type: Component,
|
|
677
|
+
args: [{
|
|
678
|
+
selector: "ChartBar",
|
|
679
|
+
providers: [CartesianContext],
|
|
680
|
+
imports: [
|
|
681
|
+
ChartPointerTracker,
|
|
682
|
+
ChartRovingFocus,
|
|
683
|
+
ChartMarkFocus,
|
|
684
|
+
ChartDataTable
|
|
685
|
+
],
|
|
686
|
+
host: {
|
|
687
|
+
class: "relative block h-full w-full",
|
|
688
|
+
"[attr.data-style]": "chartStyle()"
|
|
689
|
+
},
|
|
690
|
+
template: `
|
|
625
691
|
<svg:svg
|
|
626
692
|
ChartPointerTracker
|
|
627
693
|
ChartRovingFocus
|
|
@@ -715,12 +781,166 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
715
781
|
[rowHeaderKey]="xKey()"
|
|
716
782
|
[label]="ariaSummary()"
|
|
717
783
|
/>
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
784
|
+
`
|
|
785
|
+
}]
|
|
786
|
+
}],
|
|
787
|
+
propDecorators: {
|
|
788
|
+
data: [{
|
|
789
|
+
type: i0.Input,
|
|
790
|
+
args: [{
|
|
791
|
+
isSignal: true,
|
|
792
|
+
alias: "data",
|
|
793
|
+
required: true
|
|
794
|
+
}]
|
|
795
|
+
}],
|
|
796
|
+
xKey: [{
|
|
797
|
+
type: i0.Input,
|
|
798
|
+
args: [{
|
|
799
|
+
isSignal: true,
|
|
800
|
+
alias: "xKey",
|
|
801
|
+
required: true
|
|
802
|
+
}]
|
|
803
|
+
}],
|
|
804
|
+
orientation: [{
|
|
805
|
+
type: i0.Input,
|
|
806
|
+
args: [{
|
|
807
|
+
isSignal: true,
|
|
808
|
+
alias: "orientation",
|
|
809
|
+
required: false
|
|
810
|
+
}]
|
|
811
|
+
}],
|
|
812
|
+
variant: [{
|
|
813
|
+
type: i0.Input,
|
|
814
|
+
args: [{
|
|
815
|
+
isSignal: true,
|
|
816
|
+
alias: "variant",
|
|
817
|
+
required: false
|
|
818
|
+
}]
|
|
819
|
+
}],
|
|
820
|
+
styleVariant: [{
|
|
821
|
+
type: i0.Input,
|
|
822
|
+
args: [{
|
|
823
|
+
isSignal: true,
|
|
824
|
+
alias: "styleVariant",
|
|
825
|
+
required: false
|
|
826
|
+
}]
|
|
827
|
+
}],
|
|
828
|
+
styles: [{
|
|
829
|
+
type: i0.Input,
|
|
830
|
+
args: [{
|
|
831
|
+
isSignal: true,
|
|
832
|
+
alias: "styles",
|
|
833
|
+
required: false
|
|
834
|
+
}]
|
|
835
|
+
}],
|
|
836
|
+
margin: [{
|
|
837
|
+
type: i0.Input,
|
|
838
|
+
args: [{
|
|
839
|
+
isSignal: true,
|
|
840
|
+
alias: "margin",
|
|
841
|
+
required: false
|
|
842
|
+
}]
|
|
843
|
+
}],
|
|
844
|
+
bandPadding: [{
|
|
845
|
+
type: i0.Input,
|
|
846
|
+
args: [{
|
|
847
|
+
isSignal: true,
|
|
848
|
+
alias: "bandPadding",
|
|
849
|
+
required: false
|
|
850
|
+
}]
|
|
851
|
+
}],
|
|
852
|
+
groupPadding: [{
|
|
853
|
+
type: i0.Input,
|
|
854
|
+
args: [{
|
|
855
|
+
isSignal: true,
|
|
856
|
+
alias: "groupPadding",
|
|
857
|
+
required: false
|
|
858
|
+
}]
|
|
859
|
+
}],
|
|
860
|
+
cornerRadius: [{
|
|
861
|
+
type: i0.Input,
|
|
862
|
+
args: [{
|
|
863
|
+
isSignal: true,
|
|
864
|
+
alias: "cornerRadius",
|
|
865
|
+
required: false
|
|
866
|
+
}]
|
|
867
|
+
}],
|
|
868
|
+
colorKey: [{
|
|
869
|
+
type: i0.Input,
|
|
870
|
+
args: [{
|
|
871
|
+
isSignal: true,
|
|
872
|
+
alias: "colorKey",
|
|
873
|
+
required: false
|
|
874
|
+
}]
|
|
875
|
+
}],
|
|
876
|
+
activeKey: [{
|
|
877
|
+
type: i0.Input,
|
|
878
|
+
args: [{
|
|
879
|
+
isSignal: true,
|
|
880
|
+
alias: "activeKey",
|
|
881
|
+
required: false
|
|
882
|
+
}]
|
|
883
|
+
}],
|
|
884
|
+
activeValue: [{
|
|
885
|
+
type: i0.Input,
|
|
886
|
+
args: [{
|
|
887
|
+
isSignal: true,
|
|
888
|
+
alias: "activeValue",
|
|
889
|
+
required: false
|
|
890
|
+
}]
|
|
891
|
+
}],
|
|
892
|
+
showValueLabels: [{
|
|
893
|
+
type: i0.Input,
|
|
894
|
+
args: [{
|
|
895
|
+
isSignal: true,
|
|
896
|
+
alias: "showValueLabels",
|
|
897
|
+
required: false
|
|
898
|
+
}]
|
|
899
|
+
}],
|
|
900
|
+
valueLabelFormat: [{
|
|
901
|
+
type: i0.Input,
|
|
902
|
+
args: [{
|
|
903
|
+
isSignal: true,
|
|
904
|
+
alias: "valueLabelFormat",
|
|
905
|
+
required: false
|
|
906
|
+
}]
|
|
907
|
+
}],
|
|
908
|
+
dotSize: [{
|
|
909
|
+
type: i0.Input,
|
|
910
|
+
args: [{
|
|
911
|
+
isSignal: true,
|
|
912
|
+
alias: "dotSize",
|
|
913
|
+
required: false
|
|
914
|
+
}]
|
|
915
|
+
}],
|
|
916
|
+
dotGap: [{
|
|
917
|
+
type: i0.Input,
|
|
918
|
+
args: [{
|
|
919
|
+
isSignal: true,
|
|
920
|
+
alias: "dotGap",
|
|
921
|
+
required: false
|
|
922
|
+
}]
|
|
923
|
+
}],
|
|
924
|
+
dotCornerRadius: [{
|
|
925
|
+
type: i0.Input,
|
|
926
|
+
args: [{
|
|
927
|
+
isSignal: true,
|
|
928
|
+
alias: "dotCornerRadius",
|
|
929
|
+
required: false
|
|
930
|
+
}]
|
|
931
|
+
}],
|
|
932
|
+
showDotTrack: [{
|
|
933
|
+
type: i0.Input,
|
|
934
|
+
args: [{
|
|
935
|
+
isSignal: true,
|
|
936
|
+
alias: "showDotTrack",
|
|
937
|
+
required: false
|
|
938
|
+
}]
|
|
939
|
+
}],
|
|
940
|
+
barClick: [{
|
|
941
|
+
type: i0.Output,
|
|
942
|
+
args: ["barClick"]
|
|
943
|
+
}]
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
export { BarChart, computeBarDotCells, computeBarLayout };
|