@pioneer-code/pioneer-charts 22.0.0 → 22.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.
- package/README.md +32 -9
- package/fesm2022/pioneer-code-pioneer-charts.mjs +326 -214
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/package.json +5 -3
- package/scss/core/theme/imports.scss +17 -11
- package/scss/pioneer-charts.scss +5 -0
- package/types/pioneer-code-pioneer-charts.d.ts +119 -61
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"type": "git",
|
|
23
23
|
"url": "git+https://github.com/PioneerCode/pioneer-charts.git"
|
|
24
24
|
},
|
|
25
|
-
"version": "22.0.
|
|
25
|
+
"version": "22.0.2",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@angular/common": "^22.0.0",
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
".": {
|
|
44
44
|
"types": "./types/pioneer-code-pioneer-charts.d.ts",
|
|
45
45
|
"default": "./fesm2022/pioneer-code-pioneer-charts.mjs"
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"./themes/*": "./themes/*",
|
|
48
|
+
"./scss/*": "./scss/*"
|
|
47
49
|
},
|
|
48
50
|
"type": "module"
|
|
49
|
-
}
|
|
51
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
$
|
|
9
|
-
$gray-
|
|
10
|
-
$gray-
|
|
11
|
-
$
|
|
1
|
+
// `!default` lets a consumer override any of these by configuring the entry point module (see
|
|
2
|
+
// pioneer-charts.scss's `@forward` of this file) via `@use "@pioneer-code/pioneer-charts/scss/pioneer-charts"
|
|
3
|
+
// with (...)`. These are the only Sass variables that actually drive rendered output in the
|
|
4
|
+
// library (tooltip background/text, grid line color, plot-line-area styling) - a `$theme-colors`
|
|
5
|
+
// Bootstrap-style map used to live here too, but nothing in the library ever read it (a leftover
|
|
6
|
+
// from an abandoned Bootstrap integration, alongside the orphaned `bootstrap` devDependency and
|
|
7
|
+
// footer.scss bug already removed elsewhere), so it was removed rather than wired up.
|
|
8
|
+
$white: #fff !default;
|
|
9
|
+
$gray-100: #f8f9fa !default;
|
|
10
|
+
$gray-200: #e9ecef !default;
|
|
11
|
+
$gray-300: #dee2e6 !default;
|
|
12
|
+
$gray-400: #ced4da !default;
|
|
13
|
+
$gray-500: #adb5bd !default;
|
|
14
|
+
$gray-600: #6c757d !default;
|
|
15
|
+
$gray-700: #495057 !default;
|
|
16
|
+
$gray-800: #343a40 !default;
|
|
17
|
+
$gray-900: #212529 !default;
|
package/scss/pioneer-charts.scss
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Forwards imports.scss's color variables as this module's own configurable public API (so a
|
|
2
|
+
// consumer can `@use "@pioneer-code/pioneer-charts/scss/pioneer-charts" with ($gray-800: ...);`),
|
|
3
|
+
// in addition to `@use`-ing it normally below for this file's own internal `imports.$...` access -
|
|
4
|
+
// a module can be both forwarded and used at once, they serve different purposes.
|
|
5
|
+
@forward "core/theme/imports";
|
|
1
6
|
@use "core/theme/imports";
|
|
2
7
|
|
|
3
8
|
.pcac-d3-tooltip {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Signal, ElementRef } from '@angular/core';
|
|
4
|
+
import { AxisDomain, AxisScale } from 'd3-axis';
|
|
5
|
+
import * as d3_selection from 'd3-selection';
|
|
4
6
|
import { Selection, BaseType } from 'd3-selection';
|
|
7
|
+
import * as _pioneer_code_pioneer_charts from '@pioneer-code/pioneer-charts';
|
|
5
8
|
|
|
6
9
|
/**
|
|
7
10
|
* Base configuration for all charts.
|
|
@@ -51,11 +54,17 @@ declare class PcacBarHorizontalChartColorOverrideConfig {
|
|
|
51
54
|
colors: string[];
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Generic over each axis's own domain type (e.g. `number` for a value axis's `ScaleLinear`,
|
|
59
|
+
* `string` for a category axis's `ScaleBand`) rather than `any`, since the two axes on a chart
|
|
60
|
+
* routinely have different domain types and each real D3 scale already satisfies `AxisScale`
|
|
61
|
+
* structurally - no widening needed at the type level.
|
|
62
|
+
*/
|
|
63
|
+
interface IPcacAxisBuilderConfig<XDomain extends AxisDomain = AxisDomain, YDomain extends AxisDomain = AxisDomain> {
|
|
64
|
+
svg: Selection<SVGGElement, unknown, BaseType, unknown>;
|
|
56
65
|
height: number;
|
|
57
|
-
xScale:
|
|
58
|
-
yScale:
|
|
66
|
+
xScale: AxisScale<XDomain>;
|
|
67
|
+
yScale: AxisScale<YDomain>;
|
|
59
68
|
numberOfTicks: number;
|
|
60
69
|
yFormat?: PcacFormatEnum;
|
|
61
70
|
xFormat?: PcacFormatEnum;
|
|
@@ -63,15 +72,18 @@ interface IPcacAxisBuilderConfig {
|
|
|
63
72
|
hideXAxis?: boolean;
|
|
64
73
|
}
|
|
65
74
|
declare class PcacAxisBuilder {
|
|
66
|
-
drawAxis(config: IPcacAxisBuilderConfig): void;
|
|
67
|
-
drawYAxis(config: IPcacAxisBuilderConfig): void;
|
|
68
|
-
drawXAxis(config: IPcacAxisBuilderConfig): void;
|
|
75
|
+
drawAxis<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacAxisBuilderConfig<XDomain, YDomain>): void;
|
|
76
|
+
drawYAxis<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacAxisBuilderConfig<XDomain, YDomain>): void;
|
|
77
|
+
drawXAxis<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacAxisBuilderConfig<XDomain, YDomain>): void;
|
|
69
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacAxisBuilder, never>;
|
|
70
79
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacAxisBuilder>;
|
|
71
80
|
}
|
|
72
81
|
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Generic over each axis's own domain type, same rationale as `IPcacAxisBuilderConfig`.
|
|
84
|
+
*/
|
|
85
|
+
interface IPcacGridBuilderConfig<XDomain extends AxisDomain = AxisDomain, YDomain extends AxisDomain = AxisDomain> {
|
|
86
|
+
svg: Selection<SVGGElement, unknown, BaseType, unknown>;
|
|
75
87
|
/**
|
|
76
88
|
* Required for horizontal grid
|
|
77
89
|
*/
|
|
@@ -80,13 +92,13 @@ interface IPcacGridBuilderConfig {
|
|
|
80
92
|
* Required for vertical grid
|
|
81
93
|
*/
|
|
82
94
|
height: number;
|
|
83
|
-
xScale:
|
|
84
|
-
yScale:
|
|
95
|
+
xScale: AxisScale<XDomain>;
|
|
96
|
+
yScale: AxisScale<YDomain>;
|
|
85
97
|
numberOfTicks: number;
|
|
86
98
|
}
|
|
87
99
|
declare class PcacGridBuilder {
|
|
88
|
-
drawVerticalGrid(config: IPcacGridBuilderConfig): void;
|
|
89
|
-
drawHorizontalGrid(config: IPcacGridBuilderConfig): void;
|
|
100
|
+
drawVerticalGrid<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacGridBuilderConfig<XDomain, YDomain>): void;
|
|
101
|
+
drawHorizontalGrid<XDomain extends AxisDomain, YDomain extends AxisDomain>(config: IPcacGridBuilderConfig<XDomain, YDomain>): void;
|
|
90
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacGridBuilder, never>;
|
|
91
103
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacGridBuilder>;
|
|
92
104
|
}
|
|
@@ -118,13 +130,13 @@ declare class PcacColorService {
|
|
|
118
130
|
setDanger(color: string): void;
|
|
119
131
|
setOrange(color: string): void;
|
|
120
132
|
setBlue(color: string): void;
|
|
121
|
-
setAlert():
|
|
133
|
+
setAlert(color: string): void;
|
|
122
134
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacColorService, never>;
|
|
123
135
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacColorService>;
|
|
124
136
|
}
|
|
125
137
|
|
|
126
138
|
declare class PcacTooltipBuilder {
|
|
127
|
-
tooltip: any
|
|
139
|
+
tooltip: d3_selection.Selection<HTMLDivElement, unknown, HTMLElement, any>;
|
|
128
140
|
showBarTooltip(event: MouseEvent, data: PcacData, valueFormat?: PcacFormatEnum, keyFormat?: PcacFormatEnum): void;
|
|
129
141
|
hideTooltip(): void;
|
|
130
142
|
private getBarTipData;
|
|
@@ -139,30 +151,83 @@ declare class PcacTransitionService {
|
|
|
139
151
|
static ɵprov: i0.ɵɵInjectableDeclaration<PcacTransitionService>;
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Rebuilds a chart whenever its container's real, laid-out size changes.
|
|
156
|
+
*
|
|
157
|
+
* A plain `window:resize` listener (the previous approach) misses any layout-driven size change
|
|
158
|
+
* that isn't a viewport resize — a sidebar collapsing, a tab becoming active, a flex/grid reflow.
|
|
159
|
+
* It also can't help a chart that mounts already holding data (e.g. behind a loading gate): that
|
|
160
|
+
* chart's first `ngOnChanges` can fire before the browser has committed layout for its own
|
|
161
|
+
* just-created DOM node, so `PcacChart.initializeChartState()` measures a 0-width container and
|
|
162
|
+
* bails out with nothing drawn — and with no resize ever firing, nothing retries it.
|
|
163
|
+
*
|
|
164
|
+
* `ResizeObserver`'s callback contract guarantees real, laid-out dimensions on every firing,
|
|
165
|
+
* including its first, so observing the container naturally retries that exact case.
|
|
166
|
+
*/
|
|
167
|
+
declare class PcacChartResizeService {
|
|
168
|
+
/**
|
|
169
|
+
* Call once from a chart component's constructor (an injection context).
|
|
170
|
+
* @param chartElm Signal resolving to the chart's `<svg>` element ref, e.g. a `viewChild.required` query.
|
|
171
|
+
* @param rebuild Invoked whenever the chart's container size changes: immediately for the
|
|
172
|
+
* observer's first (guaranteed-initial) callback, debounced for every one after that.
|
|
173
|
+
*/
|
|
174
|
+
observe(chartElm: Signal<ElementRef>, rebuild: () => void): void;
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PcacChartResizeService, never>;
|
|
176
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PcacChartResizeService>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface PcacChartMargin {
|
|
180
|
+
top: number;
|
|
181
|
+
right: number;
|
|
182
|
+
bottom: number;
|
|
183
|
+
left: number;
|
|
184
|
+
}
|
|
142
185
|
declare class PcacChart {
|
|
143
186
|
axisBuilder: PcacAxisBuilder;
|
|
144
187
|
gridBuilder: PcacGridBuilder;
|
|
145
188
|
transitionService: PcacTransitionService;
|
|
146
189
|
tooltipBuilder: PcacTooltipBuilder;
|
|
147
190
|
colorService: PcacColorService;
|
|
148
|
-
margin:
|
|
149
|
-
|
|
150
|
-
right: number;
|
|
151
|
-
bottom: number;
|
|
152
|
-
left: number;
|
|
153
|
-
};
|
|
154
|
-
svg: Selection<BaseType, {}, HTMLElement, any> | any;
|
|
191
|
+
margin: PcacChartMargin;
|
|
192
|
+
svg: Selection<SVGGElement, unknown, BaseType, unknown>;
|
|
155
193
|
width: number;
|
|
156
194
|
height: number;
|
|
157
195
|
colors: string[];
|
|
158
|
-
startData:
|
|
159
|
-
endData: any[];
|
|
196
|
+
startData: PcacData[];
|
|
160
197
|
/**
|
|
161
|
-
*
|
|
198
|
+
* Raw, unadjusted container width measured by the last successful `initializeChartState()`
|
|
199
|
+
* call, or `null` if none has succeeded yet. Deliberately tracked separately from `width`:
|
|
200
|
+
* some builders (e.g. bar-horizontal-chart's `setHorizontalMarginsBasedOnContent`) recompute
|
|
201
|
+
* `width`/`margin.left` mid-build from measured axis-label sizes, so `width` alone isn't a
|
|
202
|
+
* stable basis for "did the container itself resize" — the raw container measurement is.
|
|
203
|
+
*/
|
|
204
|
+
private lastContainerWidth;
|
|
205
|
+
/**
|
|
206
|
+
* Prior to building a chart, we need to initialize the state of the chart.
|
|
207
|
+
*
|
|
208
|
+
* Returns `false` (and leaves `width`/`height`/`colors` untouched) if the container hasn't
|
|
209
|
+
* been laid out yet, so its `clientWidth` measures 0 — this happens when a chart mounts
|
|
210
|
+
* already holding data (e.g. behind a loading gate) and its first `ngOnChanges` fires before
|
|
211
|
+
* the browser has committed layout for its own just-created DOM node. Callers should bail out
|
|
212
|
+
* of their build on `false` rather than proceeding with a degenerate width; `PcacChartResizeService`
|
|
213
|
+
* (wired up by every chart component) retries the build once the container has a real size.
|
|
162
214
|
* @param chartElm Reference to SVG on dom
|
|
163
215
|
* @param config Chart specific configuration
|
|
164
216
|
*/
|
|
165
|
-
initializeChartState(chartElm: ElementRef, config: PcacChartConfig):
|
|
217
|
+
initializeChartState(chartElm: ElementRef, config: PcacChartConfig): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* True if the container's current raw layout width differs from the one measured by the last
|
|
220
|
+
* successful build, or if no successful build has happened yet.
|
|
221
|
+
*
|
|
222
|
+
* `PcacChartResizeService`'s `ResizeObserver` is guaranteed to fire once as soon as it starts
|
|
223
|
+
* observing — that's what lets a chart recover from the 0-width race described on
|
|
224
|
+
* `initializeChartState`, but it also means that "routine" first callback usually lands
|
|
225
|
+
* moments after `ngOnChanges` already built successfully at the same width. Without this
|
|
226
|
+
* check, that redundant callback would restart the chart's enter transition mid-animation for
|
|
227
|
+
* no visual change. Only `ngOnChanges` (which reacts to data, not size) should skip this check.
|
|
228
|
+
* @param chartElm Reference to SVG on dom
|
|
229
|
+
*/
|
|
230
|
+
containerSizeChanged(chartElm: ElementRef): boolean;
|
|
166
231
|
/**
|
|
167
232
|
* 1) Set the width and height of the SVG
|
|
168
233
|
* 2) Add a group and translate it to state of {{center}} option
|
|
@@ -179,9 +244,15 @@ declare class PcacChart {
|
|
|
179
244
|
* @param data Generic multi-dimensional PcacData structure
|
|
180
245
|
* @param yScale D3 scale transformation object (d3.ScaleBand)
|
|
181
246
|
*/
|
|
182
|
-
setHorizontalMarginsBasedOnContent(chartElm: ElementRef, data: PcacData[], yScale:
|
|
247
|
+
setHorizontalMarginsBasedOnContent<Domain extends AxisDomain>(chartElm: ElementRef, data: PcacData[], yScale: AxisScale<Domain>): void;
|
|
183
248
|
}
|
|
184
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Provided per-component (see PcacBarHorizontalChartComponent's `providers`), not root-scoped:
|
|
252
|
+
* this builder extends PcacChart, which holds mutable per-chart-instance state (margin, width,
|
|
253
|
+
* height, colors, svg). A root singleton would be shared and clobbered by every
|
|
254
|
+
* <pcac-bar-horizontal-chart> rendered at once.
|
|
255
|
+
*/
|
|
185
256
|
declare class BarHorizontalChartBuilder extends PcacChart {
|
|
186
257
|
private xScale;
|
|
187
258
|
private yScaleStacked;
|
|
@@ -192,7 +263,6 @@ declare class BarHorizontalChartBuilder extends PcacChart {
|
|
|
192
263
|
barClicked$: rxjs.Observable<PcacData>;
|
|
193
264
|
buildChart(chartElm: ElementRef, config: PcacBarHorizontalChartConfig): void;
|
|
194
265
|
private adjustForHiddenAxis;
|
|
195
|
-
private setStartState;
|
|
196
266
|
private buildScales;
|
|
197
267
|
private drawChart;
|
|
198
268
|
private addGroups;
|
|
@@ -205,19 +275,13 @@ declare class BarHorizontalChartBuilder extends PcacChart {
|
|
|
205
275
|
static ɵprov: i0.ɵɵInjectableDeclaration<BarHorizontalChartBuilder>;
|
|
206
276
|
}
|
|
207
277
|
|
|
208
|
-
declare class PcacBarHorizontalChartComponent
|
|
278
|
+
declare class PcacBarHorizontalChartComponent {
|
|
209
279
|
private chartBuilder;
|
|
210
280
|
readonly config: i0.InputSignal<PcacBarHorizontalChartConfig>;
|
|
211
281
|
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
212
|
-
readonly barClicked: i0.
|
|
213
|
-
private resizeWindowTimeout;
|
|
282
|
+
readonly barClicked: i0.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
214
283
|
constructor();
|
|
215
|
-
ngOnChanges(): void;
|
|
216
284
|
buildChart(): void;
|
|
217
|
-
/**
|
|
218
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
219
|
-
*/
|
|
220
|
-
onResize(): void;
|
|
221
285
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarHorizontalChartComponent, never>;
|
|
222
286
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarHorizontalChartComponent, "pcac-bar-horizontal-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
|
|
223
287
|
}
|
|
@@ -240,6 +304,12 @@ declare class PcacBarVerticalChartColorOverrideConfig {
|
|
|
240
304
|
interface IBarVerticalChartBuilder {
|
|
241
305
|
buildChart(chartElm: ElementRef, config: PcacBarVerticalChartConfig): void;
|
|
242
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Provided per-component (see PcacBarVerticalChartComponent's `providers`), not root-scoped:
|
|
309
|
+
* this builder extends PcacChart, which holds mutable per-chart-instance state (margin, width,
|
|
310
|
+
* height, colors, svg). A root singleton would be shared and clobbered by every
|
|
311
|
+
* <pcac-bar-vertical-chart> rendered at once.
|
|
312
|
+
*/
|
|
243
313
|
declare class BarVerticalChartBuilder extends PcacChart {
|
|
244
314
|
private xScaleStacked;
|
|
245
315
|
private xScaleGrouped;
|
|
@@ -261,19 +331,13 @@ declare class BarVerticalChartBuilder extends PcacChart {
|
|
|
261
331
|
static ɵprov: i0.ɵɵInjectableDeclaration<BarVerticalChartBuilder>;
|
|
262
332
|
}
|
|
263
333
|
|
|
264
|
-
declare class PcacBarVerticalChartComponent
|
|
334
|
+
declare class PcacBarVerticalChartComponent {
|
|
265
335
|
private chartBuilder;
|
|
266
336
|
readonly config: i0.InputSignal<PcacBarVerticalChartConfig>;
|
|
267
337
|
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
268
|
-
readonly barClicked: i0.
|
|
269
|
-
private resizeWindowTimeout;
|
|
338
|
+
readonly barClicked: i0.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
270
339
|
constructor();
|
|
271
|
-
ngOnChanges(): void;
|
|
272
340
|
buildChart(): void;
|
|
273
|
-
/**
|
|
274
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
275
|
-
*/
|
|
276
|
-
onResize(): void;
|
|
277
341
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacBarVerticalChartComponent, never>;
|
|
278
342
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacBarVerticalChartComponent, "pcac-bar-vertical-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "barClicked": "barClicked"; }, never, never, true, never>;
|
|
279
343
|
}
|
|
@@ -327,8 +391,6 @@ declare class PcacPlotChart {
|
|
|
327
391
|
readonly config: i0.InputSignal<PcacPlotChartConfig>;
|
|
328
392
|
readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
329
393
|
readonly dotClicked: i0.OutputEmitterRef<PcacData>;
|
|
330
|
-
private chart;
|
|
331
|
-
onResize(): void;
|
|
332
394
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacPlotChart, never>;
|
|
333
395
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacPlotChart, "pcac-plot-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, never, never, true, never>;
|
|
334
396
|
}
|
|
@@ -340,8 +402,6 @@ declare class PcacLineChart {
|
|
|
340
402
|
readonly config: i0.InputSignal<PcacLineChartConfig>;
|
|
341
403
|
readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
342
404
|
readonly dotClicked: i0.OutputEmitterRef<PcacData>;
|
|
343
|
-
private chart;
|
|
344
|
-
onResize(): void;
|
|
345
405
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacLineChart, never>;
|
|
346
406
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacLineChart, "pcac-line-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, never, never, true, never>;
|
|
347
407
|
}
|
|
@@ -353,8 +413,6 @@ declare class PcacAreaChart {
|
|
|
353
413
|
readonly config: i0.InputSignal<PcacAreaChartConfig>;
|
|
354
414
|
readonly types: typeof PcacLineAreaPlotChartConfigType;
|
|
355
415
|
readonly dotClicked: i0.OutputEmitterRef<PcacData>;
|
|
356
|
-
private chart;
|
|
357
|
-
onResize(): void;
|
|
358
416
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacAreaChart, never>;
|
|
359
417
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacAreaChart, "pcac-area-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "dotClicked": "dotClicked"; }, never, never, true, never>;
|
|
360
418
|
}
|
|
@@ -363,6 +421,12 @@ declare class PcacPieChartConfig extends PcacChartConfig {
|
|
|
363
421
|
numberOfTicks: number;
|
|
364
422
|
}
|
|
365
423
|
|
|
424
|
+
/**
|
|
425
|
+
* Provided per-component (see PcacPieChartComponent's `providers`), not root-scoped:
|
|
426
|
+
* this builder extends PcacChart, which holds mutable per-chart-instance state (margin, width,
|
|
427
|
+
* height, colors, svg). A root singleton would be shared and clobbered by every
|
|
428
|
+
* <pcac-pie-chart> rendered at once.
|
|
429
|
+
*/
|
|
366
430
|
declare class PieChartBuilder extends PcacChart {
|
|
367
431
|
private radius;
|
|
368
432
|
private arcShape;
|
|
@@ -378,22 +442,16 @@ declare class PieChartBuilder extends PcacChart {
|
|
|
378
442
|
static ɵprov: i0.ɵɵInjectableDeclaration<PieChartBuilder>;
|
|
379
443
|
}
|
|
380
444
|
|
|
381
|
-
declare class PcacPieChartComponent
|
|
445
|
+
declare class PcacPieChartComponent {
|
|
382
446
|
private chartBuilder;
|
|
383
447
|
readonly config: i0.InputSignal<PcacPieChartConfig>;
|
|
384
448
|
readonly chartElm: i0.Signal<ElementRef<any>>;
|
|
385
|
-
readonly sliceClicked: i0.
|
|
386
|
-
private resizeWindowTimeout;
|
|
449
|
+
readonly sliceClicked: i0.OutputRef<_pioneer_code_pioneer_charts.PcacData>;
|
|
387
450
|
constructor();
|
|
388
|
-
ngOnChanges(): void;
|
|
389
451
|
buildChart(): void;
|
|
390
|
-
/**
|
|
391
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
392
|
-
*/
|
|
393
|
-
onResize(): void;
|
|
394
452
|
static ɵfac: i0.ɵɵFactoryDeclaration<PcacPieChartComponent, never>;
|
|
395
453
|
static ɵcmp: i0.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "sliceClicked": "sliceClicked"; }, never, never, true, never>;
|
|
396
454
|
}
|
|
397
455
|
|
|
398
|
-
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, PcacAreaChart, PcacAreaChartConfig, PcacAxisBuilder, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacColorService, PcacData, PcacFormatEnum, PcacGridBuilder, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacPlotChart, PcacPlotChartConfig, PcacTooltipBuilder, PcacTransitionService, PieChartBuilder };
|
|
399
|
-
export type { IBarVerticalChartBuilder, IPcacAxisBuilderConfig, IPcacGridBuilderConfig };
|
|
456
|
+
export { BarHorizontalChartBuilder, BarVerticalChartBuilder, PcacAreaChart, PcacAreaChartConfig, PcacAxisBuilder, PcacBarHorizontalChartColorOverrideConfig, PcacBarHorizontalChartComponent, PcacBarHorizontalChartConfig, PcacBarVerticalChartColorOverrideConfig, PcacBarVerticalChartComponent, PcacBarVerticalChartConfig, PcacChart, PcacChartConfig, PcacChartResizeService, PcacColorService, PcacData, PcacFormatEnum, PcacGridBuilder, PcacLegend, PcacLegendConfig, PcacLegendConfigItem, PcacLineChart, PcacLineChartConfig, PcacPieChartComponent, PcacPieChartConfig, PcacPlotChart, PcacPlotChartConfig, PcacTooltipBuilder, PcacTransitionService, PieChartBuilder };
|
|
457
|
+
export type { IBarVerticalChartBuilder, IPcacAxisBuilderConfig, IPcacGridBuilderConfig, PcacChartMargin };
|