@pioneer-code/pioneer-charts 18.0.0 → 19.0.0
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 +132 -50
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.builder.d.ts +4 -4
- package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.component.d.ts +7 -7
- package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.model.d.ts +9 -9
- package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.builder.d.ts +5 -5
- package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.component.d.ts +4 -4
- package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.model.d.ts +9 -9
- package/lib/core/chart.d.ts +5 -5
- package/lib/core/chart.model.d.ts +6 -6
- package/lib/core/index.d.ts +1 -1
- package/lib/core/tooltip.builder.d.ts +2 -2
- package/lib/line-area-chart/line-area-chart-effects.builders.d.ts +2 -2
- package/lib/line-area-chart/line-area-chart.builder.d.ts +4 -4
- package/lib/line-area-chart/line-area-chart.component.d.ts +4 -4
- package/lib/line-area-chart/line-area-chart.model.d.ts +2 -2
- package/lib/pie-chart/pie-chart.builder.d.ts +4 -4
- package/lib/pie-chart/pie-chart.component.d.ts +4 -4
- package/lib/pie-chart/pie-chart.model.d.ts +2 -2
- package/package.json +4 -6
- package/public-api.d.ts +5 -5
- package/esm2022/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.builder.mjs +0 -272
- package/esm2022/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.component.mjs +0 -47
- package/esm2022/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.model.mjs +0 -2
- package/esm2022/lib/bar-chart/bar-horizontal-chart/public_api.mjs +0 -4
- package/esm2022/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.builder.mjs +0 -284
- package/esm2022/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.component.mjs +0 -47
- package/esm2022/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.model.mjs +0 -2
- package/esm2022/lib/bar-chart/bar-vertical-chart/public_api.mjs +0 -4
- package/esm2022/lib/core/axis.builder.mjs +0 -62
- package/esm2022/lib/core/chart.mjs +0 -90
- package/esm2022/lib/core/chart.model.mjs +0 -9
- package/esm2022/lib/core/color.service.mjs +0 -74
- package/esm2022/lib/core/grid.builder.mjs +0 -40
- package/esm2022/lib/core/index.mjs +0 -2
- package/esm2022/lib/core/public_api.mjs +0 -8
- package/esm2022/lib/core/tooltip.builder.mjs +0 -58
- package/esm2022/lib/core/transition.service.mjs +0 -19
- package/esm2022/lib/line-area-chart/line-area-chart-effects.builders.mjs +0 -127
- package/esm2022/lib/line-area-chart/line-area-chart.builder.mjs +0 -230
- package/esm2022/lib/line-area-chart/line-area-chart.component.mjs +0 -49
- package/esm2022/lib/line-area-chart/line-area-chart.model.mjs +0 -2
- package/esm2022/lib/line-area-chart/public_api.mjs +0 -4
- package/esm2022/lib/pie-chart/pie-chart.builder.mjs +0 -99
- package/esm2022/lib/pie-chart/pie-chart.component.mjs +0 -47
- package/esm2022/lib/pie-chart/pie-chart.model.mjs +0 -2
- package/esm2022/lib/pie-chart/public_api.mjs +0 -4
- package/esm2022/pioneer-code-pioneer-charts.mjs +0 -5
- package/esm2022/public-api.mjs +0 -9
- /package/lib/bar-chart/bar-horizontal-chart/{public_api.d.ts → public-api.d.ts} +0 -0
- /package/lib/bar-chart/bar-vertical-chart/{public_api.d.ts → public-api.d.ts} +0 -0
- /package/lib/core/{public_api.d.ts → public-api.d.ts} +0 -0
- /package/lib/line-area-chart/{public_api.d.ts → public-api.d.ts} +0 -0
- /package/lib/pie-chart/{public_api.d.ts → public-api.d.ts} +0 -0
|
@@ -11,6 +11,27 @@ import { Subject } from 'rxjs';
|
|
|
11
11
|
import { interpolate } from 'd3-interpolate';
|
|
12
12
|
import { color } from 'd3-color';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Base configuration for all charts.
|
|
16
|
+
* INewChart extends IChart
|
|
17
|
+
*/
|
|
18
|
+
class PcacChartConfig {
|
|
19
|
+
constructor() {
|
|
20
|
+
/**
|
|
21
|
+
* Height in pixels
|
|
22
|
+
*/
|
|
23
|
+
this.height = 200;
|
|
24
|
+
this.data = [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
class PcacData {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.key = null;
|
|
30
|
+
this.value = null;
|
|
31
|
+
this.hide = false;
|
|
32
|
+
this.data = [];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
14
35
|
var PcacFormatEnum;
|
|
15
36
|
(function (PcacFormatEnum) {
|
|
16
37
|
PcacFormatEnum["None"] = "none";
|
|
@@ -68,10 +89,10 @@ class PcacAxisBuilder {
|
|
|
68
89
|
.attr('transform', 'translate(0,' + config.height + ')')
|
|
69
90
|
.call(xAxis);
|
|
70
91
|
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
72
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
92
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacAxisBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
93
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacAxisBuilder, providedIn: 'root' }); }
|
|
73
94
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacAxisBuilder, decorators: [{
|
|
75
96
|
type: Injectable,
|
|
76
97
|
args: [{
|
|
77
98
|
providedIn: 'root',
|
|
@@ -106,10 +127,10 @@ class PcacGridBuilder {
|
|
|
106
127
|
.attr('x2', config.width)
|
|
107
128
|
.attr('class', (_, i) => (i === 0 ? 'pcac-grid-rule-last' : ''));
|
|
108
129
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
110
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacGridBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
131
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacGridBuilder, providedIn: 'root' }); }
|
|
111
132
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacGridBuilder, decorators: [{
|
|
113
134
|
type: Injectable,
|
|
114
135
|
args: [{
|
|
115
136
|
providedIn: 'root',
|
|
@@ -123,10 +144,10 @@ class PcacTransitionService {
|
|
|
123
144
|
getTransitionDuration() {
|
|
124
145
|
return this.transitionDuration;
|
|
125
146
|
}
|
|
126
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
127
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacTransitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacTransitionService, providedIn: 'root' }); }
|
|
128
149
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacTransitionService, decorators: [{
|
|
130
151
|
type: Injectable,
|
|
131
152
|
args: [{
|
|
132
153
|
providedIn: 'root',
|
|
@@ -161,7 +182,7 @@ class PcacTooltipBuilder {
|
|
|
161
182
|
break;
|
|
162
183
|
}
|
|
163
184
|
}
|
|
164
|
-
if (keyFormat) {
|
|
185
|
+
if (key && keyFormat) {
|
|
165
186
|
switch (keyFormat) {
|
|
166
187
|
case PcacFormatEnum.DateTime:
|
|
167
188
|
key = new Date(key).toLocaleDateString('en-US', {
|
|
@@ -175,12 +196,13 @@ class PcacTooltipBuilder {
|
|
|
175
196
|
break;
|
|
176
197
|
}
|
|
177
198
|
}
|
|
178
|
-
|
|
199
|
+
let finalValue = value ? value.toString() : null;
|
|
200
|
+
return key ? key + '</br>' + finalValue : finalValue;
|
|
179
201
|
}
|
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
181
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
202
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacTooltipBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
203
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacTooltipBuilder, providedIn: 'root' }); }
|
|
182
204
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacTooltipBuilder, decorators: [{
|
|
184
206
|
type: Injectable,
|
|
185
207
|
args: [{
|
|
186
208
|
providedIn: 'root',
|
|
@@ -249,10 +271,10 @@ class PcacColorService {
|
|
|
249
271
|
setAlert() {
|
|
250
272
|
return this.alert;
|
|
251
273
|
}
|
|
252
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
253
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
275
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacColorService, providedIn: 'root' }); }
|
|
254
276
|
}
|
|
255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacColorService, decorators: [{
|
|
256
278
|
type: Injectable,
|
|
257
279
|
args: [{
|
|
258
280
|
providedIn: 'root',
|
|
@@ -312,7 +334,7 @@ class PcacChart {
|
|
|
312
334
|
* For example, labels on a horizontal bar chart are dynamic and such the margin needs to be calculated ahead of
|
|
313
335
|
* chart axis construction.
|
|
314
336
|
* @param chartElm Reference to SVG on dom
|
|
315
|
-
* @param data Generic multi-dimensional
|
|
337
|
+
* @param data Generic multi-dimensional PcacData structure
|
|
316
338
|
* @param yScale D3 scale transformation object (d3.ScaleBand)
|
|
317
339
|
*/
|
|
318
340
|
setHorizontalMarginsBasedOnContent(chartElm, data, yScale) {
|
|
@@ -330,10 +352,10 @@ class PcacChart {
|
|
|
330
352
|
this.margin.bottom = this.margin.bottom;
|
|
331
353
|
this.width = this.width - this.margin.left;
|
|
332
354
|
}
|
|
333
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
334
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacChart, deps: [{ token: PcacAxisBuilder }, { token: PcacGridBuilder }, { token: PcacTransitionService }, { token: PcacTooltipBuilder }, { token: PcacColorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
356
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacChart, providedIn: 'root' }); }
|
|
335
357
|
}
|
|
336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacChart, decorators: [{
|
|
337
359
|
type: Injectable,
|
|
338
360
|
args: [{
|
|
339
361
|
providedIn: 'root',
|
|
@@ -454,10 +476,10 @@ class LineAreaChartEffectsBuilder {
|
|
|
454
476
|
return 'translate(' + mousePos[0] + ',' + pos.y + ')';
|
|
455
477
|
});
|
|
456
478
|
}
|
|
457
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
458
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
479
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LineAreaChartEffectsBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
480
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LineAreaChartEffectsBuilder, providedIn: 'root' }); }
|
|
459
481
|
}
|
|
460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LineAreaChartEffectsBuilder, decorators: [{
|
|
461
483
|
type: Injectable,
|
|
462
484
|
args: [{
|
|
463
485
|
providedIn: 'root',
|
|
@@ -664,10 +686,10 @@ class LineAreaChartBuilder extends PcacChart {
|
|
|
664
686
|
return this.xScale(index);
|
|
665
687
|
}
|
|
666
688
|
}
|
|
667
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
668
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
689
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LineAreaChartBuilder, deps: [{ token: PcacAxisBuilder }, { token: PcacGridBuilder }, { token: PcacTransitionService }, { token: PcacTooltipBuilder }, { token: PcacColorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
690
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LineAreaChartBuilder, providedIn: 'root' }); }
|
|
669
691
|
}
|
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LineAreaChartBuilder, decorators: [{
|
|
671
693
|
type: Injectable,
|
|
672
694
|
args: [{
|
|
673
695
|
providedIn: 'root',
|
|
@@ -702,10 +724,10 @@ class PcacLineAreaChartComponent {
|
|
|
702
724
|
self.buildChart();
|
|
703
725
|
}, 300);
|
|
704
726
|
}
|
|
705
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
706
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
727
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacLineAreaChartComponent, deps: [{ token: LineAreaChartBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
728
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: PcacLineAreaChartComponent, isStandalone: true, selector: "pcac-line-area-chart", inputs: { config: "config" }, outputs: { dotClicked: "dotClicked" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"pcac-line-area-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-line-area-chart svg{width:100%;display:block}.pcac-line-area-chart .dot{stroke-width:2px}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:#ced4da;stroke-width:1px;opacity:0}.pcac-line-area-chart .effect-circle{stroke-width:1px;fill:none;opacity:0}.pcac-line-area-chart .effect-text{font-size:11px;font-weight:700;fill:#343a40}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
707
729
|
}
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacLineAreaChartComponent, decorators: [{
|
|
709
731
|
type: Component,
|
|
710
732
|
args: [{ selector: 'pcac-line-area-chart', encapsulation: ViewEncapsulation.None, standalone: true, template: "<section class=\"pcac-line-area-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-line-area-chart svg{width:100%;display:block}.pcac-line-area-chart .dot{stroke-width:2px}.pcac-line-area-chart .effects-canvas{fill:none}.pcac-line-area-chart .effect-line{stroke:#ced4da;stroke-width:1px;opacity:0}.pcac-line-area-chart .effect-circle{stroke-width:1px;fill:none;opacity:0}.pcac-line-area-chart .effect-text{font-size:11px;font-weight:700;fill:#343a40}\n"] }]
|
|
711
733
|
}], ctorParameters: () => [{ type: LineAreaChartBuilder }], propDecorators: { config: [{
|
|
@@ -720,6 +742,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
720
742
|
args: ['window:resize']
|
|
721
743
|
}] } });
|
|
722
744
|
|
|
745
|
+
class PcacLineAreaChartConfig extends PcacChartConfig {
|
|
746
|
+
constructor() {
|
|
747
|
+
super(...arguments);
|
|
748
|
+
this.isArea = false;
|
|
749
|
+
this.enableEffects = true;
|
|
750
|
+
this.numberOfTicks = 5;
|
|
751
|
+
this.hideGrid = false;
|
|
752
|
+
this.hideAxis = false;
|
|
753
|
+
this.yFormat = PcacFormatEnum.None;
|
|
754
|
+
this.xFormat = PcacFormatEnum.None;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
723
758
|
class PieChartBuilder extends PcacChart {
|
|
724
759
|
constructor(axisBuilder, gridBuilder, transitionService, tooltipBuilder, colorService) {
|
|
725
760
|
super(axisBuilder, gridBuilder, transitionService, tooltipBuilder, colorService);
|
|
@@ -792,10 +827,10 @@ class PieChartBuilder extends PcacChart {
|
|
|
792
827
|
const i = interpolate({ startAngle: 0, endAngle: 0 }, b);
|
|
793
828
|
return (t) => this.arcShape(i(t)); // TODO: Strongly type
|
|
794
829
|
}
|
|
795
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
796
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
830
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PieChartBuilder, deps: [{ token: PcacAxisBuilder }, { token: PcacGridBuilder }, { token: PcacTransitionService }, { token: PcacTooltipBuilder }, { token: PcacColorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
831
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PieChartBuilder, providedIn: 'root' }); }
|
|
797
832
|
}
|
|
798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
833
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PieChartBuilder, decorators: [{
|
|
799
834
|
type: Injectable,
|
|
800
835
|
args: [{
|
|
801
836
|
providedIn: 'root',
|
|
@@ -828,10 +863,10 @@ class PcacPieChartComponent {
|
|
|
828
863
|
self.buildChart();
|
|
829
864
|
}, 300);
|
|
830
865
|
}
|
|
831
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
832
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
866
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacPieChartComponent, deps: [{ token: PieChartBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
867
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: PcacPieChartComponent, isStandalone: true, selector: "pcac-pie-chart", inputs: { config: "config" }, outputs: { sliceClicked: "sliceClicked" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"pcac-pie-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-pie-chart svg{width:100%;display:block}.pcac-pie-chart .dot{fill:none;stroke-width:1px}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
833
868
|
}
|
|
834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacPieChartComponent, decorators: [{
|
|
835
870
|
type: Component,
|
|
836
871
|
args: [{ selector: 'pcac-pie-chart', encapsulation: ViewEncapsulation.None, standalone: true, template: "<section class=\"pcac-pie-chart\">\n <svg #chart></svg>\n</section>\n\n", styles: [".pcac-pie-chart svg{width:100%;display:block}.pcac-pie-chart .dot{fill:none;stroke-width:1px}\n"] }]
|
|
837
872
|
}], ctorParameters: () => [{ type: PieChartBuilder }], propDecorators: { config: [{
|
|
@@ -846,6 +881,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
846
881
|
args: ['window:resize']
|
|
847
882
|
}] } });
|
|
848
883
|
|
|
884
|
+
class PcacPieChartConfig extends PcacChartConfig {
|
|
885
|
+
constructor() {
|
|
886
|
+
super(...arguments);
|
|
887
|
+
this.numberOfTicks = 5;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
849
891
|
class BarHorizontalChartBuilder extends PcacChart {
|
|
850
892
|
constructor(axisBuilder, gridBuilder, transitionService, tooltipBuilder, colorService) {
|
|
851
893
|
super(axisBuilder, gridBuilder, transitionService, tooltipBuilder, colorService);
|
|
@@ -1094,17 +1136,17 @@ class BarHorizontalChartBuilder extends PcacChart {
|
|
|
1094
1136
|
this.tooltipBuilder.hideTooltip();
|
|
1095
1137
|
});
|
|
1096
1138
|
}
|
|
1097
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1098
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1139
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BarHorizontalChartBuilder, deps: [{ token: PcacAxisBuilder }, { token: PcacGridBuilder }, { token: PcacTransitionService }, { token: PcacTooltipBuilder }, { token: PcacColorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1140
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BarHorizontalChartBuilder, providedIn: 'root' }); }
|
|
1099
1141
|
}
|
|
1100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BarHorizontalChartBuilder, decorators: [{
|
|
1101
1143
|
type: Injectable,
|
|
1102
1144
|
args: [{
|
|
1103
1145
|
providedIn: 'root',
|
|
1104
1146
|
}]
|
|
1105
1147
|
}], ctorParameters: () => [{ type: PcacAxisBuilder }, { type: PcacGridBuilder }, { type: PcacTransitionService }, { type: PcacTooltipBuilder }, { type: PcacColorService }] });
|
|
1106
1148
|
|
|
1107
|
-
class
|
|
1149
|
+
class PcacBarHorizontalChartComponent {
|
|
1108
1150
|
constructor(chartBuilder) {
|
|
1109
1151
|
this.chartBuilder = chartBuilder;
|
|
1110
1152
|
this.barClicked = new EventEmitter();
|
|
@@ -1130,10 +1172,10 @@ class PcacBarChartHorizontalComponent {
|
|
|
1130
1172
|
self.buildChart();
|
|
1131
1173
|
}, 300);
|
|
1132
1174
|
}
|
|
1133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1134
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacBarHorizontalChartComponent, deps: [{ token: BarHorizontalChartBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1176
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: PcacBarHorizontalChartComponent, isStandalone: true, selector: "pcac-bar-horizontal-chart", inputs: { config: "config" }, outputs: { barClicked: "barClicked" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"pcac-bar-horizontal-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-horizontal-chart{display:block}.pcac-bar-horizontal-chart svg{width:100%;display:block}.pcac-d3-tooltip{position:absolute;text-align:center;font-size:14px;padding:.5rem;pointer-events:none;display:none;background-color:#000000bf;color:#fff;border-radius:5px}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1135
1177
|
}
|
|
1136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacBarHorizontalChartComponent, decorators: [{
|
|
1137
1179
|
type: Component,
|
|
1138
1180
|
args: [{ selector: 'pcac-bar-horizontal-chart', encapsulation: ViewEncapsulation.None, standalone: true, template: "<section class=\"pcac-bar-horizontal-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-horizontal-chart{display:block}.pcac-bar-horizontal-chart svg{width:100%;display:block}.pcac-d3-tooltip{position:absolute;text-align:center;font-size:14px;padding:.5rem;pointer-events:none;display:none;background-color:#000000bf;color:#fff;border-radius:5px}\n"] }]
|
|
1139
1181
|
}], ctorParameters: () => [{ type: BarHorizontalChartBuilder }], propDecorators: { config: [{
|
|
@@ -1148,6 +1190,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1148
1190
|
args: ['window:resize']
|
|
1149
1191
|
}] } });
|
|
1150
1192
|
|
|
1193
|
+
class PcacBarHorizontalChartConfig extends PcacChartConfig {
|
|
1194
|
+
constructor() {
|
|
1195
|
+
super(...arguments);
|
|
1196
|
+
this.domainMax = 100;
|
|
1197
|
+
this.numberOfTicks = 5;
|
|
1198
|
+
this.isStacked = false;
|
|
1199
|
+
this.thresholds = [];
|
|
1200
|
+
this.tickFormat = PcacFormatEnum.None;
|
|
1201
|
+
this.hideGrid = false;
|
|
1202
|
+
this.hideAxis = false;
|
|
1203
|
+
this.spreadColorsPerGroup = false;
|
|
1204
|
+
this.colorOverride = new PcacBarHorizontalChartColorOverrideConfig();
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
class PcacBarHorizontalChartColorOverrideConfig {
|
|
1208
|
+
constructor() {
|
|
1209
|
+
this.colors = [];
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1151
1213
|
class BarVerticalChartBuilder extends PcacChart {
|
|
1152
1214
|
constructor(axisBuilder, gridBuilder, transitionService, tooltipBuilder, colorService) {
|
|
1153
1215
|
super(axisBuilder, gridBuilder, transitionService, tooltipBuilder, colorService);
|
|
@@ -1408,10 +1470,10 @@ class BarVerticalChartBuilder extends PcacChart {
|
|
|
1408
1470
|
return '3px';
|
|
1409
1471
|
});
|
|
1410
1472
|
}
|
|
1411
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1412
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1473
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BarVerticalChartBuilder, deps: [{ token: PcacAxisBuilder }, { token: PcacGridBuilder }, { token: PcacTransitionService }, { token: PcacTooltipBuilder }, { token: PcacColorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1474
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BarVerticalChartBuilder, providedIn: 'root' }); }
|
|
1413
1475
|
}
|
|
1414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: BarVerticalChartBuilder, decorators: [{
|
|
1415
1477
|
type: Injectable,
|
|
1416
1478
|
args: [{
|
|
1417
1479
|
providedIn: 'root',
|
|
@@ -1444,10 +1506,10 @@ class PcacBarVerticalChartComponent {
|
|
|
1444
1506
|
self.buildChart();
|
|
1445
1507
|
}, 300);
|
|
1446
1508
|
}
|
|
1447
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1448
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacBarVerticalChartComponent, deps: [{ token: BarVerticalChartBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1510
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: PcacBarVerticalChartComponent, isStandalone: true, selector: "pcac-bar-vertical-chart", inputs: { config: "config" }, outputs: { barClicked: "barClicked" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "chartElm", first: true, predicate: ["chart"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"pcac-bar-vertical-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-vertical-chart svg{width:100%;display:block}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1449
1511
|
}
|
|
1450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PcacBarVerticalChartComponent, decorators: [{
|
|
1451
1513
|
type: Component,
|
|
1452
1514
|
args: [{ selector: 'pcac-bar-vertical-chart', encapsulation: ViewEncapsulation.None, standalone: true, template: "<section class=\"pcac-bar-vertical-chart\">\n <svg #chart></svg>\n</section>\n", styles: [".pcac-bar-vertical-chart svg{width:100%;display:block}\n"] }]
|
|
1453
1515
|
}], ctorParameters: () => [{ type: BarVerticalChartBuilder }], propDecorators: { config: [{
|
|
@@ -1462,6 +1524,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1462
1524
|
args: ['window:resize']
|
|
1463
1525
|
}] } });
|
|
1464
1526
|
|
|
1527
|
+
class PcacBarVerticalChartConfig extends PcacChartConfig {
|
|
1528
|
+
constructor() {
|
|
1529
|
+
super(...arguments);
|
|
1530
|
+
this.domainMax = 100;
|
|
1531
|
+
this.numberOfTicks = 5;
|
|
1532
|
+
this.isStacked = false;
|
|
1533
|
+
this.thresholds = [];
|
|
1534
|
+
this.tickFormat = PcacFormatEnum.None;
|
|
1535
|
+
this.hideGrid = false;
|
|
1536
|
+
this.hideAxis = false;
|
|
1537
|
+
this.spreadColorsPerGroup = false;
|
|
1538
|
+
this.colorOverride = new PcacBarVerticalChartColorOverrideConfig();
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
class PcacBarVerticalChartColorOverrideConfig {
|
|
1542
|
+
constructor() {
|
|
1543
|
+
this.colors = [];
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1465
1547
|
/*
|
|
1466
1548
|
* Public API Surface of pioneer-charts
|
|
1467
1549
|
*/
|
|
@@ -1470,5 +1552,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1470
1552
|
* Generated bundle index. Do not edit.
|
|
1471
1553
|
*/
|
|
1472
1554
|
|
|
1473
|
-
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, LineAreaChartBuilder, PcacAxisBuilder,
|
|
1555
|
+
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, LineAreaChartBuilder, PcacAxisBuilder, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacColorService, PcacData, PcacFormatEnum, PcacGridBuilder, PcacLineAreaChartComponent, PcacLineAreaChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacTooltipBuilder, PcacTransitionService, PieChartBuilder };
|
|
1474
1556
|
//# sourceMappingURL=pioneer-code-pioneer-charts.mjs.map
|