@pioneer-code/pioneer-charts 22.2.18 → 22.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/pioneer-code-pioneer-charts.mjs +925 -47
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/package.json +1 -1
- package/scss/dot-plot-chart/dot-plot-chart.component.scss +27 -0
- package/scss/plot-line-area-chart/plot-line-area-chart.component.scss +33 -0
- package/scss/proximity-chart/proximity-chart.component.scss +68 -0
- package/types/pioneer-code-pioneer-charts.d.ts +249 -21
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.pcac-dot-plot-chart {
|
|
2
|
+
svg {
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// A dot's outline is its series' color (set by the builder); its fill is the page's background
|
|
8
|
+
// until hovered or focused, when it fills with the series' color. `--pcac-dot-fill` changes the
|
|
9
|
+
// resting fill - for a dark background, say - as the theme's other custom properties do.
|
|
10
|
+
.pcac-dot {
|
|
11
|
+
stroke-width: 2px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pcac-dot-mark {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// `heightFull` support (see PcacChartConfig.heightFull), as on the other charts.
|
|
20
|
+
pcac-dot-plot-chart.pcac-height-full {
|
|
21
|
+
display: block;
|
|
22
|
+
height: 100%;
|
|
23
|
+
|
|
24
|
+
.pcac-dot-plot-chart {
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -23,6 +23,39 @@
|
|
|
23
23
|
fill: var(--pcac-fan-out-anchor-color, #{imports.$gray-600});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// `referenceLines` (see PcacReferenceLine) and `cornerLabels` (PcacCornerLabels): guides, drawn
|
|
27
|
+
// as quietly as the fan-out anchors. `color` overrides them through `--pcac-reference-line-color`
|
|
28
|
+
// (on each line's group) and `--pcac-corner-label-color` (on the labels' group), as above.
|
|
29
|
+
.reference-line-stroke {
|
|
30
|
+
stroke: var(--pcac-reference-line-color, #{imports.$gray-500});
|
|
31
|
+
stroke-width: 1px;
|
|
32
|
+
stroke-dasharray: 4 4;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.reference-line-label {
|
|
36
|
+
font-size: 11px;
|
|
37
|
+
fill: var(--pcac-reference-line-color, #{imports.$gray-500});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// `pointGauge` (see PcacPointGaugeConfig): a ring around each point with a `gauge`. The arc is
|
|
41
|
+
// the config's `color` (`--pcac-point-gauge-color`, on each `.dots` group) or else the series'
|
|
42
|
+
// own (`--pcac-point-gauge-series-color`, which the builder sets on each ring); the track is
|
|
43
|
+
// `trackColor` (`--pcac-point-gauge-track-color`) or a light gray, like the grid.
|
|
44
|
+
.point-gauge-track {
|
|
45
|
+
fill: none;
|
|
46
|
+
stroke: var(--pcac-point-gauge-track-color, #{imports.$gray-200});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.point-gauge-arc {
|
|
50
|
+
fill: var(--pcac-point-gauge-color, var(--pcac-point-gauge-series-color));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.corner-label {
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
fill: var(--pcac-corner-label-color, #{imports.$gray-600});
|
|
57
|
+
}
|
|
58
|
+
|
|
26
59
|
// `pointRange` (see PcacPointRangeConfig): each point's `range`, drawn by the builder into a
|
|
27
60
|
// `.point-range` group per point, a `.point-range-series` group per series, and one
|
|
28
61
|
// `.point-ranges` group for the chart. Color is the config's `color` when set
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "../core/theme/imports";
|
|
2
|
+
|
|
3
|
+
.pcac-proximity-chart {
|
|
4
|
+
svg {
|
|
5
|
+
width: 100%;
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Guides: the rings, their labels and the spokes, as quiet as the plot chart's fan-out anchors.
|
|
10
|
+
// Each color is a custom property, so a stylesheet can restyle them - for a dark background, say.
|
|
11
|
+
.pcac-proximity-ring circle {
|
|
12
|
+
stroke: var(--pcac-proximity-ring-color, #{imports.$gray-300});
|
|
13
|
+
stroke-dasharray: 3 4;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pcac-proximity-ring-label {
|
|
17
|
+
font-size: 11px;
|
|
18
|
+
fill: var(--pcac-proximity-ring-label-color, #{imports.$gray-600});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pcac-proximity-spoke {
|
|
22
|
+
stroke: var(--pcac-proximity-spoke-color, #{imports.$gray-300});
|
|
23
|
+
stroke-width: 1px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pcac-proximity-item {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Names under the items (`showLabels`), and ring labels, keep a halo of the background around them
|
|
31
|
+
// so a spoke or ring running behind doesn't cut through the text.
|
|
32
|
+
.pcac-proximity-label,
|
|
33
|
+
.pcac-proximity-ring-label {
|
|
34
|
+
paint-order: stroke;
|
|
35
|
+
stroke: var(--pcac-proximity-label-halo-color, #{imports.$white});
|
|
36
|
+
stroke-width: 3px;
|
|
37
|
+
stroke-linejoin: round;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pcac-proximity-label {
|
|
41
|
+
font-size: 11px;
|
|
42
|
+
fill: var(--pcac-proximity-label-color, #{imports.$gray-800});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pcac-proximity-center .pcac-proximity-label {
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// A hovered or focused item's dot grows a ring in its own color.
|
|
50
|
+
.pcac-proximity-item.is-active .pcac-proximity-dot {
|
|
51
|
+
stroke: currentColor;
|
|
52
|
+
stroke-width: 2px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pcac-proximity-item.is-active .pcac-proximity-image {
|
|
56
|
+
filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.35));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// `heightFull` support (see PcacChartConfig.heightFull), as on the other charts.
|
|
61
|
+
pcac-proximity-chart.pcac-height-full {
|
|
62
|
+
display: block;
|
|
63
|
+
height: 100%;
|
|
64
|
+
|
|
65
|
+
.pcac-proximity-chart {
|
|
66
|
+
height: 100%;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -194,6 +194,17 @@ declare class PcacData {
|
|
|
194
194
|
* Optional for the same reason as `image`.
|
|
195
195
|
*/
|
|
196
196
|
range?: PcacDataRange;
|
|
197
|
+
/**
|
|
198
|
+
* A third number for this point, shown as how full a ring around its mark is - on a scatter of
|
|
199
|
+
* two measures, say, a third one per point. Out of the chart config's `pointGauge.max`: at `max`
|
|
200
|
+
* or above the ring is full, at `0` or below it's empty. Currently honored by the line/area/plot
|
|
201
|
+
* charts only, on the innermost (point-level) `PcacData`, and only drawn when the chart config
|
|
202
|
+
* turns `pointGauge` on (see `PcacPointGaugeConfig`). A point without one gets no ring at all,
|
|
203
|
+
* which can itself say something ("doesn't apply").
|
|
204
|
+
*
|
|
205
|
+
* Optional for the same reason as `image`.
|
|
206
|
+
*/
|
|
207
|
+
gauge?: number;
|
|
197
208
|
}
|
|
198
209
|
/**
|
|
199
210
|
* One side of a `PcacDataRange`. `min` above `max` is read as the other way round; `min` equal to
|
|
@@ -441,26 +452,6 @@ declare class PcacColorService {
|
|
|
441
452
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
|
|
442
453
|
}
|
|
443
454
|
|
|
444
|
-
declare class PcacLegendConfigItem {
|
|
445
|
-
label: string;
|
|
446
|
-
checked: boolean;
|
|
447
|
-
colorOverride: string | null;
|
|
448
|
-
}
|
|
449
|
-
declare class PcacLegendConfig {
|
|
450
|
-
heading: string | null;
|
|
451
|
-
items: PcacLegendConfigItem[];
|
|
452
|
-
}
|
|
453
|
-
declare class PcacLegend {
|
|
454
|
-
readonly headingId: string;
|
|
455
|
-
private readonly colorService;
|
|
456
|
-
config: _angular_core.ModelSignal<PcacLegendConfig>;
|
|
457
|
-
itemClicked: _angular_core.OutputEmitterRef<PcacLegendConfigItem[]>;
|
|
458
|
-
colorScale: _angular_core.Signal<string[]>;
|
|
459
|
-
onItemClicked(index: number): void;
|
|
460
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacLegend, never>;
|
|
461
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacLegend, "pcac-legend", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "config": "configChange"; "itemClicked": "itemClicked"; }, never, never, true, never>;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
455
|
declare enum PcacLineAreaPlotChartConfigType {
|
|
465
456
|
Line = "line",
|
|
466
457
|
Area = "area",
|
|
@@ -514,6 +505,80 @@ declare class PcacPointRangeConfig {
|
|
|
514
505
|
*/
|
|
515
506
|
color?: string;
|
|
516
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Drawing for `PcacData.gauge` on the line/area/plot charts: a ring around each point's mark (its
|
|
510
|
+
* dot, or its image) whose arc fills clockwise from 12 o'clock in proportion to `gauge / max`,
|
|
511
|
+
* over a faint full-circle track. Drawn with the mark, so it moves with zoom and fan-out; fan-out
|
|
512
|
+
* spacing and the chart's edge space grow to fit it. Points without a `gauge` get no ring.
|
|
513
|
+
*/
|
|
514
|
+
declare class PcacPointGaugeConfig {
|
|
515
|
+
/** The `gauge` value of a full ring. Default 1, for values that are already a fraction. */
|
|
516
|
+
max: number;
|
|
517
|
+
/** Ring thickness in px. */
|
|
518
|
+
width: number;
|
|
519
|
+
/** Space between the mark (the image box, or a hovered dot) and the ring, in px. */
|
|
520
|
+
gap: number;
|
|
521
|
+
/** Draw the unfilled rest of the ring, so an arc reads as a share of a whole. */
|
|
522
|
+
showTrack: boolean;
|
|
523
|
+
/**
|
|
524
|
+
* What the gauge measures, e.g. `'PSA'`. When set, each point's screen reader name ends with it
|
|
525
|
+
* and the point's value - "…, PSA 0.018" - since the ring itself is only visual. Unset, the
|
|
526
|
+
* ring isn't read at all; say what it means in the chart's `ariaLabel`, or a custom tooltip.
|
|
527
|
+
*/
|
|
528
|
+
name?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Any CSS color for the filled arc. Unset, each takes its series' color. Applied as
|
|
531
|
+
* `--pcac-point-gauge-color` on the chart's `.dots` groups, so a stylesheet can set it on an
|
|
532
|
+
* ancestor instead (a config value wins).
|
|
533
|
+
*/
|
|
534
|
+
color?: string;
|
|
535
|
+
/** Any CSS color for the track (`--pcac-point-gauge-track-color`). Theme default `$gray-200`. */
|
|
536
|
+
trackColor?: string;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* A line across the plot at one value on an axis (see `PcacLineAreaChartConfig.referenceLines`):
|
|
540
|
+
* a target, a threshold, a median. Drawn dashed, over the grid and under the series, clipped to
|
|
541
|
+
* the plot area, and moved with zoom like the data.
|
|
542
|
+
*/
|
|
543
|
+
declare class PcacReferenceLine {
|
|
544
|
+
/** Which axis `value` is on: `'y'` draws a horizontal line, `'x'` a vertical one. */
|
|
545
|
+
axis: 'x' | 'y';
|
|
546
|
+
/**
|
|
547
|
+
* Where the line sits, in the axis's own terms: a number on the y axis; on the x axis, whatever
|
|
548
|
+
* a point's `key` would be under `xAxis.format` - a number for `Decimal`, a date (or anything
|
|
549
|
+
* `new Date()` reads) for `DateTime`, a series index otherwise.
|
|
550
|
+
*/
|
|
551
|
+
value: number | string;
|
|
552
|
+
/**
|
|
553
|
+
* A few words drawn at the line's far end, inside the plot: above the right end of a horizontal
|
|
554
|
+
* line, beside the top of a vertical one. Styled by the theme's `.reference-line-label` rule.
|
|
555
|
+
*/
|
|
556
|
+
label?: string;
|
|
557
|
+
/**
|
|
558
|
+
* Any CSS color for the line and its label. Theme default `$gray-500`. Applied as
|
|
559
|
+
* `--pcac-reference-line-color` on the line's group, so a stylesheet can set it on an ancestor
|
|
560
|
+
* instead (a config value wins).
|
|
561
|
+
*/
|
|
562
|
+
color?: string;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Text pinned to the plot area's corners (see `PcacLineAreaChartConfig.cornerLabels`) - names for
|
|
566
|
+
* the regions the plot divides into, such as the quadrants between two reference lines. Pinned to
|
|
567
|
+
* the plot's frame rather than to data, so they stay put when the chart is zoomed. Drawn under the
|
|
568
|
+
* series, so a point in the corner covers its label rather than the other way round. Any corner
|
|
569
|
+
* left unset is left empty.
|
|
570
|
+
*/
|
|
571
|
+
declare class PcacCornerLabels {
|
|
572
|
+
topLeft?: string;
|
|
573
|
+
topRight?: string;
|
|
574
|
+
bottomLeft?: string;
|
|
575
|
+
bottomRight?: string;
|
|
576
|
+
/**
|
|
577
|
+
* Any CSS color for all four. Theme default `$gray-600`. Applied as `--pcac-corner-label-color`
|
|
578
|
+
* on their group, so a stylesheet can set it on an ancestor instead (a config value wins).
|
|
579
|
+
*/
|
|
580
|
+
color?: string;
|
|
581
|
+
}
|
|
517
582
|
/**
|
|
518
583
|
* The axes' `format` and `domainMin`/`domainMax` (`PcacAxisConfig`) do more here than on the bar
|
|
519
584
|
* charts. `yAxis.domainMin`/`domainMax` are the y scale's domain (default 0..100). `xAxis.format`
|
|
@@ -551,6 +616,102 @@ declare class PcacLineAreaChartConfig extends PcacAxisChartConfig {
|
|
|
551
616
|
* every `PcacPointRangeConfig` default. Points without a `range` draw nothing extra.
|
|
552
617
|
*/
|
|
553
618
|
pointRange?: Partial<PcacPointRangeConfig>;
|
|
619
|
+
/**
|
|
620
|
+
* Dashed lines at chosen values on either axis (see `PcacReferenceLine`). None when not set.
|
|
621
|
+
* They are decoration for sighted readers - hidden from screen readers like the grid - so when
|
|
622
|
+
* one carries meaning, say so in the chart's `ariaLabel`.
|
|
623
|
+
*/
|
|
624
|
+
referenceLines?: Partial<PcacReferenceLine>[];
|
|
625
|
+
/**
|
|
626
|
+
* Draw each point's `gauge` as a ring around its mark (see `PcacData.gauge`). Off when not set;
|
|
627
|
+
* `{}` turns it on with every `PcacPointGaugeConfig` default. Points without a `gauge` draw
|
|
628
|
+
* nothing extra.
|
|
629
|
+
*/
|
|
630
|
+
pointGauge?: Partial<PcacPointGaugeConfig>;
|
|
631
|
+
/**
|
|
632
|
+
* Labels in the plot's four corners (see `PcacCornerLabels`). None when not set. Hidden from
|
|
633
|
+
* screen readers like the grid, so when they carry meaning, say so in the chart's `ariaLabel`.
|
|
634
|
+
*/
|
|
635
|
+
cornerLabels?: PcacCornerLabels;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* A dot plot: every point placed along one value axis (x), and points that share a value - or,
|
|
640
|
+
* with `binWidth`, fall in the same bin - stacked into a column above it, one mark per point. It
|
|
641
|
+
* shows how values are distributed while keeping every item visible and hoverable, which suits
|
|
642
|
+
* items with their own identity (and their own `image`) better than a histogram's bars.
|
|
643
|
+
*
|
|
644
|
+
* `data` is series, each holding its points - the same shape as the plot chart - so points can be
|
|
645
|
+
* colored by group. A point's `value` is its position on the axis and its `key` its name (in the
|
|
646
|
+
* tooltip and to screen readers). A point whose `value` isn't a number is left out, as is a series
|
|
647
|
+
* or point with `hide`.
|
|
648
|
+
*
|
|
649
|
+
* The axes: `xAxis` is the value axis - `domainMin` / `domainMax` fix its span (by default it
|
|
650
|
+
* spans the data, rounded out to nice ticks), `format` formats its ticks and the tooltip's value,
|
|
651
|
+
* and every label, sub label, tick and grid setting applies. There is no y scale - a column's
|
|
652
|
+
* height is a count of marks, not a value - so the y axis is never drawn; `yAxis` is ignored.
|
|
653
|
+
*/
|
|
654
|
+
declare class PcacDotPlotChartConfig extends PcacAxisChartConfig {
|
|
655
|
+
/**
|
|
656
|
+
* Group values into bins this wide, in the axis's units, and stack each bin at its center: with
|
|
657
|
+
* values 7, 7.5 and 8 and a `binWidth` of 1, the 7 and 7.5 share a column. Unset (the default),
|
|
658
|
+
* only equal values stack. Bins start at `xAxis.domainMin`, or 0 without one.
|
|
659
|
+
*/
|
|
660
|
+
binWidth?: number;
|
|
661
|
+
/**
|
|
662
|
+
* Radius of a point's dot, in px; default 6. Points with an `image` are sized by `pointImage`
|
|
663
|
+
* instead. Optional, as `colorOverride` is on every chart, so an object literal needn't spell it out.
|
|
664
|
+
*/
|
|
665
|
+
dotRadius?: number;
|
|
666
|
+
/** Space between marks stacked in a column, in px; default 2. Optional, likewise. */
|
|
667
|
+
gap?: number;
|
|
668
|
+
/**
|
|
669
|
+
* Bounding box for points' images (`PcacData.image`), drawn in place of their dots, as on the
|
|
670
|
+
* plot chart. Each field falls back to its `PcacPointImageConfig` default.
|
|
671
|
+
*
|
|
672
|
+
* A column too tall for the chart's height shrinks every mark on the chart evenly until it fits,
|
|
673
|
+
* so no point is ever cut off; give the chart more `height` to keep marks at full size.
|
|
674
|
+
*/
|
|
675
|
+
pointImage?: Partial<PcacPointImageConfig>;
|
|
676
|
+
/**
|
|
677
|
+
* Series colors, any CSS color, in place of the theme palette, one per series in order. Repeats
|
|
678
|
+
* when there are more series than colors. Omitted or empty, the theme palette is used.
|
|
679
|
+
*/
|
|
680
|
+
colorOverride?: string[];
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/** A dot plot: points along one value axis, stacked into columns where they share a value (see PcacDotPlotChartConfig). */
|
|
684
|
+
declare class PcacDotPlotChart {
|
|
685
|
+
private chartBuilder;
|
|
686
|
+
readonly config: _angular_core.InputSignal<PcacDotPlotChartConfig>;
|
|
687
|
+
private readonly chartElm;
|
|
688
|
+
readonly dotClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
689
|
+
/** Optional consumer `<ng-template pcacTooltip>`, replacing the default tooltip (see PcacTooltipDirective). */
|
|
690
|
+
readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
|
|
691
|
+
constructor();
|
|
692
|
+
private buildChart;
|
|
693
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacDotPlotChart, never>;
|
|
694
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacDotPlotChart, "pcac-dot-plot-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
declare class PcacLegendConfigItem {
|
|
698
|
+
label: string;
|
|
699
|
+
checked: boolean;
|
|
700
|
+
colorOverride: string | null;
|
|
701
|
+
}
|
|
702
|
+
declare class PcacLegendConfig {
|
|
703
|
+
heading: string | null;
|
|
704
|
+
items: PcacLegendConfigItem[];
|
|
705
|
+
}
|
|
706
|
+
declare class PcacLegend {
|
|
707
|
+
readonly headingId: string;
|
|
708
|
+
private readonly colorService;
|
|
709
|
+
config: _angular_core.ModelSignal<PcacLegendConfig>;
|
|
710
|
+
itemClicked: _angular_core.OutputEmitterRef<PcacLegendConfigItem[]>;
|
|
711
|
+
colorScale: _angular_core.Signal<string[]>;
|
|
712
|
+
onItemClicked(index: number): void;
|
|
713
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacLegend, never>;
|
|
714
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacLegend, "pcac-legend", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "config": "configChange"; "itemClicked": "itemClicked"; }, never, never, true, never>;
|
|
554
715
|
}
|
|
555
716
|
|
|
556
717
|
/**
|
|
@@ -647,6 +808,73 @@ declare class PcacAreaChart {
|
|
|
647
808
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacAreaChart, "pcac-area-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
648
809
|
}
|
|
649
810
|
|
|
811
|
+
/**
|
|
812
|
+
* A proximity chart: one item in the middle (`center`) and others (`data`) around it, each placed
|
|
813
|
+
* closer in or further out by its `value` - how similar it is to the center, say, or how far from
|
|
814
|
+
* it. It answers "what's nearest to this?" at a glance: the closest matches sit tight around the
|
|
815
|
+
* center, weaker ones out on the rim.
|
|
816
|
+
*
|
|
817
|
+
* Each item in `data` is one point: `key` is its name (tooltip, screen readers), `value` its
|
|
818
|
+
* closeness in whatever units the chart's `closeValue` / `farValue` use, and `image` optionally
|
|
819
|
+
* drawn in place of its dot. Items go around the center clockwise from `startAngle` in data order,
|
|
820
|
+
* evenly spaced, so put the closest first to have it at the top. An item whose `value` isn't a
|
|
821
|
+
* number, or with `hide`, is left out. Best with a handful to a dozen or so items; past that they
|
|
822
|
+
* crowd one another around the ring.
|
|
823
|
+
*/
|
|
824
|
+
declare class PcacProximityChartConfig extends PcacChartConfig {
|
|
825
|
+
/** The item the others are measured against, drawn in the middle. Its `value` isn't used. */
|
|
826
|
+
center: PcacData;
|
|
827
|
+
/**
|
|
828
|
+
* The `value` that sits right up against the center, and the one that sits on the outer rim;
|
|
829
|
+
* values in between are placed proportionally, and anything beyond either is held at it.
|
|
830
|
+
* The defaults suit a similarity from 0 to 1 (1 = identical, closest in). For a distance, swap
|
|
831
|
+
* them: `closeValue: 0, farValue: <largest distance>`.
|
|
832
|
+
*/
|
|
833
|
+
closeValue?: number;
|
|
834
|
+
farValue?: number;
|
|
835
|
+
/**
|
|
836
|
+
* Values to draw a faint guide ring at, each labelled in `format` - e.g. `[0.95, 0.9, 0.85]` with
|
|
837
|
+
* `Percentage` reads "95%", "90%", "85%". None when not set.
|
|
838
|
+
*/
|
|
839
|
+
rings?: number[];
|
|
840
|
+
/** How values read on the ring labels, in the tooltip and to screen readers; see `PcacFormatEnum`. */
|
|
841
|
+
format?: PcacFormatEnum;
|
|
842
|
+
/**
|
|
843
|
+
* Write each item's `key` under it, and the center's under the center. Default false: names are
|
|
844
|
+
* in the tooltip either way. Keep it off for long names or a crowded ring.
|
|
845
|
+
*/
|
|
846
|
+
showLabels?: boolean;
|
|
847
|
+
/** Draw a faint line from the center to each item. Default true. */
|
|
848
|
+
showSpokes?: boolean;
|
|
849
|
+
/** Where the first item sits, in degrees clockwise from 12 o'clock. Default 0. */
|
|
850
|
+
startAngle?: number;
|
|
851
|
+
/** Size of the center item's image (or twice its dot's radius), in px. Default 64. */
|
|
852
|
+
centerSize?: number;
|
|
853
|
+
/** Size of each surrounding item's image (or twice its dot's radius), in px. Default 40. */
|
|
854
|
+
itemSize?: number;
|
|
855
|
+
/**
|
|
856
|
+
* Item colors, any CSS color, used in data order for the dots of items without an `image` (the
|
|
857
|
+
* center takes the first). Repeated when there are more items than colors. Omitted or empty, the
|
|
858
|
+
* theme palette is used.
|
|
859
|
+
*/
|
|
860
|
+
colorOverride?: string[];
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/** A proximity chart: an item in the middle, others around it by closeness (see PcacProximityChartConfig). */
|
|
864
|
+
declare class PcacProximityChart {
|
|
865
|
+
private chartBuilder;
|
|
866
|
+
readonly config: _angular_core.InputSignal<PcacProximityChartConfig>;
|
|
867
|
+
private readonly chartElm;
|
|
868
|
+
/** An item - or the center - was clicked, or activated with Enter or Space. */
|
|
869
|
+
readonly itemClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
870
|
+
/** Optional consumer `<ng-template pcacTooltip>`, replacing the default tooltip (see PcacTooltipDirective). */
|
|
871
|
+
readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
|
|
872
|
+
constructor();
|
|
873
|
+
private buildChart;
|
|
874
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacProximityChart, never>;
|
|
875
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacProximityChart, "pcac-proximity-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "itemClicked": "itemClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
876
|
+
}
|
|
877
|
+
|
|
650
878
|
/** Which chart the shared `<pcac-pie-donut-chart>` draws; each wrapper binds its own. */
|
|
651
879
|
declare enum PcacPieDonutChartType {
|
|
652
880
|
Pie = "pie",
|
|
@@ -722,5 +950,5 @@ declare class PcacDonutChart {
|
|
|
722
950
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacDonutChart, "pcac-donut-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
723
951
|
}
|
|
724
952
|
|
|
725
|
-
export { PcacAreaChart, PcacAreaChartConfig, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChart, PcacBarHorizontalChart as PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChart, PcacBarVerticalChart as PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChartConfig, PcacColorService, PcacData, PcacDataRange, PcacDonutChart, PcacDonutChartConfig, PcacFormatEnum, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChart, PcacPieChartConfig, PcacPlotChart, PcacPlotChartConfig, PcacPointFanOutConfig, PcacPointImageConfig, PcacPointRangeConfig, PcacPointRangeShow, PcacPointRangeStyle, PcacRangeBounds, PcacTooltipDirective };
|
|
953
|
+
export { PcacAreaChart, PcacAreaChartConfig, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChart, PcacBarHorizontalChart as PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChart, PcacBarVerticalChart as PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChartConfig, PcacColorService, PcacCornerLabels, PcacData, PcacDataRange, PcacDonutChart, PcacDonutChartConfig, PcacDotPlotChart, PcacDotPlotChartConfig, PcacFormatEnum, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChart, PcacPieChartConfig, PcacPlotChart, PcacPlotChartConfig, PcacPointFanOutConfig, PcacPointGaugeConfig, PcacPointImageConfig, PcacPointRangeConfig, PcacPointRangeShow, PcacPointRangeStyle, PcacProximityChart, PcacProximityChartConfig, PcacRangeBounds, PcacReferenceLine, PcacTooltipDirective };
|
|
726
954
|
export type { PcacTooltipCoincident, PcacTooltipContext };
|