@pioneer-code/pioneer-charts 19.0.0 → 20.0.2

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.
Files changed (34) hide show
  1. package/fesm2022/pioneer-code-pioneer-charts.mjs +169 -205
  2. package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
  3. package/index.d.ts +363 -3
  4. package/package.json +3 -3
  5. package/scss/bar-chart/bar-vertical-chart/bar-vertical-chart.component.scss +0 -2
  6. package/scss/line-area-chart/line-area-chart.component.scss +3 -3
  7. package/scss/pioneer-charts.scss +4 -4
  8. package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.builder.d.ts +0 -41
  9. package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.component.d.ts +0 -21
  10. package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.model.d.ts +0 -15
  11. package/lib/bar-chart/bar-horizontal-chart/public-api.d.ts +0 -3
  12. package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.builder.d.ts +0 -42
  13. package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.component.d.ts +0 -21
  14. package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.model.d.ts +0 -15
  15. package/lib/bar-chart/bar-vertical-chart/public-api.d.ts +0 -3
  16. package/lib/core/axis.builder.d.ts +0 -21
  17. package/lib/core/chart.d.ts +0 -55
  18. package/lib/core/chart.model.d.ts +0 -24
  19. package/lib/core/color.service.d.ts +0 -32
  20. package/lib/core/grid.builder.d.ts +0 -22
  21. package/lib/core/index.d.ts +0 -1
  22. package/lib/core/public-api.d.ts +0 -7
  23. package/lib/core/tooltip.builder.d.ts +0 -10
  24. package/lib/core/transition.service.d.ts +0 -7
  25. package/lib/line-area-chart/line-area-chart-effects.builders.d.ts +0 -28
  26. package/lib/line-area-chart/line-area-chart.builder.d.ts +0 -37
  27. package/lib/line-area-chart/line-area-chart.component.d.ts +0 -21
  28. package/lib/line-area-chart/line-area-chart.model.d.ts +0 -14
  29. package/lib/line-area-chart/public-api.d.ts +0 -3
  30. package/lib/pie-chart/pie-chart.builder.d.ts +0 -33
  31. package/lib/pie-chart/pie-chart.component.d.ts +0 -21
  32. package/lib/pie-chart/pie-chart.model.d.ts +0 -4
  33. package/lib/pie-chart/public-api.d.ts +0 -3
  34. package/public-api.d.ts +0 -5
package/index.d.ts CHANGED
@@ -1,5 +1,365 @@
1
+ import { Selection, BaseType } from 'd3-selection';
2
+ import * as i0 from '@angular/core';
3
+ import { ElementRef, SimpleChanges, OnChanges } from '@angular/core';
4
+ import * as rxjs from 'rxjs';
5
+
1
6
  /**
2
- * Generated bundle index. Do not edit.
7
+ * Base configuration for all charts.
8
+ * INewChart extends IChart
3
9
  */
4
- /// <amd-module name="@pioneer-code/pioneer-charts" />
5
- export * from './public-api';
10
+ declare class PcacChartConfig {
11
+ /**
12
+ * Height in pixels
13
+ */
14
+ height: number;
15
+ data: PcacData[];
16
+ }
17
+ declare class PcacData {
18
+ key: string | number | null;
19
+ value: string | number | null;
20
+ hide: boolean;
21
+ data: PcacData[];
22
+ }
23
+ declare enum PcacFormatEnum {
24
+ None = "none",
25
+ Percentage = "percentage",
26
+ Minutes = "minutes",
27
+ DateTime = "dateTime",
28
+ Fahrenheit = "fahrenheit"
29
+ }
30
+
31
+ interface IPcacAxisBuilderConfig {
32
+ svg: Selection<BaseType, {}, HTMLElement, any>;
33
+ height: number;
34
+ xScale: any;
35
+ yScale: any;
36
+ numberOfTicks: number;
37
+ yFormat?: PcacFormatEnum;
38
+ xFormat?: PcacFormatEnum;
39
+ hideYAxis?: boolean;
40
+ hideXAxis?: boolean;
41
+ }
42
+ declare class PcacAxisBuilder {
43
+ drawAxis(config: IPcacAxisBuilderConfig): void;
44
+ private drawYAxis;
45
+ private drawXAxis;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacAxisBuilder, never>;
47
+ static ɵprov: i0.ɵɵInjectableDeclaration<PcacAxisBuilder>;
48
+ }
49
+
50
+ interface IPcacGridBuilderConfig {
51
+ svg: Selection<BaseType, {}, HTMLElement, any>;
52
+ /**
53
+ * Required for horizontal grid
54
+ */
55
+ width: number;
56
+ /**
57
+ * Required for vertical grid
58
+ */
59
+ height: number;
60
+ xScale: any;
61
+ yScale: any;
62
+ numberOfTicks: number;
63
+ }
64
+ declare class PcacGridBuilder {
65
+ drawVerticalGrid(config: IPcacGridBuilderConfig): void;
66
+ drawHorizontalGrid(config: IPcacGridBuilderConfig): void;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacGridBuilder, never>;
68
+ static ɵprov: i0.ɵɵInjectableDeclaration<PcacGridBuilder>;
69
+ }
70
+
71
+ declare class PcacColorService {
72
+ private primary;
73
+ private primaryLight;
74
+ private success;
75
+ private danger;
76
+ private warning;
77
+ private orange;
78
+ private blue;
79
+ private scale;
80
+ private alert;
81
+ /**
82
+ * Get a scale of colors dynamically
83
+ * @param numberOfNodes Number of items in dynamically build collection of colors
84
+ */
85
+ getColorScale(numberOfNodes: number): string[];
86
+ getAlert(): string;
87
+ /**
88
+ * Set the scale that charts use to set colors of data[x] on the UI.
89
+ * @param colors A collection of hex values
90
+ */
91
+ setScale(colors: string[]): void;
92
+ setPrimary(color: string): void;
93
+ setPrimaryLight(color: string): void;
94
+ setSuccess(color: string): void;
95
+ setDanger(color: string): void;
96
+ setOrange(color: string): void;
97
+ setBlue(color: string): void;
98
+ setAlert(): string;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacColorService, never>;
100
+ static ɵprov: i0.ɵɵInjectableDeclaration<PcacColorService>;
101
+ }
102
+
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
+ declare class PcacTooltipBuilder {
111
+ tooltip: any;
112
+ showBarTooltip(event: MouseEvent, data: PcacData, valueFormat?: PcacFormatEnum, keyFormat?: PcacFormatEnum): void;
113
+ hideTooltip(): void;
114
+ private getBarTipData;
115
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacTooltipBuilder, never>;
116
+ static ɵprov: i0.ɵɵInjectableDeclaration<PcacTooltipBuilder>;
117
+ }
118
+
119
+ declare class PcacChart {
120
+ axisBuilder: PcacAxisBuilder;
121
+ gridBuilder: PcacGridBuilder;
122
+ transitionService: PcacTransitionService;
123
+ tooltipBuilder: PcacTooltipBuilder;
124
+ colorService: PcacColorService;
125
+ margin: {
126
+ top: number;
127
+ right: number;
128
+ bottom: number;
129
+ left: number;
130
+ };
131
+ svg: Selection<BaseType, {}, HTMLElement, any> | any;
132
+ width: number;
133
+ height: number;
134
+ colors: string[];
135
+ startData: any[];
136
+ endData: any[];
137
+ /**
138
+ * Prior to building a chart, we need to initialize the state of the chart
139
+ * @param chartElm Reference to SVG on dom
140
+ * @param config Chart specific configuration
141
+ */
142
+ initializeChartState(chartElm: ElementRef, config: PcacChartConfig): void;
143
+ /**
144
+ * 1) Set the width and height of the SVG
145
+ * 2) Add a group and translate it to state of {{center}} option
146
+ * @param chartElm Reference to SVG on dom
147
+ * @param center Are we pinning x,y to the top,left, or are we centering our drawing group inside the SVG.
148
+ */
149
+ buildContainer(chartElm: ElementRef, center?: boolean): void;
150
+ /**
151
+ * Most charts share a default margin(s) state.
152
+ * In some cases, that state needs to be calculated based on the content that resides in that margin.
153
+ * For example, labels on a horizontal bar chart are dynamic and such the margin needs to be calculated ahead of
154
+ * chart axis construction.
155
+ * @param chartElm Reference to SVG on dom
156
+ * @param data Generic multi-dimensional PcacData structure
157
+ * @param yScale D3 scale transformation object (d3.ScaleBand)
158
+ */
159
+ setHorizontalMarginsBasedOnContent(chartElm: ElementRef, data: PcacData[], yScale: any): void;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacChart, never>;
161
+ static ɵprov: i0.ɵɵInjectableDeclaration<PcacChart>;
162
+ }
163
+
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
+ declare class BarHorizontalChartBuilder extends PcacChart {
269
+ private xScale;
270
+ private yScaleStacked;
271
+ private yScaleGrouped;
272
+ private barClickedSource;
273
+ private config;
274
+ private cachedMargins;
275
+ barClicked$: rxjs.Observable<PcacData>;
276
+ buildChart(chartElm: ElementRef, config: PcacBarHorizontalChartConfig): void;
277
+ private adjustForHiddenAxis;
278
+ private setStartState;
279
+ private buildScales;
280
+ private drawChart;
281
+ private addGroups;
282
+ private drawBarsPerGroup;
283
+ private drawThresholdAcrossChart;
284
+ private drawThresholdsPerGroup;
285
+ private drawThresholdsPerBarInGroup;
286
+ private applyPreTransitionThresholdStyles;
287
+ static ɵfac: i0.ɵɵFactoryDeclaration<BarHorizontalChartBuilder, never>;
288
+ static ɵprov: i0.ɵɵInjectableDeclaration<BarHorizontalChartBuilder>;
289
+ }
290
+
291
+ declare class PcacBarHorizontalChartComponent implements OnChanges {
292
+ private chartBuilder;
293
+ readonly config: i0.InputSignal<PcacBarHorizontalChartConfig>;
294
+ readonly chartElm: i0.Signal<ElementRef<any>>;
295
+ readonly barClicked: i0.OutputEmitterRef<PcacData>;
296
+ private resizeWindowTimeout;
297
+ constructor();
298
+ ngOnChanges(): void;
299
+ buildChart(): void;
300
+ /**
301
+ * Opting against fromEvent due to incompatibility with rxjs 5 => 6
302
+ */
303
+ onResize(): void;
304
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarHorizontalChartComponent, never>;
305
+ static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarHorizontalChartComponent, "pcac-bar-horizontal-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
306
+ }
307
+
308
+ declare class PcacBarVerticalChartConfig extends PcacChartConfig {
309
+ domainMax: number;
310
+ numberOfTicks: number;
311
+ isStacked: boolean;
312
+ thresholds: PcacData[];
313
+ tickFormat: PcacFormatEnum;
314
+ hideGrid: boolean;
315
+ hideAxis: boolean;
316
+ spreadColorsPerGroup: boolean;
317
+ colorOverride: PcacBarVerticalChartColorOverrideConfig;
318
+ }
319
+ declare class PcacBarVerticalChartColorOverrideConfig {
320
+ colors: string[];
321
+ }
322
+
323
+ interface IBarVerticalChartBuilder {
324
+ buildChart(chartElm: ElementRef, config: PcacBarVerticalChartConfig): void;
325
+ }
326
+ declare class BarVerticalChartBuilder extends PcacChart {
327
+ private xScaleStacked;
328
+ private xScaleGrouped;
329
+ private yScale;
330
+ private barClickedSource;
331
+ barClicked$: rxjs.Observable<PcacData>;
332
+ buildChart(chartElm: ElementRef, config: PcacBarVerticalChartConfig): void;
333
+ private adjustForHiddenAxis;
334
+ private hasGroupLabel;
335
+ private buildScales;
336
+ private drawChart;
337
+ private addGroups;
338
+ private drawBarsPerGroup;
339
+ private drawThresholdAcrossChart;
340
+ private drawThresholdsPerGroup;
341
+ private drawThresholdsPerBarInGroup;
342
+ private applyPreTransitionThresholdStyles;
343
+ static ɵfac: i0.ɵɵFactoryDeclaration<BarVerticalChartBuilder, never>;
344
+ static ɵprov: i0.ɵɵInjectableDeclaration<BarVerticalChartBuilder>;
345
+ }
346
+
347
+ declare class PcacBarVerticalChartComponent implements OnChanges {
348
+ private chartBuilder;
349
+ readonly config: i0.InputSignal<PcacBarVerticalChartConfig>;
350
+ readonly chartElm: i0.Signal<ElementRef<any>>;
351
+ readonly barClicked: i0.OutputEmitterRef<PcacData>;
352
+ private resizeWindowTimeout;
353
+ constructor();
354
+ ngOnChanges(): void;
355
+ buildChart(): void;
356
+ /**
357
+ * Opting against fromEvent due to incompatibility with rxjs 5 => 6
358
+ */
359
+ onResize(): void;
360
+ static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarVerticalChartComponent, never>;
361
+ static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarVerticalChartComponent, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
362
+ }
363
+
364
+ export { BarHorizontalChartBuilder, BarVerticalChartBuilder, LineAreaChartBuilder, PcacAxisBuilder, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacColorService, PcacData, PcacFormatEnum, PcacGridBuilder, PcacLineAreaChartComponent, PcacLineAreaChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacTooltipBuilder, PcacTransitionService, PieChartBuilder };
365
+ export type { IBarVerticalChartBuilder, IPcacAxisBuilderConfig, IPcacGridBuilderConfig };
package/package.json CHANGED
@@ -22,11 +22,11 @@
22
22
  "type": "git",
23
23
  "url": "git+https://github.com/PioneerCode/pioneer-charts.git"
24
24
  },
25
- "version": "19.0.0",
25
+ "version": "20.0.2",
26
26
  "license": "MIT",
27
27
  "peerDependencies": {
28
- "@angular/common": "^19.0.0",
29
- "@angular/core": "^19.0.0",
28
+ "@angular/common": "^20.0.0",
29
+ "@angular/core": "^20.0.0",
30
30
  "d3": "^7.9.0",
31
31
  "@types/d3": "^7.4.3"
32
32
  },
@@ -1,5 +1,3 @@
1
- @import "../../core/theme/imports";
2
-
3
1
  .pcac-bar-vertical-chart {
4
2
  svg {
5
3
  width: 100%;
@@ -1,4 +1,4 @@
1
- @import "../core/theme/imports";
1
+ @use "../core/theme/imports";
2
2
 
3
3
  .pcac-line-area-chart {
4
4
  svg {
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  .effect-line {
18
- stroke: $gray-400;
18
+ stroke: imports.$gray-400;
19
19
  stroke-width: 1px;
20
20
  opacity: 0;
21
21
  }
@@ -29,6 +29,6 @@
29
29
  .effect-text {
30
30
  font-size: 11px;
31
31
  font-weight: bold;
32
- fill: $gray-800;
32
+ fill: imports.$gray-800;
33
33
  }
34
34
  }
@@ -1,4 +1,4 @@
1
- @import "core/theme/imports";
1
+ @use "core/theme/imports";
2
2
 
3
3
  .pcac-d3-tooltip {
4
4
  position: absolute;
@@ -7,14 +7,14 @@
7
7
  padding: 0.5rem;
8
8
  pointer-events: none;
9
9
  display: none;
10
- background-color: rgba($gray-800, 0.85);
11
- color: $white;
10
+ background-color: rgba(imports.$gray-800, 0.85);
11
+ color: imports.$white;
12
12
  border-radius: 2px;
13
13
  z-index: 1000
14
14
  }
15
15
 
16
16
  .pcac-grid-rule line {
17
- stroke: $gray-200;
17
+ stroke: imports.$gray-200;
18
18
  }
19
19
 
20
20
  .pcac-x-axis,
@@ -1,41 +0,0 @@
1
- import { ElementRef } from '@angular/core';
2
- /**
3
- * Lib
4
- */
5
- import { PcacBarHorizontalChartConfig } from './bar-horizontal-chart.model';
6
- import { PcacAxisBuilder } from '../../core/axis.builder';
7
- import { PcacGridBuilder } from '../../core/grid.builder';
8
- import { PcacTransitionService } from '../../core/transition.service';
9
- import { PcacTooltipBuilder } from '../../core/tooltip.builder';
10
- import { PcacColorService } from '../../core/color.service';
11
- import { PcacChart } from '../../core/chart';
12
- import { PcacData } from '../../core/chart.model';
13
- import * as i0 from "@angular/core";
14
- export declare class BarHorizontalChartBuilder extends PcacChart {
15
- axisBuilder: PcacAxisBuilder;
16
- gridBuilder: PcacGridBuilder;
17
- transitionService: PcacTransitionService;
18
- tooltipBuilder: PcacTooltipBuilder;
19
- colorService: PcacColorService;
20
- private xScale;
21
- private yScaleStacked;
22
- private yScaleGrouped;
23
- private barClickedSource;
24
- private config;
25
- private cachedMargins;
26
- barClicked$: import("rxjs").Observable<PcacData>;
27
- constructor(axisBuilder: PcacAxisBuilder, gridBuilder: PcacGridBuilder, transitionService: PcacTransitionService, tooltipBuilder: PcacTooltipBuilder, colorService: PcacColorService);
28
- buildChart(chartElm: ElementRef, config: PcacBarHorizontalChartConfig): void;
29
- private adjustForHiddenAxis;
30
- private setStartState;
31
- private buildScales;
32
- private drawChart;
33
- private addGroups;
34
- private drawBarsPerGroup;
35
- private drawThresholdAcrossChart;
36
- private drawThresholdsPerGroup;
37
- private drawThresholdsPerBarInGroup;
38
- private applyPreTransitionThresholdStyles;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<BarHorizontalChartBuilder, never>;
40
- static ɵprov: i0.ɵɵInjectableDeclaration<BarHorizontalChartBuilder>;
41
- }
@@ -1,21 +0,0 @@
1
- import { ElementRef, OnChanges, EventEmitter } from '@angular/core';
2
- import { BarHorizontalChartBuilder } from './bar-horizontal-chart.builder';
3
- import { PcacBarHorizontalChartConfig } from './bar-horizontal-chart.model';
4
- import { PcacData } from '../../core';
5
- import * as i0 from "@angular/core";
6
- export declare class PcacBarHorizontalChartComponent implements OnChanges {
7
- private chartBuilder;
8
- config: PcacBarHorizontalChartConfig;
9
- chartElm: ElementRef;
10
- barClicked: EventEmitter<PcacData>;
11
- private resizeWindowTimeout;
12
- constructor(chartBuilder: BarHorizontalChartBuilder);
13
- ngOnChanges(): void;
14
- buildChart(): void;
15
- /**
16
- * Opting against fromEvent due to incompatibility with rxjs 5 => 6
17
- */
18
- onResize(): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarHorizontalChartComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarHorizontalChartComponent, "pcac-bar-horizontal-chart", never, { "config": { "alias": "config"; "required": false; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
21
- }
@@ -1,15 +0,0 @@
1
- import { PcacChartConfig, PcacData, PcacFormatEnum } from '../../core/chart.model';
2
- export declare class PcacBarHorizontalChartConfig extends PcacChartConfig {
3
- domainMax: number;
4
- numberOfTicks: number;
5
- isStacked: boolean;
6
- thresholds: PcacData[];
7
- tickFormat: PcacFormatEnum;
8
- hideGrid: boolean;
9
- hideAxis: boolean;
10
- spreadColorsPerGroup: boolean;
11
- colorOverride: PcacBarHorizontalChartColorOverrideConfig;
12
- }
13
- export declare class PcacBarHorizontalChartColorOverrideConfig {
14
- colors: string[];
15
- }
@@ -1,3 +0,0 @@
1
- export * from './bar-horizontal-chart.builder';
2
- export * from './bar-horizontal-chart.component';
3
- export * from './bar-horizontal-chart.model';
@@ -1,42 +0,0 @@
1
- import { ElementRef } from '@angular/core';
2
- /**
3
- * Lib
4
- */
5
- import { PcacBarVerticalChartConfig } from './bar-vertical-chart.model';
6
- import { PcacAxisBuilder } from '../../core/axis.builder';
7
- import { PcacGridBuilder } from '../../core/grid.builder';
8
- import { PcacTransitionService } from '../../core/transition.service';
9
- import { PcacTooltipBuilder } from '../../core/tooltip.builder';
10
- import { PcacColorService } from '../../core/color.service';
11
- import { PcacChart } from '../../core/chart';
12
- import { PcacData } from '../../core/chart.model';
13
- import * as i0 from "@angular/core";
14
- export interface IBarVerticalChartBuilder {
15
- buildChart(chartElm: ElementRef, config: PcacBarVerticalChartConfig): void;
16
- }
17
- export declare class BarVerticalChartBuilder extends PcacChart {
18
- axisBuilder: PcacAxisBuilder;
19
- gridBuilder: PcacGridBuilder;
20
- transitionService: PcacTransitionService;
21
- tooltipBuilder: PcacTooltipBuilder;
22
- colorService: PcacColorService;
23
- private xScaleStacked;
24
- private xScaleGrouped;
25
- private yScale;
26
- private barClickedSource;
27
- barClicked$: import("rxjs").Observable<PcacData>;
28
- constructor(axisBuilder: PcacAxisBuilder, gridBuilder: PcacGridBuilder, transitionService: PcacTransitionService, tooltipBuilder: PcacTooltipBuilder, colorService: PcacColorService);
29
- buildChart(chartElm: ElementRef, config: PcacBarVerticalChartConfig): void;
30
- private adjustForHiddenAxis;
31
- private hasGroupLabel;
32
- private buildScales;
33
- private drawChart;
34
- private addGroups;
35
- private drawBarsPerGroup;
36
- private drawThresholdAcrossChart;
37
- private drawThresholdsPerGroup;
38
- private drawThresholdsPerBarInGroup;
39
- private applyPreTransitionThresholdStyles;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<BarVerticalChartBuilder, never>;
41
- static ɵprov: i0.ɵɵInjectableDeclaration<BarVerticalChartBuilder>;
42
- }
@@ -1,21 +0,0 @@
1
- import { ElementRef, OnChanges, EventEmitter } from '@angular/core';
2
- import { BarVerticalChartBuilder } from './bar-vertical-chart.builder';
3
- import { PcacBarVerticalChartConfig } from './bar-vertical-chart.model';
4
- import { PcacData } from '../../core';
5
- import * as i0 from "@angular/core";
6
- export declare class PcacBarVerticalChartComponent implements OnChanges {
7
- private chartBuilder;
8
- config: PcacBarVerticalChartConfig;
9
- chartElm: ElementRef;
10
- barClicked: EventEmitter<PcacData>;
11
- private resizeWindowTimeout;
12
- constructor(chartBuilder: BarVerticalChartBuilder);
13
- ngOnChanges(): void;
14
- buildChart(): void;
15
- /**
16
- * Opting against fromEvent due to incompatibility with rxjs 5 => 6
17
- */
18
- onResize(): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarVerticalChartComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarVerticalChartComponent, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": false; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
21
- }
@@ -1,15 +0,0 @@
1
- import { PcacChartConfig, PcacData, PcacFormatEnum } from '../../core/chart.model';
2
- export declare class PcacBarVerticalChartConfig extends PcacChartConfig {
3
- domainMax: number;
4
- numberOfTicks: number;
5
- isStacked: boolean;
6
- thresholds: PcacData[];
7
- tickFormat: PcacFormatEnum;
8
- hideGrid: boolean;
9
- hideAxis: boolean;
10
- spreadColorsPerGroup: boolean;
11
- colorOverride: PcacBarVerticalChartColorOverrideConfig;
12
- }
13
- export declare class PcacBarVerticalChartColorOverrideConfig {
14
- colors: string[];
15
- }
@@ -1,3 +0,0 @@
1
- export * from './bar-vertical-chart.builder';
2
- export * from './bar-vertical-chart.component';
3
- export * from './bar-vertical-chart.model';
@@ -1,21 +0,0 @@
1
- import { BaseType, Selection } from 'd3-selection';
2
- import { PcacFormatEnum } from './chart.model';
3
- import * as i0 from "@angular/core";
4
- export interface IPcacAxisBuilderConfig {
5
- svg: Selection<BaseType, {}, HTMLElement, any>;
6
- height: number;
7
- xScale: any;
8
- yScale: any;
9
- numberOfTicks: number;
10
- yFormat?: PcacFormatEnum;
11
- xFormat?: PcacFormatEnum;
12
- hideYAxis?: boolean;
13
- hideXAxis?: boolean;
14
- }
15
- export declare class PcacAxisBuilder {
16
- drawAxis(config: IPcacAxisBuilderConfig): void;
17
- private drawYAxis;
18
- private drawXAxis;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<PcacAxisBuilder, never>;
20
- static ɵprov: i0.ɵɵInjectableDeclaration<PcacAxisBuilder>;
21
- }