@ojiepermana/angular 22.1.14 → 22.2.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/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 +1 -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-DYuysKVf.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -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 +1928 -553
- 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 +69 -18
- 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 +166 -125
- package/types/ojiepermana-angular-navigation.d.ts +708 -375
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
- 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 +446 -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,8 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { ScaleBand, ScaleLinear,
|
|
4
|
-
import * as _ojiepermana_angular_chart_core from '@ojiepermana/angular/chart/core';
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Signal, Type } from "@angular/core";
|
|
3
|
+
import { ScaleBand, ScaleLinear, ScalePoint, scaleBand, scaleLinear, scalePoint } from "d3-scale";
|
|
6
4
|
/**
|
|
7
5
|
* Theme-aware color definition for a chart series.
|
|
8
6
|
*
|
|
@@ -16,26 +14,26 @@ import * as _ojiepermana_angular_chart_core from '@ojiepermana/angular/chart/cor
|
|
|
16
14
|
* Defaults reference the theme tokens from `@ojiepermana/angular/theme/styles`
|
|
17
15
|
* (e.g. `'hsl(var(--chart-1))'`).
|
|
18
16
|
*/
|
|
19
|
-
interface ChartSeriesConfig {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
export interface ChartSeriesConfig {
|
|
18
|
+
/** Human-readable label (shown in legend, tooltip). */
|
|
19
|
+
readonly label?: string;
|
|
20
|
+
/** Optional icon component rendered next to the label. */
|
|
21
|
+
readonly icon?: Type<unknown>;
|
|
22
|
+
/** Raw color. Mutually exclusive with `theme`. */
|
|
23
|
+
readonly color?: string;
|
|
24
|
+
/** Theme-aware colors — keyed by color scheme. */
|
|
25
|
+
readonly theme?: Readonly<Record<ChartThemeKey, string>>;
|
|
28
26
|
}
|
|
29
27
|
/** Supported color scheme keys. */
|
|
30
|
-
type ChartThemeKey = 'light' | 'dark';
|
|
28
|
+
export type ChartThemeKey = 'light' | 'dark';
|
|
31
29
|
/** Map of series-key → config. */
|
|
32
|
-
type ChartConfig = Readonly<Record<string, ChartSeriesConfig>>;
|
|
30
|
+
export type ChartConfig = Readonly<Record<string, ChartSeriesConfig>>;
|
|
33
31
|
/** CSS selector under which a chart instance is scoped. */
|
|
34
|
-
declare const CHART_DATA_ATTRIBUTE = "data-chart";
|
|
32
|
+
export declare const CHART_DATA_ATTRIBUTE = "data-chart";
|
|
35
33
|
/** Default color schemes supported by the generated `<style>` block. */
|
|
36
|
-
declare const CHART_THEMES: ReadonlyArray<{
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
export declare const CHART_THEMES: ReadonlyArray<{
|
|
35
|
+
readonly key: ChartThemeKey;
|
|
36
|
+
readonly selector: string;
|
|
39
37
|
}>;
|
|
40
38
|
/**
|
|
41
39
|
* Whether a value is safe to interpolate into the generated `<style>` block.
|
|
@@ -52,7 +50,7 @@ declare const CHART_THEMES: ReadonlyArray<{
|
|
|
52
50
|
* Real values keep working: `#2563eb`, `red`, `var(--chart-2)`,
|
|
53
51
|
* `hsl(var(--chart-1))`, `rgb(0 0 0 / 50%)`, `color-mix(in srgb, red, blue)`.
|
|
54
52
|
*/
|
|
55
|
-
declare function isSafeCssColorValue(value: string): boolean;
|
|
53
|
+
export declare function isSafeCssColorValue(value: string): boolean;
|
|
56
54
|
/**
|
|
57
55
|
* Generate the CSS rule-set for a chart instance: one `--color-<key>` per
|
|
58
56
|
* series, scoped to the owning `[data-chart]` element, with optional dark
|
|
@@ -67,7 +65,7 @@ declare function isSafeCssColorValue(value: string): boolean;
|
|
|
67
65
|
* @param chartId Unique chart id (used as attribute value).
|
|
68
66
|
* @param config Series configuration map.
|
|
69
67
|
*/
|
|
70
|
-
declare function buildChartCss(chartId: string, config: ChartConfig): string;
|
|
68
|
+
export declare function buildChartCss(chartId: string, config: ChartConfig): string;
|
|
71
69
|
/**
|
|
72
70
|
* Escape a string so it is safe to use as a CSS custom-property identifier or as
|
|
73
71
|
* an attribute selector value. The result only ever holds `[A-Za-z0-9_-]`.
|
|
@@ -82,9 +80,9 @@ declare function buildChartCss(chartId: string, config: ChartConfig): string;
|
|
|
82
80
|
* declarations into the same rule so the last one wins, and
|
|
83
81
|
* {@link seriesColorVar} then resolves both series to that one token.
|
|
84
82
|
*/
|
|
85
|
-
declare function escapeCssIdent(input: string): string;
|
|
83
|
+
export declare function escapeCssIdent(input: string): string;
|
|
86
84
|
/** Resolve the `var(--color-<key>)` reference for a given series. */
|
|
87
|
-
declare function seriesColorVar(seriesKey: string): string;
|
|
85
|
+
export declare function seriesColorVar(seriesKey: string): string;
|
|
88
86
|
/**
|
|
89
87
|
* Resolve a raw per-datum colour to a paint value for an SVG attribute
|
|
90
88
|
* (`[attr.fill]`, `[attr.stroke]`).
|
|
@@ -104,8 +102,7 @@ declare function seriesColorVar(seriesKey: string): string;
|
|
|
104
102
|
* key rather than becoming the colour red. That is the existing behaviour and
|
|
105
103
|
* changing it is a separate decision.
|
|
106
104
|
*/
|
|
107
|
-
declare function resolveSeriesColor(raw: unknown, fallback: string): string;
|
|
108
|
-
|
|
105
|
+
export declare function resolveSeriesColor(raw: unknown, fallback: string): string;
|
|
109
106
|
/**
|
|
110
107
|
* Resolves the live spacing unit in pixels for SVG chart geometry, and re-emits
|
|
111
108
|
* when the global `theme-space` axis switches.
|
|
@@ -130,28 +127,27 @@ declare function resolveSeriesColor(raw: unknown, fallback: string): string;
|
|
|
130
127
|
*
|
|
131
128
|
* SSR-safe: with no document it returns the fallback and skips observing.
|
|
132
129
|
*/
|
|
133
|
-
declare class ChartThemeSpace {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
130
|
+
export declare class ChartThemeSpace {
|
|
131
|
+
private readonly document;
|
|
132
|
+
private readonly unitPx;
|
|
133
|
+
/** Resolved spacing unit (`--spacing-base`) in px; reactive to the theme-space axis. */
|
|
134
|
+
readonly px: import("@angular/core").Signal<number>;
|
|
135
|
+
constructor();
|
|
136
|
+
/** Scale one margin constant, expressed in spacing units, into pixels. */
|
|
137
|
+
scale(units: number): number;
|
|
138
|
+
private readUnitPx;
|
|
139
|
+
private toPx;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartThemeSpace, never>;
|
|
141
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
145
142
|
}
|
|
146
|
-
|
|
147
143
|
/** A single row of chart data — one categorical key + N numeric series. */
|
|
148
|
-
type ChartDatum = Readonly<Record<string, unknown>>;
|
|
144
|
+
export type ChartDatum = Readonly<Record<string, unknown>>;
|
|
149
145
|
/** Render-area margins inside the chart's SVG (px). */
|
|
150
|
-
interface ChartMargin {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
export interface ChartMargin {
|
|
147
|
+
readonly top: number;
|
|
148
|
+
readonly right: number;
|
|
149
|
+
readonly bottom: number;
|
|
150
|
+
readonly left: number;
|
|
155
151
|
}
|
|
156
152
|
/**
|
|
157
153
|
* Default margins, one per chart geometry. THREE constants, not one: the
|
|
@@ -162,11 +158,11 @@ interface ChartMargin {
|
|
|
162
158
|
* y tick labels. Polar charts have no axes to make room for. Radar needs
|
|
163
159
|
* symmetric room for its outer labels.
|
|
164
160
|
*/
|
|
165
|
-
declare const DEFAULT_CARTESIAN_MARGIN: ChartMargin;
|
|
161
|
+
export declare const DEFAULT_CARTESIAN_MARGIN: ChartMargin;
|
|
166
162
|
/** Polar geometry (pie, radial): no axis gutters. */
|
|
167
|
-
declare const DEFAULT_POLAR_MARGIN: ChartMargin;
|
|
163
|
+
export declare const DEFAULT_POLAR_MARGIN: ChartMargin;
|
|
168
164
|
/** Radar geometry: symmetric room for the outer axis labels. */
|
|
169
|
-
declare const DEFAULT_RADAR_MARGIN: ChartMargin;
|
|
165
|
+
export declare const DEFAULT_RADAR_MARGIN: ChartMargin;
|
|
170
166
|
/**
|
|
171
167
|
* The same three margins expressed in SPACING UNITS rather than pixels.
|
|
172
168
|
*
|
|
@@ -179,14 +175,14 @@ declare const DEFAULT_RADAR_MARGIN: ChartMargin;
|
|
|
179
175
|
* unit maths reproduces them precisely: 4px per unit gives back 8/8/24/40,
|
|
180
176
|
* 8 all round, and 24 all round.
|
|
181
177
|
*/
|
|
182
|
-
declare const DEFAULT_CARTESIAN_MARGIN_UNITS: ChartMargin;
|
|
183
|
-
declare const DEFAULT_POLAR_MARGIN_UNITS: ChartMargin;
|
|
184
|
-
declare const DEFAULT_RADAR_MARGIN_UNITS: ChartMargin;
|
|
178
|
+
export declare const DEFAULT_CARTESIAN_MARGIN_UNITS: ChartMargin;
|
|
179
|
+
export declare const DEFAULT_POLAR_MARGIN_UNITS: ChartMargin;
|
|
180
|
+
export declare const DEFAULT_RADAR_MARGIN_UNITS: ChartMargin;
|
|
185
181
|
/** Axis orientation for cartesian charts. */
|
|
186
|
-
type ChartOrientation = 'vertical' | 'horizontal';
|
|
182
|
+
export type ChartOrientation = 'vertical' | 'horizontal';
|
|
187
183
|
/** Primary axis scale — band for categorical, linear for numeric. */
|
|
188
|
-
type CategoryScale = ScaleBand<string>;
|
|
189
|
-
type ValueScale = ScaleLinear<number, number>;
|
|
184
|
+
export type CategoryScale = ScaleBand<string>;
|
|
185
|
+
export type ValueScale = ScaleLinear<number, number>;
|
|
190
186
|
/**
|
|
191
187
|
* Cartesian plotting frame shared between a chart type (Bar, Line, Area…)
|
|
192
188
|
* and its axis / grid primitives.
|
|
@@ -195,28 +191,28 @@ type ValueScale = ScaleLinear<number, number>;
|
|
|
195
191
|
* descendants read them via signals and re-render when dimensions or data
|
|
196
192
|
* change.
|
|
197
193
|
*/
|
|
198
|
-
declare class CartesianContext {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
194
|
+
export declare class CartesianContext {
|
|
195
|
+
/** Inner width (outer width − margin.left − margin.right). */
|
|
196
|
+
readonly innerWidth: import("@angular/core").WritableSignal<number>;
|
|
197
|
+
/** Inner height (outer height − margin.top − margin.bottom). */
|
|
198
|
+
readonly innerHeight: import("@angular/core").WritableSignal<number>;
|
|
199
|
+
/** Margins around the plotting area. */
|
|
200
|
+
readonly margin: import("@angular/core").WritableSignal<ChartMargin>;
|
|
201
|
+
/** Layout orientation (drives which axis holds the band scale). */
|
|
202
|
+
readonly orientation: import("@angular/core").WritableSignal<ChartOrientation>;
|
|
203
|
+
/** Band (categorical) scale. */
|
|
204
|
+
readonly categoryScale: import("@angular/core").WritableSignal<CategoryScale | null>;
|
|
205
|
+
/** Linear (numeric) scale. */
|
|
206
|
+
readonly valueScale: import("@angular/core").WritableSignal<ValueScale | null>;
|
|
207
|
+
/** Ordered category domain (e.g. x labels for vertical, y labels for horizontal). */
|
|
208
|
+
readonly categories: import("@angular/core").WritableSignal<readonly string[]>;
|
|
209
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CartesianContext, never>;
|
|
210
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
215
211
|
}
|
|
216
212
|
/** Resolve the scale that maps to the X axis for a given orientation. */
|
|
217
|
-
declare function xScale(ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>): Signal<CategoryScale | ValueScale | null>;
|
|
213
|
+
export declare function xScale(ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>): Signal<CategoryScale | ValueScale | null>;
|
|
218
214
|
/** Resolve the scale that maps to the Y axis for a given orientation. */
|
|
219
|
-
declare function yScale(ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>): Signal<CategoryScale | ValueScale | null>;
|
|
215
|
+
export declare function yScale(ctx: Pick<CartesianContext, 'orientation' | 'categoryScale' | 'valueScale'>): Signal<CategoryScale | ValueScale | null>;
|
|
220
216
|
/**
|
|
221
217
|
* The plot margin actually in effect: the consumer's `margin` input when they
|
|
222
218
|
* set one, otherwise the default scaled by the live spacing unit.
|
|
@@ -229,8 +225,7 @@ declare function yScale(ctx: Pick<CartesianContext, 'orientation' | 'categorySca
|
|
|
229
225
|
* to be able to tell "the caller wants 8px here" apart from "nobody said", and
|
|
230
226
|
* an eagerly-defaulted object cannot express the difference.
|
|
231
227
|
*/
|
|
232
|
-
declare function resolveChartMargin(margin: Signal<ChartMargin | null>, units: ChartMargin, space: ChartThemeSpace): Signal<ChartMargin>;
|
|
233
|
-
|
|
228
|
+
export declare function resolveChartMargin(margin: Signal<ChartMargin | null>, units: ChartMargin, space: ChartThemeSpace): Signal<ChartMargin>;
|
|
234
229
|
/**
|
|
235
230
|
* Emitted when a datum-bearing mark is activated by pointer or keyboard: a
|
|
236
231
|
* line or area dot, a bar, a pie slice, a radial bar, a scatter point.
|
|
@@ -244,34 +239,33 @@ declare function resolveChartMargin(margin: Signal<ChartMargin | null>, units: C
|
|
|
244
239
|
* `output<...ClickEvent>()` in the library is written without a type argument.
|
|
245
240
|
* It stays an `interface` so a consumer can still `extends` it.
|
|
246
241
|
*/
|
|
247
|
-
interface ChartPointClickEvent<TDatum = ChartDatum> {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
242
|
+
export interface ChartPointClickEvent<TDatum = ChartDatum> {
|
|
243
|
+
/** Series the mark belongs to. This is the `--color-<key>` key. */
|
|
244
|
+
readonly seriesKey: string;
|
|
245
|
+
/**
|
|
246
|
+
* Index into the chart's own `data()` array. Always absolute: the line and
|
|
247
|
+
* area charts add their viewport offset before emitting, so a zoomed chart
|
|
248
|
+
* still reports the row the user actually clicked.
|
|
249
|
+
*/
|
|
250
|
+
readonly datumIndex: number;
|
|
251
|
+
/** Categorical label of the mark. */
|
|
252
|
+
readonly category: string;
|
|
253
|
+
/** Numeric magnitude of the mark. */
|
|
254
|
+
readonly value: number;
|
|
255
|
+
/** The source row at `datumIndex`. */
|
|
256
|
+
readonly datum: TDatum;
|
|
262
257
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
readonly endIndex: number;
|
|
258
|
+
export interface ChartIndexRange {
|
|
259
|
+
readonly startIndex: number;
|
|
260
|
+
readonly endIndex: number;
|
|
267
261
|
}
|
|
268
|
-
type NumericDomain = readonly [number, number];
|
|
269
|
-
declare function normalizeIndexRange(start: number, end: number, maxCount: number): ChartIndexRange | null;
|
|
270
|
-
declare function effectiveIndexRange(range: ChartIndexRange | null, maxCount: number): ChartIndexRange | null;
|
|
271
|
-
declare function indexRangeSize(range: ChartIndexRange | null, maxCount: number): number;
|
|
272
|
-
declare function sliceByIndexRange<T>(data: readonly T[], range: ChartIndexRange | null): readonly T[];
|
|
273
|
-
declare function zoomIndexRange(current: ChartIndexRange | null, maxCount: number, anchorIndex: number, factor: number): ChartIndexRange | null;
|
|
274
|
-
declare function panIndexRange(current: ChartIndexRange | null, maxCount: number, deltaSteps: number): ChartIndexRange | null;
|
|
262
|
+
export type NumericDomain = readonly [number, number];
|
|
263
|
+
export declare function normalizeIndexRange(start: number, end: number, maxCount: number): ChartIndexRange | null;
|
|
264
|
+
export declare function effectiveIndexRange(range: ChartIndexRange | null, maxCount: number): ChartIndexRange | null;
|
|
265
|
+
export declare function indexRangeSize(range: ChartIndexRange | null, maxCount: number): number;
|
|
266
|
+
export declare function sliceByIndexRange<T>(data: readonly T[], range: ChartIndexRange | null): readonly T[];
|
|
267
|
+
export declare function zoomIndexRange(current: ChartIndexRange | null, maxCount: number, anchorIndex: number, factor: number): ChartIndexRange | null;
|
|
268
|
+
export declare function panIndexRange(current: ChartIndexRange | null, maxCount: number, deltaSteps: number): ChartIndexRange | null;
|
|
275
269
|
/**
|
|
276
270
|
* The value domain for a chart drawn against a zero baseline.
|
|
277
271
|
*
|
|
@@ -283,21 +277,19 @@ declare function panIndexRange(current: ChartIndexRange | null, maxCount: number
|
|
|
283
277
|
* d3 maps to the middle of the range for every value, so it is opened by one
|
|
284
278
|
* unit instead.
|
|
285
279
|
*/
|
|
286
|
-
declare function zeroBaselineDomain(minValue: number, maxValue: number): NumericDomain;
|
|
287
|
-
declare function normalizeNumericDomain(a: number, b: number): NumericDomain;
|
|
288
|
-
declare function zoomNumericDomain(current: NumericDomain, full: NumericDomain, anchor: number, factor: number): NumericDomain;
|
|
289
|
-
declare function panNumericDomain(current: NumericDomain, full: NumericDomain, delta: number): NumericDomain;
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
|
|
280
|
+
export declare function zeroBaselineDomain(minValue: number, maxValue: number): NumericDomain;
|
|
281
|
+
export declare function normalizeNumericDomain(a: number, b: number): NumericDomain;
|
|
282
|
+
export declare function zoomNumericDomain(current: NumericDomain, full: NumericDomain, anchor: number, factor: number): NumericDomain;
|
|
283
|
+
export declare function panNumericDomain(current: NumericDomain, full: NumericDomain, delta: number): NumericDomain;
|
|
284
|
+
export declare class CategoricalViewportContext {
|
|
285
|
+
readonly dataCount: import("@angular/core").WritableSignal<number>;
|
|
286
|
+
readonly brushRange: import("@angular/core").WritableSignal<ChartIndexRange | null>;
|
|
287
|
+
readonly zoomRange: import("@angular/core").WritableSignal<ChartIndexRange | null>;
|
|
288
|
+
readonly hasZoom: import("@angular/core").Signal<boolean>;
|
|
289
|
+
resetZoom(): void;
|
|
290
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CategoricalViewportContext, never>;
|
|
291
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
299
292
|
}
|
|
300
|
-
|
|
301
293
|
/**
|
|
302
294
|
* The scaffolding every cartesian chart needs, in one place.
|
|
303
295
|
*
|
|
@@ -318,81 +310,81 @@ declare class CategoricalViewportContext {
|
|
|
318
310
|
* `datumIndex` here is the index into the VISIBLE window, not the full dataset.
|
|
319
311
|
* {@link CartesianChartSetup.resolveDatumIndex} converts it.
|
|
320
312
|
*/
|
|
321
|
-
interface CartesianMark {
|
|
322
|
-
|
|
323
|
-
|
|
313
|
+
export interface CartesianMark {
|
|
314
|
+
readonly seriesKey: string;
|
|
315
|
+
readonly datumIndex: number;
|
|
324
316
|
}
|
|
325
|
-
interface CartesianChartOptions<M extends CartesianMark, E> {
|
|
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
|
-
|
|
317
|
+
export interface CartesianChartOptions<M extends CartesianMark, E> {
|
|
318
|
+
/** The full, unwindowed dataset. A thunk so it is only read inside reactive contexts. */
|
|
319
|
+
readonly data: () => readonly ChartDatum[];
|
|
320
|
+
/** The chart's `margin` input. */
|
|
321
|
+
readonly margin: () => ChartMargin;
|
|
322
|
+
/**
|
|
323
|
+
* Present when the chart provides a `CartesianContext` (line, area, bar). The
|
|
324
|
+
* setup owns orientation, margin, and the inner geometry on it; scales and
|
|
325
|
+
* categories stay with the chart, in {@link publishLayout}. Scatter omits it.
|
|
326
|
+
*/
|
|
327
|
+
readonly cartesian?: {
|
|
328
|
+
readonly context: CartesianContext;
|
|
329
|
+
readonly orientation: () => ChartOrientation;
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Present when the chart supports index brush or zoom (line, area). It drives
|
|
333
|
+
* `visibleStartIndex` and `visibleData`, and the setup keeps its `dataCount`
|
|
334
|
+
* in step with the data. Bar and scatter omit it, and their `visibleData` is
|
|
335
|
+
* simply `data()`.
|
|
336
|
+
*/
|
|
337
|
+
readonly viewport?: CategoricalViewportContext;
|
|
338
|
+
/**
|
|
339
|
+
* The chart-specific half of the layout effect: push this chart's own layout
|
|
340
|
+
* downstream. It runs inside the single effect the setup creates, so every
|
|
341
|
+
* signal it reads is tracked. It receives the inner geometry so it never has
|
|
342
|
+
* to reach back into the object it is being passed to.
|
|
343
|
+
*/
|
|
344
|
+
readonly publishLayout?: (inner: {
|
|
345
|
+
readonly width: number;
|
|
346
|
+
readonly height: number;
|
|
347
|
+
}) => void;
|
|
348
|
+
/** The chart's click output. */
|
|
349
|
+
readonly click: {
|
|
350
|
+
/** Must be a bound lambda, not a detached `output.emit` reference. */
|
|
351
|
+
readonly emit: (event: E) => void;
|
|
352
|
+
/** `datumIndex` is absolute (the viewport offset is already applied). */
|
|
353
|
+
readonly payload: (mark: M, datumIndex: number, datum: ChartDatum) => E;
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* The aria-label for one mark. `seriesLabel` arrives already resolved from the
|
|
357
|
+
* chart config, so each chart only writes its own sentence.
|
|
358
|
+
*/
|
|
359
|
+
readonly ariaLabel: (mark: M, seriesLabel: string) => string;
|
|
368
360
|
}
|
|
369
|
-
interface CartesianChartSetup<M extends CartesianMark> {
|
|
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
|
-
|
|
361
|
+
export interface CartesianChartSetup<M extends CartesianMark> {
|
|
362
|
+
/** Plot width, margins removed, never negative. */
|
|
363
|
+
readonly innerWidth: Signal<number>;
|
|
364
|
+
/** Plot height, margins removed, never negative. */
|
|
365
|
+
readonly innerHeight: Signal<number>;
|
|
366
|
+
/** `viewBox` for the outer svg, in RAW dimensions (not the inner geometry). */
|
|
367
|
+
readonly viewBox: Signal<string>;
|
|
368
|
+
/** `transform` that moves the inner group inside the margins. */
|
|
369
|
+
readonly innerTransform: Signal<string>;
|
|
370
|
+
/** First absolute index the current window shows. `0` without a viewport. */
|
|
371
|
+
readonly visibleStartIndex: Signal<number>;
|
|
372
|
+
/** The windowed data, or the whole dataset when there is no viewport. */
|
|
373
|
+
readonly visibleData: Signal<readonly ChartDatum[]>;
|
|
374
|
+
/** Absolute index into the full dataset for a rendered mark. */
|
|
375
|
+
resolveDatumIndex(mark: M): number;
|
|
376
|
+
/** `config[key].label` when the chart config names the series, else the key. */
|
|
377
|
+
seriesLabel(seriesKey: string): string;
|
|
378
|
+
/** The four handlers a chart template binds. */
|
|
379
|
+
pointAriaLabel(mark: M): string;
|
|
380
|
+
emitClick(mark: M): void;
|
|
381
|
+
/**
|
|
382
|
+
* Accepts a pointer gesture as well as keyboard focus: a chart whose marks are
|
|
383
|
+
* the only hover surface (scatter has no `ChartPointerTracker`) has nothing
|
|
384
|
+
* else to publish an active point from.
|
|
385
|
+
*/
|
|
386
|
+
setActivePoint(event: PointerEvent | FocusEvent, mark: M): void;
|
|
387
|
+
clearActivePoint(): void;
|
|
396
388
|
}
|
|
397
389
|
/**
|
|
398
390
|
* Build the shared cartesian scaffolding.
|
|
@@ -400,8 +392,7 @@ interface CartesianChartSetup<M extends CartesianMark> {
|
|
|
400
392
|
* MUST be called in an injection context, so a field initializer or the
|
|
401
393
|
* constructor: it injects `ChartContext` and creates one `effect`.
|
|
402
394
|
*/
|
|
403
|
-
declare function setupCartesianChart<M extends CartesianMark, E>(options: CartesianChartOptions<M, E>): CartesianChartSetup<M>;
|
|
404
|
-
|
|
395
|
+
export declare function setupCartesianChart<M extends CartesianMark, E>(options: CartesianChartOptions<M, E>): CartesianChartSetup<M>;
|
|
405
396
|
/**
|
|
406
397
|
* The scaffolding every polar chart needs, in one place.
|
|
407
398
|
*
|
|
@@ -424,28 +415,28 @@ declare function setupCartesianChart<M extends CartesianMark, E>(options: Cartes
|
|
|
424
415
|
* A polar chart draws its whole dataset at once, so there is no visible window
|
|
425
416
|
* and `datumIndex` is always absolute.
|
|
426
417
|
*/
|
|
427
|
-
interface PolarMark {
|
|
428
|
-
|
|
429
|
-
|
|
418
|
+
export interface PolarMark {
|
|
419
|
+
readonly seriesKey: string;
|
|
420
|
+
readonly datumIndex: number;
|
|
430
421
|
}
|
|
431
|
-
interface PolarChartOptions {
|
|
432
|
-
|
|
433
|
-
|
|
422
|
+
export interface PolarChartOptions {
|
|
423
|
+
/** The chart's `margin` input. */
|
|
424
|
+
readonly margin: () => ChartMargin;
|
|
434
425
|
}
|
|
435
|
-
interface PolarChartSetup {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
426
|
+
export interface PolarChartSetup {
|
|
427
|
+
/** Plot width, margins removed, never negative. */
|
|
428
|
+
readonly innerWidth: Signal<number>;
|
|
429
|
+
/** Plot height, margins removed, never negative. */
|
|
430
|
+
readonly innerHeight: Signal<number>;
|
|
431
|
+
/** `viewBox` for the outer svg, in RAW dimensions (not the inner geometry). */
|
|
432
|
+
readonly viewBox: Signal<string>;
|
|
433
|
+
/** `transform` that moves the inner group inside the margins. */
|
|
434
|
+
readonly innerTransform: Signal<string>;
|
|
435
|
+
/** `config[key].label` when the chart config names the series, else the key. */
|
|
436
|
+
seriesLabel(seriesKey: string): string;
|
|
437
|
+
/** The two handlers a chart template binds. */
|
|
438
|
+
setActivePoint(event: PointerEvent | FocusEvent, mark: PolarMark): void;
|
|
439
|
+
clearActivePoint(): void;
|
|
449
440
|
}
|
|
450
441
|
/**
|
|
451
442
|
* Build the shared polar scaffolding.
|
|
@@ -453,20 +444,19 @@ interface PolarChartSetup {
|
|
|
453
444
|
* MUST be called in an injection context, so a field initializer or the
|
|
454
445
|
* constructor: it injects `ChartContext`.
|
|
455
446
|
*/
|
|
456
|
-
declare function setupPolarChart(options: PolarChartOptions): PolarChartSetup;
|
|
457
|
-
|
|
447
|
+
export declare function setupPolarChart(options: PolarChartOptions): PolarChartSetup;
|
|
458
448
|
/** Pixel dimensions of the chart render area. */
|
|
459
|
-
interface ChartDimensions {
|
|
460
|
-
|
|
461
|
-
|
|
449
|
+
export interface ChartDimensions {
|
|
450
|
+
readonly width: number;
|
|
451
|
+
readonly height: number;
|
|
462
452
|
}
|
|
463
453
|
/** Active data point (for tooltip / crosshair) shared across primitives. */
|
|
464
|
-
interface ChartActivePoint {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
454
|
+
export interface ChartActivePoint {
|
|
455
|
+
readonly index: number;
|
|
456
|
+
readonly datumIndex?: number;
|
|
457
|
+
readonly seriesKey?: string;
|
|
458
|
+
readonly clientX?: number;
|
|
459
|
+
readonly clientY?: number;
|
|
470
460
|
}
|
|
471
461
|
/**
|
|
472
462
|
* Shared chart state provided by `ChartContainer` to all nested chart
|
|
@@ -475,27 +465,26 @@ interface ChartActivePoint {
|
|
|
475
465
|
* All state is exposed as signals so consumers can derive computed state
|
|
476
466
|
* (scales, visible series, tooltip position) without manual subscriptions.
|
|
477
467
|
*/
|
|
478
|
-
declare class ChartContext {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
468
|
+
export declare class ChartContext {
|
|
469
|
+
/** Stable instance id — used in the `data-chart` attribute and CSS scope. */
|
|
470
|
+
readonly id: import("@angular/core").WritableSignal<string>;
|
|
471
|
+
/** User-provided series config. */
|
|
472
|
+
readonly config: import("@angular/core").WritableSignal<Readonly<Record<string, import("@ojiepermana/angular/chart/core").ChartSeriesConfig>>>;
|
|
473
|
+
/** Measured render-area dimensions (ResizeObserver-driven). */
|
|
474
|
+
readonly dimensions: import("@angular/core").WritableSignal<ChartDimensions>;
|
|
475
|
+
/** Currently highlighted data point (tooltip / crosshair). */
|
|
476
|
+
readonly activePoint: import("@angular/core").WritableSignal<ChartActivePoint | null>;
|
|
477
|
+
/** Series keys the user has toggled off via legend. */
|
|
478
|
+
readonly hiddenSeries: import("@angular/core").WritableSignal<ReadonlySet<string>>;
|
|
479
|
+
/** Ordered list of series keys (from `config`). */
|
|
480
|
+
readonly seriesKeys: Signal<readonly string[]>;
|
|
481
|
+
/** Series keys currently visible (config order minus `hiddenSeries`). */
|
|
482
|
+
readonly visibleSeriesKeys: Signal<readonly string[]>;
|
|
483
|
+
/** Toggle visibility of a series. */
|
|
484
|
+
toggleSeries(key: string): void;
|
|
485
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartContext, never>;
|
|
486
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
497
487
|
}
|
|
498
|
-
|
|
499
488
|
/**
|
|
500
489
|
* Emits a scoped `<style>` block mapping every series key in the current
|
|
501
490
|
* `ChartConfig` to a `--color-<key>` CSS custom property, scoped to
|
|
@@ -508,17 +497,16 @@ declare class ChartContext {
|
|
|
508
497
|
*
|
|
509
498
|
* Consumers never instantiate this directly — `ChartContainer` renders it.
|
|
510
499
|
*/
|
|
511
|
-
declare class ChartStyle {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
500
|
+
export declare class ChartStyle {
|
|
501
|
+
private readonly ctx;
|
|
502
|
+
private readonly host;
|
|
503
|
+
private readonly renderer;
|
|
504
|
+
private styleEl;
|
|
505
|
+
protected readonly css: import("@angular/core").Signal<string>;
|
|
506
|
+
constructor();
|
|
507
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartStyle, never>;
|
|
508
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartStyle, "ChartStyle", never, {}, {}, never, never, true, never>;
|
|
520
509
|
}
|
|
521
|
-
|
|
522
510
|
/**
|
|
523
511
|
* Presentational style of a chart family.
|
|
524
512
|
*
|
|
@@ -530,7 +518,7 @@ declare class ChartStyle {
|
|
|
530
518
|
* library) but must only use theme CSS variables (`--muted`, `--color-<key>`,
|
|
531
519
|
* …) so they follow the active theme automatically.
|
|
532
520
|
*/
|
|
533
|
-
type ChartStyleVariant = 'base';
|
|
521
|
+
export type ChartStyleVariant = 'base';
|
|
534
522
|
/**
|
|
535
523
|
* Resolve the effective chart style from the canonical `styleVariant` input and
|
|
536
524
|
* the deprecated `styles` input.
|
|
@@ -545,8 +533,7 @@ type ChartStyleVariant = 'base';
|
|
|
545
533
|
* each class body: the compiler discovers signal inputs by looking at the field
|
|
546
534
|
* initializer, and an `input()` hidden behind a helper is never registered.
|
|
547
535
|
*/
|
|
548
|
-
declare function resolveChartStyle<T extends string>(styleVariant: () => T | undefined, styles: () => T): Signal<T>;
|
|
549
|
-
|
|
536
|
+
export declare function resolveChartStyle<T extends string>(styleVariant: () => T | undefined, styles: () => T): Signal<T>;
|
|
550
537
|
/**
|
|
551
538
|
* Root of every chart. Provides `ChartContext` to descendants, reflects the
|
|
552
539
|
* chart id via `data-chart`, injects the per-instance CSS-variable
|
|
@@ -565,61 +552,95 @@ declare function resolveChartStyle<T extends string>(styleVariant: () => T | und
|
|
|
565
552
|
* rendered as a centered row beneath it. Render-area dimensions are measured on
|
|
566
553
|
* the chart area only, so the legend never shrinks the chart.
|
|
567
554
|
*/
|
|
568
|
-
declare class ChartContainer {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
555
|
+
export declare class ChartContainer {
|
|
556
|
+
protected readonly ctx: ChartContext;
|
|
557
|
+
private readonly zone;
|
|
558
|
+
private readonly platformId;
|
|
559
|
+
private readonly destroyRef;
|
|
560
|
+
private readonly areaRef;
|
|
561
|
+
/** Series configuration. Required for color / label resolution. */
|
|
562
|
+
readonly config: import("@angular/core").InputSignal<Readonly<Record<string, import("@ojiepermana/angular/chart/core").ChartSeriesConfig>>>;
|
|
563
|
+
/**
|
|
564
|
+
* Tailwind aspect-ratio utility for the chart render area. Defaults to
|
|
565
|
+
* `aspect-video` for cartesian charts; override with `aspect-square` for
|
|
566
|
+
* radial / pie layouts, or e.g. `aspect-auto h-80` for a fixed height.
|
|
567
|
+
*/
|
|
568
|
+
readonly aspect: import("@angular/core").InputSignal<string>;
|
|
569
|
+
protected readonly areaClass: import("@angular/core").Signal<string>;
|
|
570
|
+
/**
|
|
571
|
+
* Optional explicit id override. When omitted, a stable auto-id is
|
|
572
|
+
* generated (`chart-<n>`), unique across the document.
|
|
573
|
+
*/
|
|
574
|
+
readonly chartId: import("@angular/core").InputSignal<string | null>;
|
|
575
|
+
constructor();
|
|
576
|
+
private observeSize;
|
|
577
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartContainer, never>;
|
|
578
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartContainer, "Chart", never, {
|
|
579
|
+
"config": {
|
|
580
|
+
"alias": "config";
|
|
581
|
+
"required": true;
|
|
582
|
+
"isSignal": true;
|
|
583
|
+
};
|
|
584
|
+
"aspect": {
|
|
585
|
+
"alias": "aspect";
|
|
586
|
+
"required": false;
|
|
587
|
+
"isSignal": true;
|
|
588
|
+
};
|
|
589
|
+
"chartId": {
|
|
590
|
+
"alias": "chartId";
|
|
591
|
+
"required": false;
|
|
592
|
+
"isSignal": true;
|
|
593
|
+
};
|
|
594
|
+
}, {}, never, ["*", "ChartLegend"], true, never>;
|
|
592
595
|
}
|
|
593
|
-
|
|
594
596
|
/** Screen-reader fallback for charts whose visual SVG is not tabular content. */
|
|
595
|
-
declare class ChartDataTable {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
597
|
+
export declare class ChartDataTable {
|
|
598
|
+
readonly data: import("@angular/core").InputSignal<readonly Readonly<Record<string, unknown>>[]>;
|
|
599
|
+
readonly columns: import("@angular/core").InputSignal<readonly string[]>;
|
|
600
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
601
|
+
readonly rowHeaderKey: import("@angular/core").InputSignal<string | null>;
|
|
602
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartDataTable, never>;
|
|
603
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartDataTable, "ChartDataTable", never, {
|
|
604
|
+
"data": {
|
|
605
|
+
"alias": "data";
|
|
606
|
+
"required": true;
|
|
607
|
+
"isSignal": true;
|
|
608
|
+
};
|
|
609
|
+
"columns": {
|
|
610
|
+
"alias": "columns";
|
|
611
|
+
"required": true;
|
|
612
|
+
"isSignal": true;
|
|
613
|
+
};
|
|
614
|
+
"label": {
|
|
615
|
+
"alias": "label";
|
|
616
|
+
"required": false;
|
|
617
|
+
"isSignal": true;
|
|
618
|
+
};
|
|
619
|
+
"rowHeaderKey": {
|
|
620
|
+
"alias": "rowHeaderKey";
|
|
621
|
+
"required": false;
|
|
622
|
+
"isSignal": true;
|
|
623
|
+
};
|
|
624
|
+
}, {}, never, never, true, never>;
|
|
602
625
|
}
|
|
603
|
-
|
|
604
626
|
/**
|
|
605
627
|
* Keeps dense SVG charts to one tab stop while preserving arrow-key access to
|
|
606
628
|
* every interactive mark. Marks are discovered by their `role="img"` and
|
|
607
629
|
* `tabindex` attributes so chart implementations do not need a shared base
|
|
608
630
|
* class or additional DOM wrappers.
|
|
609
631
|
*/
|
|
610
|
-
declare class ChartRovingFocus {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
632
|
+
export declare class ChartRovingFocus {
|
|
633
|
+
private readonly host;
|
|
634
|
+
private readonly destroyRef;
|
|
635
|
+
private activeMark;
|
|
636
|
+
constructor();
|
|
637
|
+
protected onFocusIn(event: FocusEvent): void;
|
|
638
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
639
|
+
private marks;
|
|
640
|
+
private syncTabStops;
|
|
641
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartRovingFocus, never>;
|
|
642
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartRovingFocus, "svg[ChartRovingFocus]", never, {}, {}, never, never, true, never>;
|
|
621
643
|
}
|
|
622
|
-
|
|
623
644
|
/**
|
|
624
645
|
* The focus treatment shared by every interactive chart mark.
|
|
625
646
|
*
|
|
@@ -634,36 +655,34 @@ declare class ChartRovingFocus {
|
|
|
634
655
|
* `outline-none` lives here rather than in the templates so the suppression and
|
|
635
656
|
* its replacement can never drift apart.
|
|
636
657
|
*/
|
|
637
|
-
declare class ChartMarkFocus {
|
|
638
|
-
|
|
639
|
-
|
|
658
|
+
export declare class ChartMarkFocus {
|
|
659
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartMarkFocus, never>;
|
|
660
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartMarkFocus, "[ChartMarkFocus]", never, {}, {}, never, never, true, never>;
|
|
640
661
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
|
|
662
|
+
export declare class ScatterViewportContext {
|
|
663
|
+
readonly innerWidth: import("@angular/core").WritableSignal<number>;
|
|
664
|
+
readonly innerHeight: import("@angular/core").WritableSignal<number>;
|
|
665
|
+
readonly fullXDomain: import("@angular/core").WritableSignal<NumericDomain | null>;
|
|
666
|
+
readonly fullYDomain: import("@angular/core").WritableSignal<NumericDomain | null>;
|
|
667
|
+
readonly zoomXDomain: import("@angular/core").WritableSignal<NumericDomain | null>;
|
|
668
|
+
readonly zoomYDomain: import("@angular/core").WritableSignal<NumericDomain | null>;
|
|
669
|
+
readonly xScale: import("@angular/core").WritableSignal<ScaleLinear<number, number, never> | null>;
|
|
670
|
+
readonly yScale: import("@angular/core").WritableSignal<ScaleLinear<number, number, never> | null>;
|
|
671
|
+
readonly hasZoom: import("@angular/core").Signal<boolean>;
|
|
672
|
+
resetZoom(): void;
|
|
673
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScatterViewportContext, never>;
|
|
674
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
655
675
|
}
|
|
656
|
-
|
|
657
676
|
/** A tick descriptor for rendering axes. */
|
|
658
|
-
interface ChartTick {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
677
|
+
export interface ChartTick {
|
|
678
|
+
readonly value: string | number;
|
|
679
|
+
/** Offset (px) along the axis. For band scales this is the band center. */
|
|
680
|
+
readonly offset: number;
|
|
681
|
+
/** Display label. */
|
|
682
|
+
readonly label: string;
|
|
664
683
|
}
|
|
665
684
|
/** Produce evenly-spaced ticks for a band (categorical) scale. */
|
|
666
|
-
declare function bandTicks(scale: ScaleBand<string>): ChartTick[];
|
|
685
|
+
export declare function bandTicks(scale: ScaleBand<string>): ChartTick[];
|
|
667
686
|
/**
|
|
668
687
|
* Produce ticks for a linear scale.
|
|
669
688
|
*
|
|
@@ -671,11 +690,10 @@ declare function bandTicks(scale: ScaleBand<string>): ChartTick[];
|
|
|
671
690
|
* @param count Approximate number of ticks (hint, d3 may return fewer/more).
|
|
672
691
|
* @param formatter Label formatter.
|
|
673
692
|
*/
|
|
674
|
-
declare function linearTicks(scale: ScaleLinear<number, number>, count?: number, formatter?: (value: number) => string): ChartTick[];
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
readonly clientY: number;
|
|
693
|
+
export declare function linearTicks(scale: ScaleLinear<number, number>, count?: number, formatter?: (value: number) => string): ChartTick[];
|
|
694
|
+
export interface ClientPoint {
|
|
695
|
+
readonly clientX: number;
|
|
696
|
+
readonly clientY: number;
|
|
679
697
|
}
|
|
680
698
|
/**
|
|
681
699
|
* Given a pointer event's local (x, y) relative to the chart's inner group,
|
|
@@ -683,17 +701,16 @@ interface ClientPoint {
|
|
|
683
701
|
*
|
|
684
702
|
* @returns index into `ctx.categories()` (or −1 if no scale / no data).
|
|
685
703
|
*/
|
|
686
|
-
declare function nearestCategoryIndex(ctx: Pick<CartesianContext, 'categoryScale' | 'categories' | 'orientation'>, localX: number, localY: number): number;
|
|
704
|
+
export declare function nearestCategoryIndex(ctx: Pick<CartesianContext, 'categoryScale' | 'categories' | 'orientation'>, localX: number, localY: number): number;
|
|
687
705
|
/** Resolve the client-space center point of a focused or clicked SVG/HTML element. */
|
|
688
|
-
declare function elementClientCenter(target: EventTarget | null): ClientPoint | null;
|
|
706
|
+
export declare function elementClientCenter(target: EventTarget | null): ClientPoint | null;
|
|
689
707
|
/**
|
|
690
708
|
* Where the tooltip should sit for whichever gesture activated a mark.
|
|
691
709
|
*
|
|
692
710
|
* A pointer carries a real cursor position, so the tooltip follows it. Keyboard
|
|
693
711
|
* focus carries none, and falls back to the centre of the mark that took focus.
|
|
694
712
|
*/
|
|
695
|
-
declare function activationClientPoint(event: PointerEvent | FocusEvent): ClientPoint | null;
|
|
696
|
-
|
|
713
|
+
export declare function activationClientPoint(event: PointerEvent | FocusEvent): ClientPoint | null;
|
|
697
714
|
/**
|
|
698
715
|
* Read a numeric value from a datum, tolerating strings.
|
|
699
716
|
*
|
|
@@ -707,63 +724,61 @@ declare function activationClientPoint(event: PointerEvent | FocusEvent): Client
|
|
|
707
724
|
* `0`. That is the behaviour bar and line already shipped, so it is the one the
|
|
708
725
|
* rest of the family adopts.
|
|
709
726
|
*/
|
|
710
|
-
declare function readNumber(datum: ChartDatum, key: string): number;
|
|
711
|
-
|
|
727
|
+
export declare function readNumber(datum: ChartDatum, key: string): number;
|
|
712
728
|
/** Curve type shared by line & area charts. */
|
|
713
|
-
type LineCurve = 'linear' | 'monotone' | 'step';
|
|
729
|
+
export type LineCurve = 'linear' | 'monotone' | 'step';
|
|
714
730
|
/** A single series ready to render as either a line or an area. */
|
|
715
|
-
interface LineSeriesPath {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
731
|
+
export interface LineSeriesPath {
|
|
732
|
+
readonly seriesKey: string;
|
|
733
|
+
readonly color: string;
|
|
734
|
+
readonly linePath: string;
|
|
735
|
+
/** Optional area path — only populated when `computeAreaLayout` is used. */
|
|
736
|
+
readonly areaPath?: string;
|
|
737
|
+
/** Raw points for dots / active markers. */
|
|
738
|
+
readonly points: readonly LinePoint[];
|
|
723
739
|
}
|
|
724
740
|
/** One resolved (x, y) point for a series. */
|
|
725
|
-
interface LinePoint {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
741
|
+
export interface LinePoint {
|
|
742
|
+
readonly seriesKey: string;
|
|
743
|
+
readonly datumIndex: number;
|
|
744
|
+
readonly category: string;
|
|
745
|
+
readonly value: number;
|
|
746
|
+
readonly x: number;
|
|
747
|
+
readonly y: number;
|
|
732
748
|
}
|
|
733
|
-
interface CartesianBase {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
749
|
+
export interface CartesianBase {
|
|
750
|
+
readonly data: readonly ChartDatum[];
|
|
751
|
+
readonly xKey: string;
|
|
752
|
+
readonly seriesKeys: readonly string[];
|
|
753
|
+
readonly orientation: ChartOrientation;
|
|
754
|
+
readonly innerWidth: number;
|
|
755
|
+
readonly innerHeight: number;
|
|
756
|
+
readonly curve: LineCurve;
|
|
741
757
|
}
|
|
742
|
-
interface LineLayoutResult {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
758
|
+
export interface LineLayoutResult {
|
|
759
|
+
readonly series: readonly LineSeriesPath[];
|
|
760
|
+
readonly points: readonly LinePoint[];
|
|
761
|
+
readonly categoryScale: ReturnType<typeof scalePoint<string>>;
|
|
762
|
+
readonly valueScale: ReturnType<typeof scaleLinear<number, number>>;
|
|
763
|
+
readonly categories: readonly string[];
|
|
748
764
|
}
|
|
749
|
-
interface AreaLayoutResult extends LineLayoutResult {
|
|
750
|
-
|
|
765
|
+
export interface AreaLayoutResult extends LineLayoutResult {
|
|
766
|
+
readonly stacked: boolean;
|
|
751
767
|
}
|
|
752
768
|
/** Build category + value scales for point-based charts (line / area). */
|
|
753
|
-
declare function buildCartesianScales(input: CartesianBase): {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
769
|
+
export declare function buildCartesianScales(input: CartesianBase): {
|
|
770
|
+
categories: readonly string[];
|
|
771
|
+
categoryScale: ReturnType<typeof scalePoint<string>>;
|
|
772
|
+
valueScale: ReturnType<typeof scaleLinear<number, number>>;
|
|
757
773
|
};
|
|
758
774
|
/** Compute line-chart geometry. */
|
|
759
|
-
declare function computeLineLayout(input: CartesianBase): LineLayoutResult;
|
|
760
|
-
interface AreaLayoutInput extends CartesianBase {
|
|
761
|
-
|
|
762
|
-
|
|
775
|
+
export declare function computeLineLayout(input: CartesianBase): LineLayoutResult;
|
|
776
|
+
export interface AreaLayoutInput extends CartesianBase {
|
|
777
|
+
readonly stacked: boolean;
|
|
778
|
+
readonly expanded?: boolean;
|
|
763
779
|
}
|
|
764
780
|
/** Compute area-chart geometry (single or stacked). */
|
|
765
|
-
declare function computeAreaLayout(input: AreaLayoutInput): AreaLayoutResult;
|
|
766
|
-
|
|
781
|
+
export declare function computeAreaLayout(input: AreaLayoutInput): AreaLayoutResult;
|
|
767
782
|
/**
|
|
768
783
|
* Publish a `scalePoint` from line/area layouts to the `CartesianContext`,
|
|
769
784
|
* which expects a `scaleBand`. Line/area points sit on the range edges (the
|
|
@@ -775,15 +790,14 @@ declare function computeAreaLayout(input: AreaLayoutInput): AreaLayoutResult;
|
|
|
775
790
|
* This keeps axes/grid primitives agnostic to whether the underlying chart
|
|
776
791
|
* uses `scaleBand` (bar) or `scalePoint` (line/area).
|
|
777
792
|
*/
|
|
778
|
-
declare function pointToBandAdapter(pointScale: ScalePoint<string>, range: [number, number]): ReturnType<typeof scaleBand<string>>;
|
|
793
|
+
export declare function pointToBandAdapter(pointScale: ScalePoint<string>, range: [number, number]): ReturnType<typeof scaleBand<string>>;
|
|
779
794
|
/** Recreate a linear scale with the same domain/range (handy for effects). */
|
|
780
|
-
declare function cloneLinear(scale: ReturnType<typeof scaleLinear<number, number>>): ReturnType<typeof scaleLinear<number, number>>;
|
|
781
|
-
declare function provideCartesianFromLineLayout(ctx: CartesianContext, layout: {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
795
|
+
export declare function cloneLinear(scale: ReturnType<typeof scaleLinear<number, number>>): ReturnType<typeof scaleLinear<number, number>>;
|
|
796
|
+
export declare function provideCartesianFromLineLayout(ctx: CartesianContext, layout: {
|
|
797
|
+
categoryScale: ScalePoint<string>;
|
|
798
|
+
valueScale: ReturnType<typeof scaleLinear<number, number>>;
|
|
799
|
+
categories: readonly string[];
|
|
785
800
|
}, orientation: 'vertical' | 'horizontal', innerWidth: number, innerHeight: number): void;
|
|
786
|
-
|
|
787
801
|
/**
|
|
788
802
|
* Resolves the live theme corner radius (the `--radius` token) in pixels for SVG
|
|
789
803
|
* chart geometry, and re-emits when the global `theme-radius` axis switches.
|
|
@@ -795,17 +809,14 @@ declare function provideCartesianFromLineLayout(ctx: CartesianContext, layout: {
|
|
|
795
809
|
*
|
|
796
810
|
* SSR-safe: with no document it returns the `md` fallback and skips observing.
|
|
797
811
|
*/
|
|
798
|
-
declare class ChartThemeRadius {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
export { CHART_DATA_ATTRIBUTE, CHART_THEMES, CartesianContext, CategoricalViewportContext, ChartContainer, ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartStyle, ChartThemeRadius, ChartThemeSpace, DEFAULT_CARTESIAN_MARGIN, DEFAULT_CARTESIAN_MARGIN_UNITS, DEFAULT_POLAR_MARGIN, DEFAULT_POLAR_MARGIN_UNITS, DEFAULT_RADAR_MARGIN, DEFAULT_RADAR_MARGIN_UNITS, ScatterViewportContext, activationClientPoint, bandTicks, buildCartesianScales, buildChartCss, cloneLinear, computeAreaLayout, computeLineLayout, effectiveIndexRange, elementClientCenter, escapeCssIdent, indexRangeSize, isSafeCssColorValue, linearTicks, nearestCategoryIndex, normalizeIndexRange, normalizeNumericDomain, panIndexRange, panNumericDomain, pointToBandAdapter, provideCartesianFromLineLayout, readNumber, resolveChartMargin, resolveChartStyle, resolveSeriesColor, seriesColorVar, setupCartesianChart, setupPolarChart, sliceByIndexRange, xScale, yScale, zeroBaselineDomain, zoomIndexRange, zoomNumericDomain };
|
|
811
|
-
export type { AreaLayoutInput, AreaLayoutResult, CartesianBase, CartesianChartOptions, CartesianChartSetup, CartesianMark, CategoryScale, ChartActivePoint, ChartConfig, ChartDatum, ChartDimensions, ChartIndexRange, ChartMargin, ChartOrientation, ChartPointClickEvent, ChartSeriesConfig, ChartStyleVariant, ChartThemeKey, ChartTick, ClientPoint, LineCurve, LineLayoutResult, LinePoint, LineSeriesPath, NumericDomain, PolarChartOptions, PolarChartSetup, PolarMark, ValueScale };
|
|
812
|
+
export declare class ChartThemeRadius {
|
|
813
|
+
private readonly document;
|
|
814
|
+
private readonly basePx;
|
|
815
|
+
/** Resolved base radius (`--radius`) in px; reactive to the theme-radius axis. */
|
|
816
|
+
readonly px: import("@angular/core").Signal<number>;
|
|
817
|
+
constructor();
|
|
818
|
+
private readBasePx;
|
|
819
|
+
private toPx;
|
|
820
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartThemeRadius, never>;
|
|
821
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
822
|
+
}
|