@pioneer-code/pioneer-charts 22.2.17 → 22.2.18
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 +355 -186
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/package.json +5 -3
- package/scss/legend/legend.component.scss +6 -0
- package/scss/pioneer-charts.scss +4 -2
- package/scss/plot-line-area-chart/plot-line-area-chart.component.scss +4 -2
- package/themes/pioneer-charts.css +2 -2
- package/themes/pioneer-charts.min.css +1 -1
- package/types/pioneer-code-pioneer-charts.d.ts +34 -32
package/package.json
CHANGED
|
@@ -30,10 +30,9 @@
|
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "git+https://github.com/PioneerCode/pioneer-charts.git"
|
|
32
32
|
},
|
|
33
|
-
"version": "22.2.
|
|
33
|
+
"version": "22.2.18",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@angular/common": "^22.1.0",
|
|
37
36
|
"@angular/core": "^22.1.0",
|
|
38
37
|
"rxjs": "^7.4.0"
|
|
39
38
|
},
|
|
@@ -50,7 +49,10 @@
|
|
|
50
49
|
"d3-zoom": "^3.0.0",
|
|
51
50
|
"tslib": "^2.3.0"
|
|
52
51
|
},
|
|
53
|
-
"sideEffects":
|
|
52
|
+
"sideEffects": [
|
|
53
|
+
"*.css",
|
|
54
|
+
"*.scss"
|
|
55
|
+
],
|
|
54
56
|
"module": "fesm2022/pioneer-code-pioneer-charts.mjs",
|
|
55
57
|
"typings": "types/pioneer-code-pioneer-charts.d.ts",
|
|
56
58
|
"exports": {
|
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
border-radius: 50%;
|
|
35
35
|
margin-right: 4px;
|
|
36
36
|
transition: box-shadow 0.3s ease, transform 0.3s ease;
|
|
37
|
+
|
|
38
|
+
// Grown in place, without the animation, for anyone who has asked their system to reduce
|
|
39
|
+
// motion - as the charts are drawn without theirs (PcacTransitionService).
|
|
40
|
+
@media (prefers-reduced-motion: reduce) {
|
|
41
|
+
transition: none;
|
|
42
|
+
}
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
.pcac-legend-unchecked {
|
package/scss/pioneer-charts.scss
CHANGED
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
outline: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
// Its color is `--pcac-focus-ring-color`, like the axis and grid colors below: a page with a dark
|
|
37
|
+
// background sets a light one.
|
|
36
38
|
[data-pcac-mark]:focus-visible {
|
|
37
|
-
outline: 2px solid imports.$gray-800;
|
|
39
|
+
outline: 2px solid var(--pcac-focus-ring-color, #{imports.$gray-800});
|
|
38
40
|
outline-offset: 2px;
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -42,7 +44,7 @@
|
|
|
42
44
|
// bounding box - which, around a wedge, frames half its neighbors too.
|
|
43
45
|
.pcac-arc path[data-pcac-mark]:focus-visible {
|
|
44
46
|
outline: none;
|
|
45
|
-
stroke: imports.$gray-800;
|
|
47
|
+
stroke: var(--pcac-focus-ring-color, #{imports.$gray-800});
|
|
46
48
|
stroke-width: 2px;
|
|
47
49
|
}
|
|
48
50
|
|
|
@@ -99,8 +99,10 @@
|
|
|
99
99
|
fill: none;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
// The hover crosshair's line and value labels: `--pcac-crosshair-line-color` and
|
|
103
|
+
// `--pcac-crosshair-text-color`, for a dark background (see pioneer-charts.scss's colors).
|
|
102
104
|
.effect-line {
|
|
103
|
-
stroke: imports.$gray-400;
|
|
105
|
+
stroke: var(--pcac-crosshair-line-color, #{imports.$gray-400});
|
|
104
106
|
stroke-width: 1px;
|
|
105
107
|
opacity: 0;
|
|
106
108
|
}
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
.effect-text {
|
|
115
117
|
font-size: 11px;
|
|
116
118
|
font-weight: bold;
|
|
117
|
-
fill: imports.$gray-800;
|
|
119
|
+
fill: var(--pcac-crosshair-text-color, #{imports.$gray-800});
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
122
|
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
[data-pcac-mark]:focus-visible {
|
|
22
|
-
outline: 2px solid #343a40;
|
|
22
|
+
outline: 2px solid var(--pcac-focus-ring-color, #343a40);
|
|
23
23
|
outline-offset: 2px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.pcac-arc path[data-pcac-mark]:focus-visible {
|
|
27
27
|
outline: none;
|
|
28
|
-
stroke: #343a40;
|
|
28
|
+
stroke: var(--pcac-focus-ring-color, #343a40);
|
|
29
29
|
stroke-width: 2px;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pcac-d3-tooltip{position:absolute;pointer-events:none;display:none;z-index:1000}.pcac-d3-tooltip-default{text-align:center;font-size:14px;padding:.5rem;background-color:rgba(52,58,64,.85);color:#fff;border-radius:2px}[data-pcac-mark]:focus{outline:none}[data-pcac-mark]:focus-visible{outline:2px solid #343a40;outline-offset:2px}.pcac-arc path[data-pcac-mark]:focus-visible{outline:none;stroke
|
|
1
|
+
.pcac-d3-tooltip{position:absolute;pointer-events:none;display:none;z-index:1000}.pcac-d3-tooltip-default{text-align:center;font-size:14px;padding:.5rem;background-color:rgba(52,58,64,.85);color:#fff;border-radius:2px}[data-pcac-mark]:focus{outline:none}[data-pcac-mark]:focus-visible{outline:2px solid var(--pcac-focus-ring-color, #343a40);outline-offset:2px}.pcac-arc path[data-pcac-mark]:focus-visible{outline:none;stroke:var(--pcac-focus-ring-color, #343a40);stroke-width:2px}.pcac-grid-rule line{stroke:var(--pcac-grid-color, #e9ecef)}.pcac-donut-center-label{fill:var(--pcac-donut-center-label-color, #343a40);font-weight:500}.pcac-donut-center-sub-label{fill:var(--pcac-donut-center-sub-label-color, #6c757d)}.pcac-x-axis path,.pcac-x-axis line,.pcac-y-axis path,.pcac-y-axis line{stroke:none}.pcac-x-axis.pcac-axis-tick-marks .tick line,.pcac-y-axis.pcac-axis-tick-marks .tick line{stroke:var(--pcac-axis-tick-color, #212529)}.pcac-x-axis.pcac-axis-line .domain,.pcac-y-axis.pcac-axis-line .domain{stroke:var(--pcac-axis-line-color, #212529)}.pcac-x-axis .pcac-axis-label,.pcac-y-axis .pcac-axis-label{font-size:12px;font-weight:600;fill:var(--pcac-axis-label-color, #495057)}.pcac-x-axis .pcac-axis-sub-label,.pcac-y-axis .pcac-axis-sub-label{font-size:11px;fill:var(--pcac-axis-sub-label-color, #6c757d)}:where(.pcac-x-axis,.pcac-y-axis) :where(.tick) text{fill:var(--pcac-axis-tick-label-color, currentColor)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _pioneer_code_pioneer_charts from '@pioneer-code/pioneer-charts';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { TemplateRef
|
|
3
|
+
import { TemplateRef } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Base configuration for all charts.
|
|
@@ -90,8 +90,8 @@ declare class PcacAxisConfig {
|
|
|
90
90
|
* the axis. Labels follow the marks (D3 places them at tick length + 3px), and the chart's
|
|
91
91
|
* margins grow or shrink by the same amount so the plot area makes room for them - a longer
|
|
92
92
|
* tick means a slightly smaller plot, never labels pushed off the edge. Only the per-tick marks
|
|
93
|
-
* change; the axis line's two end-caps keep their default length.
|
|
94
|
-
*
|
|
93
|
+
* change; the axis line's two end-caps keep their default length. Colored by `tickColor`, the
|
|
94
|
+
* theme's `$gray-900` (like the axis line) by default.
|
|
95
95
|
*/
|
|
96
96
|
tickSize?: number;
|
|
97
97
|
/**
|
|
@@ -106,8 +106,8 @@ declare class PcacAxisConfig {
|
|
|
106
106
|
tickLabelColor?: string;
|
|
107
107
|
/**
|
|
108
108
|
* Draw a solid line along the axis itself (the full length of the axis, with D3's short
|
|
109
|
-
* end-caps). Off by default, as the theme has always hidden it.
|
|
110
|
-
*
|
|
109
|
+
* end-caps). Off by default, as the theme has always hidden it. Colored by `lineColor`, the
|
|
110
|
+
* theme's `$gray-900` by default.
|
|
111
111
|
*/
|
|
112
112
|
showLine?: boolean;
|
|
113
113
|
/**
|
|
@@ -140,7 +140,8 @@ declare class PcacAxisConfig {
|
|
|
140
140
|
* (`yAxis`) or key (`xAxis`) in the default tooltip. On the line/area/plot charts the x axis's
|
|
141
141
|
* format is also what decides how a point's `key` maps to an x position (by index for the
|
|
142
142
|
* default, `Decimal` and `DateTime` by the key's own value on a linear/time scale - see
|
|
143
|
-
* `PcacLineAreaChartConfig`); a bar chart's category axis
|
|
143
|
+
* `PcacLineAreaChartConfig`); on a bar chart's category axis it only formats keys that are
|
|
144
|
+
* numbers, and shows any other key as it is. Default `None`, which
|
|
144
145
|
* on those charts behaves as `DatasetLength`.
|
|
145
146
|
*/
|
|
146
147
|
format?: PcacFormatEnum;
|
|
@@ -233,10 +234,10 @@ declare class PcacBarHorizontalChartConfig extends PcacAxisChartConfig {
|
|
|
233
234
|
spreadColorsPerGroup: boolean;
|
|
234
235
|
/**
|
|
235
236
|
* Bar colors, any CSS color, in place of the theme palette - by series, or by group with
|
|
236
|
-
* `spreadColorsPerGroup`. Repeated when there are more series (or groups) than colors.
|
|
237
|
-
* the theme palette is used.
|
|
237
|
+
* `spreadColorsPerGroup`. Repeated when there are more series (or groups) than colors. Omitted
|
|
238
|
+
* or empty, the theme palette is used - optional, as on every chart's config.
|
|
238
239
|
*/
|
|
239
|
-
colorOverride
|
|
240
|
+
colorOverride?: string[];
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
/**
|
|
@@ -343,10 +344,10 @@ declare class PcacTooltipDirective {
|
|
|
343
344
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PcacTooltipDirective, "ng-template[pcacTooltip]", never, {}, {}, never, never, true, never>;
|
|
344
345
|
}
|
|
345
346
|
|
|
346
|
-
declare class
|
|
347
|
+
declare class PcacBarHorizontalChart {
|
|
347
348
|
private chartBuilder;
|
|
348
349
|
readonly config: _angular_core.InputSignal<PcacBarHorizontalChartConfig>;
|
|
349
|
-
readonly chartElm
|
|
350
|
+
private readonly chartElm;
|
|
350
351
|
readonly barClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
351
352
|
/**
|
|
352
353
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element; replaces the
|
|
@@ -354,9 +355,9 @@ declare class PcacBarHorizontalChartComponent {
|
|
|
354
355
|
*/
|
|
355
356
|
readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
|
|
356
357
|
constructor();
|
|
357
|
-
buildChart
|
|
358
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
359
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
358
|
+
private buildChart;
|
|
359
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacBarHorizontalChart, never>;
|
|
360
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacBarHorizontalChart, "pcac-bar-horizontal-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
declare class PcacBarVerticalChartConfig extends PcacAxisChartConfig {
|
|
@@ -365,16 +366,16 @@ declare class PcacBarVerticalChartConfig extends PcacAxisChartConfig {
|
|
|
365
366
|
spreadColorsPerGroup: boolean;
|
|
366
367
|
/**
|
|
367
368
|
* Bar colors, any CSS color, in place of the theme palette - by series, or by group with
|
|
368
|
-
* `spreadColorsPerGroup`. Repeated when there are more series (or groups) than colors.
|
|
369
|
-
* the theme palette is used.
|
|
369
|
+
* `spreadColorsPerGroup`. Repeated when there are more series (or groups) than colors. Omitted
|
|
370
|
+
* or empty, the theme palette is used - optional, as on every chart's config.
|
|
370
371
|
*/
|
|
371
|
-
colorOverride
|
|
372
|
+
colorOverride?: string[];
|
|
372
373
|
}
|
|
373
374
|
|
|
374
|
-
declare class
|
|
375
|
+
declare class PcacBarVerticalChart {
|
|
375
376
|
private chartBuilder;
|
|
376
377
|
readonly config: _angular_core.InputSignal<PcacBarVerticalChartConfig>;
|
|
377
|
-
readonly chartElm
|
|
378
|
+
private readonly chartElm;
|
|
378
379
|
readonly barClicked: _angular_core.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
379
380
|
/**
|
|
380
381
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element; replaces the
|
|
@@ -382,9 +383,9 @@ declare class PcacBarVerticalChartComponent {
|
|
|
382
383
|
*/
|
|
383
384
|
readonly tooltipTemplate: _angular_core.Signal<PcacTooltipDirective | undefined>;
|
|
384
385
|
constructor();
|
|
385
|
-
buildChart
|
|
386
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
387
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
386
|
+
private buildChart;
|
|
387
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PcacBarVerticalChart, never>;
|
|
388
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacBarVerticalChart, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
388
389
|
}
|
|
389
390
|
|
|
390
391
|
declare class PcacColorService {
|
|
@@ -451,7 +452,7 @@ declare class PcacLegendConfig {
|
|
|
451
452
|
}
|
|
452
453
|
declare class PcacLegend {
|
|
453
454
|
readonly headingId: string;
|
|
454
|
-
readonly colorService
|
|
455
|
+
private readonly colorService;
|
|
455
456
|
config: _angular_core.ModelSignal<PcacLegendConfig>;
|
|
456
457
|
itemClicked: _angular_core.OutputEmitterRef<PcacLegendConfigItem[]>;
|
|
457
458
|
colorScale: _angular_core.Signal<string[]>;
|
|
@@ -534,10 +535,11 @@ declare class PcacLineAreaChartConfig extends PcacAxisChartConfig {
|
|
|
534
535
|
enableZoomX: boolean;
|
|
535
536
|
enableZoomY: boolean;
|
|
536
537
|
/**
|
|
537
|
-
*
|
|
538
|
-
* start when there are more series than colors, as the default palette does.
|
|
538
|
+
* Series colors, any CSS color, in place of the theme palette, one per series in order. Repeats
|
|
539
|
+
* from the start when there are more series than colors, as the default palette does. Omitted or
|
|
540
|
+
* empty, the theme palette is used - optional, as on every chart's config.
|
|
539
541
|
*/
|
|
540
|
-
colorOverride
|
|
542
|
+
colorOverride?: string[];
|
|
541
543
|
/**
|
|
542
544
|
* Bounding box for any point images (`PcacData.image`) on this chart. Optional; each field falls
|
|
543
545
|
* back to the `PcacPointImageConfig` default when not given, so a consumer only setting `image`
|
|
@@ -602,7 +604,7 @@ declare class PcacPlotChartConfig extends PcacLineAreaChartConfig {
|
|
|
602
604
|
|
|
603
605
|
declare class PcacPlotChart {
|
|
604
606
|
readonly config: _angular_core.InputSignal<PcacPlotChartConfig>;
|
|
605
|
-
readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
607
|
+
protected readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
606
608
|
readonly dotClicked: _angular_core.OutputEmitterRef<PcacData>;
|
|
607
609
|
/**
|
|
608
610
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
|
|
@@ -618,7 +620,7 @@ declare class PcacLineChartConfig extends PcacLineAreaChartConfig {
|
|
|
618
620
|
|
|
619
621
|
declare class PcacLineChart {
|
|
620
622
|
readonly config: _angular_core.InputSignal<PcacLineChartConfig>;
|
|
621
|
-
readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
623
|
+
protected readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
622
624
|
readonly dotClicked: _angular_core.OutputEmitterRef<PcacData>;
|
|
623
625
|
/**
|
|
624
626
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
|
|
@@ -634,7 +636,7 @@ declare class PcacAreaChartConfig extends PcacLineAreaChartConfig {
|
|
|
634
636
|
|
|
635
637
|
declare class PcacAreaChart {
|
|
636
638
|
readonly config: _angular_core.InputSignal<PcacAreaChartConfig>;
|
|
637
|
-
readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
639
|
+
protected readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
638
640
|
readonly dotClicked: _angular_core.OutputEmitterRef<PcacData>;
|
|
639
641
|
/**
|
|
640
642
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
|
|
@@ -669,7 +671,7 @@ declare class PcacPieChartConfig extends PcacPieDonutChartConfig {
|
|
|
669
671
|
|
|
670
672
|
declare class PcacPieChart {
|
|
671
673
|
readonly config: _angular_core.InputSignal<PcacPieChartConfig>;
|
|
672
|
-
readonly types: typeof PcacPieDonutChartType;
|
|
674
|
+
protected readonly types: typeof PcacPieDonutChartType;
|
|
673
675
|
readonly sliceClicked: _angular_core.OutputEmitterRef<PcacData>;
|
|
674
676
|
/**
|
|
675
677
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
|
|
@@ -709,7 +711,7 @@ declare class PcacDonutChartConfig extends PcacPieDonutChartConfig {
|
|
|
709
711
|
|
|
710
712
|
declare class PcacDonutChart {
|
|
711
713
|
readonly config: _angular_core.InputSignal<PcacDonutChartConfig>;
|
|
712
|
-
readonly types: typeof PcacPieDonutChartType;
|
|
714
|
+
protected readonly types: typeof PcacPieDonutChartType;
|
|
713
715
|
readonly sliceClicked: _angular_core.OutputEmitterRef<PcacData>;
|
|
714
716
|
/**
|
|
715
717
|
* Optional consumer `<ng-template pcacTooltip>` projected into this element, forwarded to the
|
|
@@ -720,5 +722,5 @@ declare class PcacDonutChart {
|
|
|
720
722
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PcacDonutChart, "pcac-donut-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
721
723
|
}
|
|
722
724
|
|
|
723
|
-
export { PcacAreaChart, PcacAreaChartConfig, PcacAxisChartConfig, PcacAxisConfig, PcacAxisSubLabels, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, 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 };
|
|
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 };
|
|
724
726
|
export type { PcacTooltipCoincident, PcacTooltipContext };
|