@pioneer-code/pioneer-charts 22.2.13 → 22.2.15

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.
@@ -1,19 +1,16 @@
1
- import * as rxjs from 'rxjs';
2
- import * as i0 from '@angular/core';
3
- import { TemplateRef, OnDestroy, ElementRef, Signal } from '@angular/core';
4
- import { AxisDomain, AxisScale } from 'd3-axis';
5
- import { Selection, BaseType } from 'd3-selection';
6
1
  import * as _pioneer_code_pioneer_charts from '@pioneer-code/pioneer-charts';
2
+ import * as _angular_core from '@angular/core';
3
+ import { TemplateRef, ElementRef } from '@angular/core';
7
4
 
8
5
  /**
9
6
  * Base configuration for all charts.
10
7
  * INewChart extends IChart
11
8
  */
12
9
  declare class PcacChartConfig {
10
+ data: PcacData[];
13
11
  /**
14
12
  * Height in pixels
15
13
  */
16
- data: PcacData[];
17
14
  height: number;
18
15
  /**
19
16
  * When true, `height` becomes a *minimum* height: if the container the chart is placed in is
@@ -30,6 +27,12 @@ declare class PcacChartConfig {
30
27
  * initializer still applies to anything constructed via `new`.
31
28
  */
32
29
  heightFull?: boolean;
30
+ /**
31
+ * What the chart shows, for screen readers - e.g. `'Sales by month, 2026'`. The chart's `<svg>` is
32
+ * announced as one image with this name; when it isn't set, the chart's type is used (`'Bar
33
+ * chart'`, `'Pie chart'`, ...). Optional for the same reason as `heightFull`.
34
+ */
35
+ ariaLabel?: string;
33
36
  }
34
37
  /**
35
38
  * Up to three short labels placed along an axis by position rather than by value: `min` at its
@@ -152,44 +155,6 @@ declare class PcacAxisConfig {
152
155
  domainMin?: number | string;
153
156
  domainMax?: number | string;
154
157
  }
155
- /**
156
- * The `PcacChartMargin` type lives here rather than in chart.ts so the axis builder can take
157
- * one without importing the class module that imports it back.
158
- */
159
- interface PcacChartMargin {
160
- top: number;
161
- right: number;
162
- bottom: number;
163
- left: number;
164
- }
165
- /**
166
- * `PcacAxisConfig` with every default applied - what builders work with, so they never have to
167
- * null-check. `tickSize`, `label`, `subLabels` and the `*Color` fields stay optional: "not set"
168
- * is itself the meaningful default (no marks, no labels, the theme's colors). The color fields
169
- * are picked up by name, so a new one needs only its declaration on the class.
170
- */
171
- type PcacOptionalAxisFields = 'tickSize' | 'label' | 'subLabels' | Extract<keyof PcacAxisConfig, `${string}Color`>;
172
- type PcacResolvedAxisConfig = Required<Omit<PcacAxisConfig, PcacOptionalAxisFields>> & Pick<PcacAxisConfig, PcacOptionalAxisFields>;
173
- /** True if `axis` has at least one sub label to draw (an empty `subLabels` object counts as none). */
174
- declare function hasAxisSubLabels(axis: PcacAxisConfig | undefined): boolean;
175
- /**
176
- * Room reserved in a margin for an axis `label`: the theme's 12px label plus a gap from the tick
177
- * labels. Reserved on the side the label sits on (`bottom` for x, `left` for y), and taken out
178
- * of the plot area, the same way a longer tick is. Change together with `.pcac-axis-label`.
179
- */
180
- declare const PCAC_AXIS_LABEL_SPACE = 18;
181
- /** Likewise for a row of `subLabels`: the theme's 11px text plus a gap (`.pcac-axis-sub-label`). */
182
- declare const PCAC_AXIS_SUB_LABEL_SPACE = 16;
183
- /**
184
- * Total margin an axis's `label` and `subLabels` take on its side. `PcacChart` reserves it and
185
- * the axis builder places the text by it, so the two stay in step.
186
- */
187
- declare function axisLabelSpace(axis: PcacAxisConfig | undefined): number;
188
- /**
189
- * @param showGridDefault what `showGrid` resolves to when the consumer left it unset - each chart
190
- * passes `true` for the axis whose grid it has always drawn and `false` for the other.
191
- */
192
- declare function resolveAxisConfig(axis?: PcacAxisConfig, showGridDefault?: boolean): PcacResolvedAxisConfig;
193
158
  /**
194
159
  * Base configuration for every chart that has an x and y axis (bar, line, area, plot - not pie).
195
160
  */
@@ -256,9 +221,8 @@ declare enum PcacFormatEnum {
256
221
  DateTime = "dateTime",
257
222
  Fahrenheit = "fahrenheit",
258
223
  /**
259
- * Expectation is we will be given a range of data from 0-23
260
- * and we will map that to a 12 hour clock with am/pm
261
- * e.g. 0 = 12am, 1 = 1am, 13 = 1pm, 23 = 11pm
224
+ * Hours of the day, 0-24, labelled on a 12 hour clock: 0 = 12am, 1 = 1am, 13 = 1pm, 24 = 12am.
225
+ * A value between hours shows its minutes (2.5 = 2:30am).
262
226
  */
263
227
  OneDayHours = "oneDayHours"
264
228
  }
@@ -273,157 +237,6 @@ declare class PcacBarHorizontalChartColorOverrideConfig {
273
237
  colors: string[];
274
238
  }
275
239
 
276
- /**
277
- * Generic over each axis's own domain type (e.g. `number` for a value axis's `ScaleLinear`,
278
- * `string` for a category axis's `ScaleBand`) rather than `any`, since the two axes on a chart
279
- * routinely have different domain types and each real D3 scale already satisfies `AxisScale`
280
- * structurally - no widening needed at the type level.
281
- */
282
- interface IPcacAxisBuilderConfig<XDomain extends AxisDomain = AxisDomain, YDomain extends AxisDomain = AxisDomain> {
283
- svg: Selection<SVGGElement, unknown, BaseType, unknown>;
284
- /** Plot area size - the axes' own lengths - and the chart's margins, which position a `label`. */
285
- width: number;
286
- height: number;
287
- margin: PcacChartMargin;
288
- xScale: AxisScale<XDomain>;
289
- yScale: AxisScale<YDomain>;
290
- /**
291
- * The chart's per-axis settings, defaults already applied (`resolveAxisConfig()`). `hide` skips
292
- * the axis entirely. `tickSize` is D3's `tickSizeInner`; left undefined, D3's default of 6
293
- * applies to the geometry - but the theme hides tick marks unless the axis group carries
294
- * `pcac-axis-tick-marks`, which is added exactly when a size is given, so an undefined size
295
- * means "no visible marks, labels where they've always been". `0` is a legitimate value (no
296
- * marks, labels hugging the axis), hence the `!== undefined` checks below. `showLine` adds
297
- * `pcac-axis-line`, which un-hides D3's `.domain` path the same way. The domain path keeps
298
- * D3's default 6px outer end-caps (`tickSizeOuter`), so it reads as a bracket rather than a
299
- * bare rule; that's D3's standard look and is left as-is. `label` and `subLabels` are drawn
300
- * inside the axis group (so they're raised and non-interactive along with it) - see `drawLabels`.
301
- * `format` picks the tick label format; `None` leaves D3's default. The `*Color` fields are
302
- * applied by `applyColors`.
303
- */
304
- xAxis: PcacResolvedAxisConfig;
305
- yAxis: PcacResolvedAxisConfig;
306
- }
307
- declare class PcacAxisBuilder {
308
- drawAxis<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacAxisBuilderConfig<XDomain, YDomain>): void;
309
- /**
310
- * Moves both axis groups to the end of the chart's `<g>`, so they paint over everything drawn
311
- * since `drawAxis()`. Axes are drawn first (so scales and margins are settled before content),
312
- * which leaves anything sitting at x = 0 - a line chart's first segment and dot, an area's fill,
313
- * a horizontal bar chart's bars - painting over the y axis line. Builders call this after the
314
- * content that should sit *under* the axes, and draw anything that should stay on top (the
315
- * line/area/plot charts' dots) afterwards. Safe to sit above the hover/zoom overlay rects too,
316
- * because the groups are `pointer-events: none` (set where each group is appended).
317
- */
318
- raiseAxes(svg: Selection<SVGGElement, unknown, BaseType, unknown>): void;
319
- drawYAxis<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacAxisBuilderConfig<XDomain, YDomain>): void;
320
- drawXAxis<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacAxisBuilderConfig<XDomain, YDomain>): void;
321
- /**
322
- * The axis `label` and `subLabels`. Both are placed by two distances: along the axis (0 at its
323
- * start, `length` at its end - for the y axis, 0 is the bottom) and out from it, toward the
324
- * chart's edge. The label goes at the very edge (`outer`, i.e. the margin), the sub-label row
325
- * `PCAC_AXIS_LABEL_SPACE` inside that when there's a label. For the y axis the text is rotated
326
- * to read bottom-to-top, which swaps the two: after `rotate(-90)` x runs up the axis (so the
327
- * bottom is x = -length) and y runs left. `fill` is set explicitly because d3-axis puts
328
- * `fill="none"` on the group; its own tick text does the same.
329
- */
330
- private drawLabels;
331
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacAxisBuilder, never>;
332
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
333
- }
334
-
335
- /**
336
- * Generic over each axis's own domain type, same rationale as `IPcacAxisBuilderConfig`.
337
- */
338
- interface IPcacGridBuilderConfig<XDomain extends AxisDomain = AxisDomain, YDomain extends AxisDomain = AxisDomain> {
339
- svg: Selection<SVGGElement, unknown, BaseType, unknown>;
340
- /**
341
- * Required for horizontal grid
342
- */
343
- width: number;
344
- /**
345
- * Required for vertical grid
346
- */
347
- height: number;
348
- xScale: AxisScale<XDomain>;
349
- yScale: AxisScale<YDomain>;
350
- /**
351
- * Tick count hint for a continuous scale (D3's `ticks(n)`); a category (band) scale ignores it
352
- * and gets one line per category.
353
- */
354
- numberOfTicks: number;
355
- /**
356
- * Line color (`PcacAxisConfig.gridColor`), set on the grid group as `--pcac-grid-color` for the
357
- * theme's `.pcac-grid-rule line` rule to read; unset means the theme's color. See the axis
358
- * builder's `applyColors` for why a custom property.
359
- */
360
- color?: string;
361
- }
362
- declare class PcacGridBuilder {
363
- /**
364
- * Vertical lines, one per x-axis tick (or category), running the plot's full height. The group
365
- * is classed `pcac-grid-vertical` (the horizontal one `pcac-grid-horizontal`) so a chart can
366
- * find and redraw just one grid - the line/area/plot charts do on zoom, when an axis's ticks move.
367
- */
368
- drawVerticalGrid<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacGridBuilderConfig<XDomain, YDomain>): void;
369
- /**
370
- * Horizontal lines, one per y-axis tick (or category), running the plot's full width.
371
- */
372
- drawHorizontalGrid<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacGridBuilderConfig<XDomain, YDomain>): void;
373
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacGridBuilder, never>;
374
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
375
- }
376
-
377
- declare class PcacColorService {
378
- private primary;
379
- private primaryLight;
380
- private success;
381
- private danger;
382
- private warning;
383
- private orange;
384
- private blue;
385
- private alert;
386
- /** A consumer's own scale from `setScale()`; replaces the default palette while set. */
387
- private customScale;
388
- /**
389
- * The palette charts cycle through: the `setScale()` one when given, else the default colors
390
- * built from the current fields - so a setter like `setSuccess()` changes the charts drawn after
391
- * it, rather than a copy of the colors taken when the service was created.
392
- */
393
- private get scale();
394
- /**
395
- * Get a scale of colors dynamically
396
- * @param numberOfNodes Number of items in dynamically build collection of colors
397
- */
398
- getColorScale(numberOfNodes: number): string[];
399
- getAlert(): string;
400
- /**
401
- * Set the scale that charts use to set colors of data[x] on the UI, in place of the default
402
- * palette (and of the individual color setters below, which only shape the default). An empty
403
- * array goes back to the default palette rather than leaving charts with no colors.
404
- * @param colors A collection of hex values
405
- */
406
- setScale(colors: string[]): void;
407
- /** @deprecated No chart reads the primary color; it isn't part of the palette. */
408
- setPrimary(color: string): void;
409
- setPrimaryLight(color: string): void;
410
- setSuccess(color: string): void;
411
- setDanger(color: string): void;
412
- setWarning(color: string): void;
413
- setOrange(color: string): void;
414
- setBlue(color: string): void;
415
- setAlert(color: string): void;
416
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacColorService, never>;
417
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
418
- }
419
-
420
- declare class PcacTransitionService {
421
- private transitionDuration;
422
- getTransitionDuration(): number;
423
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacTransitionService, never>;
424
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
425
- }
426
-
427
240
  /**
428
241
  * A datum drawn at the same coordinate as the hovered one (see `PcacTooltipContext.coincident`),
429
242
  * located the same way the context locates `$implicit`: `parent` is the series it belongs to,
@@ -524,372 +337,24 @@ declare class PcacTooltipDirective {
524
337
  * `<ng-template>`, so `point.value` etc. are checked against `PcacData` under strictTemplates.
525
338
  */
526
339
  static ngTemplateContextGuard(_dir: PcacTooltipDirective, _ctx: unknown): _ctx is PcacTooltipContext;
527
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacTooltipDirective, never>;
528
- static ɵdir: i0.ɵɵDirectiveDeclaration<PcacTooltipDirective, "ng-template[pcacTooltip]", never, {}, {}, never, never, true, never>;
529
- }
530
-
531
- declare class PcacTooltipBuilder implements OnDestroy {
532
- private appRef;
533
- private document;
534
- private shell;
535
- /**
536
- * One tooltip element shared by every chart on the page, appended to `<body>` so it can float
537
- * over anything. It's only ever a positioning shell: the default look (`.pcac-d3-tooltip-default`)
538
- * is toggled on when the library renders its own key/value content and off when a consumer's
539
- * `<ng-template pcacTooltip>` is rendered into it instead, so a custom template owns the whole box.
540
- *
541
- * Created on first use rather than with the service, which every chart builder injects: that
542
- * way nothing touches the DOM until a chart actually shows a tooltip, so building a chart
543
- * where there's no browser `document` (server-side rendering) doesn't throw. Removed again in
544
- * `ngOnDestroy()`, when the app that owns this root service is destroyed.
545
- */
546
- get tooltip(): Selection<HTMLDivElement, unknown, null, undefined>;
547
- /**
548
- * The consumer template currently rendered into the shell, if any. Created on the first show
549
- * of a hover and torn down in `hideTooltip()` - not kept around between hovers - so a view is
550
- * never left holding onto a declaring component that has since been destroyed (e.g. after a
551
- * route change). While it lives, repeated `mousemove`s just update its context in place.
552
- */
553
- private view;
554
- private viewTemplate;
555
- /** Space left between the tooltip and whatever it's placed next to (the cursor or an anchor). */
556
- static readonly GAP = 8;
557
- /**
558
- * Shows the tooltip for a hovered datum. Renders `template` when the chart has one projected;
559
- * otherwise falls back to the default key/value content, formatted per `valueFormat`/`keyFormat`.
560
- * Placed beside `anchor` when one is given (see `positionBeside`), else above the event's position.
561
- */
562
- showTooltip(event: MouseEvent, template: TemplateRef<PcacTooltipContext> | undefined, context: PcacTooltipContext, valueFormat?: PcacFormatEnum, keyFormat?: PcacFormatEnum, anchor?: Element | null): void;
563
- /**
564
- * @deprecated Builders should call `PcacChart.showTooltip()`, which routes through a chart's
565
- * projected `pcacTooltip` template. This only ever renders the default content.
566
- */
567
- showBarTooltip(event: MouseEvent, data: PcacData, valueFormat?: PcacFormatEnum, keyFormat?: PcacFormatEnum): void;
568
- hideTooltip(): void;
569
- ngOnDestroy(): void;
570
- /**
571
- * The library's own key/value content. Built from text nodes, never parsed as HTML: `key` and
572
- * `value` are consumer data, and markup in them must show as text rather than run.
573
- */
574
- private renderDefault;
575
- private renderTemplate;
576
- private destroyView;
577
- /**
578
- * Shows the (already rendered) shell at the page's top-left so it can be measured. Left where the
579
- * last hover put it, a shell near the right edge would be squeezed by its containing block and
580
- * measure narrower (wrapped) than the content really is once it's moved somewhere with room.
581
- */
582
- private measurable;
583
- /**
584
- * Centers the tooltip horizontally on the cursor and sits it just above. Measured from the real
585
- * box rather than fixed offsets so it works for content of any size.
586
- */
587
- private positionAbove;
588
- /**
589
- * Places the tooltip diagonally off one corner of `anchor`'s rendered box, so it never covers
590
- * the anchor itself (e.g. a point's image). Prefers above-right - the tooltip's bottom-left
591
- * corner at the anchor's top-right - and flips each axis independently when the tooltip wouldn't
592
- * fit in the viewport that way: to the left when there's no room on the right, below when there's
593
- * no room above. When neither side of an axis fits, it takes whichever side has more room.
594
- */
595
- private positionBeside;
596
- /** The default tooltip's two lines as plain text; `key` is null when the datum has none. */
597
- private getBarTipData;
598
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacTooltipBuilder, never>;
599
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
600
- }
601
-
602
- /**
603
- * Everything `showTooltip()` needs beyond the hovered datum itself. `parent`/`isThreshold` feed
604
- * the consumer template's context; the formats only apply to the default (no template) content.
605
- */
606
- interface PcacTooltipOptions {
607
- /** See `PcacTooltipContext.index`. Required so no hover site can forget to supply it. */
608
- index: number;
609
- parent?: PcacData | null;
610
- /** See `PcacTooltipContext.parentIndex`. Defaults to `null`, matching `parent`'s default. */
611
- parentIndex?: number | null;
612
- isThreshold?: boolean;
613
- /** See `PcacTooltipContext.coincident`. Defaults to none. */
614
- coincident?: PcacTooltipCoincident[];
615
- valueFormat?: PcacFormatEnum;
616
- keyFormat?: PcacFormatEnum;
617
- /**
618
- * The element the tooltip is placed beside instead of above the cursor: off one of its corners,
619
- * whichever fits in the viewport (see `PcacTooltipBuilder.positionBeside`), so it never covers it.
620
- */
621
- anchor?: Element | null;
622
- }
623
- declare class PcacChart {
624
- axisBuilder: PcacAxisBuilder;
625
- gridBuilder: PcacGridBuilder;
626
- transitionService: PcacTransitionService;
627
- tooltipBuilder: PcacTooltipBuilder;
628
- colorService: PcacColorService;
629
- /** D3's own `tickSizeInner` default, which the default `margin` below is sized around. */
630
- static readonly DEFAULT_TICK_SIZE = 6;
631
- /** See `PCAC_AXIS_LABEL_SPACE` / `PCAC_AXIS_SUB_LABEL_SPACE` in chart.model.ts. */
632
- static readonly AXIS_LABEL_SPACE = 18;
633
- static readonly AXIS_SUB_LABEL_SPACE = 16;
634
- margin: PcacChartMargin;
635
- private readonly defaultMargin;
636
- /**
637
- * The current build's per-axis settings with defaults applied, set by `initializeAxisState()`.
638
- * Builders read these (not the raw `config.xAxis`) everywhere: drawing the axes, choosing
639
- * whether to draw a grid, how many grid lines, and so on. Pie has no axes and never sets them.
640
- */
641
- xAxis: PcacResolvedAxisConfig;
642
- yAxis: PcacResolvedAxisConfig;
643
- svg: Selection<SVGGElement, unknown, BaseType, unknown>;
644
- width: number;
645
- height: number;
646
- colors: string[];
647
- startData: PcacData[];
648
- /**
649
- * Swaps a consumer's `colorOverride` in for the theme palette `initializeChartState` set, in
650
- * order. Checks `length` rather than truthiness: every config class defaults its override to
651
- * `[]`, and an empty array is truthy - taken as an override, it would leave every mark with no
652
- * color. Cycled out to at least as many entries as the theme palette, the same way that palette
653
- * cycles its own colors, so an override shorter than the data repeats rather than leaving the
654
- * marks past its end with an `undefined` color. Call after `initializeChartState()`.
655
- */
656
- protected applyColorOverride(override: readonly string[] | undefined): void;
657
- /**
658
- * Raw, unadjusted container width measured by the last successful `initializeChartState()`
659
- * call, or `null` if none has succeeded yet. Deliberately tracked separately from `width`:
660
- * some builders (e.g. bar-horizontal-chart's `setHorizontalMarginsBasedOnContent`) recompute
661
- * `width`/`margin.left` mid-build from measured axis-label sizes, so `width` alone isn't a
662
- * stable basis for "did the container itself resize" — the raw container measurement is.
663
- */
664
- private lastContainerWidth;
665
- /**
666
- * Raw container height measured by the last successful `initializeChartState()` call, and
667
- * whether that build was running with `heightFull` on. Only consulted by `containerSizeChanged`
668
- * when it was: without `heightFull` the container's height is driven *by* the chart's own SVG
669
- * height, so comparing it would report "changed" every time the chart itself grew or shrank.
670
- */
671
- private lastContainerHeight;
672
- private lastHeightFull;
673
- /**
674
- * How much the vertical margins have grown this build beyond their defaults - for tick marks
675
- * and axis labels (`initializeAxisState()`; negative when a short tick took some away) and for
676
- * content that hangs past the plot's edge (`reserveEdgeSpace()`). `resolveHeight()` subtracts
677
- * it from the plot height so the SVG's total height doesn't change with any of them. Reset
678
- * alongside the margins.
679
- */
680
- private reservedHeight;
681
- /**
682
- * Resolves the consumer's projected `<ng-template pcacTooltip>`, if any. Each chart component
683
- * points this at its own `contentChild(PcacTooltipDirective)` query. It's a getter rather than
684
- * a captured value so it's read lazily, at hover time, from inside a D3 listener: reading the
685
- * query signal in the component's build effect instead would make the effect depend on it and
686
- * rebuild the whole chart (restarting its entry animation) whenever the query resolves.
687
- */
688
- tooltipTemplate: () => TemplateRef<PcacTooltipContext> | undefined;
689
- /**
690
- * Puts `margin` back to its defaults. `initializeAxisState()` calls this first thing, before any
691
- * per-build adjustment (hidden axes giving sides back, tick sizes growing them, label widths
692
- * measured into `margin.left`): `margin` lives on this per-chart instance and so persists
693
- * between builds, and without a reset an adjustment made for one config silently carries into
694
- * the next - e.g. axes drawn with no room after `hide` flips back to false.
695
- */
696
- resetMargin(): void;
697
- /**
698
- * Resolves the config's `xAxis`/`yAxis` onto this chart and sets the margins up for them. Axis
699
- * charts call this at the top of `buildChart()`, on their own copy of the config (it rewrites
700
- * `config.height` for hidden axes), before `initializeChartState()` measures the plot area.
701
- * In order:
702
- *
703
- * 1. `resetMargin()`.
704
- * 2. Tick marks: room for a non-default `tickSize` is reserved on each axis that will actually
705
- * be drawn (`reserveTickSizeMargins`).
706
- * 3. Labels: `AXIS_LABEL_SPACE` is added to `bottom` / `left` for an axis with a `label`, and
707
- * `AXIS_SUB_LABEL_SPACE` for one with any `subLabels` (see `axisLabelSpace`), again only if
708
- * the axis will be drawn.
709
- * 4. Hidden axes: an axis with `hide` gives its margins back to the plot. The y axis owns
710
- * `left` and `top` (the top margin is only there so the topmost y label isn't clipped), the
711
- * x axis `bottom` and `right` (likewise for the rightmost x label). Each reclaimed vertical
712
- * margin is added onto `config.height` so the SVG's total height stays what the consumer
713
- * configured; horizontally `initializeChartState()` picks the change up on its own.
714
- *
715
- * @param defaultGrid the axis whose grid this chart draws when the consumer hasn't said
716
- * (`PcacAxisConfig.showGrid`): `'y'` for horizontal lines, `'x'` for vertical.
717
- * @param hiddenAxisMargin what a hidden axis's sides shrink to, rather than 0. The
718
- * line/area/plot charts keep 8px so a dot on the edge of the plot isn't clipped by the SVG.
719
- */
720
- initializeAxisState(config: PcacAxisChartConfig, defaultGrid: 'x' | 'y', hiddenAxisMargin?: number): void;
721
- /**
722
- * The `PcacAxisBuilder` config for this chart's current state - everything but the scales is
723
- * already on the instance. Builders pass the result to `drawAxis()` (or `drawXAxis()` with a
724
- * rescaled x, on zoom).
725
- */
726
- axisBuilderConfig<XDomain extends AxisDomain, YDomain extends AxisDomain>(xScale: AxisScale<XDomain>, yScale: AxisScale<YDomain>): IPcacAxisBuilderConfig<XDomain, YDomain>;
727
- /**
728
- * Draws whichever grids the resolved axes ask for: vertical lines from the x axis's ticks,
729
- * horizontal from the y's (`PcacAxisConfig.showGrid`). `which` restricts it to one axis - the
730
- * line/area/plot charts redraw just a zoomed axis's grid against its rescaled scale on zoom.
731
- */
732
- drawGrids<XDomain extends AxisDomain, YDomain extends AxisDomain>(xScale: AxisScale<XDomain>, yScale: AxisScale<YDomain>, which?: 'x' | 'y' | 'both'): void;
733
- /**
734
- * Makes room in the margins for tick marks longer (or shorter) than D3's default. The default
735
- * margins are sized around that default (`DEFAULT_TICK_SIZE`), and D3 places each tick label at
736
- * tick length + padding, so a longer tick pushes its labels outward by exactly the difference -
737
- * into space the margin doesn't have unless it grows by the same amount. Growing the margin here,
738
- * *before* `initializeChartState()` measures the plot area, is what makes the chart shrink to fit
739
- * its labels rather than pushing them off the edge of the SVG. A shorter tick hands the
740
- * difference back to the plot area the same way.
741
- *
742
- * Horizontally that happens on its own: `initializeChartState()` derives `width` from the
743
- * container minus the margins. Vertically it doesn't - `config.height` is the plot area, and
744
- * the SVG is that plus the margins - so a taller bottom margin would grow the SVG instead. The
745
- * delta is therefore also remembered in `reservedHeight` and taken back out of the plot
746
- * height by `resolveHeight()`, keeping the chart's total footprint where the consumer put it.
747
- *
748
- * Called by `initializeAxisState()` right after `resetMargin()`, for the axes that will be
749
- * drawn. Only the axis a tick size is given for is affected; `undefined` leaves that margin
750
- * alone.
751
- * @param xTickSize `tickSizeInner` for the bottom (x) axis, which lives in `margin.bottom`
752
- * @param yTickSize `tickSizeInner` for the left (y) axis, which lives in `margin.left`
753
- */
754
- reserveTickSizeMargins(xTickSize?: number, yTickSize?: number): void;
755
- /**
756
- * Makes sure each given margin is at least that big, for content drawn at the very edge of the
757
- * plot area that reaches past it - a point image on the line/area/plot charts, say, whose box
758
- * is centered on a point at the top of the y domain and so hangs half of itself above the plot.
759
- * Those charts already widen their clip-path to let such a point through; this is what stops
760
- * the `<svg>` itself from cutting it off, the SVG being only the plot area plus the margins.
761
- *
762
- * "At least", not "add": the default margins, and any tick / label room already reserved in
763
- * them, may well cover it already (`margin.left` is 40 by default), and adding on top of that
764
- * would give up plot area for nothing. Vertical growth is taken out of the plot height the same
765
- * way `reserveTickSizeMargins()`'s is, so the SVG's total height stays what the consumer
766
- * configured; horizontally `initializeChartState()` picks the change up on its own. A side
767
- * left `undefined` is untouched.
768
- *
769
- * Call after `initializeAxisState()` (which resets the margins) and before
770
- * `initializeChartState()` (which measures the plot area against them).
771
- */
772
- reserveEdgeSpace(space: Partial<PcacChartMargin>): void;
773
- /**
774
- * Shows the tooltip for a hovered datum, through the chart's `pcacTooltip` template when one is
775
- * projected and the default key/value content otherwise. Every builder's hover handler should
776
- * go through here rather than `tooltipBuilder` directly so the template is honored everywhere.
777
- */
778
- showTooltip(event: MouseEvent, data: PcacData, options: PcacTooltipOptions): void;
779
- hideTooltip(): void;
780
- /**
781
- * Prior to building a chart, we need to initialize the state of the chart.
782
- *
783
- * Returns `false` (and leaves `width`/`height`/`colors` untouched) if the container hasn't
784
- * been laid out yet, so its `clientWidth` measures 0 — this happens when a chart mounts
785
- * already holding data (e.g. behind a loading gate) and its first `ngOnChanges` fires before
786
- * the browser has committed layout for its own just-created DOM node. Callers should bail out
787
- * of their build on `false` rather than proceeding with a degenerate width; `PcacChartResizeService`
788
- * (wired up by every chart component) retries the build once the container has a real size.
789
- * @param chartElm Reference to SVG on dom
790
- * @param config Chart specific configuration
791
- */
792
- /**
793
- * Removes whatever the chart last drew, for a build with no data to draw. Builders call it
794
- * rather than just returning, which left the previous data on screen when a consumer emptied
795
- * the chart (e.g. a filter that now matches nothing).
796
- */
797
- clearChart(chartElm: ElementRef): void;
798
- initializeChartState(chartElm: ElementRef, config: PcacChartConfig): boolean;
799
- /**
800
- * `config.height` normally *is* the height of the drawing area. With `config.heightFull` on it
801
- * becomes a floor instead: the chart fills its container, and only falls back to `config.height`
802
- * when the container is shorter than that (or has no definite height of its own to fill - see
803
- * `PcacChartConfig.heightFull`, where an auto-height container measures ~0 here and the
804
- * `Math.max` keeps the configured height).
805
- *
806
- * Note this deliberately subtracts the margins, so it's the *total* SVG that ends up matching
807
- * the container: `buildContainer()` adds `margin.top`/`margin.bottom` back on top of `height`
808
- * when sizing the `<svg>`, so filling without this would overflow the container by exactly the
809
- * vertical margins.
810
- * @param container The chart's container element (the `<svg>`'s parent)
811
- * @param config Chart specific configuration
812
- */
813
- private resolveHeight;
814
- /**
815
- * True if the container's current raw layout width differs from the one measured by the last
816
- * successful build, or if no successful build has happened yet. For a `heightFull` chart, a
817
- * change in the container's height counts too - that's the whole size the chart is tracking.
818
- *
819
- * `PcacChartResizeService`'s `ResizeObserver` is guaranteed to fire once as soon as it starts
820
- * observing — that's what lets a chart recover from the 0-width race described on
821
- * `initializeChartState`, but it also means that "routine" first callback usually lands
822
- * moments after `ngOnChanges` already built successfully at the same width. Without this
823
- * check, that redundant callback would restart the chart's enter transition mid-animation for
824
- * no visual change. Only `ngOnChanges` (which reacts to data, not size) should skip this check.
825
- * @param chartElm Reference to SVG on dom
826
- */
827
- containerSizeChanged(chartElm: ElementRef): boolean;
828
- /**
829
- * 1) Set the width and height of the SVG
830
- * 2) Add a group and translate it to state of {{center}} option
831
- * @param chartElm Reference to SVG on dom
832
- * @param center Are we pinning x,y to the top,left, or are we centering our drawing group inside the SVG.
833
- */
834
- buildContainer(chartElm: ElementRef, center?: boolean): void;
835
- /**
836
- * Most charts share a default margin(s) state.
837
- * In some cases, that state needs to be calculated based on the content that resides in that margin.
838
- * For example, labels on a horizontal bar chart are dynamic and such the margin needs to be calculated ahead of
839
- * chart axis construction.
840
- *
841
- * Measures with the y axis's own `tickSize` (the measured box spans the tick line as well as
842
- * the label, so measuring at a different length would put the labels off by the difference)
843
- * and adds its `axisLabelSpace()` back on top, since the measurement replaces whatever
844
- * `initializeAxisState()` reserved for the label / sub labels.
845
- * @param chartElm Reference to SVG on dom
846
- * @param yScale D3 scale transformation object (d3.ScaleBand)
847
- */
848
- setHorizontalMarginsBasedOnContent<Domain extends AxisDomain>(chartElm: ElementRef, yScale: AxisScale<Domain>): void;
849
- }
850
-
851
- /**
852
- * Provided per-component (see PcacBarHorizontalChartComponent's `providers`), not root-scoped:
853
- * this builder extends PcacChart, which holds mutable per-chart-instance state (margin, width,
854
- * height, colors, svg). A root singleton would be shared and clobbered by every
855
- * <pcac-bar-horizontal-chart> rendered at once.
856
- */
857
- declare class BarHorizontalChartBuilder extends PcacChart {
858
- private xScale;
859
- private yScaleStacked;
860
- private yScaleGrouped;
861
- private barClickedSource;
862
- private config;
863
- barClicked$: rxjs.Observable<PcacData>;
864
- buildChart(chartElm: ElementRef, config: PcacBarHorizontalChartConfig): void;
865
- private buildScales;
866
- private drawChart;
867
- private addGroups;
868
- private drawBarsPerGroup;
869
- private drawThresholdAcrossChart;
870
- /** One threshold across each group that has one; groups without an entry are skipped. */
871
- private drawThresholdsPerGroup;
872
- /** One threshold across each bar that has one; bars without an entry are skipped. */
873
- private drawThresholdsPerBarInGroup;
874
- private applyPreTransitionThresholdStyles;
875
- static ɵfac: i0.ɵɵFactoryDeclaration<BarHorizontalChartBuilder, never>;
876
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
340
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacTooltipDirective, never>;
341
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PcacTooltipDirective, "ng-template[pcacTooltip]", never, {}, {}, never, never, true, never>;
877
342
  }
878
343
 
879
344
  declare class PcacBarHorizontalChartComponent {
880
345
  private chartBuilder;
881
- readonly config: i0.InputSignal<PcacBarHorizontalChartConfig>;
882
- readonly chartElm: i0.Signal<ElementRef<any>>;
883
- readonly barClicked: i0.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
346
+ readonly config: _angular_core.InputSignal<PcacBarHorizontalChartConfig>;
347
+ readonly chartElm: _angular_core.Signal<ElementRef<any>>;
348
+ readonly barClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
884
349
  /**
885
350
  * Optional consumer `<ng-template pcacTooltip>` projected into this element; replaces the
886
351
  * default tooltip when present (see PcacTooltipDirective).
887
352
  */
888
- readonly tooltipTemplate: i0.Signal<PcacTooltipDirective | undefined>;
353
+ readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
889
354
  constructor();
890
355
  buildChart(): void;
891
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarHorizontalChartComponent, never>;
892
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarHorizontalChartComponent, "pcac-bar-horizontal-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, ["tooltipTemplate"], never, true, never>;
356
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacBarHorizontalChartComponent, never>;
357
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacBarHorizontalChartComponent, "pcac-bar-horizontal-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, ["tooltipTemplate"], never, true, never>;
893
358
  }
894
359
 
895
360
  declare class PcacBarVerticalChartConfig extends PcacAxisChartConfig {
@@ -902,72 +367,76 @@ declare class PcacBarVerticalChartColorOverrideConfig {
902
367
  colors: string[];
903
368
  }
904
369
 
905
- /**
906
- * Provided per-component (see PcacBarVerticalChartComponent's `providers`), not root-scoped:
907
- * this builder extends PcacChart, which holds mutable per-chart-instance state (margin, width,
908
- * height, colors, svg). A root singleton would be shared and clobbered by every
909
- * <pcac-bar-vertical-chart> rendered at once.
910
- */
911
- declare class BarVerticalChartBuilder extends PcacChart {
912
- private xScaleStacked;
913
- private xScaleGrouped;
914
- private yScale;
915
- private barClickedSource;
916
- barClicked$: rxjs.Observable<PcacData>;
917
- buildChart(chartElm: ElementRef, config: PcacBarVerticalChartConfig): void;
918
- private buildScales;
919
- private drawChart;
920
- private addGroups;
921
- private drawBarsPerGroup;
922
- private drawThresholdAcrossChart;
923
- /** One threshold across each group that has one; groups without an entry are skipped. */
924
- private drawThresholdsPerGroup;
925
- /** One threshold across each bar that has one; bars without an entry are skipped. */
926
- private drawThresholdsPerBarInGroup;
927
- private applyPreTransitionThresholdStyles;
928
- static ɵfac: i0.ɵɵFactoryDeclaration<BarVerticalChartBuilder, never>;
929
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
930
- }
931
-
932
370
  declare class PcacBarVerticalChartComponent {
933
371
  private chartBuilder;
934
- readonly config: i0.InputSignal<PcacBarVerticalChartConfig>;
935
- readonly chartElm: i0.Signal<ElementRef<any>>;
936
- readonly barClicked: i0.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
372
+ readonly config: _angular_core.InputSignal<PcacBarVerticalChartConfig>;
373
+ readonly chartElm: _angular_core.Signal<ElementRef<any>>;
374
+ readonly barClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
937
375
  /**
938
376
  * Optional consumer `<ng-template pcacTooltip>` projected into this element; replaces the
939
377
  * default tooltip when present (see PcacTooltipDirective).
940
378
  */
941
- readonly tooltipTemplate: i0.Signal<PcacTooltipDirective | undefined>;
379
+ readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
942
380
  constructor();
943
381
  buildChart(): void;
944
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarVerticalChartComponent, never>;
945
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarVerticalChartComponent, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, ["tooltipTemplate"], never, true, never>;
382
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacBarVerticalChartComponent, never>;
383
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacBarVerticalChartComponent, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, ["tooltipTemplate"], never, true, never>;
946
384
  }
947
385
 
948
- /**
949
- * Rebuilds a chart whenever its container's real, laid-out size changes.
950
- *
951
- * A plain `window:resize` listener (the previous approach) misses any layout-driven size change
952
- * that isn't a viewport resize — a sidebar collapsing, a tab becoming active, a flex/grid reflow.
953
- * It also can't help a chart that mounts already holding data (e.g. behind a loading gate): that
954
- * chart's first `ngOnChanges` can fire before the browser has committed layout for its own
955
- * just-created DOM node, so `PcacChart.initializeChartState()` measures a 0-width container and
956
- * bails out with nothing drawn — and with no resize ever firing, nothing retries it.
957
- *
958
- * `ResizeObserver`'s callback contract guarantees real, laid-out dimensions on every firing,
959
- * including its first, so observing the container naturally retries that exact case.
960
- */
961
- declare class PcacChartResizeService {
386
+ declare class PcacColorService {
387
+ private primary;
388
+ private primaryLight;
389
+ private success;
390
+ private danger;
391
+ private warning;
392
+ private orange;
393
+ private blue;
394
+ private alert;
395
+ /**
396
+ * Bumped by every setter, and read by the getters, so anything reading colors inside a reactive
397
+ * context tracks palette changes: the legend's `colorScale` computed recomputes, and every chart
398
+ * (whose build runs in an `effect`) redraws - together, rather than the legend keeping the old
399
+ * swatches while newly built charts took the new palette.
400
+ */
401
+ private readonly version;
402
+ /**
403
+ * Bumps `version` from a setter. `untracked`, because Angular forbids writing a signal inside a
404
+ * `computed` - and a consumer deriving its theme reactively (`computed(() => { setScale(...);
405
+ * ... })`) called these setters there without error before they were reactive.
406
+ */
407
+ private changed;
408
+ /** A consumer's own scale from `setScale()`; replaces the default palette while set. */
409
+ private customScale;
410
+ /**
411
+ * The palette charts cycle through: the `setScale()` one when given, else the default colors
412
+ * built from the current fields - so a setter like `setSuccess()` changes the charts drawn after
413
+ * it, rather than a copy of the colors taken when the service was created.
414
+ */
415
+ private get scale();
962
416
  /**
963
- * Call once from a chart component's constructor (an injection context).
964
- * @param chartElm Signal resolving to the chart's `<svg>` element ref, e.g. a `viewChild.required` query.
965
- * @param rebuild Invoked whenever the chart's container size changes: immediately for the
966
- * observer's first (guaranteed-initial) callback, debounced for every one after that.
417
+ * Get a scale of colors dynamically
418
+ * @param numberOfNodes Number of items in dynamically build collection of colors
419
+ */
420
+ getColorScale(numberOfNodes: number): string[];
421
+ getAlert(): string;
422
+ /**
423
+ * Set the scale that charts use to set colors of data[x] on the UI, in place of the default
424
+ * palette (and of the individual color setters below, which only shape the default). An empty
425
+ * array goes back to the default palette rather than leaving charts with no colors.
426
+ * @param colors A collection of hex values
967
427
  */
968
- observe(chartElm: Signal<ElementRef>, rebuild: () => void): void;
969
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacChartResizeService, never>;
970
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
428
+ setScale(colors: string[]): void;
429
+ /** @deprecated No chart reads the primary color; it isn't part of the palette. */
430
+ setPrimary(color: string): void;
431
+ setPrimaryLight(color: string): void;
432
+ setSuccess(color: string): void;
433
+ setDanger(color: string): void;
434
+ setWarning(color: string): void;
435
+ setOrange(color: string): void;
436
+ setBlue(color: string): void;
437
+ setAlert(color: string): void;
438
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacColorService, never>;
439
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
971
440
  }
972
441
 
973
442
  declare class PcacLegendConfigItem {
@@ -981,12 +450,12 @@ declare class PcacLegendConfig {
981
450
  }
982
451
  declare class PcacLegend {
983
452
  readonly colorService: PcacColorService;
984
- config: i0.ModelSignal<PcacLegendConfig>;
985
- itemClicked: i0.OutputEmitterRef<PcacLegendConfigItem[]>;
986
- colorScale: i0.Signal<string[]>;
453
+ config: _angular_core.ModelSignal<PcacLegendConfig>;
454
+ itemClicked: _angular_core.OutputEmitterRef<PcacLegendConfigItem[]>;
455
+ colorScale: _angular_core.Signal<string[]>;
987
456
  onItemClicked(index: number): void;
988
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacLegend, never>;
989
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacLegend, "pcac-legend", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "config": "configChange"; "itemClicked": "itemClicked"; }, never, never, true, never>;
457
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacLegend, never>;
458
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacLegend, "pcac-legend", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "config": "configChange"; "itemClicked": "itemClicked"; }, never, never, true, never>;
990
459
  }
991
460
 
992
461
  declare enum PcacLineAreaPlotChartConfigType {
@@ -1128,48 +597,48 @@ declare class PcacPlotChartConfig extends PcacLineAreaChartConfig {
1128
597
  }
1129
598
 
1130
599
  declare class PcacPlotChart {
1131
- readonly config: i0.InputSignal<PcacPlotChartConfig>;
600
+ readonly config: _angular_core.InputSignal<PcacPlotChartConfig>;
1132
601
  readonly types: typeof PcacLineAreaPlotChartConfigType;
1133
- readonly dotClicked: i0.OutputEmitterRef<PcacData>;
602
+ readonly dotClicked: _angular_core.OutputEmitterRef<PcacData>;
1134
603
  /**
1135
604
  * Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
1136
605
  * inner chart (see PcacLineAreaChartComponent.tooltipTemplate for why it can't query it itself).
1137
606
  */
1138
- readonly tooltipTemplate: i0.Signal<PcacTooltipDirective | undefined>;
1139
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacPlotChart, never>;
1140
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacPlotChart, "pcac-plot-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
607
+ readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
608
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacPlotChart, never>;
609
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacPlotChart, "pcac-plot-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
1141
610
  }
1142
611
 
1143
612
  declare class PcacLineChartConfig extends PcacLineAreaChartConfig {
1144
613
  }
1145
614
 
1146
615
  declare class PcacLineChart {
1147
- readonly config: i0.InputSignal<PcacLineChartConfig>;
616
+ readonly config: _angular_core.InputSignal<PcacLineChartConfig>;
1148
617
  readonly types: typeof PcacLineAreaPlotChartConfigType;
1149
- readonly dotClicked: i0.OutputEmitterRef<PcacData>;
618
+ readonly dotClicked: _angular_core.OutputEmitterRef<PcacData>;
1150
619
  /**
1151
620
  * Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
1152
621
  * inner chart (see PcacLineAreaChartComponent.tooltipTemplate for why it can't query it itself).
1153
622
  */
1154
- readonly tooltipTemplate: i0.Signal<PcacTooltipDirective | undefined>;
1155
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacLineChart, never>;
1156
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacLineChart, "pcac-line-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
623
+ readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
624
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacLineChart, never>;
625
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacLineChart, "pcac-line-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
1157
626
  }
1158
627
 
1159
628
  declare class PcacAreaChartConfig extends PcacLineAreaChartConfig {
1160
629
  }
1161
630
 
1162
631
  declare class PcacAreaChart {
1163
- readonly config: i0.InputSignal<PcacAreaChartConfig>;
632
+ readonly config: _angular_core.InputSignal<PcacAreaChartConfig>;
1164
633
  readonly types: typeof PcacLineAreaPlotChartConfigType;
1165
- readonly dotClicked: i0.OutputEmitterRef<PcacData>;
634
+ readonly dotClicked: _angular_core.OutputEmitterRef<PcacData>;
1166
635
  /**
1167
636
  * Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
1168
637
  * inner chart (see PcacLineAreaChartComponent.tooltipTemplate for why it can't query it itself).
1169
638
  */
1170
- readonly tooltipTemplate: i0.Signal<PcacTooltipDirective | undefined>;
1171
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacAreaChart, never>;
1172
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacAreaChart, "pcac-area-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
639
+ readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
640
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacAreaChart, never>;
641
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacAreaChart, "pcac-area-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
1173
642
  }
1174
643
 
1175
644
  /**
@@ -1212,55 +681,21 @@ declare class PcacPieChartConfig extends PcacChartConfig {
1212
681
  colorOverride?: string[];
1213
682
  }
1214
683
 
1215
- /**
1216
- * Provided per-component (see PcacPieChartComponent's `providers`), not root-scoped:
1217
- * this builder extends PcacChart, which holds mutable per-chart-instance state (margin, width,
1218
- * height, colors, svg). A root singleton would be shared and clobbered by every
1219
- * <pcac-pie-chart> rendered at once.
1220
- */
1221
- declare class PieChartBuilder extends PcacChart {
1222
- private radius;
1223
- private innerRadius;
1224
- private arcShape;
1225
- private arcOverShape;
1226
- private pieAngles;
1227
- private sliceClickedSource;
1228
- sliceClicked$: rxjs.Observable<PcacData>;
1229
- buildChart(chartElm: ElementRef, config: PcacPieChartConfig): void;
1230
- private buildShapes;
1231
- private drawChart;
1232
- /**
1233
- * The donut's `label` / `subLabel`, stacked around the center of the hole. Each line starts at a
1234
- * size proportional to the hole and shrinks until it fits across it; a line that would have to
1235
- * drop below `MIN_CENTER_FONT_SIZE` is left out rather than spill over the slices. Drawn after
1236
- * the slices and ignoring the pointer, so it never blocks a slice's hover or click.
1237
- */
1238
- private drawCenter;
1239
- /**
1240
- * One centered line of the donut's center text at the largest size up to `preferredSize` that
1241
- * fits `maxWidth`, or nothing (null) when there's no text or it can't fit at a readable size.
1242
- */
1243
- private drawCenterLine;
1244
- private tweenChart;
1245
- static ɵfac: i0.ɵɵFactoryDeclaration<PieChartBuilder, never>;
1246
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1247
- }
1248
-
1249
684
  declare class PcacPieChartComponent {
1250
685
  private chartBuilder;
1251
- readonly config: i0.InputSignal<PcacPieChartConfig>;
1252
- readonly chartElm: i0.Signal<ElementRef<any>>;
1253
- readonly sliceClicked: i0.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
686
+ readonly config: _angular_core.InputSignal<PcacPieChartConfig>;
687
+ readonly chartElm: _angular_core.Signal<ElementRef<any>>;
688
+ readonly sliceClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
1254
689
  /**
1255
690
  * Optional consumer `<ng-template pcacTooltip>` projected into this element; replaces the
1256
691
  * default tooltip when present (see PcacTooltipDirective).
1257
692
  */
1258
- readonly tooltipTemplate: i0.Signal<PcacTooltipDirective | undefined>;
693
+ readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
1259
694
  constructor();
1260
695
  buildChart(): void;
1261
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacPieChartComponent, never>;
1262
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, ["tooltipTemplate"], never, true, never>;
696
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacPieChartComponent, never>;
697
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, ["tooltipTemplate"], never, true, never>;
1263
698
  }
1264
699
 
1265
- export { BarHorizontalChartBuilder, BarVerticalChartBuilder, PCAC_AXIS_LABEL_SPACE, PCAC_AXIS_SUB_LABEL_SPACE, PcacAreaChart, PcacAreaChartConfig, PcacAxisBuilder, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacChartResizeService, PcacColorService, PcacData, PcacDataRange, PcacFormatEnum, PcacGridBuilder, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacPieDonutConfig, PcacPlotChart, PcacPlotChartConfig, PcacPointFanOutConfig, PcacPointImageConfig, PcacPointRangeConfig, PcacPointRangeShow, PcacPointRangeStyle, PcacRangeBounds, PcacTooltipBuilder, PcacTooltipDirective, PcacTransitionService, PieChartBuilder, axisLabelSpace, hasAxisSubLabels, resolveAxisConfig };
1266
- export type { IPcacAxisBuilderConfig, IPcacGridBuilderConfig, PcacChartMargin, PcacResolvedAxisConfig, PcacTooltipCoincident, PcacTooltipContext, PcacTooltipOptions };
700
+ export { PcacAreaChart, PcacAreaChartConfig, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChartConfig, PcacColorService, PcacData, PcacDataRange, PcacFormatEnum, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacPieDonutConfig, PcacPlotChart, PcacPlotChartConfig, PcacPointFanOutConfig, PcacPointImageConfig, PcacPointRangeConfig, PcacPointRangeShow, PcacPointRangeStyle, PcacRangeBounds, PcacTooltipDirective };
701
+ export type { PcacTooltipCoincident, PcacTooltipContext };