@pioneer-code/pioneer-charts 20.0.3 → 20.3.1
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 +834 -803
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/index.d.ts +126 -117
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Selection, BaseType } from 'd3-selection';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { ElementRef, SimpleChanges, OnChanges } from '@angular/core';
|
|
4
1
|
import * as rxjs from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
4
|
+
import { Selection, BaseType } from 'd3-selection';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Base configuration for all charts.
|
|
@@ -11,8 +11,8 @@ declare class PcacChartConfig {
|
|
|
11
11
|
/**
|
|
12
12
|
* Height in pixels
|
|
13
13
|
*/
|
|
14
|
-
height: number;
|
|
15
14
|
data: PcacData[];
|
|
15
|
+
height: number;
|
|
16
16
|
}
|
|
17
17
|
declare class PcacData {
|
|
18
18
|
key: string | number | null;
|
|
@@ -25,7 +25,28 @@ declare enum PcacFormatEnum {
|
|
|
25
25
|
Percentage = "percentage",
|
|
26
26
|
Minutes = "minutes",
|
|
27
27
|
DateTime = "dateTime",
|
|
28
|
-
Fahrenheit = "fahrenheit"
|
|
28
|
+
Fahrenheit = "fahrenheit",
|
|
29
|
+
/**
|
|
30
|
+
* Expectation is we will be given a range of data from 0-23
|
|
31
|
+
* and we will map that to a 12 hour clock with am/pm
|
|
32
|
+
* e.g. 0 = 12am, 1 = 1am, 13 = 1pm, 23 = 11pm
|
|
33
|
+
*/
|
|
34
|
+
OneDayHours = "oneDayHours"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class PcacBarHorizontalChartConfig extends PcacChartConfig {
|
|
38
|
+
domainMax: number;
|
|
39
|
+
numberOfTicks: number;
|
|
40
|
+
isStacked: boolean;
|
|
41
|
+
thresholds: PcacData[];
|
|
42
|
+
tickFormat: PcacFormatEnum;
|
|
43
|
+
hideGrid: boolean;
|
|
44
|
+
hideAxis: boolean;
|
|
45
|
+
spreadColorsPerGroup: boolean;
|
|
46
|
+
colorOverride: PcacBarHorizontalChartColorOverrideConfig;
|
|
47
|
+
}
|
|
48
|
+
declare class PcacBarHorizontalChartColorOverrideConfig {
|
|
49
|
+
colors: string[];
|
|
29
50
|
}
|
|
30
51
|
|
|
31
52
|
interface IPcacAxisBuilderConfig {
|
|
@@ -100,13 +121,6 @@ declare class PcacColorService {
|
|
|
100
121
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacColorService>;
|
|
101
122
|
}
|
|
102
123
|
|
|
103
|
-
declare class PcacTransitionService {
|
|
104
|
-
private transitionDuration;
|
|
105
|
-
getTransitionDuration(): number;
|
|
106
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacTransitionService, never>;
|
|
107
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PcacTransitionService>;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
124
|
declare class PcacTooltipBuilder {
|
|
111
125
|
tooltip: any;
|
|
112
126
|
showBarTooltip(event: MouseEvent, data: PcacData, valueFormat?: PcacFormatEnum, keyFormat?: PcacFormatEnum): void;
|
|
@@ -116,6 +130,13 @@ declare class PcacTooltipBuilder {
|
|
|
116
130
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacTooltipBuilder>;
|
|
117
131
|
}
|
|
118
132
|
|
|
133
|
+
declare class PcacTransitionService {
|
|
134
|
+
private transitionDuration;
|
|
135
|
+
getTransitionDuration(): number;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PcacTransitionService, never>;
|
|
137
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PcacTransitionService>;
|
|
138
|
+
}
|
|
139
|
+
|
|
119
140
|
declare class PcacChart {
|
|
120
141
|
axisBuilder: PcacAxisBuilder;
|
|
121
142
|
gridBuilder: PcacGridBuilder;
|
|
@@ -161,110 +182,6 @@ declare class PcacChart {
|
|
|
161
182
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacChart>;
|
|
162
183
|
}
|
|
163
184
|
|
|
164
|
-
declare class PcacLineAreaChartConfig extends PcacChartConfig {
|
|
165
|
-
isArea: boolean;
|
|
166
|
-
enableEffects: boolean;
|
|
167
|
-
numberOfTicks: number;
|
|
168
|
-
hideGrid: boolean;
|
|
169
|
-
hideAxis: boolean;
|
|
170
|
-
yFormat: PcacFormatEnum;
|
|
171
|
-
xFormat: PcacFormatEnum;
|
|
172
|
-
yDomainMax: number | string;
|
|
173
|
-
yDomainMin: number | string;
|
|
174
|
-
xDomainMin: number | string;
|
|
175
|
-
xDomainMax: number | string;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
declare class LineAreaChartBuilder extends PcacChart {
|
|
179
|
-
private line;
|
|
180
|
-
private area;
|
|
181
|
-
private xScale;
|
|
182
|
-
private yScale;
|
|
183
|
-
private dotClickedSource;
|
|
184
|
-
private config;
|
|
185
|
-
dotClicked$: rxjs.Observable<PcacData>;
|
|
186
|
-
buildChart(chartElm: ElementRef, config: PcacLineAreaChartConfig): void;
|
|
187
|
-
private adjustForHiddenAxis;
|
|
188
|
-
private buildScales;
|
|
189
|
-
private drawChart;
|
|
190
|
-
private drawLineArea;
|
|
191
|
-
private drawLine;
|
|
192
|
-
private drawArea;
|
|
193
|
-
private drawEffects;
|
|
194
|
-
private drawDots;
|
|
195
|
-
private getXFormat;
|
|
196
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LineAreaChartBuilder, never>;
|
|
197
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LineAreaChartBuilder>;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
declare class PcacLineAreaChartComponent {
|
|
201
|
-
private chartBuilder;
|
|
202
|
-
readonly config: i0.InputSignal<PcacLineAreaChartConfig>;
|
|
203
|
-
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
204
|
-
readonly dotClicked: i0.OutputEmitterRef<PcacData>;
|
|
205
|
-
private resizeWindowTimeout;
|
|
206
|
-
constructor();
|
|
207
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
208
|
-
buildChart(): void;
|
|
209
|
-
/**
|
|
210
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
211
|
-
*/
|
|
212
|
-
onResize(): void;
|
|
213
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacLineAreaChartComponent, never>;
|
|
214
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PcacLineAreaChartComponent, "pcac-line-area-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, never, never, true, never>;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
declare class PcacPieChartConfig extends PcacChartConfig {
|
|
218
|
-
numberOfTicks: number;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
declare class PieChartBuilder extends PcacChart {
|
|
222
|
-
private radius;
|
|
223
|
-
private arcShape;
|
|
224
|
-
private arcOverShape;
|
|
225
|
-
private pieAngles;
|
|
226
|
-
private sliceClickedSource;
|
|
227
|
-
sliceClicked$: rxjs.Observable<PcacData>;
|
|
228
|
-
buildChart(chartElm: ElementRef, config: PcacPieChartConfig): void;
|
|
229
|
-
private buildShapes;
|
|
230
|
-
private drawChart;
|
|
231
|
-
private tweenChart;
|
|
232
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PieChartBuilder, never>;
|
|
233
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PieChartBuilder>;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
declare class PcacPieChartComponent implements OnChanges {
|
|
237
|
-
private chartBuilder;
|
|
238
|
-
readonly config: i0.InputSignal<PcacPieChartConfig>;
|
|
239
|
-
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
240
|
-
readonly sliceClicked: i0.OutputEmitterRef<PcacData>;
|
|
241
|
-
private resizeWindowTimeout;
|
|
242
|
-
constructor();
|
|
243
|
-
ngOnChanges(): void;
|
|
244
|
-
buildChart(): void;
|
|
245
|
-
/**
|
|
246
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
247
|
-
*/
|
|
248
|
-
onResize(): void;
|
|
249
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacPieChartComponent, never>;
|
|
250
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, never, never, true, never>;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
declare class PcacBarHorizontalChartConfig extends PcacChartConfig {
|
|
254
|
-
domainMax: number;
|
|
255
|
-
numberOfTicks: number;
|
|
256
|
-
isStacked: boolean;
|
|
257
|
-
thresholds: PcacData[];
|
|
258
|
-
tickFormat: PcacFormatEnum;
|
|
259
|
-
hideGrid: boolean;
|
|
260
|
-
hideAxis: boolean;
|
|
261
|
-
spreadColorsPerGroup: boolean;
|
|
262
|
-
colorOverride: PcacBarHorizontalChartColorOverrideConfig;
|
|
263
|
-
}
|
|
264
|
-
declare class PcacBarHorizontalChartColorOverrideConfig {
|
|
265
|
-
colors: string[];
|
|
266
|
-
}
|
|
267
|
-
|
|
268
185
|
declare class BarHorizontalChartBuilder extends PcacChart {
|
|
269
186
|
private xScale;
|
|
270
187
|
private yScaleStacked;
|
|
@@ -361,5 +278,97 @@ declare class PcacBarVerticalChartComponent implements OnChanges {
|
|
|
361
278
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarVerticalChartComponent, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
|
|
362
279
|
}
|
|
363
280
|
|
|
364
|
-
|
|
281
|
+
declare class PcacLineAreaChartConfig extends PcacChartConfig {
|
|
282
|
+
isArea: boolean;
|
|
283
|
+
enableEffects: boolean;
|
|
284
|
+
numberOfTicks: number;
|
|
285
|
+
hideGrid: boolean;
|
|
286
|
+
hideAxis: boolean;
|
|
287
|
+
yFormat: PcacFormatEnum;
|
|
288
|
+
xFormat: PcacFormatEnum;
|
|
289
|
+
yDomainMax: number | string;
|
|
290
|
+
yDomainMin: number | string;
|
|
291
|
+
xDomainMin: number | string;
|
|
292
|
+
xDomainMax: number | string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare class LineAreaChartBuilder extends PcacChart {
|
|
296
|
+
private line;
|
|
297
|
+
private area;
|
|
298
|
+
private xScale;
|
|
299
|
+
private yScale;
|
|
300
|
+
private dotClickedSource;
|
|
301
|
+
private config;
|
|
302
|
+
dotClicked$: rxjs.Observable<PcacData>;
|
|
303
|
+
buildChart(chartElm: ElementRef, config: PcacLineAreaChartConfig): void;
|
|
304
|
+
private adjustForHiddenAxis;
|
|
305
|
+
private buildScales;
|
|
306
|
+
private drawChart;
|
|
307
|
+
private drawLineArea;
|
|
308
|
+
private drawLine;
|
|
309
|
+
private drawArea;
|
|
310
|
+
private drawEffects;
|
|
311
|
+
private drawDots;
|
|
312
|
+
private getXFormat;
|
|
313
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LineAreaChartBuilder, never>;
|
|
314
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LineAreaChartBuilder>;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare class PcacLineAreaChartComponent {
|
|
318
|
+
private chartBuilder;
|
|
319
|
+
readonly config: i0.InputSignal<PcacLineAreaChartConfig>;
|
|
320
|
+
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
321
|
+
readonly dotClicked: i0.OutputEmitterRef<PcacData>;
|
|
322
|
+
private resizeWindowTimeout;
|
|
323
|
+
constructor();
|
|
324
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
325
|
+
buildChart(): void;
|
|
326
|
+
/**
|
|
327
|
+
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
328
|
+
*/
|
|
329
|
+
onResize(): void;
|
|
330
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PcacLineAreaChartComponent, never>;
|
|
331
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PcacLineAreaChartComponent, "pcac-line-area-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, never, never, true, never>;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
declare class PcacPieChartConfig extends PcacChartConfig {
|
|
335
|
+
numberOfTicks: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
declare class PieChartBuilder extends PcacChart {
|
|
339
|
+
private radius;
|
|
340
|
+
private arcShape;
|
|
341
|
+
private arcOverShape;
|
|
342
|
+
private pieAngles;
|
|
343
|
+
private sliceClickedSource;
|
|
344
|
+
sliceClicked$: rxjs.Observable<PcacData>;
|
|
345
|
+
buildChart(chartElm: ElementRef, config: PcacPieChartConfig): void;
|
|
346
|
+
private buildShapes;
|
|
347
|
+
private drawChart;
|
|
348
|
+
private tweenChart;
|
|
349
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PieChartBuilder, never>;
|
|
350
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PieChartBuilder>;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
declare class PcacPieChartComponent implements OnChanges {
|
|
354
|
+
private chartBuilder;
|
|
355
|
+
readonly config: i0.InputSignal<PcacPieChartConfig>;
|
|
356
|
+
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
357
|
+
readonly sliceClicked: i0.OutputEmitterRef<PcacData>;
|
|
358
|
+
private resizeWindowTimeout;
|
|
359
|
+
constructor();
|
|
360
|
+
ngOnChanges(): void;
|
|
361
|
+
buildChart(): void;
|
|
362
|
+
/**
|
|
363
|
+
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
364
|
+
*/
|
|
365
|
+
onResize(): void;
|
|
366
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PcacPieChartComponent, never>;
|
|
367
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, never, never, true, never>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare class PcacScatterPlotConfig extends PcacChartConfig {
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, LineAreaChartBuilder, PcacAxisBuilder, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacColorService, PcacData, PcacFormatEnum, PcacGridBuilder, PcacLineAreaChartComponent, PcacLineAreaChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacScatterPlotConfig, PcacTooltipBuilder, PcacTransitionService, PieChartBuilder };
|
|
365
374
|
export type { IBarVerticalChartBuilder, IPcacAxisBuilderConfig, IPcacGridBuilderConfig };
|