@besaitech/ng-design-system 0.0.67 → 0.0.68

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.
@@ -0,0 +1,1257 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import * as d3_scale from 'd3-scale';
4
+ import * as _besaitech_ng_design_system from '@besaitech/ng-design-system';
5
+
6
+ /** A value the x / category axis can carry. ISO date strings (`2026-03-01`) are read as dates. */
7
+ type SdsXValue = string | number | Date;
8
+ /**
9
+ * How a chart reads a field from a row: either the property name, or a function. The function form
10
+ * covers derived values (`row => row.cost / row.units`) and nested data (`row => row.stats.total`).
11
+ */
12
+ type SdsAccessor<T, R> = (keyof T & string) | ((row: T, index: number) => R);
13
+ /** A number format: `Intl.NumberFormatOptions` (locale-aware, the default) or your own function. */
14
+ type SdsNumberFormat = Intl.NumberFormatOptions | ((value: number) => string);
15
+ /**
16
+ * An x-axis format. Options objects are interpreted from the axis kind: `Intl.DateTimeFormatOptions`
17
+ * on a time axis, `Intl.NumberFormatOptions` on a numeric one. Category axes print the value as-is
18
+ * unless a function is given.
19
+ */
20
+ type SdsXFormat = Intl.DateTimeFormatOptions | Intl.NumberFormatOptions | ((value: SdsXValue) => string);
21
+ /** What the x axis is. `auto` infers it from the data: Date / ISO string → time, number → linear. */
22
+ type SdsChartXType = 'auto' | 'time' | 'linear' | 'category';
23
+ /** Value-axis scale. `log` needs strictly positive values (non-positive points are dropped). */
24
+ type SdsChartScale = 'linear' | 'log';
25
+ /**
26
+ * Where the legend sits. `auto` picks the chart's natural place (top for two or more series, none for
27
+ * one; right for a donut). `right` falls back to below on narrow containers.
28
+ */
29
+ type SdsChartLegend = 'auto' | 'top' | 'bottom' | 'right' | 'none';
30
+ /** Which gridlines to draw. They are always solid hairlines, never dashed. */
31
+ type SdsChartGrid = 'y' | 'x' | 'both' | 'none';
32
+ /** Stacking: `stacked` piles the series, `percent` normalises every stack to 100 %. */
33
+ type SdsChartStack = 'none' | 'stacked' | 'percent';
34
+ /** Semantic tone for annotations and single-colour charts. */
35
+ type SdsChartTone = 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
36
+ /** One plotted measure. `key` is both the row property it reads and the series' identity. */
37
+ interface SdsChartSeries<T = any> {
38
+ /** Row property holding the value — and the stable id used for colour, legend and toggling. */
39
+ key: string;
40
+ /** Human label (legend, tooltip, table header). Defaults to `key`. */
41
+ label?: string;
42
+ /** Read the value with a function instead of `row[key]` (derived or nested values). */
43
+ value?: (row: T, index: number) => number | null | undefined;
44
+ /** Any CSS colour, including `var(--token)`. Defaults to the categorical slot of its index. */
45
+ color?: string;
46
+ /** Per-series value format (tooltip, labels, table). Falls back to the chart's `valueFormat`. */
47
+ format?: SdsNumberFormat;
48
+ /** Line charts: draw dashed — a forecast, a target or a projection. */
49
+ dashed?: boolean;
50
+ /** Bar charts: draw this series as a line over the bars (a combo chart, on the SAME axis). */
51
+ type?: 'bar' | 'line';
52
+ }
53
+ /** A horizontal/vertical reference line — a target, a threshold, a mean. */
54
+ interface SdsChartReferenceLine {
55
+ type: 'line';
56
+ /** `y` (default) draws across the plot at a value; `x` draws down it at an x position. */
57
+ axis?: 'x' | 'y';
58
+ value: SdsXValue;
59
+ label?: string;
60
+ tone?: SdsChartTone;
61
+ }
62
+ /** A shaded range — a normal range, a target zone, a holiday period. */
63
+ interface SdsChartReferenceBand {
64
+ type: 'band';
65
+ axis?: 'x' | 'y';
66
+ from: SdsXValue;
67
+ to: SdsXValue;
68
+ label?: string;
69
+ tone?: SdsChartTone;
70
+ }
71
+ type SdsChartAnnotation = SdsChartReferenceLine | SdsChartReferenceBand;
72
+ /** One line of the tooltip. `value` is already formatted; `raw` is the number behind it. */
73
+ interface SdsChartTooltipRow {
74
+ key: string;
75
+ label: string;
76
+ value: string;
77
+ raw: number | null;
78
+ color: string;
79
+ /** Shape of the key glyph: a short line for lines, a square for bars/areas/slices, a dot for points. */
80
+ shape: 'line' | 'rect' | 'dot';
81
+ }
82
+ /** Context handed to a custom `<ng-template sdsChartTooltip let-tip>` template. */
83
+ interface SdsChartTooltipContext<T = any> {
84
+ /** Formatted heading (the x value, the category, the slice…). */
85
+ title: string;
86
+ rows: SdsChartTooltipRow[];
87
+ /** Optional footer line (a total, a share…). */
88
+ footer?: string;
89
+ /** The source row(s) behind the hovered position. */
90
+ data: T[];
91
+ index: number;
92
+ }
93
+ /** Emitted when a mark is clicked (or activated with Enter on the keyboard). */
94
+ interface SdsChartPointEvent<T = any> {
95
+ /** Series key — or the slice / cell / node id on charts without series. */
96
+ key: string;
97
+ /** The source row (null when the mark aggregates several rows, e.g. the "Other" slice). */
98
+ row: T | null;
99
+ index: number;
100
+ value: number | null;
101
+ x?: SdsXValue;
102
+ /** The row dimension (heatmap). */
103
+ y?: SdsXValue;
104
+ }
105
+
106
+ /**
107
+ * Replace a chart's default tooltip body with your own markup. The template receives the hovered
108
+ * position as `$implicit` ({ title, rows, footer, data, index }) — `data` holds the source rows, so the
109
+ * tooltip can show fields the chart does not plot (a comment, a status, a unit).
110
+ *
111
+ * Works on line, bar, scatter, donut, heatmap and treemap charts (not the sparkline). The chart still
112
+ * positions, flips and clamps the box; you style the body. The box is visual and pointer-transparent:
113
+ * never put links or buttons in it, and keep anything essential in the plotted data too — keyboard and
114
+ * screen-reader users get the default rows through the live region and the table twin.
115
+ *
116
+ * @example
117
+ * <sds-line-chart [data]="rows" x="day" [series]="series">
118
+ * <ng-template sdsChartTooltip let-tip>
119
+ * <p class="font-semibold">{{ tip.title }}</p>
120
+ * <p>{{ tip.data[0].comment }}</p>
121
+ * </ng-template>
122
+ * </sds-line-chart>
123
+ */
124
+ declare class SdsChartTooltip {
125
+ readonly template: TemplateRef<{
126
+ $implicit: SdsChartTooltipContext;
127
+ }>;
128
+ static ngTemplateContextGuard(_dir: SdsChartTooltip, ctx: unknown): ctx is {
129
+ $implicit: SdsChartTooltipContext;
130
+ };
131
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsChartTooltip, never>;
132
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdsChartTooltip, "ng-template[sdsChartTooltip]", never, {}, {}, never, never, true, never>;
133
+ }
134
+
135
+ interface PlotRect {
136
+ left: number;
137
+ top: number;
138
+ width: number;
139
+ height: number;
140
+ }
141
+ interface AxisTick {
142
+ pos: number;
143
+ label: string;
144
+ }
145
+ interface ResolvedAnnotation {
146
+ kind: 'line' | 'band';
147
+ x1: number;
148
+ y1: number;
149
+ x2: number;
150
+ y2: number;
151
+ label: string;
152
+ color: string;
153
+ labelX: number;
154
+ labelY: number;
155
+ anchor: 'start' | 'middle' | 'end';
156
+ }
157
+
158
+ interface LegendItem {
159
+ key: string;
160
+ label: string;
161
+ color: string;
162
+ shape: 'line' | 'rect' | 'dot';
163
+ /** Optional trailing text — a value or a share (the donut's direct labels). */
164
+ detail?: string;
165
+ dashed?: boolean;
166
+ }
167
+ interface ChartTable {
168
+ columns: string[];
169
+ rows: string[][];
170
+ }
171
+
172
+ /** Line interpolation. `monotone` (default) is smooth but never overshoots the data. */
173
+ type SdsLineCurve = 'linear' | 'monotone' | 'step' | 'natural';
174
+ /** Point markers: `auto` = every point on sparse plain lines (≤ 16), only the last on dense lines and plain areas, none on stacks. */
175
+ type SdsLineMarkers = 'auto' | 'all' | 'last' | 'none';
176
+ interface Point<T> {
177
+ row: T;
178
+ index: number;
179
+ x: SdsXValue;
180
+ key: string;
181
+ }
182
+ /** [x, y, y0] in pixels; undefined where the value is missing (the line breaks there). */
183
+ type P3 = readonly number[];
184
+ /**
185
+ * Line and area chart for anything over an ordered axis — time series, numeric x, or categories.
186
+ * Multi-series, stacked or 100 % areas, smooth / step curves, log scale, reference lines and bands,
187
+ * dashed forecast series, a crosshair tooltip listing every series, legend toggling, keyboard
188
+ * navigation and a data-table twin. Rows are read with accessors, so API data plots as-is.
189
+ *
190
+ * @example
191
+ * <sds-line-chart
192
+ * heading="Admissions"
193
+ * [data]="rows"
194
+ * x="date"
195
+ * [series]="[{ key: 'urgences', label: 'Urgences' }, { key: 'programmees', label: 'Programmées' }]"
196
+ * />
197
+ */
198
+ declare class SdsLineChart<T = any> {
199
+ /** The rows to plot — any shape; fields are read through `x` and each series' `key` / `value`. */
200
+ readonly data: _angular_core.InputSignal<readonly T[] | null | undefined>;
201
+ /** The x field: a property name or `(row, i) => value`. Dates, ISO strings, numbers or labels. */
202
+ readonly x: _angular_core.InputSignal<SdsAccessor<T, SdsXValue>>;
203
+ /** The measures to draw. A series keeps its colour slot (its index here) even when hidden. */
204
+ readonly series: _angular_core.InputSignal<readonly SdsChartSeries<T>[]>;
205
+ /** Force the x-axis kind instead of inferring it from the data. */
206
+ readonly xType: _angular_core.InputSignal<SdsChartXType>;
207
+ readonly heading: _angular_core.InputSignal<string>;
208
+ readonly subtitle: _angular_core.InputSignal<string>;
209
+ /** Plot height in px, axis labels included (the chart never scrolls inside itself). */
210
+ readonly height: _angular_core.InputSignalWithTransform<number, unknown>;
211
+ readonly curve: _angular_core.InputSignal<SdsLineCurve>;
212
+ /** Fill under each line with a soft wash of its colour. */
213
+ readonly area: _angular_core.InputSignalWithTransform<boolean, unknown>;
214
+ /** Stack the series as areas (`stacked`) or as shares of 100 % (`percent`). */
215
+ readonly stack: _angular_core.InputSignal<SdsChartStack>;
216
+ readonly markers: _angular_core.InputSignal<SdsLineMarkers>;
217
+ /** Label each line at its last point; converging labels spread apart with leader lines (dropped if they cannot fit). */
218
+ readonly endLabels: _angular_core.InputSignalWithTransform<boolean, unknown>;
219
+ readonly grid: _angular_core.InputSignal<SdsChartGrid>;
220
+ readonly legend: _angular_core.InputSignal<SdsChartLegend>;
221
+ /** Emphasise one series: the others fade back. */
222
+ readonly highlight: _angular_core.InputSignal<string | null>;
223
+ readonly annotations: _angular_core.InputSignal<readonly SdsChartAnnotation[]>;
224
+ readonly yScale: _angular_core.InputSignal<SdsChartScale>;
225
+ readonly yMin: _angular_core.InputSignal<number | null>;
226
+ readonly yMax: _angular_core.InputSignal<number | null>;
227
+ /** Start the value axis at zero. Defaults to true for areas/stacks, false for plain lines. */
228
+ readonly includeZero: _angular_core.InputSignal<boolean | null>;
229
+ /** Format of values in the tooltip, labels and table. Axis ticks derive a compact version. */
230
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
231
+ /** Override the value-axis tick format. */
232
+ readonly axisFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
233
+ /** Format of x values (ticks + tooltip heading). Time axes pick a sensible multi-scale default. */
234
+ readonly xFormat: _angular_core.InputSignal<SdsXFormat | null>;
235
+ readonly xLabel: _angular_core.InputSignal<string>;
236
+ readonly yLabel: _angular_core.InputSignal<string>;
237
+ /** BCP-47 locale for numbers and dates. Defaults to provideSdsCharts() / LOCALE_ID. */
238
+ readonly locale: _angular_core.InputSignal<string | null>;
239
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
240
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
241
+ /** Hold the current render at reduced opacity while new data loads (no skeleton flash). */
242
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
243
+ /** Empty-state text. Default (`null`): the configured `labels.empty` ("No data to display"). */
244
+ readonly emptyText: _angular_core.InputSignal<string | null>;
245
+ /** Show a button that swaps the plot for its data table. */
246
+ readonly tableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
247
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
248
+ /** Keys of the series currently hidden (legend toggles write it back — two-way bindable). */
249
+ readonly hidden: _angular_core.ModelSignal<readonly string[]>;
250
+ /** A point was clicked (the series nearest the pointer) or activated with Enter. */
251
+ readonly pointClick: _angular_core.OutputEmitterRef<SdsChartPointEvent<T>>;
252
+ protected readonly customTooltip: _angular_core.Signal<SdsChartTooltip | undefined>;
253
+ protected readonly uid: string;
254
+ protected readonly legendFocus: _angular_core.WritableSignal<string | null>;
255
+ protected readonly active: _angular_core.WritableSignal<number | null>;
256
+ protected readonly keyboard: _angular_core.WritableSignal<boolean>;
257
+ /** Leaving the chart dismisses a keyboard-driven readout (a pointer one clears on pointerleave). */
258
+ protected onBlur(): void;
259
+ private readonly pointerY;
260
+ private readonly width;
261
+ private readonly loc;
262
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
263
+ protected readonly text: _angular_core.Signal<_besaitech_ng_design_system.SdsChartLabels>;
264
+ private readonly animates;
265
+ private readonly palette;
266
+ protected readonly stacked: _angular_core.Signal<boolean>;
267
+ private readonly model;
268
+ private readonly allSeries;
269
+ private readonly visible;
270
+ /** Raw values per series, aligned with the sorted points (null = missing → a gap). */
271
+ private readonly values;
272
+ /** [y0, y1] per series and point — stacked offsets, or a baseline of 0 for plain lines. */
273
+ private readonly bands;
274
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
275
+ /** Axis formatter at a given precision (uniqueLabels raises it until ticks stop repeating). */
276
+ private readonly axisMaker;
277
+ private readonly fmtX;
278
+ protected readonly layout: _angular_core.Signal<{
279
+ width: number;
280
+ height: number;
281
+ plot: PlotRect;
282
+ y: d3_scale.ScaleLinear<number, number, never>;
283
+ xPos: (p: Point<T>) => number;
284
+ mapX: (v: SdsXValue) => number | null;
285
+ xTicks: AxisTick[];
286
+ yTicks: AxisTick[];
287
+ baseline: number;
288
+ baseY: number;
289
+ } | null>;
290
+ private timeTicks;
291
+ private readonly target;
292
+ /** Boolean, so a resize (width A → B) never counts as a data change: resizes snap, data animates. */
293
+ private readonly ready;
294
+ private readonly version;
295
+ private readonly geometry;
296
+ protected readonly drawn: _angular_core.Signal<{
297
+ key: string;
298
+ color: string;
299
+ dashed: boolean;
300
+ dim: boolean;
301
+ line: string;
302
+ area: string | null;
303
+ markers: P3[];
304
+ }[]>;
305
+ protected readonly annotationsPx: _angular_core.Signal<ResolvedAnnotation[]>;
306
+ /**
307
+ * End labels. Where lines converge the labels are spread apart (never stacked on each other) and a
308
+ * hairline leader ties each displaced label back to its line end. If they cannot all fit in the plot
309
+ * height the set is dropped — the legend then carries identity.
310
+ */
311
+ protected readonly endLabelsPx: _angular_core.Signal<{
312
+ tx: number;
313
+ leader: boolean;
314
+ key: string;
315
+ label: string;
316
+ x: number;
317
+ anchorY: number;
318
+ y: number;
319
+ dim: boolean;
320
+ }[]>;
321
+ protected readonly activePx: _angular_core.Signal<{
322
+ x: number;
323
+ dots: {
324
+ key: string;
325
+ y: number;
326
+ color: string;
327
+ }[];
328
+ } | null>;
329
+ protected readonly tooltipY: _angular_core.Signal<number>;
330
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<T> | null>;
331
+ protected readonly liveText: _angular_core.Signal<string>;
332
+ protected onPointer(event: PointerEvent): void;
333
+ private nearestIndex;
334
+ protected onClick(): void;
335
+ protected onKey(event: KeyboardEvent): void;
336
+ protected toggleSeries(key: string): void;
337
+ protected readonly legendPosition: _angular_core.Signal<"top" | "bottom" | "right" | "none">;
338
+ protected readonly legendItems: _angular_core.Signal<LegendItem[]>;
339
+ protected readonly label: _angular_core.Signal<string>;
340
+ protected readonly table: _angular_core.Signal<ChartTable>;
341
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsLineChart<any>, never>;
342
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsLineChart<any>, "sds-line-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "x": { "alias": "x"; "required": true; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; "xType": { "alias": "xType"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "curve": { "alias": "curve"; "required": false; "isSignal": true; }; "area": { "alias": "area"; "required": false; "isSignal": true; }; "stack": { "alias": "stack"; "required": false; "isSignal": true; }; "markers": { "alias": "markers"; "required": false; "isSignal": true; }; "endLabels": { "alias": "endLabels"; "required": false; "isSignal": true; }; "grid": { "alias": "grid"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "highlight": { "alias": "highlight"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "yScale": { "alias": "yScale"; "required": false; "isSignal": true; }; "yMin": { "alias": "yMin"; "required": false; "isSignal": true; }; "yMax": { "alias": "yMax"; "required": false; "isSignal": true; }; "includeZero": { "alias": "includeZero"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "xFormat": { "alias": "xFormat"; "required": false; "isSignal": true; }; "xLabel": { "alias": "xLabel"; "required": false; "isSignal": true; }; "yLabel": { "alias": "yLabel"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "tableToggle": { "alias": "tableToggle"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "pointClick": "pointClick"; }, ["customTooltip"], never, true, never>;
343
+ }
344
+
345
+ /** `vertical` = columns rising from the category axis; `horizontal` = bars (best for long labels / rankings). */
346
+ type SdsBarOrientation = 'vertical' | 'horizontal';
347
+ /** Order the categories by their total. `none` keeps the data order. */
348
+ type SdsBarSort = 'none' | 'asc' | 'desc';
349
+ /**
350
+ * Bar and column chart for comparing categories: grouped, stacked or 100 % stacked, vertical or
351
+ * horizontal, with negative values, value labels that are only drawn where they fit, sorting,
352
+ * per-bar colours, a combo `type: 'line'` series on the same axis, reference lines (targets) and a
353
+ * per-category tooltip listing every series. Bars are capped in thickness, rounded on their data end
354
+ * only, and separated by a 2 px surface gap — never outlined.
355
+ *
356
+ * @example
357
+ * <sds-bar-chart
358
+ * heading="Séjours par service"
359
+ * [data]="rows"
360
+ * x="mois"
361
+ * [series]="[{ key: 'cardio', label: 'Cardiologie' }, { key: 'neuro', label: 'Neurologie' }]"
362
+ * stack="stacked"
363
+ * />
364
+ */
365
+ declare class SdsBarChart<T = any> {
366
+ readonly data: _angular_core.InputSignal<readonly T[] | null | undefined>;
367
+ /** The category field: a property name or `(row, i) => value`. */
368
+ readonly x: _angular_core.InputSignal<SdsAccessor<T, SdsXValue>>;
369
+ /** The measures. A `type: 'line'` series is drawn as a line over the bars (vertical only). */
370
+ readonly series: _angular_core.InputSignal<readonly SdsChartSeries<T>[]>;
371
+ readonly heading: _angular_core.InputSignal<string>;
372
+ readonly subtitle: _angular_core.InputSignal<string>;
373
+ readonly orientation: _angular_core.InputSignal<SdsBarOrientation>;
374
+ readonly stack: _angular_core.InputSignal<SdsChartStack>;
375
+ /** Height in px, axes included. Defaults to 300 (vertical) or one row per category (horizontal). */
376
+ readonly height: _angular_core.InputSignalWithTransform<number | null, unknown>;
377
+ /** Maximum bar thickness in px — bars never fill their slot; the leftover is air. */
378
+ readonly maxBarSize: _angular_core.InputSignalWithTransform<number, unknown>;
379
+ /** Corner radius of the bar's data end (its baseline end stays square). */
380
+ readonly radius: _angular_core.InputSignalWithTransform<number, unknown>;
381
+ /** Print each bar's value at its tip (each stack's total when stacked) — only where it fits. */
382
+ readonly showValues: _angular_core.InputSignalWithTransform<boolean, unknown>;
383
+ readonly sort: _angular_core.InputSignal<SdsBarSort>;
384
+ /** Emphasise some categories (their x values): the other bars fade back. (Series emphasis: hover the legend.) */
385
+ readonly highlightCategories: _angular_core.InputSignal<SdsXValue | readonly SdsXValue[] | null>;
386
+ /** Colour one bar from its data — e.g. negatives in red, or a status. Return null to keep the series colour. */
387
+ readonly barColor: _angular_core.InputSignal<((row: T, seriesKey: string, value: number) => string | null | undefined) | null>;
388
+ readonly grid: _angular_core.InputSignal<SdsChartGrid | null>;
389
+ readonly legend: _angular_core.InputSignal<SdsChartLegend>;
390
+ /** Reference lines / bands. `axis: 'y'` (default) is the VALUE axis in both orientations. */
391
+ readonly annotations: _angular_core.InputSignal<readonly SdsChartAnnotation[]>;
392
+ readonly yMin: _angular_core.InputSignal<number | null>;
393
+ readonly yMax: _angular_core.InputSignal<number | null>;
394
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
395
+ readonly axisFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
396
+ /** Format of the category labels (dates are formatted at their granularity by default). */
397
+ readonly xFormat: _angular_core.InputSignal<SdsXFormat | null>;
398
+ readonly xLabel: _angular_core.InputSignal<string>;
399
+ readonly yLabel: _angular_core.InputSignal<string>;
400
+ readonly locale: _angular_core.InputSignal<string | null>;
401
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
402
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
403
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
404
+ /** Empty-state text. Default (`null`): the configured `labels.empty` ("No data to display"). */
405
+ readonly emptyText: _angular_core.InputSignal<string | null>;
406
+ readonly tableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
407
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
408
+ readonly hidden: _angular_core.ModelSignal<readonly string[]>;
409
+ /** A bar (or a category, from the keyboard) was clicked. */
410
+ readonly pointClick: _angular_core.OutputEmitterRef<SdsChartPointEvent<T>>;
411
+ protected readonly customTooltip: _angular_core.Signal<SdsChartTooltip | undefined>;
412
+ protected readonly legendFocus: _angular_core.WritableSignal<string | null>;
413
+ protected readonly active: _angular_core.WritableSignal<number | null>;
414
+ protected readonly keyboard: _angular_core.WritableSignal<boolean>;
415
+ /** Leaving the chart dismisses a keyboard-driven readout (a pointer one clears on pointerleave). */
416
+ protected onBlur(): void;
417
+ private readonly pointer;
418
+ private readonly width;
419
+ private readonly loc;
420
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
421
+ protected readonly text: _angular_core.Signal<_besaitech_ng_design_system.SdsChartLabels>;
422
+ private readonly animates;
423
+ private readonly palette;
424
+ private readonly horizontal;
425
+ private readonly stacked;
426
+ private readonly allSeries;
427
+ private readonly visible;
428
+ private readonly barSeries;
429
+ private readonly lineSeries;
430
+ private readonly raw;
431
+ private readonly rawValues;
432
+ /** Categories in display order (sorted by total of the visible bar series when asked). */
433
+ private readonly order;
434
+ /** [v0, v1] per bar series per category (value space). */
435
+ private readonly extents;
436
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
437
+ private readonly axisMaker;
438
+ private readonly fmtCat;
439
+ /** Bars-per-group (1 when stacked) — drives row height for auto-sized horizontal charts. */
440
+ private readonly groupCount;
441
+ protected readonly resolvedHeight: _angular_core.Signal<number>;
442
+ protected readonly layout: _angular_core.Signal<{
443
+ readonly width: number;
444
+ readonly height: number;
445
+ readonly horizontal: boolean;
446
+ readonly plot: PlotRect;
447
+ readonly value: d3_scale.ScaleLinear<number, number, never>;
448
+ readonly band: d3_scale.ScaleBand<number>;
449
+ readonly bw: number;
450
+ readonly barSize: number;
451
+ readonly groupSize: number;
452
+ readonly base: number;
453
+ readonly grid: SdsChartGrid;
454
+ readonly xTicks: AxisTick[];
455
+ readonly yTicks: AxisTick[];
456
+ } | null>;
457
+ /** Formatted values that may be printed as labels (for margin sizing). */
458
+ private readonly labelTexts;
459
+ /** Target pixel geometry per bar / line point, plus the non-animated facts about each bar. */
460
+ private readonly targetModel;
461
+ private readonly target;
462
+ private readonly meta;
463
+ /** Boolean, so a resize (width A → B) never counts as a data change: resizes snap, data animates. */
464
+ private readonly ready;
465
+ private readonly version;
466
+ private readonly geometry;
467
+ private readonly highlightSet;
468
+ protected readonly bars: _angular_core.Signal<{
469
+ id: string;
470
+ d: string;
471
+ color: string;
472
+ dim: boolean;
473
+ }[]>;
474
+ protected readonly lines: _angular_core.Signal<{
475
+ key: string;
476
+ color: string;
477
+ dashed: boolean;
478
+ dim: boolean;
479
+ d: string;
480
+ points: (readonly number[])[];
481
+ }[]>;
482
+ /** Value labels at the bar tips — dropped wherever they would not fit or would collide. */
483
+ protected readonly valueLabels: _angular_core.Signal<{
484
+ id: string;
485
+ x: number;
486
+ y: number;
487
+ text: string;
488
+ anchor: "start" | "middle" | "end";
489
+ }[]>;
490
+ protected readonly annotationsPx: _angular_core.Signal<ResolvedAnnotation[]>;
491
+ /** One hit target per category — the whole band step, bigger than any bar in it. */
492
+ protected readonly hits: _angular_core.Signal<{
493
+ index: number;
494
+ x: number;
495
+ y: number;
496
+ w: number;
497
+ h: number;
498
+ }[]>;
499
+ protected readonly hoverBand: _angular_core.Signal<{
500
+ x: number;
501
+ y: number;
502
+ w: number;
503
+ h: number;
504
+ } | null>;
505
+ protected readonly tooltipAt: _angular_core.Signal<{
506
+ x: number;
507
+ y: number;
508
+ }>;
509
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<T> | null>;
510
+ protected readonly liveText: _angular_core.Signal<string>;
511
+ private local;
512
+ protected enter(index: number, event: PointerEvent): void;
513
+ protected move(event: PointerEvent): void;
514
+ protected onClick(index: number, event?: MouseEvent): void;
515
+ protected onKey(event: KeyboardEvent): void;
516
+ protected toggleSeries(key: string): void;
517
+ protected readonly legendPosition: _angular_core.Signal<"top" | "bottom" | "right" | "none">;
518
+ protected readonly legendItems: _angular_core.Signal<LegendItem[]>;
519
+ protected readonly label: _angular_core.Signal<string>;
520
+ protected readonly table: _angular_core.Signal<ChartTable>;
521
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsBarChart<any>, never>;
522
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsBarChart<any>, "sds-bar-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "x": { "alias": "x"; "required": true; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "stack": { "alias": "stack"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxBarSize": { "alias": "maxBarSize"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "highlightCategories": { "alias": "highlightCategories"; "required": false; "isSignal": true; }; "barColor": { "alias": "barColor"; "required": false; "isSignal": true; }; "grid": { "alias": "grid"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "yMin": { "alias": "yMin"; "required": false; "isSignal": true; }; "yMax": { "alias": "yMax"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "xFormat": { "alias": "xFormat"; "required": false; "isSignal": true; }; "xLabel": { "alias": "xLabel"; "required": false; "isSignal": true; }; "yLabel": { "alias": "yLabel"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "tableToggle": { "alias": "tableToggle"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "pointClick": "pointClick"; }, ["customTooltip"], never, true, never>;
523
+ }
524
+
525
+ interface Dot<T> {
526
+ row: T;
527
+ index: number;
528
+ id: string;
529
+ x: number;
530
+ xDate: boolean;
531
+ y: number;
532
+ size: number | null;
533
+ group: string;
534
+ label: string;
535
+ }
536
+ /**
537
+ * Scatter and bubble chart for relationships between two measures — with an optional third measure
538
+ * as bubble area and a categorical group as colour. Linear / log / time axes, per-group least-squares
539
+ * trend lines, reference lines and bands on either axis, nearest-point hover (a Delaunay search, so
540
+ * the pointer only has to be closest — never dead-centre on an 8 px dot), keyboard stepping and a
541
+ * data-table twin. Keep groups to three or fewer: past that, colours stop separating in a cloud.
542
+ *
543
+ * @example
544
+ * <sds-scatter-chart
545
+ * [data]="patients"
546
+ * x="age"
547
+ * y="duree"
548
+ * group="service"
549
+ * size="cout"
550
+ * xLabel="Âge"
551
+ * yLabel="Durée de séjour (j)"
552
+ * trendline
553
+ * />
554
+ */
555
+ declare class SdsScatterChart<T = any> {
556
+ readonly data: _angular_core.InputSignal<readonly T[] | null | undefined>;
557
+ /** Horizontal measure: numbers, Dates or ISO strings. */
558
+ readonly x: _angular_core.InputSignal<SdsAccessor<T, SdsXValue>>;
559
+ /** Vertical measure. */
560
+ readonly y: _angular_core.InputSignal<SdsAccessor<T, number | null | undefined>>;
561
+ /** Optional third measure, encoded as bubble AREA (not radius — area reads true). */
562
+ readonly size: _angular_core.InputSignal<SdsAccessor<T, number | null | undefined> | null>;
563
+ /** Optional categorical field coloured by slot. Three groups or fewer read best. */
564
+ readonly group: _angular_core.InputSignal<SdsAccessor<T, string | null | undefined> | null>;
565
+ /** Optional point name for the tooltip heading and the table (also the point's animation identity). */
566
+ readonly pointLabel: _angular_core.InputSignal<SdsAccessor<T, string | null | undefined> | null>;
567
+ /** Fix the group order (and so their colours) instead of first-appearance order. */
568
+ readonly groupOrder: _angular_core.InputSignal<readonly string[] | null>;
569
+ readonly heading: _angular_core.InputSignal<string>;
570
+ readonly subtitle: _angular_core.InputSignal<string>;
571
+ readonly height: _angular_core.InputSignalWithTransform<number, unknown>;
572
+ /** Dot radius when there is no `size` measure. */
573
+ readonly radius: _angular_core.InputSignalWithTransform<number, unknown>;
574
+ /** Largest bubble radius when `size` is set. */
575
+ readonly maxRadius: _angular_core.InputSignalWithTransform<number, unknown>;
576
+ /** Draw a least-squares trend line per group (dashed — it is a model, not data). Linear axes only. */
577
+ readonly trendline: _angular_core.InputSignalWithTransform<boolean, unknown>;
578
+ readonly grid: _angular_core.InputSignal<SdsChartGrid>;
579
+ readonly legend: _angular_core.InputSignal<SdsChartLegend>;
580
+ readonly annotations: _angular_core.InputSignal<readonly SdsChartAnnotation[]>;
581
+ readonly xScale: _angular_core.InputSignal<SdsChartScale>;
582
+ readonly yScale: _angular_core.InputSignal<SdsChartScale>;
583
+ readonly xMin: _angular_core.InputSignal<number | null>;
584
+ readonly xMax: _angular_core.InputSignal<number | null>;
585
+ readonly yMin: _angular_core.InputSignal<number | null>;
586
+ readonly yMax: _angular_core.InputSignal<number | null>;
587
+ readonly includeZero: _angular_core.InputSignalWithTransform<boolean, unknown>;
588
+ readonly xFormat: _angular_core.InputSignal<SdsXFormat | null>;
589
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
590
+ /** Override the y-axis tick format (defaults to a compact form of `valueFormat`). */
591
+ readonly axisFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
592
+ readonly sizeFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
593
+ readonly xLabel: _angular_core.InputSignal<string>;
594
+ readonly yLabel: _angular_core.InputSignal<string>;
595
+ /** Name of the bubble size (tooltip, table). Default (`null`): the configured `labels.size`. */
596
+ readonly sizeLabel: _angular_core.InputSignal<string | null>;
597
+ protected readonly sizeName: _angular_core.Signal<string>;
598
+ readonly locale: _angular_core.InputSignal<string | null>;
599
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
600
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
601
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
602
+ /** Empty-state text. Default (`null`): the configured `labels.empty` ("No data to display"). */
603
+ readonly emptyText: _angular_core.InputSignal<string | null>;
604
+ readonly tableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
605
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
606
+ /** Hidden group names (two-way bindable; the legend toggles them). */
607
+ readonly hidden: _angular_core.ModelSignal<readonly string[]>;
608
+ readonly pointClick: _angular_core.OutputEmitterRef<SdsChartPointEvent<T>>;
609
+ protected readonly customTooltip: _angular_core.Signal<SdsChartTooltip | undefined>;
610
+ protected readonly uid: string;
611
+ protected readonly legendFocus: _angular_core.WritableSignal<string | null>;
612
+ protected readonly active: _angular_core.WritableSignal<number | null>;
613
+ protected readonly keyboard: _angular_core.WritableSignal<boolean>;
614
+ /** Leaving the chart dismisses a keyboard-driven readout (a pointer one clears on pointerleave). */
615
+ protected onBlur(): void;
616
+ private readonly width;
617
+ private readonly loc;
618
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
619
+ protected readonly text: _angular_core.Signal<_besaitech_ng_design_system.SdsChartLabels>;
620
+ private readonly animates;
621
+ private readonly palette;
622
+ protected readonly bubbles: _angular_core.Signal<boolean>;
623
+ private readonly points;
624
+ private readonly xIsTime;
625
+ /** Groups in colour order; a group keeps its slot when others are hidden. */
626
+ protected readonly groups: _angular_core.Signal<{
627
+ name: string;
628
+ color: string;
629
+ }[]>;
630
+ private readonly colorOf;
631
+ private readonly visiblePoints;
632
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
633
+ private readonly fmtY;
634
+ private readonly fmtSize;
635
+ private readonly fmtX;
636
+ protected readonly layout: _angular_core.Signal<{
637
+ width: number;
638
+ height: number;
639
+ plot: PlotRect;
640
+ x: (v: number) => number;
641
+ y: (v: number) => number;
642
+ radius: (p: Dot<T>) => number;
643
+ xTicks: AxisTick[];
644
+ yTicks: {
645
+ pos: number;
646
+ label: string;
647
+ }[];
648
+ clipPad: number;
649
+ } | null>;
650
+ private readonly target;
651
+ /** Boolean, so a resize (width A → B) never counts as a data change: resizes snap, data animates. */
652
+ private readonly ready;
653
+ private readonly version;
654
+ private readonly geometry;
655
+ protected readonly dots: _angular_core.Signal<{
656
+ id: string;
657
+ cx: number;
658
+ cy: number;
659
+ r: number;
660
+ color: string;
661
+ dim: boolean;
662
+ size: number;
663
+ }[]>;
664
+ /** Least-squares fit per visible group, drawn across that group's own x range. */
665
+ protected readonly trends: _angular_core.Signal<{
666
+ group: string;
667
+ x1: number;
668
+ y1: number;
669
+ x2: number;
670
+ y2: number;
671
+ color: string;
672
+ dim: boolean;
673
+ }[]>;
674
+ protected readonly annotationsPx: _angular_core.Signal<ResolvedAnnotation[]>;
675
+ /** Nearest-point index, rebuilt only when the geometry settles. */
676
+ private readonly delaunay;
677
+ protected readonly activeDot: _angular_core.Signal<{
678
+ cx: number;
679
+ cy: number;
680
+ r: number;
681
+ color: string;
682
+ } | null>;
683
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<T> | null>;
684
+ protected readonly liveText: _angular_core.Signal<string>;
685
+ protected onPointer(event: PointerEvent): void;
686
+ protected onClick(): void;
687
+ /** Arrow keys step through the points in x order. */
688
+ protected onKey(event: KeyboardEvent): void;
689
+ protected toggleGroup(name: string): void;
690
+ protected readonly legendPosition: _angular_core.Signal<"top" | "bottom" | "right" | "none">;
691
+ protected readonly legendItems: _angular_core.Signal<LegendItem[]>;
692
+ protected readonly label: _angular_core.Signal<string>;
693
+ protected readonly table: _angular_core.Signal<ChartTable>;
694
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsScatterChart<any>, never>;
695
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsScatterChart<any>, "sds-scatter-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "x": { "alias": "x"; "required": true; "isSignal": true; }; "y": { "alias": "y"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "group": { "alias": "group"; "required": false; "isSignal": true; }; "pointLabel": { "alias": "pointLabel"; "required": false; "isSignal": true; }; "groupOrder": { "alias": "groupOrder"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "maxRadius": { "alias": "maxRadius"; "required": false; "isSignal": true; }; "trendline": { "alias": "trendline"; "required": false; "isSignal": true; }; "grid": { "alias": "grid"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "xScale": { "alias": "xScale"; "required": false; "isSignal": true; }; "yScale": { "alias": "yScale"; "required": false; "isSignal": true; }; "xMin": { "alias": "xMin"; "required": false; "isSignal": true; }; "xMax": { "alias": "xMax"; "required": false; "isSignal": true; }; "yMin": { "alias": "yMin"; "required": false; "isSignal": true; }; "yMax": { "alias": "yMax"; "required": false; "isSignal": true; }; "includeZero": { "alias": "includeZero"; "required": false; "isSignal": true; }; "xFormat": { "alias": "xFormat"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "sizeFormat": { "alias": "sizeFormat"; "required": false; "isSignal": true; }; "xLabel": { "alias": "xLabel"; "required": false; "isSignal": true; }; "yLabel": { "alias": "yLabel"; "required": false; "isSignal": true; }; "sizeLabel": { "alias": "sizeLabel"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "tableToggle": { "alias": "tableToggle"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "pointClick": "pointClick"; }, ["customTooltip"], never, true, never>;
696
+ }
697
+
698
+ /** `donut` has a hole for a headline figure; `pie` is solid. */
699
+ type SdsDonutVariant = 'donut' | 'pie';
700
+ /** What the legend prints after each label (the chart's direct labels). */
701
+ type SdsDonutLegendValue = 'percent' | 'value' | 'both' | 'none';
702
+ /** Slice order: `desc` = largest first, `none` = data order. */
703
+ type SdsDonutSort = 'desc' | 'none';
704
+ /** Key of the folded "Other" slice — in `hidden` and in `pointClick.key`. */
705
+ declare const SDS_DONUT_OTHER_KEY = "__sds_other__";
706
+ /**
707
+ * Donut, pie and half-donut for part-to-whole at a glance. Small tails fold into "Other" past
708
+ * `maxSlices` (a pie stops reading beyond ~6 parts), the legend doubles as direct labels with each
709
+ * share, the centre states the total and swaps to the hovered slice, slices separate with a
710
+ * constant 2 px gap, and the whole thing is keyboard-navigable with a data-table twin. Colour follows
711
+ * the category (its position in the data), never its rank.
712
+ *
713
+ * @example
714
+ * <sds-donut-chart heading="Motifs de séjour" [data]="rows" category="motif" value="sejours" />
715
+ */
716
+ declare class SdsDonutChart<T = any> {
717
+ readonly data: _angular_core.InputSignal<readonly T[] | null | undefined>;
718
+ /** The part's name. Rows sharing a name are summed into one slice. */
719
+ readonly category: _angular_core.InputSignal<SdsAccessor<T, string | null | undefined>>;
720
+ /** The part's size (negative and missing values are ignored). */
721
+ readonly value: _angular_core.InputSignal<SdsAccessor<T, number | null | undefined>>;
722
+ /** Optional per-row colour (any CSS colour) — e.g. a status palette. */
723
+ readonly color: _angular_core.InputSignal<SdsAccessor<T, string | null | undefined> | null>;
724
+ readonly heading: _angular_core.InputSignal<string>;
725
+ readonly subtitle: _angular_core.InputSignal<string>;
726
+ readonly variant: _angular_core.InputSignal<SdsDonutVariant>;
727
+ /** Draw a half-donut (a gauge-like arc) instead of a full circle. */
728
+ readonly half: _angular_core.InputSignalWithTransform<boolean, unknown>;
729
+ /** Diameter cap in px (the chart also shrinks to its container). */
730
+ readonly height: _angular_core.InputSignalWithTransform<number, unknown>;
731
+ /** Ring thickness in px. Defaults to ~26 % of the radius. */
732
+ readonly thickness: _angular_core.InputSignalWithTransform<number | null, unknown>;
733
+ /** Beyond this many slices the smallest fold into one "Other" slice. */
734
+ readonly maxSlices: _angular_core.InputSignalWithTransform<number, unknown>;
735
+ /** Name of the folded tail slice. Default (`null`): the configured `labels.other` ("Other"). */
736
+ readonly otherLabel: _angular_core.InputSignal<string | null>;
737
+ /** `desc` (default) orders slices largest first; `none` keeps the data order. */
738
+ readonly sort: _angular_core.InputSignal<SdsDonutSort>;
739
+ /** `auto` = right of the ring (below it on narrow containers). */
740
+ readonly legend: _angular_core.InputSignal<SdsChartLegend>;
741
+ readonly legendValue: _angular_core.InputSignal<SdsDonutLegendValue>;
742
+ /**
743
+ * Headline in the hole. Default (`null`): the configured `labels.total` ("Total"). An empty string
744
+ * `''` hides the centre readout entirely (label and figure — what `null` did before 0.0.67), and the
745
+ * hover tooltip takes over.
746
+ */
747
+ readonly centerLabel: _angular_core.InputSignal<string | null>;
748
+ /** Override the centre figure (e.g. "72 %" for a completion donut). */
749
+ readonly centerValue: _angular_core.InputSignal<string | null>;
750
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
751
+ readonly locale: _angular_core.InputSignal<string | null>;
752
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
753
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
754
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
755
+ /** Empty-state text. Default (`null`): the configured `labels.empty` ("No data to display"). */
756
+ readonly emptyText: _angular_core.InputSignal<string | null>;
757
+ readonly tableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
758
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
759
+ /** Hidden slice keys (category names, or the "Other" slice). Two-way bindable. */
760
+ readonly hidden: _angular_core.ModelSignal<readonly string[]>;
761
+ readonly pointClick: _angular_core.OutputEmitterRef<SdsChartPointEvent<T>>;
762
+ protected readonly customTooltip: _angular_core.Signal<SdsChartTooltip | undefined>;
763
+ protected readonly focus: _angular_core.WritableSignal<string | null>;
764
+ protected readonly active: _angular_core.WritableSignal<string | null>;
765
+ protected readonly keyboard: _angular_core.WritableSignal<boolean>;
766
+ /** Leaving the chart dismisses a keyboard-driven readout (a pointer one clears on pointerleave). */
767
+ protected onBlur(): void;
768
+ protected readonly pointer: _angular_core.WritableSignal<{
769
+ x: number;
770
+ y: number;
771
+ }>;
772
+ private readonly width;
773
+ private readonly loc;
774
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
775
+ protected readonly text: _angular_core.Signal<_besaitech_ng_design_system.SdsChartLabels>;
776
+ private readonly animates;
777
+ private readonly palette;
778
+ private readonly fmt;
779
+ private readonly pct;
780
+ /** Slices after grouping, sorting and folding the tail into "Other". */
781
+ private readonly slices;
782
+ private readonly visible;
783
+ private readonly total;
784
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
785
+ protected readonly size: _angular_core.Signal<number>;
786
+ protected readonly boxHeight: _angular_core.Signal<number>;
787
+ protected readonly showCenter: _angular_core.Signal<boolean>;
788
+ protected readonly showTooltip: _angular_core.Signal<boolean>;
789
+ protected readonly geo: _angular_core.Signal<{
790
+ cx: number;
791
+ cy: number;
792
+ outer: number;
793
+ inner: number;
794
+ start: number;
795
+ end: number;
796
+ valueSize: number;
797
+ labelSize: number;
798
+ labelY: number;
799
+ valueY: number;
800
+ subY: number;
801
+ } | null>;
802
+ private readonly target;
803
+ /** Boolean, so a resize (width A → B) never counts as a data change: resizes snap, data animates. */
804
+ private readonly ready;
805
+ private readonly version;
806
+ private readonly tween;
807
+ protected readonly arcs: _angular_core.Signal<{
808
+ key: string;
809
+ color: string;
810
+ d: string;
811
+ shift: string | null;
812
+ dim: boolean;
813
+ }[]>;
814
+ protected readonly center: _angular_core.Signal<{
815
+ label: string;
816
+ value: string;
817
+ sub: string;
818
+ }>;
819
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<T> | null>;
820
+ /** Spoken readout — from the full label (the centre one is truncated to fit the hole). */
821
+ protected readonly liveText: _angular_core.Signal<string>;
822
+ protected readonly legendPosition: _angular_core.Signal<"top" | "bottom" | "right" | "none">;
823
+ protected hover(key: string, event: PointerEvent): void;
824
+ protected track(event: PointerEvent): void;
825
+ protected emit(key: string): void;
826
+ protected onKey(event: KeyboardEvent): void;
827
+ protected toggleSlice(key: string): void;
828
+ protected readonly legendItems: _angular_core.Signal<LegendItem[]>;
829
+ protected readonly label: _angular_core.Signal<string>;
830
+ protected readonly table: _angular_core.Signal<ChartTable>;
831
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsDonutChart<any>, never>;
832
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsDonutChart<any>, "sds-donut-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "category": { "alias": "category"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "half": { "alias": "half"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "thickness": { "alias": "thickness"; "required": false; "isSignal": true; }; "maxSlices": { "alias": "maxSlices"; "required": false; "isSignal": true; }; "otherLabel": { "alias": "otherLabel"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "legendValue": { "alias": "legendValue"; "required": false; "isSignal": true; }; "centerLabel": { "alias": "centerLabel"; "required": false; "isSignal": true; }; "centerValue": { "alias": "centerValue"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "tableToggle": { "alias": "tableToggle"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "pointClick": "pointClick"; }, ["customTooltip"], never, true, never>;
833
+ }
834
+
835
+ /** `sequential` = magnitude (one hue, pale → strong); `diverging` = polarity around a midpoint. */
836
+ type SdsHeatmapScheme = 'sequential' | 'diverging';
837
+ /**
838
+ * Heatmap — a matrix of two categorical dimensions coloured by a measure: weekday × hour, service ×
839
+ * month, product × region. Sequential (one hue, light → dark) or diverging (two opposite hues around
840
+ * a neutral gray midpoint) colour, mixed by the browser in OKLab from theme tokens so it re-themes and
841
+ * flips to dark mode on its own. Values print inside cells only where they fit, missing cells read
842
+ * as empty (not as zero), arrow keys move cell by cell, and a scale legend states the range.
843
+ *
844
+ * @example
845
+ * <sds-heatmap [data]="rows" x="heure" y="jour" value="arrivees" heading="Arrivées aux urgences" />
846
+ */
847
+ declare class SdsHeatmap<T = any> {
848
+ readonly data: _angular_core.InputSignal<readonly T[] | null | undefined>;
849
+ /** Column dimension. */
850
+ readonly x: _angular_core.InputSignal<SdsAccessor<T, SdsXValue>>;
851
+ /** Row dimension. */
852
+ readonly y: _angular_core.InputSignal<SdsAccessor<T, SdsXValue>>;
853
+ /** The measure colouring each cell. Rows sharing an (x, y) pair are summed. */
854
+ readonly value: _angular_core.InputSignal<SdsAccessor<T, number | null | undefined>>;
855
+ /** Fix column order (default: first appearance). */
856
+ readonly xOrder: _angular_core.InputSignal<readonly SdsXValue[] | null>;
857
+ /** Fix row order (default: first appearance). */
858
+ readonly yOrder: _angular_core.InputSignal<readonly SdsXValue[] | null>;
859
+ readonly heading: _angular_core.InputSignal<string>;
860
+ readonly subtitle: _angular_core.InputSignal<string>;
861
+ readonly scheme: _angular_core.InputSignal<SdsHeatmapScheme>;
862
+ /** Fix the colour domain instead of the data extent. */
863
+ readonly domain: _angular_core.InputSignal<readonly [number, number] | null>;
864
+ /** The diverging scheme's neutral value. */
865
+ readonly midpoint: _angular_core.InputSignalWithTransform<number, unknown>;
866
+ /** Height in px. Defaults to `cellHeight` per row. */
867
+ readonly height: _angular_core.InputSignalWithTransform<number | null, unknown>;
868
+ readonly cellHeight: _angular_core.InputSignalWithTransform<number, unknown>;
869
+ readonly radius: _angular_core.InputSignalWithTransform<number, unknown>;
870
+ /** Print each value inside its cell — only when every value fits (never a partial matrix). */
871
+ readonly showValues: _angular_core.InputSignalWithTransform<boolean, unknown>;
872
+ /** Show the colour-scale legend under the matrix. */
873
+ readonly scaleLegend: _angular_core.InputSignalWithTransform<boolean, unknown>;
874
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
875
+ /** Format of the column / row labels (a function; dates default to their day). */
876
+ readonly xFormat: _angular_core.InputSignal<SdsXFormat | null>;
877
+ /** Name of the measure in the tooltip (e.g. "Arrivals"). Default (`null`): `labels.value`. */
878
+ readonly valueLabel: _angular_core.InputSignal<string | null>;
879
+ /** Column-axis title, drawn under the matrix. */
880
+ readonly xLabel: _angular_core.InputSignal<string>;
881
+ /** Row-axis title, drawn vertically on the left (and the table's first column header). */
882
+ readonly yLabel: _angular_core.InputSignal<string>;
883
+ readonly locale: _angular_core.InputSignal<string | null>;
884
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
885
+ /** Cross-fade cell colours when the data changes. */
886
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
887
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
888
+ /** Empty-state text. Default (`null`): the configured `labels.empty` ("No data to display"). */
889
+ readonly emptyText: _angular_core.InputSignal<string | null>;
890
+ readonly tableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
891
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
892
+ readonly pointClick: _angular_core.OutputEmitterRef<SdsChartPointEvent<T>>;
893
+ protected readonly customTooltip: _angular_core.Signal<SdsChartTooltip | undefined>;
894
+ protected readonly active: _angular_core.WritableSignal<number | null>;
895
+ protected readonly keyboard: _angular_core.WritableSignal<boolean>;
896
+ /** Leaving the chart dismisses a keyboard-driven readout (a pointer one clears on pointerleave). */
897
+ protected onBlur(): void;
898
+ private readonly width;
899
+ private readonly loc;
900
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
901
+ protected readonly text: _angular_core.Signal<_besaitech_ng_design_system.SdsChartLabels>;
902
+ protected readonly animates: _angular_core.Signal<boolean>;
903
+ private readonly fmt;
904
+ private readonly matrix;
905
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
906
+ private readonly fmtX;
907
+ /** Colour domain; the diverging arms are made symmetric so equal distances read as equal. */
908
+ protected readonly scale: _angular_core.Signal<{
909
+ lo: number;
910
+ hi: number;
911
+ mid: number;
912
+ minLabel: string;
913
+ maxLabel: string;
914
+ midLabel: string;
915
+ gradient: string;
916
+ }>;
917
+ /** Signed position on the scale: 0…1 sequential, −1…1 diverging. */
918
+ private position;
919
+ /**
920
+ * Where a cell label switches to the strong-end ink — measured, not guessed: the point where the
921
+ * strong ink starts to out-contrast the pale one, per ramp, in both modes.
922
+ */
923
+ private strongEnd;
924
+ protected readonly resolvedHeight: _angular_core.Signal<number>;
925
+ protected readonly layout: _angular_core.Signal<{
926
+ width: number;
927
+ height: number;
928
+ plot: {
929
+ left: number;
930
+ top: number;
931
+ width: number;
932
+ height: number;
933
+ };
934
+ bx: d3_scale.ScaleBand<number>;
935
+ by: d3_scale.ScaleBand<number>;
936
+ xTicks: AxisTick[];
937
+ yTicks: {
938
+ pos: number;
939
+ label: string;
940
+ }[];
941
+ } | null>;
942
+ protected readonly cells: _angular_core.Signal<{
943
+ id: string;
944
+ i: number;
945
+ x: number;
946
+ y: number;
947
+ w: number;
948
+ h: number;
949
+ fill: string;
950
+ text: string;
951
+ ink: string;
952
+ missing: boolean;
953
+ }[]>;
954
+ protected readonly activeCell: _angular_core.Signal<{
955
+ id: string;
956
+ i: number;
957
+ x: number;
958
+ y: number;
959
+ w: number;
960
+ h: number;
961
+ fill: string;
962
+ text: string;
963
+ ink: string;
964
+ missing: boolean;
965
+ } | null>;
966
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<T> | null>;
967
+ protected readonly liveText: _angular_core.Signal<string>;
968
+ protected hover(i: number, _event: PointerEvent): void;
969
+ protected emit(i: number): void;
970
+ /** Arrow keys move one cell in any direction. */
971
+ protected onKey(event: KeyboardEvent): void;
972
+ protected readonly label: _angular_core.Signal<string>;
973
+ protected readonly table: _angular_core.Signal<ChartTable>;
974
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsHeatmap<any>, never>;
975
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsHeatmap<any>, "sds-heatmap", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "x": { "alias": "x"; "required": true; "isSignal": true; }; "y": { "alias": "y"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "xOrder": { "alias": "xOrder"; "required": false; "isSignal": true; }; "yOrder": { "alias": "yOrder"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "scheme": { "alias": "scheme"; "required": false; "isSignal": true; }; "domain": { "alias": "domain"; "required": false; "isSignal": true; }; "midpoint": { "alias": "midpoint"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "cellHeight": { "alias": "cellHeight"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; "scaleLegend": { "alias": "scaleLegend"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "xFormat": { "alias": "xFormat"; "required": false; "isSignal": true; }; "valueLabel": { "alias": "valueLabel"; "required": false; "isSignal": true; }; "xLabel": { "alias": "xLabel"; "required": false; "isSignal": true; }; "yLabel": { "alias": "yLabel"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "tableToggle": { "alias": "tableToggle"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "pointClick": "pointClick"; }, ["customTooltip"], never, true, never>;
976
+ }
977
+
978
+ /** A treemap node: a leaf carries `value`; a branch carries `children` (its value is their sum). */
979
+ interface SdsTreemapNode {
980
+ name: string;
981
+ value?: number | null;
982
+ children?: readonly SdsTreemapNode[];
983
+ /** Override the colour of this node's whole branch (top-level nodes) or of one leaf. */
984
+ color?: string;
985
+ /** Label ink for a custom `color` (defaults to white). */
986
+ ink?: string;
987
+ }
988
+ /**
989
+ * Treemap for part-to-whole across many items or a hierarchy — budget lines, stock by family, stays
990
+ * by service and unit. Squarified tiles sized by value, coloured by their top-level branch,
991
+ * separated by surface gaps (wider between branches), labelled only where the name fits, with a
992
+ * breadcrumb drill-down: click a branch to zoom into it, the breadcrumb to come back. Leaf clicks
993
+ * emit `pointClick`.
994
+ *
995
+ * @example
996
+ * <sds-treemap heading="Budget 2026" [data]="[{ name: 'Personnel', children: [{ name: 'Soins', value: 48 }] }]" />
997
+ */
998
+ declare class SdsTreemap {
999
+ readonly data: _angular_core.InputSignal<readonly SdsTreemapNode[] | null | undefined>;
1000
+ readonly heading: _angular_core.InputSignal<string>;
1001
+ readonly subtitle: _angular_core.InputSignal<string>;
1002
+ readonly height: _angular_core.InputSignalWithTransform<number, unknown>;
1003
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
1004
+ /** Click a branch to zoom into it (with a breadcrumb back). */
1005
+ readonly drilldown: _angular_core.InputSignalWithTransform<boolean, unknown>;
1006
+ /** Name of the top of the breadcrumb. */
1007
+ /** Default (`null`): the configured `labels.all` ("All"). */
1008
+ readonly rootLabel: _angular_core.InputSignal<string | null>;
1009
+ protected readonly rootName: _angular_core.Signal<string>;
1010
+ /** Print the value under the name inside tiles large enough. */
1011
+ readonly showValues: _angular_core.InputSignalWithTransform<boolean, unknown>;
1012
+ /** `auto` = the branch legend below the tiles when there are two or more branches. */
1013
+ readonly legend: _angular_core.InputSignal<SdsChartLegend>;
1014
+ readonly locale: _angular_core.InputSignal<string | null>;
1015
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
1016
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
1017
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
1018
+ /** Empty-state text. Default (`null`): the configured `labels.empty` ("No data to display"). */
1019
+ readonly emptyText: _angular_core.InputSignal<string | null>;
1020
+ readonly tableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
1021
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
1022
+ /** A leaf tile was clicked (branches zoom instead while `drilldown` is on). `key` is the path "A › B". */
1023
+ readonly pointClick: _angular_core.OutputEmitterRef<SdsChartPointEvent<SdsTreemapNode>>;
1024
+ protected readonly customTooltip: _angular_core.Signal<SdsChartTooltip | undefined>;
1025
+ /** Requested zoom: data indices from the root down to the zoomed branch. */
1026
+ private readonly path;
1027
+ protected readonly active: _angular_core.WritableSignal<string | null>;
1028
+ protected readonly keyboard: _angular_core.WritableSignal<boolean>;
1029
+ private readonly announcement;
1030
+ protected readonly pointer: _angular_core.WritableSignal<{
1031
+ x: number;
1032
+ y: number;
1033
+ }>;
1034
+ protected readonly width: _angular_core.Signal<number>;
1035
+ private readonly loc;
1036
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
1037
+ protected readonly text: _angular_core.Signal<_besaitech_ng_design_system.SdsChartLabels>;
1038
+ private readonly animates;
1039
+ private readonly palette;
1040
+ private readonly fmt;
1041
+ private readonly pct;
1042
+ /** Leaving the chart dismisses a keyboard-driven readout (a pointer one clears on pointerleave). */
1043
+ protected onBlur(): void;
1044
+ /** Full hierarchy, summed once. */
1045
+ private readonly root;
1046
+ private build;
1047
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
1048
+ /**
1049
+ * The zoom that actually applies: the requested path walked against the CURRENT data, stopping at
1050
+ * the first index that no longer names a branch — so new data can never leave a stale zoom behind.
1051
+ */
1052
+ protected readonly zoom: _angular_core.Signal<{
1053
+ node: SdsTreemapNode;
1054
+ indices: number[];
1055
+ names: string[];
1056
+ }>;
1057
+ /** Branch colour + label ink per top-level data index (colour follows the entity, not its size). */
1058
+ private readonly branchStyle;
1059
+ /** The zoomed sub-tree, laid out at the current size. */
1060
+ private readonly layoutRoot;
1061
+ private readonly tiles;
1062
+ private readonly target;
1063
+ private readonly ready;
1064
+ private readonly version;
1065
+ private readonly geometry;
1066
+ protected readonly rects: _angular_core.Signal<{
1067
+ key: string;
1068
+ x: number;
1069
+ y: number;
1070
+ w: number;
1071
+ h: number;
1072
+ color: string;
1073
+ ink: string;
1074
+ name: string;
1075
+ value: string;
1076
+ }[]>;
1077
+ protected readonly activeRect: _angular_core.Signal<{
1078
+ key: string;
1079
+ x: number;
1080
+ y: number;
1081
+ w: number;
1082
+ h: number;
1083
+ color: string;
1084
+ ink: string;
1085
+ name: string;
1086
+ value: string;
1087
+ } | null>;
1088
+ private readonly activeTile;
1089
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<SdsTreemapNode> | null>;
1090
+ protected readonly liveText: _angular_core.Signal<string>;
1091
+ protected hover(key: string, event: PointerEvent): void;
1092
+ protected track(event: PointerEvent): void;
1093
+ /** Zoom to a breadcrumb depth (0 = everything) and say so to screen readers. */
1094
+ protected zoomTo(depth: number): void;
1095
+ private announceZoom;
1096
+ /** Zoom into the tile's branch — or, at the deepest level, report the leaf. */
1097
+ protected activate(key: string): void;
1098
+ protected onKey(event: KeyboardEvent): void;
1099
+ protected readonly legendItems: _angular_core.Signal<LegendItem[]>;
1100
+ protected readonly legendPosition: _angular_core.Signal<"top" | "bottom" | "right" | "none">;
1101
+ protected readonly label: _angular_core.Signal<string>;
1102
+ protected readonly table: _angular_core.Signal<ChartTable>;
1103
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsTreemap, never>;
1104
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsTreemap, "sds-treemap", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "drilldown": { "alias": "drilldown"; "required": false; "isSignal": true; }; "rootLabel": { "alias": "rootLabel"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "tableToggle": { "alias": "tableToggle"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "pointClick": "pointClick"; }, ["customTooltip"], never, true, never>;
1105
+ }
1106
+
1107
+ type SdsSparklineVariant = 'line' | 'area' | 'bar';
1108
+ /**
1109
+ * A word-sized trend — in a table cell, a KPI tile, a list row. No axes, no legend: the shape is the
1110
+ * message. Line, area or micro-bars; an optional normal range band and reference value; the last
1111
+ * point (and optionally min / max) marked; a tiny hover readout; and an accessible summary (first,
1112
+ * last, min, max) so the trend is never visual-only.
1113
+ *
1114
+ * @example
1115
+ * <sds-sparkline [data]="[12, 14, 13, 18, 21, 19, 24]" label="Admissions sur 7 jours" />
1116
+ */
1117
+ declare class SdsSparkline {
1118
+ /** The values in order. `null` leaves a gap. */
1119
+ readonly data: _angular_core.InputSignal<readonly (number | null | undefined)[] | null | undefined>;
1120
+ /** Optional name per point (dates, weeks) for the hover readout. */
1121
+ readonly labels: _angular_core.InputSignal<readonly string[] | null>;
1122
+ readonly variant: _angular_core.InputSignal<SdsSparklineVariant>;
1123
+ /** Width in px; `null` (default) fills the container. */
1124
+ readonly width: _angular_core.InputSignalWithTransform<number | null, unknown>;
1125
+ readonly height: _angular_core.InputSignalWithTransform<number, unknown>;
1126
+ /** Any CSS colour. Defaults to the first categorical slot. */
1127
+ readonly color: _angular_core.InputSignal<string | null>;
1128
+ readonly strokeWidth: _angular_core.InputSignalWithTransform<number, unknown>;
1129
+ /** Mark the last point. */
1130
+ readonly showLast: _angular_core.InputSignalWithTransform<boolean, unknown>;
1131
+ /** Mark the lowest and highest points. */
1132
+ readonly showMinMax: _angular_core.InputSignalWithTransform<boolean, unknown>;
1133
+ /** Shade a normal range, e.g. [60, 100]. */
1134
+ readonly band: _angular_core.InputSignal<readonly [number, number] | null>;
1135
+ /** Draw a reference value (a target, zero, last year's mean). */
1136
+ readonly reference: _angular_core.InputSignal<number | null>;
1137
+ /** Include zero in the value range (bars always do). */
1138
+ readonly includeZero: _angular_core.InputSignalWithTransform<boolean, unknown>;
1139
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
1140
+ /** What the trend measures — prefixes the spoken summary. */
1141
+ readonly label: _angular_core.InputSignal<string>;
1142
+ /** Replace the generated summary ("Trend: from 12 to 24 — min…", `labels.sparklineSummary`) entirely. */
1143
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
1144
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, unknown>;
1145
+ readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
1146
+ readonly locale: _angular_core.InputSignal<string | null>;
1147
+ protected readonly uid: string;
1148
+ protected readonly active: _angular_core.WritableSignal<number | null>;
1149
+ private readonly measured;
1150
+ private readonly loc;
1151
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
1152
+ private readonly text;
1153
+ private readonly animates;
1154
+ private readonly fmt;
1155
+ private readonly palette;
1156
+ protected readonly tint: _angular_core.Signal<string>;
1157
+ protected readonly barTint: _angular_core.Signal<string>;
1158
+ private readonly values;
1159
+ protected readonly geo: _angular_core.Signal<{
1160
+ width: number;
1161
+ x: (i: number) => number;
1162
+ y: (v: number) => number;
1163
+ base: number;
1164
+ band: {
1165
+ y: number;
1166
+ h: number;
1167
+ } | null;
1168
+ ref: number | null;
1169
+ } | null>;
1170
+ private readonly target;
1171
+ private readonly ready;
1172
+ private readonly version;
1173
+ private readonly tween;
1174
+ private readonly seq;
1175
+ protected readonly paths: _angular_core.Signal<{
1176
+ line: string;
1177
+ area: string;
1178
+ }>;
1179
+ protected readonly bars: _angular_core.Signal<{
1180
+ d: string;
1181
+ last: boolean;
1182
+ }[]>;
1183
+ protected readonly markers: _angular_core.Signal<{
1184
+ kind: string;
1185
+ x: number;
1186
+ y: number;
1187
+ }[]>;
1188
+ protected readonly activePoint: _angular_core.Signal<{
1189
+ x: number;
1190
+ y: number;
1191
+ } | null>;
1192
+ protected readonly tooltipCtx: _angular_core.Signal<SdsChartTooltipContext<any> | null>;
1193
+ /** "Admissions: from 12 to 24 — min 12, max 24, 7 points" (`labels.sparklineSummary`). */
1194
+ protected readonly summary: _angular_core.Signal<string>;
1195
+ protected onPointer(event: PointerEvent): void;
1196
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsSparkline, never>;
1197
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsSparkline, "sds-sparkline", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "showLast": { "alias": "showLast"; "required": false; "isSignal": true; }; "showMinMax": { "alias": "showMinMax"; "required": false; "isSignal": true; }; "band": { "alias": "band"; "required": false; "isSignal": true; }; "reference": { "alias": "reference"; "required": false; "isSignal": true; }; "includeZero": { "alias": "includeZero"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1198
+ }
1199
+
1200
+ /** How the change is expressed: relative (+12,4 %) or in the value's own unit (+38). */
1201
+ type SdsKpiDeltaMode = 'percent' | 'absolute';
1202
+ type SdsKpiSize = 'md' | 'lg';
1203
+ /** `card` draws its own surface; `plain` sits inside a card or grid you already have. */
1204
+ type SdsKpiAppearance = 'card' | 'plain';
1205
+ /**
1206
+ * A stat tile — the number IS the chart. Label, headline value, a signed change against a named
1207
+ * period whose colour means "good" or "bad" (set `upIsGood` false for waits, costs, incidents), an
1208
+ * arrow glyph and a spoken sentence so the change never relies on colour, and an optional sparkline
1209
+ * of the recent trend. Values auto-compact (12 900 → 12,9 k) unless a format says otherwise.
1210
+ *
1211
+ * @example
1212
+ * <sds-kpi label="Admissions" [value]="1284" [previous]="1150" deltaLabel="vs semaine passée" [trend]="last12Weeks" />
1213
+ */
1214
+ declare class SdsKpi {
1215
+ readonly label: _angular_core.InputSignal<string>;
1216
+ readonly value: _angular_core.InputSignal<number | null | undefined>;
1217
+ /** Value format. Default: exact below 10 000, compact above (12,9 k · 4,2 M). */
1218
+ readonly valueFormat: _angular_core.InputSignal<SdsNumberFormat | null>;
1219
+ /** The comparison value — the change is computed from it. */
1220
+ readonly previous: _angular_core.InputSignal<number | null | undefined>;
1221
+ /** Give the change directly instead of `previous` (a ratio in `percent` mode: 0.124 = +12,4 %). */
1222
+ readonly delta: _angular_core.InputSignal<number | null | undefined>;
1223
+ readonly deltaMode: _angular_core.InputSignal<SdsKpiDeltaMode>;
1224
+ /** The named period, e.g. "vs mois dernier". */
1225
+ readonly deltaLabel: _angular_core.InputSignal<string>;
1226
+ /** False when a rise is bad news (waiting time, cost, incidents). */
1227
+ readonly upIsGood: _angular_core.InputSignalWithTransform<boolean, unknown>;
1228
+ readonly trend: _angular_core.InputSignal<readonly (number | null)[] | null>;
1229
+ readonly trendLabels: _angular_core.InputSignal<readonly string[] | null>;
1230
+ readonly trendVariant: _angular_core.InputSignal<SdsSparklineVariant>;
1231
+ readonly trendColor: _angular_core.InputSignal<string | null>;
1232
+ readonly icon: _angular_core.InputSignal<"x" | "search" | "filter" | "menu" | "table" | "copy" | "square" | "chart-column" | "chart-line" | "chart-bar" | "chart-area" | "chart-pie" | "chart-scatter" | "grid-3x3" | "activity" | "gauge" | "trending-up" | "trending-down" | "clipboard-list" | "credit-card" | "external-link" | "languages" | "megaphone" | "monitor" | "store" | "user-round" | "home" | "user-plus" | "user-check" | "hand" | "users" | "bike" | "building-2" | "package" | "package-plus" | "package-open" | "rotate-ccw" | "bar-chart-3" | "log-out" | "panel-left-close" | "panel-left-open" | "panel-left" | "calendar" | "chevron-right" | "chevron-left" | "chevron-down" | "chevron-up" | "plus" | "minus" | "chevrons-left" | "chevrons-right" | "check" | "alert-circle" | "info" | "type" | "tag" | "ticket" | "square-check" | "circle-dot" | "circle-user" | "layout-grid" | "panels-top-left" | "panel-top" | "rows-3" | "book-open" | "palette" | "bell" | "phone" | "settings" | "align-left" | "toggle-left" | "arrow-up" | "arrow-down" | "chevrons-up-down" | "chevrons-up" | "chevrons-down" | "star" | "message-square" | "qr-code" | "eye" | "eye-off" | "user" | "check-circle" | "arrows-clockwise" | "file-text" | "file-check" | "hash" | "map-pin" | "inbox" | "arrow-right" | "refresh-cw" | "loader-circle" | "locate-fixed" | "locate-off" | "bug" | "scroll-text" | "moon" | "sun" | "search-x" | "command" | "sparkles" | "triangle-alert" | "octagon-x" | "ban" | "ellipsis" | "ellipsis-vertical" | "grip-vertical" | "upload" | "image" | "image-off" | "utensils" | "zoom-in" | "zoom-out" | "trash-2" | "clock" | "pencil" | "circle-help" | "stock" | "allergen-cereals-gluten" | "allergen-crustaceans" | "allergen-eggs" | "allergen-fish" | "allergen-peanuts" | "allergen-soybeans" | "allergen-milk" | "allergen-nuts" | "allergen-celery" | "allergen-mustard" | "allergen-sesame" | "allergen-sulphites" | "allergen-lupin" | "allergen-molluscs" | null>;
1233
+ /** Shown under the value when there is no change to report. */
1234
+ readonly hint: _angular_core.InputSignal<string>;
1235
+ readonly size: _angular_core.InputSignal<SdsKpiSize>;
1236
+ readonly appearance: _angular_core.InputSignal<SdsKpiAppearance>;
1237
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
1238
+ readonly locale: _angular_core.InputSignal<string | null>;
1239
+ private readonly loc;
1240
+ /** Built-in strings (provideSdsCharts labels over the English defaults). */
1241
+ private readonly text;
1242
+ protected readonly display: _angular_core.Signal<string>;
1243
+ private readonly deltaValue;
1244
+ /** The change, signed, with a tone that means good/bad — never colour alone (glyph + words). */
1245
+ protected readonly deltaView: _angular_core.Signal<{
1246
+ text: string;
1247
+ tone: string;
1248
+ icon: "trending-up" | "trending-down" | "minus";
1249
+ spoken: string;
1250
+ } | null>;
1251
+ private absoluteFormat;
1252
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdsKpi, never>;
1253
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdsKpi, "sds-kpi", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "previous": { "alias": "previous"; "required": false; "isSignal": true; }; "delta": { "alias": "delta"; "required": false; "isSignal": true; }; "deltaMode": { "alias": "deltaMode"; "required": false; "isSignal": true; }; "deltaLabel": { "alias": "deltaLabel"; "required": false; "isSignal": true; }; "upIsGood": { "alias": "upIsGood"; "required": false; "isSignal": true; }; "trend": { "alias": "trend"; "required": false; "isSignal": true; }; "trendLabels": { "alias": "trendLabels"; "required": false; "isSignal": true; }; "trendVariant": { "alias": "trendVariant"; "required": false; "isSignal": true; }; "trendColor": { "alias": "trendColor"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1254
+ }
1255
+
1256
+ export { SDS_DONUT_OTHER_KEY, SdsBarChart, SdsChartTooltip, SdsDonutChart, SdsHeatmap, SdsKpi, SdsLineChart, SdsScatterChart, SdsSparkline, SdsTreemap };
1257
+ export type { SdsAccessor, SdsBarOrientation, SdsBarSort, SdsChartAnnotation, SdsChartGrid, SdsChartLegend, SdsChartPointEvent, SdsChartReferenceBand, SdsChartReferenceLine, SdsChartScale, SdsChartSeries, SdsChartStack, SdsChartTone, SdsChartTooltipContext, SdsChartTooltipRow, SdsChartXType, SdsDonutLegendValue, SdsDonutSort, SdsDonutVariant, SdsHeatmapScheme, SdsKpiAppearance, SdsKpiDeltaMode, SdsKpiSize, SdsLineCurve, SdsLineMarkers, SdsNumberFormat, SdsSparklineVariant, SdsTreemapNode, SdsXFormat, SdsXValue };