@ids-group-ltd/ids-design-system 0.13.1 → 0.13.3
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/CHANGELOG.md +626 -0
- package/components.md +17 -9
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +3 -2
- package/docs/agent/charts/ds-line-chart.md +2 -1
- package/docs/agent/feedback/ds-bar.md +13 -0
- package/docs/agent/forms/ds-button.md +1 -1
- package/docs/agent/forms/ds-icon-button.md +1 -1
- package/docs/agent/surfaces/ds-card.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +81 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +198 -50
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +172 -111
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +86 -15
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +87 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +193 -98
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +233 -33
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.2.json +269 -0
- package/migrations/0.13.3.json +211 -0
- package/package.json +17 -9
- package/styles/_chart-frame.scss +117 -10
- package/styles/_chart-interactive.scss +12 -3
- package/styles/_overlay-motion.scss +7 -6
- package/styles/_tokens-charts.scss +29 -5
- package/styles/_tokens.scss +1 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +68 -5
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +21 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +125 -37
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +43 -4
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +52 -4
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +90 -23
- package/types/ids-group-ltd-ids-design-system-components.d.ts +91 -16
- package/types/ids-group-ltd-ids-design-system-core.d.ts +73 -6
- package/types/ids-group-ltd-ids-design-system.d.ts +7 -6
- package/docs/agent/feedback/ds-progress.md +0 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -22
package/styles/_chart-frame.scss
CHANGED
|
@@ -1,33 +1,67 @@
|
|
|
1
|
+
@use 'focus' as focus;
|
|
2
|
+
|
|
1
3
|
// The box a chart draws around itself. All five draw the same one, so the rules live here.
|
|
2
4
|
//
|
|
3
|
-
//
|
|
5
|
+
// ON by default, which is unusual for this library: most components resist owning chrome. A chart
|
|
4
6
|
// is the exception because it is read as an OBJECT — a plot with axes, a legend and an annex table
|
|
5
|
-
// — and without an edge those parts run into whatever sits beside them on the page.
|
|
6
|
-
// inside a card drops the frame with two declarations rather than a mode flag:
|
|
7
|
+
// — and without an edge those parts run into whatever sits beside them on the page.
|
|
7
8
|
//
|
|
8
|
-
//
|
|
9
|
+
// A chart already inside a card turns it off through the `frame` input, or once for a whole app
|
|
10
|
+
// through `DS_CONFIG.chart.frame`, which is where an app-wide layout decision belongs. The
|
|
11
|
+
// `--ds-chart-frame-*` tokens still size it.
|
|
9
12
|
@mixin chart-frame {
|
|
10
13
|
:host {
|
|
11
14
|
display: block;
|
|
15
|
+
|
|
16
|
+
// A drag across a plot selects the chart's chrome — axis ticks, legend labels, and the
|
|
17
|
+
// caption a screen reader needs that is clipped to a thin strip for everyone else. The
|
|
18
|
+
// selection then paints as bars across the card, over content that is not visibly there.
|
|
19
|
+
// None of it is text anyone copies; the numbers live in the annex table, which stays
|
|
20
|
+
// selectable below.
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// The class is the resolved answer, not the input: the component reads `frame`, falls back to
|
|
25
|
+
// `DS_CONFIG.chart.frame`, and puts this on only when the result is `'auto'`.
|
|
26
|
+
:host(.framed) {
|
|
12
27
|
padding: var(--ds-chart-frame-padding);
|
|
13
28
|
background: var(--ds-chart-frame-bg-color);
|
|
14
29
|
border: var(--ds-chart-frame-border-width) solid
|
|
15
30
|
var(--ds-chart-frame-border-color);
|
|
16
31
|
border-radius: var(--ds-chart-frame-radius);
|
|
17
32
|
}
|
|
33
|
+
|
|
34
|
+
.data-table,
|
|
35
|
+
.stage-table,
|
|
36
|
+
figcaption {
|
|
37
|
+
user-select: text;
|
|
38
|
+
}
|
|
18
39
|
}
|
|
19
40
|
|
|
20
41
|
// The focus indicator, drawn rather than outlined: `outline` on an SVG element paints its BOUNDING
|
|
21
42
|
// BOX, not its silhouette, so a slice would ring as a rectangle. Two tones, because one is not
|
|
22
|
-
// enough
|
|
23
|
-
//
|
|
24
|
-
// the
|
|
43
|
+
// enough: the ring is the app's own focus colour, so a focused mark reads as the same indicator as
|
|
44
|
+
// every other control, and the light keyline around it is what separates that colour from a mark
|
|
45
|
+
// of the same hue family. `drop-shadow` rather than a second stroke: an SVG shape has one stroke.
|
|
25
46
|
@mixin drawn-focus-ring {
|
|
26
47
|
stroke: var(--ds-chart-focus-ring-color);
|
|
27
48
|
stroke-width: var(--focus-ring-width);
|
|
28
49
|
paint-order: stroke;
|
|
29
|
-
filter: drop-shadow(0 0
|
|
30
|
-
|
|
50
|
+
filter: drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// A CLICK focuses an SVG shape in Chromium even with no `tabindex` on it, and `:focus-visible` is
|
|
54
|
+
// false for that focus — so a rule keyed on `:focus-visible` never fires and the user-agent paints
|
|
55
|
+
// its own outline around the BOUNDING BOX. On a ring or a funnel band that is a rectangle standing
|
|
56
|
+
// off the shape, which reads as a selection nobody asked for.
|
|
57
|
+
//
|
|
58
|
+
// Keyed on `:focus` so it catches the pointer case too. The keyboard indicator is unaffected:
|
|
59
|
+
// `drawn-focus-ring` under `:focus-visible` still paints, and `own-indicator` keeps the outline
|
|
60
|
+
// under forced colours, where `stroke` is not remapped and the outline is all there is.
|
|
61
|
+
@mixin no-bounding-box-focus($mark) {
|
|
62
|
+
#{$mark}:focus {
|
|
63
|
+
@include focus.own-indicator;
|
|
64
|
+
}
|
|
31
65
|
}
|
|
32
66
|
|
|
33
67
|
// `fill` and `stroke` are NOT remapped by forced colours: the chart keeps every series colour and
|
|
@@ -56,7 +90,13 @@
|
|
|
56
90
|
// its data is empty, its request failed, or its legend switched the last series off drags the whole
|
|
57
91
|
// page up under the reader's cursor — and the state they are being told about is exactly the moment
|
|
58
92
|
// they are least able to afford the jump. `$height` is the plot the message stands in for.
|
|
59
|
-
|
|
93
|
+
// `$axes` keeps the L of a plot that HAS axes — the value axis down the left, the category axis
|
|
94
|
+
// along the bottom. A chart whose data went away still has the frame its readings were measured
|
|
95
|
+
// against, and drawing it keeps the message inside a plot rather than floating in a blank card.
|
|
96
|
+
// Borders rather than an SVG: with no data there is nothing to scale against, and an axis without
|
|
97
|
+
// ticks or labels is exactly two lines. Off for the donut and the funnel, which have no axes to
|
|
98
|
+
// keep.
|
|
99
|
+
@mixin message-box($height, $axes: false) {
|
|
60
100
|
.empty {
|
|
61
101
|
display: grid;
|
|
62
102
|
place-items: center;
|
|
@@ -64,5 +104,72 @@
|
|
|
64
104
|
margin: 0;
|
|
65
105
|
color: var(--text-secondary);
|
|
66
106
|
text-align: center;
|
|
107
|
+
|
|
108
|
+
@if $axes {
|
|
109
|
+
border-inline-start: 1px solid var(--ds-chart-axis-line-color);
|
|
110
|
+
border-block-end: 1px solid var(--ds-chart-axis-line-color);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* The way out of a pin, said in a word. A held mark is a state the reader did not have before and
|
|
116
|
+
cannot obviously undo — Escape is invisible, and clicking the mark again is a guess. It reads
|
|
117
|
+
`Unpin` rather than `Reset`, which would leave a reader wondering what else it resets. */
|
|
118
|
+
@mixin pin-reset {
|
|
119
|
+
:host {
|
|
120
|
+
position: relative;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Top CENTRE: the corner competes with a legend on the donut and with the value labels on a
|
|
124
|
+
column chart, and on a wide card a corner control is a long way from the mark it undoes.
|
|
125
|
+
Centred, it sits over the plot it belongs to whatever the chart's shape.
|
|
126
|
+
|
|
127
|
+
44px minimum box around a 12px label, because it is a real control and the library's own touch
|
|
128
|
+
rule applies to it. */
|
|
129
|
+
.pin-reset {
|
|
130
|
+
position: absolute;
|
|
131
|
+
inset-block-start: var(--space-2);
|
|
132
|
+
inset-inline: 0;
|
|
133
|
+
z-index: 1;
|
|
134
|
+
justify-self: center;
|
|
135
|
+
margin-inline: auto;
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
gap: var(--space-1);
|
|
139
|
+
min-block-size: var(--space-12);
|
|
140
|
+
inline-size: fit-content;
|
|
141
|
+
padding: var(--space-1) var(--space-3);
|
|
142
|
+
border: var(--border-width-default) solid var(--border-divider);
|
|
143
|
+
border-radius: var(--radius-pill);
|
|
144
|
+
background: var(--surface-default);
|
|
145
|
+
color: var(--text-secondary);
|
|
146
|
+
font-size: var(--font-size-xs);
|
|
147
|
+
line-height: 1;
|
|
148
|
+
box-shadow: var(--shadow-1);
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
color: var(--text-primary);
|
|
153
|
+
border-color: var(--border-strong);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* The pinned mark's badge: a pushpin on an opaque disc. The disc is what makes it legible — a bare
|
|
159
|
+
glyph with a halo has to win against whatever colour the series happens to be, and a palette of
|
|
160
|
+
eight cannot promise that. Size is the icon's touch-free minimum: it is a STATE, never a target,
|
|
161
|
+
so it carries `pointer-events: none` and no tab stop. */
|
|
162
|
+
@mixin pin-marker {
|
|
163
|
+
.pin-marker {
|
|
164
|
+
display: grid;
|
|
165
|
+
place-items: center;
|
|
166
|
+
inline-size: var(--ds-chart-pin-size, 22px);
|
|
167
|
+
block-size: var(--ds-chart-pin-size, 22px);
|
|
168
|
+
border: var(--border-width-default) solid var(--border-divider);
|
|
169
|
+
border-radius: var(--radius-pill);
|
|
170
|
+
background: var(--surface-default);
|
|
171
|
+
color: var(--text-primary);
|
|
172
|
+
box-shadow: var(--shadow-1);
|
|
173
|
+
pointer-events: none;
|
|
67
174
|
}
|
|
68
175
|
}
|
|
@@ -36,10 +36,19 @@
|
|
|
36
36
|
@mixin fades($mark, $also: '') {
|
|
37
37
|
@include dims($mark, $also);
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
// A PIN SUSPENDS THE HOVER RULE ENTIRELY, which is what `:not(:has(.is-pinned))` is for. Without
|
|
40
|
+
// it the two rules dim each other out: the hover rule takes down the pinned mark because the
|
|
41
|
+
// pointer has moved off it, the pin rule takes down the hovered mark because it is not the pinned
|
|
42
|
+
// one, and every mark on the chart ends up faded with nothing lit.
|
|
43
|
+
&.dims-others:not(:has(#{$mark}.is-pinned)):has(#{$mark}.interactive:hover)
|
|
40
44
|
#{$mark}.interactive:not(:hover),
|
|
41
|
-
&.dims-others:has(#{$mark}.
|
|
42
|
-
|
|
45
|
+
&.dims-others:not(:has(#{$mark}.is-pinned)):has(
|
|
46
|
+
#{$mark}.interactive:focus-visible
|
|
47
|
+
)
|
|
48
|
+
#{$mark}.interactive:not(:focus-visible),
|
|
49
|
+
// A pinned mark keeps the others down after the pointer has gone, which is the whole point of
|
|
50
|
+
// pinning: the reader looks away from the chart and the comparison is still on screen.
|
|
51
|
+
&.dims-others:has(#{$mark}.is-pinned) #{$mark}:not(.is-pinned) {
|
|
43
52
|
opacity: var(--ds-chart-dim-opacity);
|
|
44
53
|
}
|
|
45
54
|
}
|
|
@@ -85,11 +85,12 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/*
|
|
89
|
-
|
|
90
|
-
takes a `pointerleave`,
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
/* The pane takes the pointer, so the panel can be reached and its text selected — WCAG 1.4.13
|
|
89
|
+
requires that of anything shown on hover. What stops the flicker an interactive pane used to
|
|
90
|
+
cause (panel covers the plot, plot takes a `pointerleave`, chart clears, panel closes, pointer
|
|
91
|
+
lands on the plot again) is the grace period on the chart's own leave, in `chart-active-mark.ts`.
|
|
92
|
+
The two are one mechanism: make the pane inert again and the criterion breaks silently; drop the
|
|
93
|
+
grace and the flicker returns. */
|
|
93
94
|
.cdk-overlay-pane.ds-chart-tooltip-pane {
|
|
94
|
-
pointer-events:
|
|
95
|
+
pointer-events: auto;
|
|
95
96
|
}
|
|
@@ -93,6 +93,14 @@
|
|
|
93
93
|
--chart-grid-line-color: var(--neutral-150);
|
|
94
94
|
--chart-axis-font-size: var(--font-size-2xs);
|
|
95
95
|
|
|
96
|
+
/* REFERENCE LINES - an annotation, not a series. A neutral stroke and a dash are what keep a
|
|
97
|
+
target from reading as one more category, and the band's opacity is low enough that a mark
|
|
98
|
+
drawn over it stays its own colour. */
|
|
99
|
+
--chart-threshold-color: var(--neutral-500);
|
|
100
|
+
--chart-threshold-band-opacity: 0.12;
|
|
101
|
+
--chart-threshold-dashed-pattern: 6 4;
|
|
102
|
+
--chart-threshold-dotted-pattern: 1 5;
|
|
103
|
+
|
|
96
104
|
/* HIGHLIGHT / HOVER */
|
|
97
105
|
|
|
98
106
|
/* Every level of dimming costs the separation BETWEEN the dimmed series: measured 2026-09-13,
|
|
@@ -103,11 +111,13 @@
|
|
|
103
111
|
--chart-hover-bg-color: hsl(225deg 39% 7% / 4%);
|
|
104
112
|
--chart-cursor-line-color: var(--neutral-400);
|
|
105
113
|
|
|
106
|
-
/* The focus indicator is TWO tones, not one: a
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
/* The focus indicator is TWO tones, not one: a single accent ring disappears on a mark of the
|
|
115
|
+
same hue family, and a chart's marks are exactly the surfaces a ring has to survive. The ring
|
|
116
|
+
itself is the app's, so a focused mark reads as the same indicator as every other control;
|
|
117
|
+
the white keyline is what separates it from the mark underneath, and it is the keyline rather
|
|
118
|
+
than the ring that does the surviving. */
|
|
119
|
+
--chart-focus-ring-color: var(--focus-ring-color);
|
|
120
|
+
--chart-focus-halo-color: white;
|
|
111
121
|
|
|
112
122
|
--chart-tooltip-bg-color: var(--neutral-900);
|
|
113
123
|
--chart-tooltip-text-color: var(--neutral-0);
|
|
@@ -123,6 +133,12 @@
|
|
|
123
133
|
--chart-line-width-bold: 3px;
|
|
124
134
|
--chart-dot-radius: 4px;
|
|
125
135
|
--chart-dot-radius-active: 6px;
|
|
136
|
+
--chart-area-opacity: 0.16;
|
|
137
|
+
|
|
138
|
+
/* Stripes wide enough to survive a 24px-wide mark at a glance, and drawn in the surface colour
|
|
139
|
+
so they read as gaps cut out of the mark rather than a second hue competing with it. */
|
|
140
|
+
--chart-hatch-color: var(--surface-default);
|
|
141
|
+
--chart-hatch-width: 3px;
|
|
126
142
|
}
|
|
127
143
|
|
|
128
144
|
/* Public override layer.
|
|
@@ -165,6 +181,11 @@
|
|
|
165
181
|
--ds-chart-axis-font-size: var(--chart-axis-font-size);
|
|
166
182
|
--ds-chart-grid-line-color: var(--chart-grid-line-color);
|
|
167
183
|
|
|
184
|
+
--ds-chart-threshold-color: var(--chart-threshold-color);
|
|
185
|
+
--ds-chart-threshold-band-opacity: var(--chart-threshold-band-opacity);
|
|
186
|
+
--ds-chart-threshold-dashed-pattern: var(--chart-threshold-dashed-pattern);
|
|
187
|
+
--ds-chart-threshold-dotted-pattern: var(--chart-threshold-dotted-pattern);
|
|
188
|
+
|
|
168
189
|
--ds-chart-dim-opacity: var(--chart-dim-opacity);
|
|
169
190
|
--ds-chart-hover-bg-color: var(--chart-hover-bg-color);
|
|
170
191
|
--ds-chart-cursor-line-color: var(--chart-cursor-line-color);
|
|
@@ -180,4 +201,7 @@
|
|
|
180
201
|
--ds-chart-line-width-bold: var(--chart-line-width-bold);
|
|
181
202
|
--ds-chart-dot-radius: var(--chart-dot-radius);
|
|
182
203
|
--ds-chart-dot-radius-active: var(--chart-dot-radius-active);
|
|
204
|
+
--ds-chart-area-opacity: var(--chart-area-opacity);
|
|
205
|
+
--ds-chart-hatch-color: var(--chart-hatch-color);
|
|
206
|
+
--ds-chart-hatch-width: var(--chart-hatch-width);
|
|
183
207
|
}
|
package/styles/_tokens.scss
CHANGED
|
@@ -2,8 +2,19 @@ import * as _ids_group_ltd_ids_design_system_components_chart_tooltip from '@ids
|
|
|
2
2
|
import { ChartItemTooltipTrigger, ChartTooltipContext } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
4
|
import { TemplateRef } from '@angular/core';
|
|
5
|
-
import {
|
|
5
|
+
import { defaultChartFormat } from '@ids-group-ltd/ids-design-system/components';
|
|
6
|
+
import { ChartFrame, ChartDataTable, ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';
|
|
6
7
|
|
|
8
|
+
/** One part of a row that is a distribution rather than a single quantity. */
|
|
9
|
+
interface BarChartSegment {
|
|
10
|
+
/** Falls back to the segment's position when left out. */
|
|
11
|
+
id?: string;
|
|
12
|
+
label: string;
|
|
13
|
+
value: number;
|
|
14
|
+
/** Overrides the palette slot this segment would take. Segments are CATEGORIES, so they take the
|
|
15
|
+
* categorical palette in order — unlike the rows, which are one series and share one colour. */
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
7
18
|
interface BarChartRow {
|
|
8
19
|
/** Falls back to the row's position when left out, so a reorder rewrites the DOM. */
|
|
9
20
|
id?: string;
|
|
@@ -12,6 +23,23 @@ interface BarChartRow {
|
|
|
12
23
|
/** A percentage already out of 100, not a fraction: `42`, never `0.42`. Printed at
|
|
13
24
|
* the row's end while `showPercent` is on; derived from `value / max` when omitted. */
|
|
14
25
|
percent?: number;
|
|
26
|
+
/** Divides the row's BAR into parts. The bar keeps its own length — the row's share of the
|
|
27
|
+
* largest row — so the chart still compares the rows while each bar says what it is made of.
|
|
28
|
+
*
|
|
29
|
+
* The parts are sized against their OWN sum and always fill the bar: a set that does not add up
|
|
30
|
+
* to `value` is a data error the chart cannot silently paper over by leaving a gap that looks
|
|
31
|
+
* like a category.
|
|
32
|
+
*
|
|
33
|
+
* Where segments are present the row's own colour is unused — each part takes its own, and each
|
|
34
|
+
* part gets its own row in the data table. */
|
|
35
|
+
segments?: readonly BarChartSegment[];
|
|
36
|
+
/** A second reading for this row, printed under the label. A row often encodes a RATIO — 12,400
|
|
37
|
+
* visitors against 456 requests — and the bar can only be one of the two numbers; without a
|
|
38
|
+
* place for the other, the chart drops half of what the row is about.
|
|
39
|
+
*
|
|
40
|
+
* Already formatted: the row knows what its second number means and the chart does not, so a
|
|
41
|
+
* `valueFormat` written for the bar's own scale would be the wrong one to apply to it. */
|
|
42
|
+
detail?: string;
|
|
15
43
|
/** Overrides this row's colour. The rows are one series, so they share one
|
|
16
44
|
* colour by default; set this on the row the reader should land on, usually
|
|
17
45
|
* to `var(--ds-chart-series-accent-color)`. There is no separate accent
|
|
@@ -26,6 +54,20 @@ declare class BarChartComponent {
|
|
|
26
54
|
/** Track length is relative to this. Null uses the largest value, so the
|
|
27
55
|
* longest row always fills its track. */
|
|
28
56
|
readonly max: _angular_core.InputSignalWithTransform<number | null, number | null>;
|
|
57
|
+
/** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;
|
|
58
|
+
* `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.
|
|
59
|
+
* Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards
|
|
60
|
+
* is one decision per app rather than per plot. */
|
|
61
|
+
readonly frame: _angular_core.InputSignal<ChartFrame | null>;
|
|
62
|
+
/** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the
|
|
63
|
+
* default, takes it away at once: a panel that outlives the pointer sits over the plot the
|
|
64
|
+
* reader has moved on to.
|
|
65
|
+
*
|
|
66
|
+
* Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything
|
|
67
|
+
* selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so
|
|
68
|
+
* crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to
|
|
69
|
+
* `DS_CONFIG.chart.tooltipLingerMs`, then 0. */
|
|
70
|
+
readonly tooltipLingerMs: _angular_core.InputSignalWithTransform<number | null, number | null>;
|
|
29
71
|
/** Printed above the plot as the chart's visible title, and reused as the annex table's
|
|
30
72
|
* caption. */
|
|
31
73
|
readonly caption: _angular_core.InputSignal<string | null>;
|
|
@@ -34,8 +76,13 @@ declare class BarChartComponent {
|
|
|
34
76
|
/** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
|
|
35
77
|
* `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
|
|
36
78
|
* `'none'` belongs only where the same data is already in a table on the page.
|
|
37
|
-
* Unset falls back to `DS_CONFIG.chart.dataTable`, then `'
|
|
79
|
+
* Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */
|
|
38
80
|
readonly dataTable: _angular_core.InputSignal<ChartDataTable | null>;
|
|
81
|
+
/** Declares that the marks are parts of one whole, which is what makes a share of their total a
|
|
82
|
+
* real quantity. Off by default: a chart of visitors per stage or revenue per month sums to a
|
|
83
|
+
* number nobody can point at, and "18.6% of total" against it is arithmetic dressed as a fact.
|
|
84
|
+
* On, each mark's share appears on the tooltip's second line and in the data table. */
|
|
85
|
+
readonly partOfWhole: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
39
86
|
/** Prints each row's share of `max` beside its value. */
|
|
40
87
|
readonly showPercent: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
41
88
|
/** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
|
|
@@ -55,10 +102,11 @@ declare class BarChartComponent {
|
|
|
55
102
|
* included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
|
|
56
103
|
* grouping with a K/M/B suffix past four digits. */
|
|
57
104
|
readonly valueFormat: _angular_core.InputSignal<ChartValueFormat | null>;
|
|
105
|
+
readonly frameResolved: _angular_core.Signal<ChartFrame>;
|
|
58
106
|
readonly dataTableResolved: _angular_core.Signal<ChartDataTable>;
|
|
59
107
|
readonly emptyTextResolved: _angular_core.Signal<string>;
|
|
60
108
|
readonly errorTextResolved: _angular_core.Signal<string>;
|
|
61
|
-
readonly valueFormatResolved: _angular_core.Signal<
|
|
109
|
+
readonly valueFormatResolved: _angular_core.Signal<typeof defaultChartFormat>;
|
|
62
110
|
/** Turns on the click affordance — the pointer cursor and any hover tint.
|
|
63
111
|
* The click output fires whether or not this is set, so a consumer that
|
|
64
112
|
* binds the output and forgets the flag still receives every click. */
|
|
@@ -66,6 +114,11 @@ declare class BarChartComponent {
|
|
|
66
114
|
/** The row that was clicked, or activated with Enter or Space. Fires whether or not
|
|
67
115
|
* `interactive` is set. */
|
|
68
116
|
readonly rowClicked: _angular_core.OutputEmitterRef<BarChartRow>;
|
|
117
|
+
/** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press
|
|
118
|
+
* outside releases it. Off by default: a click is already the drill-down hook, and a mark left
|
|
119
|
+
* lit after the pointer has gone needs a reader who knows why it is lit. `rowClicked` fires
|
|
120
|
+
* either way — pinning is a state, not a handler. */
|
|
121
|
+
readonly pinOnClick: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
69
122
|
/** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
|
|
70
123
|
* one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
|
|
71
124
|
* marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
|
|
@@ -83,7 +136,9 @@ declare class BarChartComponent {
|
|
|
83
136
|
protected readonly tooltipTemplate: _angular_core.Signal<TemplateRef<{
|
|
84
137
|
$implicit: ChartTooltipContext;
|
|
85
138
|
}> | undefined>;
|
|
139
|
+
private readonly tooltipLingerResolved;
|
|
86
140
|
protected readonly activeMark: _ids_group_ltd_ids_design_system_components_chart_tooltip.ChartActiveMark;
|
|
141
|
+
protected onMarkClick(payload: BarChartRow, index: number, event: Event): void;
|
|
87
142
|
/** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not
|
|
88
143
|
* every mouse-operable control has to be separately focusable, and that is what keeps a
|
|
89
144
|
* twenty-five mark chart from being twenty-five stops in the page's tab order. */
|
|
@@ -99,6 +154,14 @@ declare class BarChartComponent {
|
|
|
99
154
|
widthPercent: number;
|
|
100
155
|
formattedValue: string;
|
|
101
156
|
formattedPercent: string;
|
|
157
|
+
share: string;
|
|
158
|
+
segments: readonly {
|
|
159
|
+
key: string;
|
|
160
|
+
segment: BarChartSegment;
|
|
161
|
+
widthPercent: number;
|
|
162
|
+
formattedValue: string;
|
|
163
|
+
color: string;
|
|
164
|
+
}[];
|
|
102
165
|
color: string;
|
|
103
166
|
}[]>;
|
|
104
167
|
protected readonly accessibleName: _angular_core.Signal<string>;
|
|
@@ -112,8 +175,8 @@ declare class BarChartComponent {
|
|
|
112
175
|
* when the data lands; falls back to three when `data` is still empty. */
|
|
113
176
|
protected readonly skeletonRows: _angular_core.Signal<unknown[]>;
|
|
114
177
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BarChartComponent, never>;
|
|
115
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChartComponent, "ds-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "summary": { "alias": "summary"; "required": false; "isSignal": true; }; "dataTable": { "alias": "dataTable"; "required": false; "isSignal": true; }; "showPercent": { "alias": "showPercent"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "dimOthers": { "alias": "dimOthers"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
178
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChartComponent, "ds-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "frame": { "alias": "frame"; "required": false; "isSignal": true; }; "tooltipLingerMs": { "alias": "tooltipLingerMs"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "summary": { "alias": "summary"; "required": false; "isSignal": true; }; "dataTable": { "alias": "dataTable"; "required": false; "isSignal": true; }; "partOfWhole": { "alias": "partOfWhole"; "required": false; "isSignal": true; }; "showPercent": { "alias": "showPercent"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "pinOnClick": { "alias": "pinOnClick"; "required": false; "isSignal": true; }; "dimOthers": { "alias": "dimOthers"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
116
179
|
}
|
|
117
180
|
|
|
118
181
|
export { BarChartComponent };
|
|
119
|
-
export type { BarChartRow };
|
|
182
|
+
export type { BarChartRow, BarChartSegment };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Colour role for the fill. */
|
|
4
|
+
type BarVariant = 'default' | 'success' | 'warning' | 'error';
|
|
5
|
+
/** What the bar IS, which decides how it is announced.
|
|
6
|
+
*
|
|
7
|
+
* - `'progress'` — how far a task has got. `role="progressbar"`.
|
|
8
|
+
* - `'meter'` — a measurement on a known scale: a rate, a score, a count against a ceiling. It
|
|
9
|
+
* has no beginning and no completion. `role="meter"`.
|
|
10
|
+
* - `'none'` — drawn only, hidden from assistive technology. For a bar in a table cell whose
|
|
11
|
+
* figure is printed beside it, where announcing each one repeats what the row already says. */
|
|
12
|
+
type BarSemantics = 'progress' | 'meter' | 'none';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* One horizontal track with one fill: a task's completion, or a measurement on a known scale.
|
|
16
|
+
*
|
|
17
|
+
* The two are the same drawing and a different claim, which is what `semantics` carries — the
|
|
18
|
+
* platform splits them the same way, into `<progress>` and `<meter>`. Getting it wrong is not
|
|
19
|
+
* cosmetic: a table of two hundred rates under `'progress'` announces two hundred progress bars.
|
|
20
|
+
*/
|
|
21
|
+
declare class BarComponent {
|
|
22
|
+
/** The reading, in units of `max`; clamped, and ignored while `indeterminate`. */
|
|
23
|
+
readonly value: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
24
|
+
/** The full scale `value` and `target` are read against. Left at 100 they are percentages. Set
|
|
25
|
+
* it to the real total — `[value]="37" [max]="80"` — and the accessible name carries "37 of 80"
|
|
26
|
+
* rather than the 46% a caller would otherwise have to compute. For a column of measurements
|
|
27
|
+
* it is usually the column's own largest value, so the longest bar fills its track and the rest
|
|
28
|
+
* are its share. Zero or less falls back to 100, because a scale with no width has no fraction
|
|
29
|
+
* to draw. */
|
|
30
|
+
readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
31
|
+
/** What the bar is, and therefore how it is announced. See `BarSemantics`. Defaults to
|
|
32
|
+
* `'progress'`. */
|
|
33
|
+
readonly semantics: _angular_core.InputSignal<BarSemantics>;
|
|
34
|
+
/** Colour role — drives the success/warning/error styling. */
|
|
35
|
+
readonly variant: _angular_core.InputSignal<BarVariant>;
|
|
36
|
+
/** Indeterminate (unknown-duration) animation instead of a fixed `value`. Only a task has an
|
|
37
|
+
* unknown duration, so it is ignored unless `semantics` is `'progress'`. */
|
|
38
|
+
readonly indeterminate: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
39
|
+
/** Overrides the fill for this one bar. A whole column is coloured once through
|
|
40
|
+
* `--ds-bar-fill-color` instead; use this where the colour carries meaning on one row. */
|
|
41
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
42
|
+
/** Accessible name (e.g. "Upload progress"). With a `target` set, name the comparison here —
|
|
43
|
+
* the mark is drawn and the role has no second value to announce, so "Resolved 62% against a
|
|
44
|
+
* 75% target" is what reaches a screen reader. Unused under `semantics="none"`. */
|
|
45
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
46
|
+
/** A second point on the same scale as `value`, drawn as a hairline across the track — a goal,
|
|
47
|
+
* a baseline or a threshold to read `value` against. Clamped like `value`, ignored while
|
|
48
|
+
* `indeterminate`, and unset draws nothing. */
|
|
49
|
+
readonly target: _angular_core.InputSignal<number | null>;
|
|
50
|
+
protected readonly role: _angular_core.Signal<"meter" | "progressbar" | null>;
|
|
51
|
+
protected readonly scale: _angular_core.Signal<number>;
|
|
52
|
+
protected readonly clampedValue: _angular_core.Signal<number>;
|
|
53
|
+
/** Width and offset are percentages of the track whatever the scale is. */
|
|
54
|
+
protected readonly valuePercent: _angular_core.Signal<number>;
|
|
55
|
+
protected readonly clampedTarget: _angular_core.Signal<number | null>;
|
|
56
|
+
protected readonly targetPercent: _angular_core.Signal<number | null>;
|
|
57
|
+
protected readonly isIndet: _angular_core.Signal<boolean>;
|
|
58
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BarComponent, never>;
|
|
59
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarComponent, "ds-bar", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "semantics": { "alias": "semantics"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { BarComponent };
|
|
63
|
+
export type { BarSemantics, BarVariant };
|
|
@@ -10,6 +10,7 @@ type ButtonVariant = 'solid' | 'tonal' | 'ghost' | 'outline' | 'text';
|
|
|
10
10
|
type ButtonType = 'button' | 'submit' | 'reset';
|
|
11
11
|
|
|
12
12
|
declare class ButtonComponent extends DsMessageBase {
|
|
13
|
+
protected readonly reserveFollowsFieldDefault = false;
|
|
13
14
|
protected readonly inGroup: boolean;
|
|
14
15
|
/** Brand/status hue family. */
|
|
15
16
|
readonly color: _angular_core.InputSignal<ButtonColor>;
|
|
@@ -51,9 +52,9 @@ declare class ButtonComponent extends DsMessageBase {
|
|
|
51
52
|
* stays lit inside its own pages. It also bounds the announcement, because the same directive
|
|
52
53
|
* writes it: narrowed to `{ exact: true }`, a prefix match is no longer active and the link
|
|
53
54
|
* announces nothing rather than `true`. Pass `ariaCurrent` alongside to keep one. */
|
|
54
|
-
readonly routerLinkActiveOptions: _angular_core.InputSignal<
|
|
55
|
+
readonly routerLinkActiveOptions: _angular_core.InputSignal<{
|
|
55
56
|
exact: boolean;
|
|
56
|
-
}>;
|
|
57
|
+
} | IsActiveMatchOptions>;
|
|
57
58
|
/** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match
|
|
58
59
|
* announces `true`, which is what ARIA means by each; pass `null` to announce nothing, or one
|
|
59
60
|
* of the other values when the link is a step or a location rather than a page. */
|
|
@@ -20,14 +20,37 @@ declare class ChartLegendComponent {
|
|
|
20
20
|
/** Ids of the hidden items. Two-way, so a page can drive it from a URL parameter and so
|
|
21
21
|
* cross-chart filtering later is this same mechanism. */
|
|
22
22
|
readonly hidden: _angular_core.ModelSignal<readonly string[]>;
|
|
23
|
-
/** Offers the
|
|
23
|
+
/** Offers the control. Off leaves the legend a plain key. */
|
|
24
24
|
readonly toggleable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
25
|
+
/** What a control does. `'isolate'` shows one series and hides the rest, which is the question a
|
|
26
|
+
* reader of a crowded chart actually asks — "show me only this" takes one action instead of one
|
|
27
|
+
* per series. `'toggle'` hides one and leaves the rest, for taking a dominant series out so the
|
|
28
|
+
* others can be read at a usable scale.
|
|
29
|
+
*
|
|
30
|
+
* The two are different controls, not two styles of one: isolate is a single choice among many,
|
|
31
|
+
* so it renders as a radio group with an "All" option, and toggle renders as checkboxes. That is
|
|
32
|
+
* what gives each the keyboard and screen-reader behaviour it should have. */
|
|
33
|
+
readonly mode: _angular_core.InputSignal<"toggle" | "isolate">;
|
|
25
34
|
/** The item under the pointer or holding focus, which is what the chart dims from. */
|
|
26
35
|
readonly highlighted: _angular_core.ModelSignal<string | null>;
|
|
27
36
|
protected isHidden(id: string): boolean;
|
|
28
37
|
protected toggle(id: string): void;
|
|
38
|
+
/** Radio groups are scoped by NAME across the whole document, so a shared name would make every
|
|
39
|
+
* legend on a page one group: choosing a series in one chart would clear the choice in all the
|
|
40
|
+
* others, and only the last one rendered would show a selection at all. */
|
|
41
|
+
protected readonly groupName: string;
|
|
42
|
+
/** Which radio is on: an item's id, or the two ends of the range. Always one of them, so the
|
|
43
|
+
* group is never a set of empty circles with nothing chosen — a radio group with no selection
|
|
44
|
+
* reads as broken, and the reader cannot tell "everything" from "not decided yet".
|
|
45
|
+
*
|
|
46
|
+
* A partial set left over from `'toggle'` — some hidden, more than one visible — is not a state
|
|
47
|
+
* isolate can express, so it settles on `'all'` and the next choice makes it true. */
|
|
48
|
+
protected readonly isolated: _angular_core.Signal<string>;
|
|
49
|
+
protected isolate(id: string): void;
|
|
50
|
+
protected showAll(): void;
|
|
51
|
+
protected hideAll(): void;
|
|
29
52
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartLegendComponent, never>;
|
|
30
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartLegendComponent, "ds-chart-legend", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "highlighted": "highlightedChange"; }, never, never, true, never>;
|
|
53
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartLegendComponent, "ds-chart-legend", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "highlighted": "highlightedChange"; }, never, never, true, never>;
|
|
31
54
|
}
|
|
32
55
|
|
|
33
56
|
export { ChartLegendComponent };
|
|
@@ -47,15 +47,25 @@ declare class ChartTooltipDirective {
|
|
|
47
47
|
readonly dsChartTooltipTemplate: _angular_core.InputSignal<TemplateRef<{
|
|
48
48
|
$implicit: ChartTooltipContext;
|
|
49
49
|
}> | null>;
|
|
50
|
+
/** Extra clearance between the mark and the panel, on top of the pointer default. A chart that
|
|
51
|
+
* prints something ABOVE its mark — a column with its value on top — needs the panel to clear
|
|
52
|
+
* that text as well as the mark, or the two overlap. Ignored for touch, where the gap is already
|
|
53
|
+
* sized for a fingertip. */
|
|
54
|
+
readonly dsChartTooltipExtraGap: _angular_core.InputSignal<number>;
|
|
55
|
+
/** Opens the panel BELOW the mark first. A chart sets it while a mark is held, so the panel
|
|
56
|
+
* leaves the plot's top edge — and the Unpin control that lives there — alone. */
|
|
57
|
+
readonly dsChartTooltipPreferBelow: _angular_core.InputSignal<boolean>;
|
|
50
58
|
private overlayRef;
|
|
51
59
|
private panelRef;
|
|
52
|
-
private
|
|
60
|
+
private detachScrollReposition;
|
|
61
|
+
private detachEscape;
|
|
53
62
|
constructor();
|
|
54
63
|
private open;
|
|
55
64
|
private strategyFor;
|
|
65
|
+
private closeOnEscape;
|
|
56
66
|
private close;
|
|
57
67
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartTooltipDirective, never>;
|
|
58
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChartTooltipDirective, "[dsChartTooltip]", never, { "dsChartTooltip": { "alias": "dsChartTooltip"; "required": false; "isSignal": true; }; "dsChartTooltipOrigin": { "alias": "dsChartTooltipOrigin"; "required": false; "isSignal": true; }; "dsChartTooltipTemplate": { "alias": "dsChartTooltipTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
68
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChartTooltipDirective, "[dsChartTooltip]", never, { "dsChartTooltip": { "alias": "dsChartTooltip"; "required": false; "isSignal": true; }; "dsChartTooltipOrigin": { "alias": "dsChartTooltipOrigin"; "required": false; "isSignal": true; }; "dsChartTooltipTemplate": { "alias": "dsChartTooltipTemplate"; "required": false; "isSignal": true; }; "dsChartTooltipExtraGap": { "alias": "dsChartTooltipExtraGap"; "required": false; "isSignal": true; }; "dsChartTooltipPreferBelow": { "alias": "dsChartTooltipPreferBelow"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
59
69
|
}
|
|
60
70
|
|
|
61
71
|
/** @internal */
|
|
@@ -64,8 +74,15 @@ interface ChartActiveMark {
|
|
|
64
74
|
readonly index: Signal<number>;
|
|
65
75
|
/** The mark's own element, which is what the tooltip anchors to. */
|
|
66
76
|
readonly origin: Signal<Element | null>;
|
|
67
|
-
|
|
77
|
+
/** Whether the active mark is held rather than followed — a tap, or a click under `pinOnClick`. */
|
|
78
|
+
readonly pinned: Signal<boolean>;
|
|
79
|
+
enter(index: number, event: Event, anchor?: string | Element | null): void;
|
|
68
80
|
leave(): void;
|
|
81
|
+
/** Holds the mark that was activated, for any pointer type. Activating the mark that is already
|
|
82
|
+
* pinned releases it, so one gesture both sets and clears. */
|
|
83
|
+
pin(index: number, event: Event, anchor?: string | Element | null): void;
|
|
84
|
+
/** Lets go of a held mark, for a control that offers the way out in as many words. */
|
|
85
|
+
release(): void;
|
|
69
86
|
}
|
|
70
87
|
/**
|
|
71
88
|
* The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.
|
|
@@ -78,7 +95,7 @@ interface ChartActiveMark {
|
|
|
78
95
|
*
|
|
79
96
|
* @internal
|
|
80
97
|
*/
|
|
81
|
-
declare function chartActiveMark(): ChartActiveMark;
|
|
98
|
+
declare function chartActiveMark(lingerMs?: () => number): ChartActiveMark;
|
|
82
99
|
|
|
83
100
|
export { ChartTooltipDirective, chartActiveMark };
|
|
84
101
|
export type { ChartActiveMark, ChartItemTooltipTrigger, ChartTooltipContext, ChartTooltipEntry, ChartTooltipOrigin, ChartTooltipTrigger };
|