@konce-pt/angular 0.15.1 → 0.16.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/CHANGELOG.md +38 -0
- package/charts/src/lib/llms.txt +27 -3
- package/fesm2022/konce-pt-angular-charts.mjs +784 -283
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs +98 -84
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +13 -13
- package/src/lib/peek/llms.txt +2 -1
- package/src/lib/popover/llms.txt +3 -1
- package/types/konce-pt-angular-charts.d.ts +101 -7
- package/types/konce-pt-angular-charts.d.ts.map +1 -1
- package/types/konce-pt-angular.d.ts +11 -0
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';
|
|
3
|
-
import { KptI18n } from '@konce-pt/angular';
|
|
4
|
-
import { chartAccessibleName, chartDataTable, seriesColor, extent,
|
|
2
|
+
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, linkedSignal, computed, viewChild, afterRenderEffect, inject, signal, effect, untracked, DestroyRef } from '@angular/core';
|
|
3
|
+
import { KptI18n, KPT_MOTION_CONFIG } from '@konce-pt/angular';
|
|
4
|
+
import { reelCells, chartAccessibleName, chartDataTable, KptChartMotion, plotArea, seriesColor, extent, domainScale, niceScale, linearScale, areaPath, linePath, significantDelta, deltaKind, formatNumber, barLayout, bandScale, radialArea, polarSlices, pieSlices, radarGrid, radarPoints, polygonPath, polarToCartesian, sameChartShape, dataScale, holdDomain } from '@konce-pt/chart';
|
|
5
5
|
export { KPT_CHART_PALETTE, areaPath, barLayout, linePath, niceScale, pieSlices, polarSlices, radarGrid, radarPoints, seriesColor } from '@konce-pt/chart';
|
|
6
6
|
|
|
7
|
-
const _forTrack0$
|
|
7
|
+
const _forTrack0$2 = ($index, $item) => $item.key;
|
|
8
8
|
function KptChartLegend_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
9
9
|
i0.ɵɵdomElementStart(0, "div", 1);
|
|
10
10
|
i0.ɵɵtext(1);
|
|
@@ -63,7 +63,7 @@ class KptChartLegend {
|
|
|
63
63
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
64
64
|
i0.ɵɵconditionalCreate(1, KptChartLegend_Conditional_1_Template, 2, 2, "div", 1);
|
|
65
65
|
i0.ɵɵdomElementStart(2, "ul", 2);
|
|
66
|
-
i0.ɵɵrepeaterCreate(3, KptChartLegend_For_4_Template, 5, 6, "li", null, _forTrack0$
|
|
66
|
+
i0.ɵɵrepeaterCreate(3, KptChartLegend_For_4_Template, 5, 6, "li", null, _forTrack0$2);
|
|
67
67
|
i0.ɵɵdomElementEnd()();
|
|
68
68
|
} if (rf & 2) {
|
|
69
69
|
i0.ɵɵattribute("data-position", ctx.position())("data-align", ctx.align());
|
|
@@ -110,72 +110,157 @@ class KptChartLegend {
|
|
|
110
110
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], pointStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pointStyle", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], seriesToggle: [{ type: i0.Output, args: ["seriesToggle"] }], highlight: [{ type: i0.Output, args: ["highlight"] }] }); })();
|
|
111
111
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChartLegend, { className: "KptChartLegend", filePath: "lib/chart-legend.component.ts", lineNumber: 48 }); })();
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
const _c0 = ["bubble"];
|
|
114
|
+
const _c1 = ["label"];
|
|
115
|
+
const _forTrack0$1 = ($index, $item) => $item.key;
|
|
116
|
+
function KptChartTooltip_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
117
|
+
i0.ɵɵdomElementStart(0, "div", 4)(1, "span", 6, 1);
|
|
118
|
+
i0.ɵɵtext(3);
|
|
119
|
+
i0.ɵɵdomElementEnd()();
|
|
120
|
+
} if (rf & 2) {
|
|
121
|
+
const t_r1 = i0.ɵɵnextContext();
|
|
122
|
+
i0.ɵɵadvance(3);
|
|
123
|
+
i0.ɵɵtextInterpolate(t_r1.label);
|
|
124
|
+
} }
|
|
125
|
+
function KptChartTooltip_Conditional_0_For_4_For_9_Conditional_0_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
126
|
+
i0.ɵɵdomElementStart(0, "span");
|
|
115
127
|
i0.ɵɵtext(1);
|
|
116
128
|
i0.ɵɵdomElementEnd();
|
|
117
129
|
} if (rf & 2) {
|
|
118
|
-
const
|
|
130
|
+
const d_r2 = ctx.$implicit;
|
|
119
131
|
i0.ɵɵadvance();
|
|
120
|
-
i0.ɵɵtextInterpolate(
|
|
132
|
+
i0.ɵɵtextInterpolate(d_r2);
|
|
133
|
+
} }
|
|
134
|
+
function KptChartTooltip_Conditional_0_For_4_For_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
+
i0.ɵɵdomElementStart(0, "span", 12)(1, "span", 14);
|
|
136
|
+
i0.ɵɵrepeaterCreate(2, KptChartTooltip_Conditional_0_For_4_For_9_Conditional_0_For_3_Template, 2, 1, "span", null, i0.ɵɵrepeaterTrackByIdentity);
|
|
137
|
+
i0.ɵɵdomElementEnd()();
|
|
138
|
+
} if (rf & 2) {
|
|
139
|
+
const cell_r3 = i0.ɵɵnextContext().$implicit;
|
|
140
|
+
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
141
|
+
i0.ɵɵadvance();
|
|
142
|
+
i0.ɵɵstyleProp("--%NS%kpt-chart-digit", cell_r3.digit);
|
|
143
|
+
i0.ɵɵadvance();
|
|
144
|
+
i0.ɵɵrepeater(ctx_r3.digits);
|
|
145
|
+
} }
|
|
146
|
+
function KptChartTooltip_Conditional_0_For_4_For_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
147
|
+
i0.ɵɵdomElementStart(0, "span", 13);
|
|
148
|
+
i0.ɵɵtext(1);
|
|
149
|
+
i0.ɵɵdomElementEnd();
|
|
150
|
+
} if (rf & 2) {
|
|
151
|
+
const cell_r3 = i0.ɵɵnextContext().$implicit;
|
|
152
|
+
i0.ɵɵadvance();
|
|
153
|
+
i0.ɵɵtextInterpolate(cell_r3.text);
|
|
154
|
+
} }
|
|
155
|
+
function KptChartTooltip_Conditional_0_For_4_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
156
|
+
i0.ɵɵconditionalCreate(0, KptChartTooltip_Conditional_0_For_4_For_9_Conditional_0_Template, 4, 2, "span", 12)(1, KptChartTooltip_Conditional_0_For_4_For_9_Conditional_1_Template, 2, 1, "span", 13);
|
|
157
|
+
} if (rf & 2) {
|
|
158
|
+
const cell_r3 = ctx.$implicit;
|
|
159
|
+
i0.ɵɵconditional(cell_r3.kind === "digit" ? 0 : 1);
|
|
121
160
|
} }
|
|
122
|
-
function
|
|
123
|
-
i0.ɵɵdomElementStart(0, "div",
|
|
124
|
-
i0.ɵɵdomElement(1, "span",
|
|
125
|
-
i0.ɵɵdomElementStart(2, "span",
|
|
161
|
+
function KptChartTooltip_Conditional_0_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
i0.ɵɵdomElementStart(0, "div", 5);
|
|
163
|
+
i0.ɵɵdomElement(1, "span", 7);
|
|
164
|
+
i0.ɵɵdomElementStart(2, "span", 8);
|
|
126
165
|
i0.ɵɵtext(3);
|
|
127
166
|
i0.ɵɵdomElementEnd();
|
|
128
|
-
i0.ɵɵdomElementStart(4, "span",
|
|
129
|
-
i0.ɵɵtext(
|
|
130
|
-
i0.ɵɵdomElementEnd()
|
|
167
|
+
i0.ɵɵdomElementStart(4, "span", 9)(5, "span", 10);
|
|
168
|
+
i0.ɵɵtext(6);
|
|
169
|
+
i0.ɵɵdomElementEnd();
|
|
170
|
+
i0.ɵɵdomElementStart(7, "span", 11);
|
|
171
|
+
i0.ɵɵrepeaterCreate(8, KptChartTooltip_Conditional_0_For_4_For_9_Template, 2, 1, null, null, _forTrack0$1);
|
|
172
|
+
i0.ɵɵdomElementEnd()()();
|
|
131
173
|
} if (rf & 2) {
|
|
132
|
-
const
|
|
174
|
+
const row_r5 = ctx.$implicit;
|
|
133
175
|
i0.ɵɵadvance();
|
|
134
|
-
i0.ɵɵstyleProp("background-color",
|
|
176
|
+
i0.ɵɵstyleProp("background-color", row_r5.color);
|
|
135
177
|
i0.ɵɵadvance(2);
|
|
136
|
-
i0.ɵɵtextInterpolate(
|
|
178
|
+
i0.ɵɵtextInterpolate(row_r5.name);
|
|
179
|
+
i0.ɵɵadvance(3);
|
|
180
|
+
i0.ɵɵtextInterpolate(row_r5.value);
|
|
137
181
|
i0.ɵɵadvance(2);
|
|
138
|
-
i0.ɵɵ
|
|
182
|
+
i0.ɵɵrepeater(row_r5.cells);
|
|
139
183
|
} }
|
|
140
184
|
function KptChartTooltip_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
141
|
-
i0.ɵɵdomElementStart(0, "div",
|
|
142
|
-
i0.ɵɵconditionalCreate(
|
|
143
|
-
i0.ɵɵrepeaterCreate(
|
|
185
|
+
i0.ɵɵdomElementStart(0, "div", 3, 0);
|
|
186
|
+
i0.ɵɵconditionalCreate(2, KptChartTooltip_Conditional_0_Conditional_2_Template, 4, 1, "div", 4);
|
|
187
|
+
i0.ɵɵrepeaterCreate(3, KptChartTooltip_Conditional_0_For_4_Template, 10, 4, "div", 5, i0.ɵɵrepeaterTrackByIndex);
|
|
144
188
|
i0.ɵɵdomElementEnd();
|
|
145
189
|
} if (rf & 2) {
|
|
146
190
|
const t_r1 = ctx;
|
|
147
|
-
const
|
|
148
|
-
i0.ɵɵstyleProp("
|
|
149
|
-
i0.ɵɵclassProp("kpt-chart__tooltip--flip", t_r1.y < 22);
|
|
150
|
-
i0.ɵɵ
|
|
151
|
-
i0.ɵɵ
|
|
191
|
+
const ctx_r3 = i0.ɵɵnextContext();
|
|
192
|
+
i0.ɵɵstyleProp("top", t_r1.y, "%");
|
|
193
|
+
i0.ɵɵclassProp("kpt-chart__tooltip--flip", t_r1.y < 22)("kpt-chart__tooltip--hidden", !ctx_r3.state());
|
|
194
|
+
i0.ɵɵattribute("aria-hidden", ctx_r3.state() ? null : "true");
|
|
195
|
+
i0.ɵɵadvance(2);
|
|
196
|
+
i0.ɵɵconditional(t_r1.label ? 2 : -1);
|
|
152
197
|
i0.ɵɵadvance();
|
|
153
|
-
i0.ɵɵrepeater(
|
|
198
|
+
i0.ɵɵrepeater(ctx_r3.rows());
|
|
154
199
|
} }
|
|
155
200
|
/**
|
|
156
|
-
* Dymek (tooltip) wykresu - pozycjonowany
|
|
157
|
-
* (niezależnie od skali SVG). Zabezpieczony przed wyjściem poza krawędzie.
|
|
201
|
+
* Dymek (tooltip) wykresu - pozycjonowany względem kontenera (niezależnie od skali SVG).
|
|
158
202
|
* Element wewnętrzny biblioteki - nie jest częścią publicznego API.
|
|
203
|
+
*
|
|
204
|
+
* Nie wychodzi poza kontener: przycięcie liczy się z faktycznej szerokości dymka, nie z jego środka.
|
|
205
|
+
* Przy chowaniu zostaje w DOM-ie z ostatnią treścią i gaśnie (`--hidden`); cyfry wartości stoją na
|
|
206
|
+
* bębnach (`reelCells` z `@konce-pt/chart`), które przy kolejnym punkcie kręcą się do nowej liczby.
|
|
159
207
|
*/
|
|
160
208
|
class KptChartTooltip {
|
|
161
209
|
constructor() {
|
|
162
210
|
this.state = input(null, /* @ts-ignore */
|
|
163
211
|
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
...(ngDevMode ? [{ debugName: "
|
|
212
|
+
this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
213
|
+
/** Ostatnia treść - zostaje na czas wygaszania, kiedy `state` jest już `null`. */
|
|
214
|
+
this.shown = linkedSignal({ ...(ngDevMode ? { debugName: "shown" } : /* istanbul ignore next */ {}), source: this.state,
|
|
215
|
+
computation: (next, previous) => next ?? previous?.value ?? null });
|
|
216
|
+
this.rows = computed(() => (this.shown()?.rows ?? []).map((r) => ({ ...r, cells: reelCells(r.value) })), /* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
218
|
+
this.bubble = viewChild('bubble', /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "bubble" }] : /* istanbul ignore next */ []));
|
|
220
|
+
this.label = viewChild('label', /* @ts-ignore */
|
|
221
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
222
|
+
this.lastLabel = '';
|
|
223
|
+
// Przycięcie do kontenera z faktycznej szerokości dymka (zmierzonej po renderze).
|
|
224
|
+
afterRenderEffect({
|
|
225
|
+
write: () => {
|
|
226
|
+
const t = this.shown();
|
|
227
|
+
const el = this.bubble()?.nativeElement;
|
|
228
|
+
// obszar wykresu (`.kpt-chart__canvas`, position: relative), nie host - ten nie ma wymiarów
|
|
229
|
+
const box = el?.offsetParent;
|
|
230
|
+
if (!t || !el || !box)
|
|
231
|
+
return;
|
|
232
|
+
const width = box.clientWidth;
|
|
233
|
+
const half = el.offsetWidth / 2;
|
|
234
|
+
const x = (t.x / 100) * width;
|
|
235
|
+
el.style.left = (half * 2 >= width ? width / 2 : Math.min(width - half, Math.max(half, x))) + 'px';
|
|
236
|
+
// Nowa kategoria: etykieta wjeżdża z kierunku ruchu. Pierwsze pokazanie stoi. Nagłówek nigdy
|
|
237
|
+
// nie znika: start od 40% widoczności, a przy szybkim przejeździe trwający wjazd nie startuje
|
|
238
|
+
// od nowa (wtedy tylko podmienia się tekst) - inaczej przy każdej kategorii etykieta gasła.
|
|
239
|
+
const label = this.label()?.nativeElement;
|
|
240
|
+
if (label && t.label !== this.lastLabel) {
|
|
241
|
+
if (t.live && this.lastLabel && typeof label.animate === 'function' && !label.getAnimations().length) {
|
|
242
|
+
const dir = t.dir ?? 0;
|
|
243
|
+
label.animate({
|
|
244
|
+
opacity: [0.4, 1],
|
|
245
|
+
filter: ['blur(1.5px)', 'blur(0px)'],
|
|
246
|
+
translate: [`${dir * 6}px ${dir ? 0 : 4}px`, '0 0'],
|
|
247
|
+
}, { duration: 220, easing: 'cubic-bezier(0.2, 0, 0, 1)' });
|
|
248
|
+
}
|
|
249
|
+
this.lastLabel = t.label;
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
});
|
|
172
253
|
}
|
|
173
254
|
static { this.ɵfac = function KptChartTooltip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChartTooltip)(); }; }
|
|
174
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChartTooltip, selectors: [["kpt-chart-tooltip"]],
|
|
175
|
-
i0.ɵɵ
|
|
255
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChartTooltip, selectors: [["kpt-chart-tooltip"]], viewQuery: function KptChartTooltip_Query(rf, ctx) { if (rf & 1) {
|
|
256
|
+
i0.ɵɵviewQuerySignal(ctx.bubble, _c0, 5)(ctx.label, _c1, 5);
|
|
257
|
+
} if (rf & 2) {
|
|
258
|
+
i0.ɵɵqueryAdvance(2);
|
|
259
|
+
} }, hostAttrs: [1, "kpt-chart-tooltip-host"], inputs: { state: [1, "state"] }, decls: 1, vars: 1, consts: [["bubble", ""], ["label", ""], ["role", "tooltip", 1, "kpt-chart__tooltip", 3, "kpt-chart__tooltip--flip", "kpt-chart__tooltip--hidden", "top"], ["role", "tooltip", 1, "kpt-chart__tooltip"], [1, "kpt-chart__tooltip-title"], [1, "kpt-chart__tooltip-row"], [1, "kpt-chart__tooltip-label"], [1, "kpt-chart__tooltip-dot"], [1, "kpt-chart__tooltip-name"], [1, "kpt-chart__tooltip-val"], [1, "kpt-chart__sr"], ["aria-hidden", "true", 1, "kpt-chart__reels"], [1, "kpt-chart__reel"], [1, "kpt-chart__reel-text"], [1, "kpt-chart__reel-strip"]], template: function KptChartTooltip_Template(rf, ctx) { if (rf & 1) {
|
|
260
|
+
i0.ɵɵconditionalCreate(0, KptChartTooltip_Conditional_0_Template, 5, 8, "div", 2);
|
|
176
261
|
} if (rf & 2) {
|
|
177
262
|
let tmp_0_0;
|
|
178
|
-
i0.ɵɵconditional((tmp_0_0 = ctx.
|
|
263
|
+
i0.ɵɵconditional((tmp_0_0 = ctx.shown()) ? 0 : -1, tmp_0_0);
|
|
179
264
|
} }, encapsulation: 2 }); }
|
|
180
265
|
}
|
|
181
266
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptChartTooltip, [{
|
|
@@ -185,16 +270,41 @@ class KptChartTooltip {
|
|
|
185
270
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
186
271
|
encapsulation: ViewEncapsulation.None,
|
|
187
272
|
template: `
|
|
188
|
-
@if (
|
|
189
|
-
<div
|
|
273
|
+
@if (shown(); as t) {
|
|
274
|
+
<div
|
|
275
|
+
#bubble
|
|
276
|
+
class="kpt-chart__tooltip"
|
|
277
|
+
[class.kpt-chart__tooltip--flip]="t.y < 22"
|
|
278
|
+
[class.kpt-chart__tooltip--hidden]="!state()"
|
|
279
|
+
[style.top.%]="t.y"
|
|
280
|
+
role="tooltip"
|
|
281
|
+
[attr.aria-hidden]="state() ? null : 'true'"
|
|
282
|
+
>
|
|
190
283
|
@if (t.label) {
|
|
191
|
-
<div class="kpt-chart__tooltip-title">
|
|
284
|
+
<div class="kpt-chart__tooltip-title">
|
|
285
|
+
<span #label class="kpt-chart__tooltip-label">{{ t.label }}</span>
|
|
286
|
+
</div>
|
|
192
287
|
}
|
|
193
|
-
@for (row of
|
|
288
|
+
@for (row of rows(); track $index) {
|
|
194
289
|
<div class="kpt-chart__tooltip-row">
|
|
195
290
|
<span class="kpt-chart__tooltip-dot" [style.background-color]="row.color"></span>
|
|
196
291
|
<span class="kpt-chart__tooltip-name">{{ row.name }}</span>
|
|
197
|
-
<span class="kpt-chart__tooltip-val">
|
|
292
|
+
<span class="kpt-chart__tooltip-val">
|
|
293
|
+
<span class="kpt-chart__sr">{{ row.value }}</span>
|
|
294
|
+
<span class="kpt-chart__reels" aria-hidden="true">
|
|
295
|
+
@for (cell of row.cells; track cell.key) {
|
|
296
|
+
@if (cell.kind === 'digit') {
|
|
297
|
+
<span class="kpt-chart__reel"
|
|
298
|
+
><span class="kpt-chart__reel-strip" [style.--kpt-chart-digit]="cell.digit"
|
|
299
|
+
>@for (d of digits; track d) {<span>{{ d }}</span>}</span
|
|
300
|
+
></span
|
|
301
|
+
>
|
|
302
|
+
} @else {
|
|
303
|
+
<span class="kpt-chart__reel-text">{{ cell.text }}</span>
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
</span>
|
|
307
|
+
</span>
|
|
198
308
|
</div>
|
|
199
309
|
}
|
|
200
310
|
</div>
|
|
@@ -202,11 +312,13 @@ class KptChartTooltip {
|
|
|
202
312
|
`,
|
|
203
313
|
host: { class: 'kpt-chart-tooltip-host' },
|
|
204
314
|
}]
|
|
205
|
-
}],
|
|
206
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChartTooltip, { className: "KptChartTooltip", filePath: "lib/chart-tooltip.component.ts", lineNumber:
|
|
315
|
+
}], () => [], { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], bubble: [{ type: i0.ViewChild, args: ['bubble', { isSignal: true }] }], label: [{ type: i0.ViewChild, args: ['label', { isSignal: true }] }] }); })();
|
|
316
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChartTooltip, { className: "KptChartTooltip", filePath: "lib/chart-tooltip.component.ts", lineNumber: 78 }); })();
|
|
207
317
|
|
|
208
318
|
const _forTrack0 = ($index, $item) => $item.key;
|
|
209
|
-
const _forTrack1 = ($index, $item) => $item.
|
|
319
|
+
const _forTrack1 = ($index, $item) => $item.id;
|
|
320
|
+
const _forTrack2 = ($index, $item) => $item.index;
|
|
321
|
+
const _forTrack3 = ($index, $item) => $item.key + "#" + $item.index;
|
|
210
322
|
function KptChart_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
211
323
|
i0.ɵɵelementStart(0, "div", 11);
|
|
212
324
|
i0.ɵɵtext(1);
|
|
@@ -227,336 +339,484 @@ function KptChart_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
227
339
|
i0.ɵɵadvance();
|
|
228
340
|
i0.ɵɵtextInterpolate1(" ", ctx_r0.subtitleOpts()?.text, " ");
|
|
229
341
|
} }
|
|
230
|
-
function
|
|
342
|
+
function KptChart_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
231
343
|
i0.ɵɵnamespaceSVG();
|
|
232
|
-
i0.ɵɵ
|
|
344
|
+
i0.ɵɵelementStart(0, "defs")(1, "linearGradient", 13);
|
|
345
|
+
i0.ɵɵelement(2, "stop", 14)(3, "stop", 15)(4, "stop", 16);
|
|
346
|
+
i0.ɵɵelementEnd()();
|
|
233
347
|
} if (rf & 2) {
|
|
234
|
-
const
|
|
235
|
-
|
|
348
|
+
const sh_r2 = ctx;
|
|
349
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
350
|
+
i0.ɵɵadvance();
|
|
351
|
+
i0.ɵɵattribute("id", ctx_r0.sheenId)("x1", sh_r2.x1)("x2", sh_r2.x2)("y1", sh_r2.y1)("y2", sh_r2.y2);
|
|
236
352
|
} }
|
|
237
|
-
function
|
|
353
|
+
function KptChart_Case_7_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
238
354
|
i0.ɵɵnamespaceSVG();
|
|
239
|
-
i0.ɵɵelement(0, "line",
|
|
355
|
+
i0.ɵɵelement(0, "line", 18);
|
|
240
356
|
} if (rf & 2) {
|
|
241
|
-
const
|
|
242
|
-
i0.ɵɵattribute("x1",
|
|
357
|
+
const g_r4 = ctx.$implicit;
|
|
358
|
+
i0.ɵɵattribute("x1", g_r4.x1)("y1", g_r4.y1)("x2", g_r4.x2)("y2", g_r4.y2);
|
|
243
359
|
} }
|
|
244
|
-
function
|
|
360
|
+
function KptChart_Case_7_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
361
|
+
i0.ɵɵnamespaceSVG();
|
|
362
|
+
i0.ɵɵelement(0, "line", 19);
|
|
363
|
+
} if (rf & 2) {
|
|
364
|
+
const ch_r5 = ctx;
|
|
365
|
+
i0.ɵɵattribute("x1", ch_r5.x)("y1", ch_r5.y1)("x2", ch_r5.x)("y2", ch_r5.y2);
|
|
366
|
+
} }
|
|
367
|
+
function KptChart_Case_7_Conditional_0_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
245
368
|
i0.ɵɵnamespaceSVG();
|
|
246
369
|
i0.ɵɵelementStart(0, "text");
|
|
247
370
|
i0.ɵɵtext(1);
|
|
248
371
|
i0.ɵɵelementEnd();
|
|
249
372
|
} if (rf & 2) {
|
|
250
|
-
const
|
|
251
|
-
i0.ɵɵattribute("x",
|
|
373
|
+
const l_r6 = ctx.$implicit;
|
|
374
|
+
i0.ɵɵattribute("x", l_r6.x)("y", l_r6.y)("text-anchor", l_r6.anchor);
|
|
252
375
|
i0.ɵɵadvance();
|
|
253
|
-
i0.ɵɵtextInterpolate(
|
|
376
|
+
i0.ɵɵtextInterpolate(l_r6.text);
|
|
254
377
|
} }
|
|
255
|
-
function
|
|
378
|
+
function KptChart_Case_7_Conditional_0_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
256
379
|
i0.ɵɵnamespaceSVG();
|
|
257
380
|
i0.ɵɵelementStart(0, "text");
|
|
258
381
|
i0.ɵɵtext(1);
|
|
259
382
|
i0.ɵɵelementEnd();
|
|
260
383
|
} if (rf & 2) {
|
|
261
|
-
const
|
|
262
|
-
i0.ɵɵattribute("x",
|
|
384
|
+
const l_r7 = ctx.$implicit;
|
|
385
|
+
i0.ɵɵattribute("x", l_r7.x)("y", l_r7.y)("text-anchor", l_r7.anchor);
|
|
263
386
|
i0.ɵɵadvance();
|
|
264
|
-
i0.ɵɵtextInterpolate(
|
|
387
|
+
i0.ɵɵtextInterpolate(l_r7.text);
|
|
265
388
|
} }
|
|
266
|
-
function
|
|
389
|
+
function KptChart_Case_7_Conditional_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
267
390
|
i0.ɵɵnamespaceSVG();
|
|
268
|
-
i0.ɵɵelementStart(0, "g",
|
|
391
|
+
i0.ɵɵelementStart(0, "g", 21);
|
|
269
392
|
i0.ɵɵelement(1, "rect");
|
|
270
|
-
i0.ɵɵelementStart(2, "text",
|
|
393
|
+
i0.ɵɵelementStart(2, "text", 26);
|
|
271
394
|
i0.ɵɵtext(3);
|
|
272
395
|
i0.ɵɵelementEnd()();
|
|
273
396
|
} if (rf & 2) {
|
|
274
|
-
const
|
|
397
|
+
const ch_r8 = ctx;
|
|
275
398
|
i0.ɵɵadvance();
|
|
276
|
-
i0.ɵɵattribute("x",
|
|
399
|
+
i0.ɵɵattribute("x", ch_r8.pillX)("y", ch_r8.pillY)("width", ch_r8.pillW)("height", ch_r8.pillH)("rx", ch_r8.pillH / 2);
|
|
277
400
|
i0.ɵɵadvance();
|
|
278
|
-
i0.ɵɵattribute("x",
|
|
401
|
+
i0.ɵɵattribute("x", ch_r8.labelX)("y", ch_r8.labelY);
|
|
279
402
|
i0.ɵɵadvance();
|
|
280
|
-
i0.ɵɵtextInterpolate(
|
|
403
|
+
i0.ɵɵtextInterpolate(ch_r8.text);
|
|
281
404
|
} }
|
|
282
|
-
function
|
|
405
|
+
function KptChart_Case_7_Conditional_0_For_11_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
283
406
|
i0.ɵɵnamespaceSVG();
|
|
284
|
-
i0.ɵɵelement(0, "
|
|
407
|
+
i0.ɵɵelement(0, "line", 28);
|
|
285
408
|
} if (rf & 2) {
|
|
286
|
-
const
|
|
287
|
-
i0.ɵɵ
|
|
288
|
-
i0.ɵɵattribute("d", s_r7.area);
|
|
409
|
+
const t_r9 = ctx.$implicit;
|
|
410
|
+
i0.ɵɵattribute("data-kind", t_r9.kind)("x1", t_r9.x)("x2", t_r9.x)("y1", t_r9.y1)("y2", t_r9.y2);
|
|
289
411
|
} }
|
|
290
|
-
function
|
|
412
|
+
function KptChart_Case_7_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
291
413
|
i0.ɵɵnamespaceSVG();
|
|
292
|
-
i0.ɵɵ
|
|
414
|
+
i0.ɵɵelementStart(0, "g", 22);
|
|
415
|
+
i0.ɵɵelement(1, "path", 27);
|
|
416
|
+
i0.ɵɵrepeaterCreate(2, KptChart_Case_7_Conditional_0_For_11_For_3_Template, 1, 5, ":svg:line", 28, i0.ɵɵrepeaterTrackByIndex);
|
|
417
|
+
i0.ɵɵelementEnd();
|
|
293
418
|
} if (rf & 2) {
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
i0.ɵɵstyleProp("fill", s_r7.color)("--%NS%kpt-chart-i", $index_r11);
|
|
300
|
-
i0.ɵɵclassProp("kpt-chart__point--active", ctx_r0.activeIndex() === $index_r11);
|
|
301
|
-
i0.ɵɵattribute("cx", p_r10.x)("cy", p_r10.y);
|
|
419
|
+
const g_r10 = ctx.$implicit;
|
|
420
|
+
i0.ɵɵadvance();
|
|
421
|
+
i0.ɵɵattribute("d", g_r10.path);
|
|
422
|
+
i0.ɵɵadvance();
|
|
423
|
+
i0.ɵɵrepeater(g_r10.ticks);
|
|
302
424
|
} }
|
|
303
|
-
function
|
|
304
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
305
|
-
i0.ɵɵconditionalCreate(0, KptChart_Case_6_Conditional_0_For_11_For_4_Conditional_0_Template, 1, 8, ":svg:circle", 24);
|
|
425
|
+
function KptChart_Case_7_Conditional_0_For_13_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
306
426
|
i0.ɵɵnamespaceSVG();
|
|
307
|
-
i0.ɵɵ
|
|
308
|
-
i0.ɵɵlistener("pointerenter", function KptChart_Case_6_Conditional_0_For_11_For_4_Template_circle_pointerenter_1_listener() { const ctx_r11 = i0.ɵɵrestoreView(_r8); const p_r10 = ctx_r11.$implicit; const $index_r11 = ctx_r11.$index; const s_r7 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onLineEnter($index_r11, p_r10.x, p_r10.y, s_r7.name, p_r10.label, p_r10.value, s_r7.color)); })("pointerleave", function KptChart_Case_6_Conditional_0_For_11_For_4_Template_circle_pointerleave_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.onLineLeave()); });
|
|
309
|
-
i0.ɵɵelementEnd();
|
|
427
|
+
i0.ɵɵelement(0, "path", 32);
|
|
310
428
|
} if (rf & 2) {
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
i0.ɵɵ
|
|
314
|
-
i0.ɵɵadvance();
|
|
315
|
-
i0.ɵɵattribute("cx", p_r10.x)("cy", p_r10.y);
|
|
429
|
+
const s_r11 = i0.ɵɵnextContext().$implicit;
|
|
430
|
+
i0.ɵɵstyleProp("fill", s_r11.color);
|
|
431
|
+
i0.ɵɵattribute("d", s_r11.area);
|
|
316
432
|
} }
|
|
317
|
-
function
|
|
433
|
+
function KptChart_Case_7_Conditional_0_For_13_For_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
318
434
|
i0.ɵɵnamespaceSVG();
|
|
319
|
-
i0.ɵɵ
|
|
320
|
-
|
|
321
|
-
i0.ɵɵ
|
|
322
|
-
|
|
435
|
+
i0.ɵɵelement(0, "circle", 34);
|
|
436
|
+
} if (rf & 2) {
|
|
437
|
+
const ctx_r11 = i0.ɵɵnextContext();
|
|
438
|
+
const p_r13 = ctx_r11.$implicit;
|
|
439
|
+
const $index_r14 = ctx_r11.$index;
|
|
440
|
+
const s_r11 = i0.ɵɵnextContext().$implicit;
|
|
441
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
442
|
+
i0.ɵɵstyleProp("fill", s_r11.color)("--%NS%kpt-chart-i", $index_r14);
|
|
443
|
+
i0.ɵɵclassProp("kpt-chart__point--active", ctx_r0.activeIndex() === $index_r14);
|
|
444
|
+
i0.ɵɵattribute("cx", p_r13.x)("cy", p_r13.y);
|
|
445
|
+
} }
|
|
446
|
+
function KptChart_Case_7_Conditional_0_For_13_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
447
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_7_Conditional_0_For_13_For_4_Conditional_0_Template, 1, 8, ":svg:circle", 33);
|
|
448
|
+
} if (rf & 2) {
|
|
449
|
+
const vm_r15 = i0.ɵɵnextContext(2);
|
|
450
|
+
i0.ɵɵconditional(vm_r15.showPoints ? 0 : -1);
|
|
451
|
+
} }
|
|
452
|
+
function KptChart_Case_7_Conditional_0_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
453
|
+
i0.ɵɵnamespaceSVG();
|
|
454
|
+
i0.ɵɵelementStart(0, "g", 29);
|
|
455
|
+
i0.ɵɵconditionalCreate(1, KptChart_Case_7_Conditional_0_For_13_Conditional_1_Template, 1, 3, ":svg:path", 30);
|
|
456
|
+
i0.ɵɵelement(2, "path", 31);
|
|
457
|
+
i0.ɵɵrepeaterCreate(3, KptChart_Case_7_Conditional_0_For_13_For_4_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
323
458
|
i0.ɵɵelementEnd();
|
|
324
459
|
} if (rf & 2) {
|
|
325
|
-
const
|
|
460
|
+
const s_r11 = ctx.$implicit;
|
|
326
461
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
327
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
462
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(s_r11.key));
|
|
463
|
+
i0.ɵɵadvance();
|
|
464
|
+
i0.ɵɵconditional(s_r11.area ? 1 : -1);
|
|
328
465
|
i0.ɵɵadvance();
|
|
329
|
-
i0.ɵɵ
|
|
466
|
+
i0.ɵɵstyleProp("stroke", s_r11.color);
|
|
467
|
+
i0.ɵɵattribute("d", s_r11.path);
|
|
330
468
|
i0.ɵɵadvance();
|
|
331
|
-
i0.ɵɵ
|
|
332
|
-
|
|
469
|
+
i0.ɵɵrepeater(s_r11.points);
|
|
470
|
+
} }
|
|
471
|
+
function KptChart_Case_7_Conditional_0_Conditional_14_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
472
|
+
i0.ɵɵnamespaceSVG();
|
|
473
|
+
i0.ɵɵelement(0, "path", 36);
|
|
474
|
+
} if (rf & 2) {
|
|
475
|
+
const s_r16 = ctx.$implicit;
|
|
476
|
+
const sh_r17 = i0.ɵɵnextContext();
|
|
477
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
478
|
+
i0.ɵɵstyleProp("opacity", sh_r17.opacity);
|
|
479
|
+
i0.ɵɵattribute("d", s_r16.path)("stroke", "url(#" + ctx_r0.sheenId + ")");
|
|
480
|
+
} }
|
|
481
|
+
function KptChart_Case_7_Conditional_0_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
482
|
+
i0.ɵɵrepeaterCreate(0, KptChart_Case_7_Conditional_0_Conditional_14_For_1_Template, 1, 4, ":svg:path", 35, _forTrack0);
|
|
483
|
+
} if (rf & 2) {
|
|
484
|
+
const vm_r15 = i0.ɵɵnextContext();
|
|
485
|
+
i0.ɵɵrepeater(vm_r15.series);
|
|
486
|
+
} }
|
|
487
|
+
function KptChart_Case_7_Conditional_0_For_16_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
488
|
+
i0.ɵɵnamespaceSVG();
|
|
489
|
+
i0.ɵɵelementStart(0, "text", 38);
|
|
490
|
+
i0.ɵɵtext(1);
|
|
491
|
+
i0.ɵɵelementEnd();
|
|
492
|
+
} if (rf & 2) {
|
|
493
|
+
const c_r18 = ctx.$implicit;
|
|
494
|
+
i0.ɵɵstyleProp("--%NS%kpt-chart-i", c_r18.index);
|
|
495
|
+
i0.ɵɵattribute("data-kind", c_r18.kind)("x", c_r18.x)("y", c_r18.y);
|
|
333
496
|
i0.ɵɵadvance();
|
|
334
|
-
i0.ɵɵ
|
|
497
|
+
i0.ɵɵtextInterpolate(c_r18.text);
|
|
335
498
|
} }
|
|
336
|
-
function
|
|
499
|
+
function KptChart_Case_7_Conditional_0_For_16_Template(rf, ctx) { if (rf & 1) {
|
|
500
|
+
i0.ɵɵrepeaterCreate(0, KptChart_Case_7_Conditional_0_For_16_For_1_Template, 2, 6, ":svg:text", 37, _forTrack2);
|
|
501
|
+
} if (rf & 2) {
|
|
502
|
+
const g_r19 = ctx.$implicit;
|
|
503
|
+
i0.ɵɵrepeater(g_r19.chips);
|
|
504
|
+
} }
|
|
505
|
+
function KptChart_Case_7_Conditional_0_For_18_Template(rf, ctx) { if (rf & 1) {
|
|
337
506
|
i0.ɵɵnamespaceSVG();
|
|
338
|
-
i0.ɵɵ
|
|
339
|
-
|
|
507
|
+
i0.ɵɵelement(0, "circle", 39);
|
|
508
|
+
} if (rf & 2) {
|
|
509
|
+
const r_r20 = ctx.$implicit;
|
|
510
|
+
i0.ɵɵstyleProp("stroke", r_r20.color);
|
|
511
|
+
i0.ɵɵattribute("cx", r_r20.x)("cy", r_r20.y);
|
|
512
|
+
} }
|
|
513
|
+
function KptChart_Case_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
514
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
515
|
+
i0.ɵɵnamespaceSVG();
|
|
516
|
+
i0.ɵɵelementStart(0, "g", 17);
|
|
517
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_7_Conditional_0_For_2_Template, 1, 4, ":svg:line", 18, i0.ɵɵrepeaterTrackByIndex);
|
|
518
|
+
i0.ɵɵelementEnd();
|
|
519
|
+
i0.ɵɵconditionalCreate(3, KptChart_Case_7_Conditional_0_Conditional_3_Template, 1, 4, ":svg:line", 19);
|
|
520
|
+
i0.ɵɵelementStart(4, "g", 20);
|
|
521
|
+
i0.ɵɵrepeaterCreate(5, KptChart_Case_7_Conditional_0_For_6_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
522
|
+
i0.ɵɵrepeaterCreate(7, KptChart_Case_7_Conditional_0_For_8_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
340
523
|
i0.ɵɵelementEnd();
|
|
341
|
-
i0.ɵɵconditionalCreate(
|
|
342
|
-
i0.ɵɵ
|
|
343
|
-
i0.ɵɵrepeaterCreate(
|
|
344
|
-
i0.ɵɵ
|
|
524
|
+
i0.ɵɵconditionalCreate(9, KptChart_Case_7_Conditional_0_Conditional_9_Template, 4, 8, ":svg:g", 21);
|
|
525
|
+
i0.ɵɵrepeaterCreate(10, KptChart_Case_7_Conditional_0_For_11_Template, 4, 1, ":svg:g", 22, _forTrack0);
|
|
526
|
+
i0.ɵɵrepeaterCreate(12, KptChart_Case_7_Conditional_0_For_13_Template, 5, 6, ":svg:g", 23, _forTrack0);
|
|
527
|
+
i0.ɵɵconditionalCreate(14, KptChart_Case_7_Conditional_0_Conditional_14_Template, 2, 0);
|
|
528
|
+
i0.ɵɵrepeaterCreate(15, KptChart_Case_7_Conditional_0_For_16_Template, 2, 0, null, null, _forTrack0);
|
|
529
|
+
i0.ɵɵrepeaterCreate(17, KptChart_Case_7_Conditional_0_For_18_Template, 1, 4, ":svg:circle", 24, _forTrack1);
|
|
530
|
+
i0.ɵɵelementStart(19, "rect", 25);
|
|
531
|
+
i0.ɵɵlistener("pointermove", function KptChart_Case_7_Conditional_0_Template_rect_pointermove_19_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryMove($event)); })("pointerleave", function KptChart_Case_7_Conditional_0_Template_rect_pointerleave_19_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
345
532
|
i0.ɵɵelementEnd();
|
|
346
|
-
i0.ɵɵconditionalCreate(9, KptChart_Case_6_Conditional_0_Conditional_9_Template, 4, 8, ":svg:g", 17);
|
|
347
|
-
i0.ɵɵrepeaterCreate(10, KptChart_Case_6_Conditional_0_For_11_Template, 5, 6, ":svg:g", 18, _forTrack0);
|
|
348
533
|
} if (rf & 2) {
|
|
349
534
|
let tmp_4_0;
|
|
350
535
|
let tmp_7_0;
|
|
351
|
-
|
|
536
|
+
let tmp_10_0;
|
|
537
|
+
const vm_r15 = ctx;
|
|
352
538
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
353
539
|
i0.ɵɵadvance();
|
|
354
|
-
i0.ɵɵrepeater(
|
|
540
|
+
i0.ɵɵrepeater(vm_r15.grid);
|
|
355
541
|
i0.ɵɵadvance(2);
|
|
356
542
|
i0.ɵɵconditional((tmp_4_0 = ctx_r0.crosshair()) ? 3 : -1, tmp_4_0);
|
|
357
543
|
i0.ɵɵadvance(2);
|
|
358
|
-
i0.ɵɵrepeater(
|
|
544
|
+
i0.ɵɵrepeater(vm_r15.valueLabels);
|
|
359
545
|
i0.ɵɵadvance(2);
|
|
360
|
-
i0.ɵɵrepeater(
|
|
546
|
+
i0.ɵɵrepeater(vm_r15.catLabels);
|
|
361
547
|
i0.ɵɵadvance(2);
|
|
362
548
|
i0.ɵɵconditional((tmp_7_0 = ctx_r0.crosshair()) ? 9 : -1, tmp_7_0);
|
|
363
549
|
i0.ɵɵadvance();
|
|
364
|
-
i0.ɵɵrepeater(
|
|
550
|
+
i0.ɵɵrepeater(vm_r15.ghost);
|
|
551
|
+
i0.ɵɵadvance(2);
|
|
552
|
+
i0.ɵɵrepeater(vm_r15.series);
|
|
553
|
+
i0.ɵɵadvance(2);
|
|
554
|
+
i0.ɵɵconditional((tmp_10_0 = ctx_r0.sheen()) ? 14 : -1, tmp_10_0);
|
|
555
|
+
i0.ɵɵadvance();
|
|
556
|
+
i0.ɵɵrepeater(vm_r15.ghost);
|
|
557
|
+
i0.ɵɵadvance(2);
|
|
558
|
+
i0.ɵɵrepeater(ctx_r0.ripple());
|
|
559
|
+
i0.ɵɵadvance(2);
|
|
560
|
+
i0.ɵɵattribute("x", vm_r15.plot.x - 12)("y", vm_r15.plot.y - 12)("width", vm_r15.plot.width + 24)("height", vm_r15.plot.height + 24);
|
|
365
561
|
} }
|
|
366
|
-
function
|
|
367
|
-
i0.ɵɵconditionalCreate(0,
|
|
562
|
+
function KptChart_Case_7_Template(rf, ctx) { if (rf & 1) {
|
|
563
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_7_Conditional_0_Template, 20, 7);
|
|
368
564
|
} if (rf & 2) {
|
|
369
565
|
let tmp_1_0;
|
|
370
566
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
371
567
|
i0.ɵɵconditional((tmp_1_0 = ctx_r0.lineVm()) ? 0 : -1, tmp_1_0);
|
|
372
568
|
} }
|
|
373
|
-
function
|
|
569
|
+
function KptChart_Case_8_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
374
570
|
i0.ɵɵnamespaceSVG();
|
|
375
|
-
i0.ɵɵelement(0, "line",
|
|
571
|
+
i0.ɵɵelement(0, "line", 18);
|
|
376
572
|
} if (rf & 2) {
|
|
377
|
-
const
|
|
378
|
-
i0.ɵɵattribute("x1",
|
|
573
|
+
const g_r22 = ctx.$implicit;
|
|
574
|
+
i0.ɵɵattribute("x1", g_r22.x1)("y1", g_r22.y1)("x2", g_r22.x2)("y2", g_r22.y2);
|
|
379
575
|
} }
|
|
380
|
-
function
|
|
576
|
+
function KptChart_Case_8_Conditional_0_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
381
577
|
i0.ɵɵnamespaceSVG();
|
|
382
578
|
i0.ɵɵelementStart(0, "text");
|
|
383
579
|
i0.ɵɵtext(1);
|
|
384
580
|
i0.ɵɵelementEnd();
|
|
385
581
|
} if (rf & 2) {
|
|
386
|
-
const
|
|
387
|
-
i0.ɵɵattribute("x",
|
|
582
|
+
const l_r23 = ctx.$implicit;
|
|
583
|
+
i0.ɵɵattribute("x", l_r23.x)("y", l_r23.y)("text-anchor", l_r23.anchor);
|
|
388
584
|
i0.ɵɵadvance();
|
|
389
|
-
i0.ɵɵtextInterpolate(
|
|
585
|
+
i0.ɵɵtextInterpolate(l_r23.text);
|
|
390
586
|
} }
|
|
391
|
-
function
|
|
587
|
+
function KptChart_Case_8_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
392
588
|
i0.ɵɵnamespaceSVG();
|
|
393
589
|
i0.ɵɵelementStart(0, "text");
|
|
394
590
|
i0.ɵɵtext(1);
|
|
395
591
|
i0.ɵɵelementEnd();
|
|
396
592
|
} if (rf & 2) {
|
|
397
|
-
const
|
|
398
|
-
i0.ɵɵattribute("x",
|
|
593
|
+
const l_r24 = ctx.$implicit;
|
|
594
|
+
i0.ɵɵattribute("x", l_r24.x)("y", l_r24.y)("text-anchor", l_r24.anchor);
|
|
399
595
|
i0.ɵɵadvance();
|
|
400
|
-
i0.ɵɵtextInterpolate(
|
|
596
|
+
i0.ɵɵtextInterpolate(l_r24.text);
|
|
401
597
|
} }
|
|
402
|
-
function
|
|
403
|
-
const _r17 = i0.ɵɵgetCurrentView();
|
|
598
|
+
function KptChart_Case_8_Conditional_0_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
404
599
|
i0.ɵɵnamespaceSVG();
|
|
405
|
-
i0.ɵɵ
|
|
406
|
-
|
|
600
|
+
i0.ɵɵelement(0, "path", 42);
|
|
601
|
+
} if (rf & 2) {
|
|
602
|
+
const g_r25 = ctx.$implicit;
|
|
603
|
+
i0.ɵɵattribute("d", g_r25.path);
|
|
604
|
+
} }
|
|
605
|
+
function KptChart_Case_8_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
606
|
+
i0.ɵɵnamespaceSVG();
|
|
607
|
+
i0.ɵɵelementStart(0, "g", 22);
|
|
608
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_Conditional_8_For_2_Template, 1, 1, ":svg:path", 42, _forTrack0);
|
|
407
609
|
i0.ɵɵelementEnd();
|
|
408
610
|
} if (rf & 2) {
|
|
409
|
-
const
|
|
611
|
+
const vm_r26 = i0.ɵɵnextContext();
|
|
612
|
+
i0.ɵɵadvance();
|
|
613
|
+
i0.ɵɵrepeater(vm_r26.ghost);
|
|
614
|
+
} }
|
|
615
|
+
function KptChart_Case_8_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
616
|
+
i0.ɵɵnamespaceSVG();
|
|
617
|
+
i0.ɵɵelement(0, "path", 43);
|
|
618
|
+
} if (rf & 2) {
|
|
619
|
+
const b_r27 = ctx.$implicit;
|
|
410
620
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
411
|
-
i0.ɵɵstyleProp("fill",
|
|
412
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
413
|
-
i0.ɵɵattribute("d",
|
|
621
|
+
i0.ɵɵstyleProp("fill", b_r27.color)("--%NS%kpt-chart-i", b_r27.index);
|
|
622
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(b_r27.key));
|
|
623
|
+
i0.ɵɵattribute("d", b_r27.path);
|
|
414
624
|
} }
|
|
415
|
-
function
|
|
625
|
+
function KptChart_Case_8_Conditional_0_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
626
|
+
i0.ɵɵnamespaceSVG();
|
|
627
|
+
i0.ɵɵelement(0, "rect", 44);
|
|
628
|
+
} if (rf & 2) {
|
|
629
|
+
const g_r28 = ctx.$implicit;
|
|
630
|
+
i0.ɵɵattribute("data-kind", g_r28.delta.kind)("x", g_r28.delta.x)("y", g_r28.delta.y)("width", g_r28.delta.width)("height", g_r28.delta.height);
|
|
631
|
+
} }
|
|
632
|
+
function KptChart_Case_8_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
633
|
+
i0.ɵɵnamespaceSVG();
|
|
634
|
+
i0.ɵɵelementStart(0, "g", 22);
|
|
635
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_Conditional_12_For_2_Template, 1, 5, ":svg:rect", 44, _forTrack0);
|
|
636
|
+
i0.ɵɵelementEnd();
|
|
637
|
+
} if (rf & 2) {
|
|
638
|
+
const vm_r26 = i0.ɵɵnextContext();
|
|
639
|
+
i0.ɵɵadvance();
|
|
640
|
+
i0.ɵɵrepeater(vm_r26.ghost);
|
|
641
|
+
} }
|
|
642
|
+
function KptChart_Case_8_Conditional_0_Conditional_13_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
416
643
|
i0.ɵɵnamespaceSVG();
|
|
417
|
-
i0.ɵɵ
|
|
418
|
-
|
|
644
|
+
i0.ɵɵelement(0, "path", 46);
|
|
645
|
+
} if (rf & 2) {
|
|
646
|
+
const b_r29 = ctx.$implicit;
|
|
647
|
+
const sh_r30 = i0.ɵɵnextContext();
|
|
648
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
649
|
+
i0.ɵɵstyleProp("opacity", sh_r30.opacity * 0.7);
|
|
650
|
+
i0.ɵɵattribute("d", b_r29.path)("fill", "url(#" + ctx_r0.sheenId + ")");
|
|
651
|
+
} }
|
|
652
|
+
function KptChart_Case_8_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
653
|
+
i0.ɵɵrepeaterCreate(0, KptChart_Case_8_Conditional_0_Conditional_13_For_1_Template, 1, 4, ":svg:path", 45, _forTrack3);
|
|
654
|
+
} if (rf & 2) {
|
|
655
|
+
const vm_r26 = i0.ɵɵnextContext();
|
|
656
|
+
i0.ɵɵrepeater(vm_r26.bars);
|
|
657
|
+
} }
|
|
658
|
+
function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
659
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
660
|
+
i0.ɵɵnamespaceSVG();
|
|
661
|
+
i0.ɵɵelementStart(0, "g", 17);
|
|
662
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_For_2_Template, 1, 4, ":svg:line", 18, i0.ɵɵrepeaterTrackByIndex);
|
|
663
|
+
i0.ɵɵelementEnd();
|
|
664
|
+
i0.ɵɵelementStart(3, "g", 20);
|
|
665
|
+
i0.ɵɵrepeaterCreate(4, KptChart_Case_8_Conditional_0_For_5_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
666
|
+
i0.ɵɵrepeaterCreate(6, KptChart_Case_8_Conditional_0_For_7_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
419
667
|
i0.ɵɵelementEnd();
|
|
420
|
-
i0.ɵɵ
|
|
421
|
-
i0.ɵɵ
|
|
422
|
-
i0.ɵɵrepeaterCreate(
|
|
668
|
+
i0.ɵɵconditionalCreate(8, KptChart_Case_8_Conditional_0_Conditional_8_Template, 3, 0, ":svg:g", 22);
|
|
669
|
+
i0.ɵɵelementStart(9, "g", 40);
|
|
670
|
+
i0.ɵɵrepeaterCreate(10, KptChart_Case_8_Conditional_0_For_11_Template, 1, 7, ":svg:path", 41, _forTrack3);
|
|
423
671
|
i0.ɵɵelementEnd();
|
|
424
|
-
i0.ɵɵ
|
|
425
|
-
i0.ɵɵ
|
|
672
|
+
i0.ɵɵconditionalCreate(12, KptChart_Case_8_Conditional_0_Conditional_12_Template, 3, 0, ":svg:g", 22);
|
|
673
|
+
i0.ɵɵconditionalCreate(13, KptChart_Case_8_Conditional_0_Conditional_13_Template, 2, 0);
|
|
674
|
+
i0.ɵɵelementStart(14, "rect", 25);
|
|
675
|
+
i0.ɵɵlistener("pointermove", function KptChart_Case_8_Conditional_0_Template_rect_pointermove_14_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryMove($event)); })("pointerleave", function KptChart_Case_8_Conditional_0_Template_rect_pointerleave_14_listener() { i0.ɵɵrestoreView(_r21); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
426
676
|
i0.ɵɵelementEnd();
|
|
427
677
|
} if (rf & 2) {
|
|
428
|
-
|
|
678
|
+
let tmp_10_0;
|
|
679
|
+
const vm_r26 = ctx;
|
|
680
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
429
681
|
i0.ɵɵadvance();
|
|
430
|
-
i0.ɵɵrepeater(
|
|
682
|
+
i0.ɵɵrepeater(vm_r26.grid);
|
|
431
683
|
i0.ɵɵadvance(3);
|
|
432
|
-
i0.ɵɵrepeater(
|
|
684
|
+
i0.ɵɵrepeater(vm_r26.valueLabels);
|
|
685
|
+
i0.ɵɵadvance(2);
|
|
686
|
+
i0.ɵɵrepeater(vm_r26.catLabels);
|
|
433
687
|
i0.ɵɵadvance(2);
|
|
434
|
-
i0.ɵɵ
|
|
688
|
+
i0.ɵɵconditional(vm_r26.ghost.length ? 8 : -1);
|
|
689
|
+
i0.ɵɵadvance();
|
|
690
|
+
i0.ɵɵattribute("data-orientation", vm_r26.orientation);
|
|
691
|
+
i0.ɵɵadvance();
|
|
692
|
+
i0.ɵɵrepeater(vm_r26.bars);
|
|
435
693
|
i0.ɵɵadvance(2);
|
|
436
|
-
i0.ɵɵ
|
|
694
|
+
i0.ɵɵconditional(vm_r26.ghost.length ? 12 : -1);
|
|
695
|
+
i0.ɵɵadvance();
|
|
696
|
+
i0.ɵɵconditional((tmp_10_0 = ctx_r0.sheen()) ? 13 : -1, tmp_10_0);
|
|
437
697
|
i0.ɵɵadvance();
|
|
438
|
-
i0.ɵɵ
|
|
698
|
+
i0.ɵɵattribute("x", vm_r26.plot.x)("y", vm_r26.plot.y)("width", vm_r26.plot.width)("height", vm_r26.plot.height);
|
|
439
699
|
} }
|
|
440
|
-
function
|
|
441
|
-
i0.ɵɵconditionalCreate(0,
|
|
700
|
+
function KptChart_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
701
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_Template, 15, 8);
|
|
442
702
|
} if (rf & 2) {
|
|
443
703
|
let tmp_1_0;
|
|
444
704
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
445
705
|
i0.ɵɵconditional((tmp_1_0 = ctx_r0.barVm()) ? 0 : -1, tmp_1_0);
|
|
446
706
|
} }
|
|
447
|
-
function
|
|
707
|
+
function KptChart_Case_9_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
448
708
|
i0.ɵɵnamespaceSVG();
|
|
449
|
-
i0.ɵɵelement(0, "path",
|
|
709
|
+
i0.ɵɵelement(0, "path", 47);
|
|
450
710
|
} if (rf & 2) {
|
|
451
|
-
const
|
|
452
|
-
i0.ɵɵattribute("d",
|
|
711
|
+
const r_r31 = ctx.$implicit;
|
|
712
|
+
i0.ɵɵattribute("d", r_r31);
|
|
453
713
|
} }
|
|
454
|
-
function
|
|
714
|
+
function KptChart_Case_9_Conditional_0_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
455
715
|
i0.ɵɵnamespaceSVG();
|
|
456
|
-
i0.ɵɵelement(0, "line",
|
|
716
|
+
i0.ɵɵelement(0, "line", 18);
|
|
457
717
|
} if (rf & 2) {
|
|
458
|
-
const
|
|
459
|
-
i0.ɵɵattribute("x1",
|
|
718
|
+
const a_r32 = ctx.$implicit;
|
|
719
|
+
i0.ɵɵattribute("x1", a_r32.x1)("y1", a_r32.y1)("x2", a_r32.x2)("y2", a_r32.y2);
|
|
460
720
|
} }
|
|
461
|
-
function
|
|
721
|
+
function KptChart_Case_9_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
462
722
|
i0.ɵɵnamespaceSVG();
|
|
463
723
|
i0.ɵɵelementStart(0, "text");
|
|
464
724
|
i0.ɵɵtext(1);
|
|
465
725
|
i0.ɵɵelementEnd();
|
|
466
726
|
} if (rf & 2) {
|
|
467
|
-
const
|
|
468
|
-
i0.ɵɵattribute("x",
|
|
727
|
+
const l_r33 = ctx.$implicit;
|
|
728
|
+
i0.ɵɵattribute("x", l_r33.x)("y", l_r33.y)("text-anchor", l_r33.anchor);
|
|
469
729
|
i0.ɵɵadvance();
|
|
470
|
-
i0.ɵɵtextInterpolate(
|
|
730
|
+
i0.ɵɵtextInterpolate(l_r33.text);
|
|
471
731
|
} }
|
|
472
|
-
function
|
|
473
|
-
const
|
|
732
|
+
function KptChart_Case_9_Conditional_0_For_9_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
733
|
+
const _r34 = i0.ɵɵgetCurrentView();
|
|
474
734
|
i0.ɵɵnamespaceSVG();
|
|
475
|
-
i0.ɵɵelementStart(0, "circle",
|
|
476
|
-
i0.ɵɵlistener("pointerenter", function
|
|
735
|
+
i0.ɵɵelementStart(0, "circle", 52);
|
|
736
|
+
i0.ɵɵlistener("pointerenter", function KptChart_Case_9_Conditional_0_For_9_For_3_Template_circle_pointerenter_0_listener() { const p_r35 = i0.ɵɵrestoreView(_r34).$implicit; const s_r36 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.showTip(p_r35.x, p_r35.y, s_r36.name, p_r35.label, p_r35.value, s_r36.color)); })("pointerleave", function KptChart_Case_9_Conditional_0_For_9_For_3_Template_circle_pointerleave_0_listener() { i0.ɵɵrestoreView(_r34); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
477
737
|
i0.ɵɵelementEnd();
|
|
478
738
|
} if (rf & 2) {
|
|
479
|
-
const
|
|
480
|
-
const $
|
|
481
|
-
const
|
|
482
|
-
i0.ɵɵstyleProp("fill",
|
|
483
|
-
i0.ɵɵattribute("cx",
|
|
739
|
+
const p_r35 = ctx.$implicit;
|
|
740
|
+
const $index_r37 = ctx.$index;
|
|
741
|
+
const s_r36 = i0.ɵɵnextContext().$implicit;
|
|
742
|
+
i0.ɵɵstyleProp("fill", s_r36.color)("--%NS%kpt-chart-i", $index_r37);
|
|
743
|
+
i0.ɵɵattribute("cx", p_r35.x)("cy", p_r35.y);
|
|
484
744
|
} }
|
|
485
|
-
function
|
|
745
|
+
function KptChart_Case_9_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
486
746
|
i0.ɵɵnamespaceSVG();
|
|
487
|
-
i0.ɵɵelementStart(0, "g",
|
|
488
|
-
i0.ɵɵelement(1, "path",
|
|
489
|
-
i0.ɵɵrepeaterCreate(2,
|
|
747
|
+
i0.ɵɵelementStart(0, "g", 49);
|
|
748
|
+
i0.ɵɵelement(1, "path", 50);
|
|
749
|
+
i0.ɵɵrepeaterCreate(2, KptChart_Case_9_Conditional_0_For_9_For_3_Template, 1, 6, ":svg:circle", 51, i0.ɵɵrepeaterTrackByIndex);
|
|
490
750
|
i0.ɵɵelementEnd();
|
|
491
751
|
} if (rf & 2) {
|
|
492
|
-
const
|
|
752
|
+
const s_r36 = ctx.$implicit;
|
|
493
753
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
494
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
754
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(s_r36.key));
|
|
495
755
|
i0.ɵɵadvance();
|
|
496
|
-
i0.ɵɵstyleProp("fill",
|
|
497
|
-
i0.ɵɵattribute("d",
|
|
756
|
+
i0.ɵɵstyleProp("fill", s_r36.color)("stroke", s_r36.color);
|
|
757
|
+
i0.ɵɵattribute("d", s_r36.polygon);
|
|
498
758
|
i0.ɵɵadvance();
|
|
499
|
-
i0.ɵɵrepeater(
|
|
759
|
+
i0.ɵɵrepeater(s_r36.points);
|
|
500
760
|
} }
|
|
501
|
-
function
|
|
761
|
+
function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
502
762
|
i0.ɵɵnamespaceSVG();
|
|
503
|
-
i0.ɵɵelementStart(0, "g",
|
|
504
|
-
i0.ɵɵrepeaterCreate(1,
|
|
505
|
-
i0.ɵɵrepeaterCreate(3,
|
|
763
|
+
i0.ɵɵelementStart(0, "g", 17);
|
|
764
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_9_Conditional_0_For_2_Template, 1, 1, ":svg:path", 47, i0.ɵɵrepeaterTrackByIndex);
|
|
765
|
+
i0.ɵɵrepeaterCreate(3, KptChart_Case_9_Conditional_0_For_4_Template, 1, 4, ":svg:line", 18, i0.ɵɵrepeaterTrackByIndex);
|
|
506
766
|
i0.ɵɵelementEnd();
|
|
507
|
-
i0.ɵɵelementStart(5, "g",
|
|
508
|
-
i0.ɵɵrepeaterCreate(6,
|
|
767
|
+
i0.ɵɵelementStart(5, "g", 20);
|
|
768
|
+
i0.ɵɵrepeaterCreate(6, KptChart_Case_9_Conditional_0_For_7_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
509
769
|
i0.ɵɵelementEnd();
|
|
510
|
-
i0.ɵɵrepeaterCreate(8,
|
|
770
|
+
i0.ɵɵrepeaterCreate(8, KptChart_Case_9_Conditional_0_For_9_Template, 4, 7, ":svg:g", 48, _forTrack0);
|
|
511
771
|
} if (rf & 2) {
|
|
512
|
-
const
|
|
772
|
+
const vm_r38 = ctx;
|
|
513
773
|
i0.ɵɵadvance();
|
|
514
|
-
i0.ɵɵrepeater(
|
|
774
|
+
i0.ɵɵrepeater(vm_r38.rings);
|
|
515
775
|
i0.ɵɵadvance(2);
|
|
516
|
-
i0.ɵɵrepeater(
|
|
776
|
+
i0.ɵɵrepeater(vm_r38.axisLines);
|
|
517
777
|
i0.ɵɵadvance(3);
|
|
518
|
-
i0.ɵɵrepeater(
|
|
778
|
+
i0.ɵɵrepeater(vm_r38.axisLabels);
|
|
519
779
|
i0.ɵɵadvance(2);
|
|
520
|
-
i0.ɵɵrepeater(
|
|
780
|
+
i0.ɵɵrepeater(vm_r38.series);
|
|
521
781
|
} }
|
|
522
|
-
function
|
|
523
|
-
i0.ɵɵconditionalCreate(0,
|
|
782
|
+
function KptChart_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
783
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_9_Conditional_0_Template, 10, 0);
|
|
524
784
|
} if (rf & 2) {
|
|
525
785
|
let tmp_1_0;
|
|
526
786
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
527
787
|
i0.ɵɵconditional((tmp_1_0 = ctx_r0.radarVm()) ? 0 : -1, tmp_1_0);
|
|
528
788
|
} }
|
|
529
|
-
function
|
|
530
|
-
const
|
|
789
|
+
function KptChart_Case_10_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
790
|
+
const _r39 = i0.ɵɵgetCurrentView();
|
|
531
791
|
i0.ɵɵnamespaceSVG();
|
|
532
|
-
i0.ɵɵelementStart(0, "path",
|
|
533
|
-
i0.ɵɵlistener("pointerenter", function
|
|
792
|
+
i0.ɵɵelementStart(0, "path", 55);
|
|
793
|
+
i0.ɵɵlistener("pointerenter", function KptChart_Case_10_Conditional_0_For_2_Template_path_pointerenter_0_listener() { const sl_r40 = i0.ɵɵrestoreView(_r39).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.showTip(sl_r40.tipX, sl_r40.tipY, sl_r40.label, "", sl_r40.value, sl_r40.color)); })("pointerleave", function KptChart_Case_10_Conditional_0_For_2_Template_path_pointerleave_0_listener() { i0.ɵɵrestoreView(_r39); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
534
794
|
i0.ɵɵelementEnd();
|
|
535
795
|
} if (rf & 2) {
|
|
536
|
-
const
|
|
537
|
-
const $
|
|
796
|
+
const sl_r40 = ctx.$implicit;
|
|
797
|
+
const $index_r41 = ctx.$index;
|
|
538
798
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
539
|
-
i0.ɵɵstyleProp("fill",
|
|
540
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
541
|
-
i0.ɵɵattribute("d",
|
|
799
|
+
i0.ɵɵstyleProp("fill", sl_r40.color)("--%NS%kpt-chart-i", $index_r41);
|
|
800
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(sl_r40.key));
|
|
801
|
+
i0.ɵɵattribute("d", sl_r40.path);
|
|
542
802
|
} }
|
|
543
|
-
function
|
|
803
|
+
function KptChart_Case_10_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
544
804
|
i0.ɵɵnamespaceSVG();
|
|
545
|
-
i0.ɵɵelementStart(0, "g",
|
|
546
|
-
i0.ɵɵrepeaterCreate(1,
|
|
805
|
+
i0.ɵɵelementStart(0, "g", 53);
|
|
806
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_10_Conditional_0_For_2_Template, 1, 7, ":svg:path", 54, _forTrack0);
|
|
547
807
|
i0.ɵɵelementEnd();
|
|
548
808
|
} if (rf & 2) {
|
|
549
809
|
i0.ɵɵadvance();
|
|
550
810
|
i0.ɵɵrepeater(ctx);
|
|
551
811
|
} }
|
|
552
|
-
function
|
|
553
|
-
i0.ɵɵconditionalCreate(0,
|
|
812
|
+
function KptChart_Case_10_Template(rf, ctx) { if (rf & 1) {
|
|
813
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_10_Conditional_0_Template, 3, 0, ":svg:g", 53);
|
|
554
814
|
} if (rf & 2) {
|
|
555
815
|
let tmp_1_0;
|
|
556
816
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
557
817
|
i0.ɵɵconditional((tmp_1_0 = ctx_r0.pieVm()) ? 0 : -1, tmp_1_0);
|
|
558
818
|
} }
|
|
559
|
-
function
|
|
819
|
+
function KptChart_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
560
820
|
i0.ɵɵelementStart(0, "p", 6);
|
|
561
821
|
i0.ɵɵtext(1);
|
|
562
822
|
i0.ɵɵelementEnd();
|
|
@@ -566,53 +826,63 @@ function KptChart_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
566
826
|
i0.ɵɵadvance();
|
|
567
827
|
i0.ɵɵtextInterpolate(ctx_r0.config().description);
|
|
568
828
|
} }
|
|
569
|
-
function
|
|
829
|
+
function KptChart_For_20_Template(rf, ctx) { if (rf & 1) {
|
|
570
830
|
i0.ɵɵelementStart(0, "th", 8);
|
|
571
831
|
i0.ɵɵtext(1);
|
|
572
832
|
i0.ɵɵelementEnd();
|
|
573
833
|
} if (rf & 2) {
|
|
574
|
-
const
|
|
834
|
+
const col_r42 = ctx.$implicit;
|
|
575
835
|
i0.ɵɵadvance();
|
|
576
|
-
i0.ɵɵtextInterpolate(
|
|
836
|
+
i0.ɵɵtextInterpolate(col_r42);
|
|
577
837
|
} }
|
|
578
|
-
function
|
|
838
|
+
function KptChart_For_23_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
579
839
|
i0.ɵɵelementStart(0, "td");
|
|
580
840
|
i0.ɵɵtext(1);
|
|
581
841
|
i0.ɵɵelementEnd();
|
|
582
842
|
} if (rf & 2) {
|
|
583
|
-
const
|
|
843
|
+
const value_r43 = ctx.$implicit;
|
|
584
844
|
i0.ɵɵadvance();
|
|
585
|
-
i0.ɵɵtextInterpolate(
|
|
845
|
+
i0.ɵɵtextInterpolate(value_r43);
|
|
586
846
|
} }
|
|
587
|
-
function
|
|
588
|
-
i0.ɵɵelementStart(0, "tr")(1, "th",
|
|
847
|
+
function KptChart_For_23_Template(rf, ctx) { if (rf & 1) {
|
|
848
|
+
i0.ɵɵelementStart(0, "tr")(1, "th", 56);
|
|
589
849
|
i0.ɵɵtext(2);
|
|
590
850
|
i0.ɵɵelementEnd();
|
|
591
|
-
i0.ɵɵrepeaterCreate(3,
|
|
851
|
+
i0.ɵɵrepeaterCreate(3, KptChart_For_23_For_4_Template, 2, 1, "td", null, i0.ɵɵrepeaterTrackByIndex);
|
|
592
852
|
i0.ɵɵelementEnd();
|
|
593
853
|
} if (rf & 2) {
|
|
594
|
-
const
|
|
854
|
+
const row_r44 = ctx.$implicit;
|
|
595
855
|
i0.ɵɵadvance(2);
|
|
596
|
-
i0.ɵɵtextInterpolate(
|
|
856
|
+
i0.ɵɵtextInterpolate(row_r44.label);
|
|
597
857
|
i0.ɵɵadvance();
|
|
598
|
-
i0.ɵɵrepeater(
|
|
858
|
+
i0.ɵɵrepeater(row_r44.values);
|
|
599
859
|
} }
|
|
600
|
-
function
|
|
601
|
-
const
|
|
602
|
-
i0.ɵɵelementStart(0, "kpt-chart-legend",
|
|
603
|
-
i0.ɵɵlistener("seriesToggle", function
|
|
860
|
+
function KptChart_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
861
|
+
const _r45 = i0.ɵɵgetCurrentView();
|
|
862
|
+
i0.ɵɵelementStart(0, "kpt-chart-legend", 57);
|
|
863
|
+
i0.ɵɵlistener("seriesToggle", function KptChart_Conditional_25_Template_kpt_chart_legend_seriesToggle_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onToggle($event)); })("highlight", function KptChart_Conditional_25_Template_kpt_chart_legend_highlight_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onHighlight($event)); });
|
|
604
864
|
i0.ɵɵelementEnd();
|
|
605
865
|
} if (rf & 2) {
|
|
606
866
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
607
867
|
i0.ɵɵproperty("items", ctx_r0.legendItems())("position", ctx_r0.legendOpts().position)("align", ctx_r0.legendOpts().align)("pointStyle", ctx_r0.legendOpts().pointStyle)("title", ctx_r0.legendOpts().title);
|
|
608
868
|
} }
|
|
609
869
|
let nextChartId = 0;
|
|
870
|
+
let nextRippleId = 0;
|
|
610
871
|
const VERTICAL_INSETS = { top: 12, right: 16, bottom: 28, left: 46 };
|
|
611
872
|
const HORIZONTAL_INSETS = { top: 12, right: 16, bottom: 28, left: 76 };
|
|
873
|
+
/** Szerokość pasma smugi światła (jednostki viewBoxa) - połowa po każdej stronie czoła fali. */
|
|
874
|
+
const SHEEN_HALF = 90;
|
|
875
|
+
/** Zjechanie z punktu na sąsiedni to `leave` i zaraz `enter` - dymek czeka chwilę, zamiast gasnąć. */
|
|
876
|
+
const TIP_HIDE_DELAY = 60;
|
|
612
877
|
/**
|
|
613
878
|
* Wykres SVG w pełni konfigurowalny przez obiekt `config`.
|
|
614
879
|
* Typy: line, bar, pie, doughnut, polarArea, radar. Sygnały + zoneless,
|
|
615
|
-
* natywne renderowanie SVG (bez manipulacji DOM). Rdzeń obliczeń:
|
|
880
|
+
* natywne renderowanie SVG (bez manipulacji DOM). Rdzeń obliczeń: `@konce-pt/chart`.
|
|
881
|
+
*
|
|
882
|
+
* Ruch: wejście w CSS (rysowanie linii, wzrost słupków); zmiana danych w tym samym wykresie -
|
|
883
|
+
* fala sprężyn od lewej z duchem poprzedniego stanu (`animation.update`, `animation.delta`);
|
|
884
|
+
* dymek jedzie między punktami z cyframi na bębnach (`tooltip.motion`). Systemowe "ogranicz ruch"
|
|
885
|
+
* i `provideKptMotion({ enabled: false })` wyłączają ruch sterowany z kodu.
|
|
616
886
|
*
|
|
617
887
|
* @example
|
|
618
888
|
* <kpt-chart [config]="{ type: 'line', labels: ['Sty','Lut','Mar'],
|
|
@@ -629,12 +899,16 @@ class KptChart {
|
|
|
629
899
|
this.height = input(360, /* @ts-ignore */
|
|
630
900
|
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
631
901
|
this.i18n = inject(KptI18n);
|
|
902
|
+
this.motionConfig = inject(KPT_MOTION_CONFIG, { optional: true });
|
|
903
|
+
this.uid = ++nextChartId;
|
|
632
904
|
/** Id opisu (`config.description`) dla `aria-describedby` wykresu. */
|
|
633
|
-
this.descId = `kpt-chart-${
|
|
905
|
+
this.descId = `kpt-chart-${this.uid}-desc`;
|
|
906
|
+
/** Id gradientów smugi światła (linia i słupki). */
|
|
907
|
+
this.sheenId = `kpt-chart-${this.uid}-sheen`;
|
|
634
908
|
/**
|
|
635
909
|
* Alternatywa tekstowa (WCAG 1.1.1): SVG `role="img"` dostaje nazwę (`ariaLabel` -> tytuł -> i18n),
|
|
636
910
|
* a dane idą do ukrytej wizualnie tabeli, po której czytnik chodzi komórka po komórce - dymek
|
|
637
|
-
* na najechanie jest dostępny tylko myszą.
|
|
911
|
+
* na najechanie jest dostępny tylko myszą. Tabela czyta config, nie klatki ruchu.
|
|
638
912
|
*/
|
|
639
913
|
this.accessibleName = computed(() => chartAccessibleName(this.config(), this.i18n.t('chart.label')), /* @ts-ignore */
|
|
640
914
|
...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
|
|
@@ -645,11 +919,55 @@ class KptChart {
|
|
|
645
919
|
...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
|
|
646
920
|
this.highlighted = signal(null, /* @ts-ignore */
|
|
647
921
|
...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
|
|
648
|
-
this.tooltip = signal(null, /* @ts-ignore */
|
|
649
|
-
...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
650
922
|
/** Indeks kategorii pod kursorem (dla prowadnicy crosshair w wykresie liniowym). */
|
|
651
923
|
this.activeIndex = signal(null, /* @ts-ignore */
|
|
652
924
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
925
|
+
// --- Ruch sterowany z kodu ---
|
|
926
|
+
this.frame = signal({ values: null, domain: null, ghost: null, sheen: null, tip: null }, /* @ts-ignore */
|
|
927
|
+
...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
|
|
928
|
+
this.motion = new KptChartMotion((f) => this.frame.set(f));
|
|
929
|
+
this.prevConfig = null;
|
|
930
|
+
this.lastTipIndex = null;
|
|
931
|
+
this.tipContent = signal(null, /* @ts-ignore */
|
|
932
|
+
...(ngDevMode ? [{ debugName: "tipContent" }] : /* istanbul ignore next */ []));
|
|
933
|
+
/** Fala z punktu docelowego dymka (wykres liniowy). */
|
|
934
|
+
this.ripple = signal([], /* @ts-ignore */
|
|
935
|
+
...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
936
|
+
/** Config z wartościami z bieżącej klatki ruchu - z niego liczy się geometria. */
|
|
937
|
+
this.view = computed(() => {
|
|
938
|
+
const c = this.config();
|
|
939
|
+
const values = this.frame().values;
|
|
940
|
+
if (!values)
|
|
941
|
+
return c;
|
|
942
|
+
return { ...c, series: c.series.map((s, i) => ({ ...s, data: values[i] ?? s.data })) };
|
|
943
|
+
}, /* @ts-ignore */
|
|
944
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
945
|
+
this.tooltip = computed(() => {
|
|
946
|
+
const content = this.tipContent();
|
|
947
|
+
const pos = this.frame().tip;
|
|
948
|
+
if (!content || !pos)
|
|
949
|
+
return null;
|
|
950
|
+
return { x: (pos.x / this.width()) * 100, y: (pos.y / this.height()) * 100, ...content };
|
|
951
|
+
}, /* @ts-ignore */
|
|
952
|
+
...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
953
|
+
/**
|
|
954
|
+
* Smuga światła: pasmo gradientu biegnące wzdłuż osi kategorii razem z czołem fali (w poziomych
|
|
955
|
+
* słupkach z góry na dół). Współrzędne końców gradientu w jednostkach viewBoxa.
|
|
956
|
+
*/
|
|
957
|
+
this.sheen = computed(() => {
|
|
958
|
+
const s = this.frame().sheen;
|
|
959
|
+
if (!s)
|
|
960
|
+
return null;
|
|
961
|
+
const horizontal = this.config().type === 'bar' && this.config().orientation === 'horizontal';
|
|
962
|
+
const plot = plotArea(this.width(), this.height(), horizontal ? HORIZONTAL_INSETS : VERTICAL_INSETS);
|
|
963
|
+
const start = horizontal ? plot.y : plot.x;
|
|
964
|
+
const length = horizontal ? plot.height : plot.width;
|
|
965
|
+
const mid = start - SHEEN_HALF + (length + 2 * SHEEN_HALF) * s.progress;
|
|
966
|
+
return horizontal
|
|
967
|
+
? { x1: 0, x2: 0, y1: mid - SHEEN_HALF, y2: mid + SHEEN_HALF, opacity: s.opacity }
|
|
968
|
+
: { x1: mid - SHEEN_HALF, x2: mid + SHEEN_HALF, y1: 0, y2: 0, opacity: s.opacity };
|
|
969
|
+
}, /* @ts-ignore */
|
|
970
|
+
...(ngDevMode ? [{ debugName: "sheen" }] : /* istanbul ignore next */ []));
|
|
653
971
|
// --- Znormalizowana konfiguracja ---
|
|
654
972
|
this.type = computed(() => this.config().type, /* @ts-ignore */
|
|
655
973
|
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
@@ -695,7 +1013,7 @@ class KptChart {
|
|
|
695
1013
|
...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
|
|
696
1014
|
// --- Wykres liniowy ---
|
|
697
1015
|
this.lineVm = computed(() => {
|
|
698
|
-
const c = this.
|
|
1016
|
+
const c = this.view();
|
|
699
1017
|
if (c.type !== 'line')
|
|
700
1018
|
return null;
|
|
701
1019
|
const h = this.hidden();
|
|
@@ -704,12 +1022,14 @@ class KptChart {
|
|
|
704
1022
|
for (const { s } of active)
|
|
705
1023
|
values.push(...s.data);
|
|
706
1024
|
const [mn, mx] = extent(values.length ? values : [0]);
|
|
707
|
-
const
|
|
1025
|
+
const domain = this.frame().domain;
|
|
1026
|
+
const scale = domain ? domainScale(domain.target, domain.min, domain.max) : niceScale(Math.min(0, mn), Math.max(0, mx), 5);
|
|
708
1027
|
const plot = plotArea(this.width(), this.height(), VERTICAL_INSETS);
|
|
709
1028
|
const yScale = linearScale(scale.min, scale.max, plot.y + plot.height, plot.y);
|
|
710
1029
|
const n = c.labels.length;
|
|
711
1030
|
const xAt = (i) => (n > 1 ? plot.x + (i / (n - 1)) * plot.width : plot.x + plot.width / 2);
|
|
712
1031
|
const baseline = yScale(0);
|
|
1032
|
+
const interpolation = c.interpolation ?? 'linear';
|
|
713
1033
|
const series = active.map(({ s, i }) => {
|
|
714
1034
|
const pts = s.data.map((v, idx) => ({ x: xAt(idx), y: yScale(v), value: v, label: c.labels[idx] ?? '' }));
|
|
715
1035
|
const color = seriesColor(s.color, i);
|
|
@@ -717,11 +1037,35 @@ class KptChart {
|
|
|
717
1037
|
key: 'ser:' + s.name,
|
|
718
1038
|
name: s.name,
|
|
719
1039
|
color,
|
|
720
|
-
path: linePath(pts,
|
|
721
|
-
area: c.area ? areaPath(pts, baseline,
|
|
1040
|
+
path: linePath(pts, interpolation),
|
|
1041
|
+
area: c.area ? areaPath(pts, baseline, interpolation) : null,
|
|
722
1042
|
points: pts,
|
|
723
1043
|
};
|
|
724
1044
|
});
|
|
1045
|
+
// Duch poprzedniego stanu w bieżącej skali, odcinki zmiany i różnice nad punktami.
|
|
1046
|
+
const ghostState = this.frame().ghost;
|
|
1047
|
+
const ghost = ghostState
|
|
1048
|
+
? active.map(({ s, i }, k) => {
|
|
1049
|
+
const prev = ghostState.prev[i] ?? [];
|
|
1050
|
+
const next = ghostState.next[i] ?? [];
|
|
1051
|
+
const gpts = prev.map((v, idx) => ({ x: xAt(idx), y: yScale(v) }));
|
|
1052
|
+
const cur = series[k]?.points ?? [];
|
|
1053
|
+
return {
|
|
1054
|
+
// numer przejścia w kluczu: nowe przejście = nowe elementy, więc ich animacja CSS rusza od nowa
|
|
1055
|
+
key: ghostState.id + ':ser:' + s.name,
|
|
1056
|
+
path: linePath(gpts, interpolation),
|
|
1057
|
+
ticks: gpts.map((p, idx) => ({ x: p.x, y1: p.y, y2: cur[idx]?.y ?? p.y, kind: deltaKind(prev[idx] ?? 0, next[idx] ?? 0) })),
|
|
1058
|
+
chips: next.flatMap((v, idx) => {
|
|
1059
|
+
const before = prev[idx] ?? 0;
|
|
1060
|
+
if (!significantDelta(before, v))
|
|
1061
|
+
return [];
|
|
1062
|
+
const kind = deltaKind(before, v);
|
|
1063
|
+
const y = cur[idx]?.y ?? 0;
|
|
1064
|
+
return [{ x: xAt(idx), y: kind === 'up' ? y - 12 : y + 20, text: signed(v - before), kind, index: idx }];
|
|
1065
|
+
}),
|
|
1066
|
+
};
|
|
1067
|
+
})
|
|
1068
|
+
: [];
|
|
725
1069
|
return {
|
|
726
1070
|
plot,
|
|
727
1071
|
series,
|
|
@@ -729,19 +1073,22 @@ class KptChart {
|
|
|
729
1073
|
valueLabels: scale.ticks.map((t) => ({ x: plot.x - 8, y: yScale(t) + 3, text: formatNumber(t), anchor: 'end' })),
|
|
730
1074
|
catLabels: c.labels.map((l, idx) => ({ x: xAt(idx), y: plot.y + plot.height + 18, text: l, anchor: 'middle' })),
|
|
731
1075
|
showPoints: c.points ?? true,
|
|
1076
|
+
ghost,
|
|
732
1077
|
};
|
|
733
1078
|
}, /* @ts-ignore */
|
|
734
1079
|
...(ngDevMode ? [{ debugName: "lineVm" }] : /* istanbul ignore next */ []));
|
|
735
1080
|
// --- Wykres słupkowy ---
|
|
736
1081
|
this.barVm = computed(() => {
|
|
737
|
-
const c = this.
|
|
1082
|
+
const c = this.view();
|
|
738
1083
|
if (c.type !== 'bar')
|
|
739
1084
|
return null;
|
|
740
1085
|
const h = this.hidden();
|
|
741
1086
|
const orientation = c.orientation ?? 'vertical';
|
|
742
1087
|
const active = c.series.map((s, i) => ({ s, i })).filter(({ s }) => !h.has('ser:' + s.name));
|
|
743
1088
|
const plot = plotArea(this.width(), this.height(), orientation === 'vertical' ? VERTICAL_INSETS : HORIZONTAL_INSETS);
|
|
744
|
-
const
|
|
1089
|
+
const domain = this.frame().domain;
|
|
1090
|
+
const radius = c.borderRadius ?? 4;
|
|
1091
|
+
const layout = barLayout(active.map(({ s }) => s.data), c.labels.length, plot, orientation, radius, domain ? domainScale(domain.target, domain.min, domain.max) : undefined);
|
|
745
1092
|
const colors = active.map(({ s, i }) => seriesColor(s.color, i));
|
|
746
1093
|
const names = active.map(({ s }) => s.name);
|
|
747
1094
|
const bars = layout.bars.map((b, order) => {
|
|
@@ -757,32 +1104,53 @@ class KptChart {
|
|
|
757
1104
|
tipX,
|
|
758
1105
|
tipY,
|
|
759
1106
|
index: order,
|
|
1107
|
+
cat: b.categoryIndex,
|
|
760
1108
|
};
|
|
761
1109
|
});
|
|
1110
|
+
// Słupki-duchy w tej samej skali i odcinki zmiany od końca ducha do końca bieżącego słupka.
|
|
1111
|
+
const ghostState = this.frame().ghost;
|
|
1112
|
+
let ghost = [];
|
|
1113
|
+
if (ghostState) {
|
|
1114
|
+
const prevRows = active.map(({ i }) => ghostState.prev[i] ?? []);
|
|
1115
|
+
const nextRows = active.map(({ i }) => ghostState.next[i] ?? []);
|
|
1116
|
+
const ghostLayout = barLayout(prevRows, c.labels.length, plot, orientation, radius, layout.scale);
|
|
1117
|
+
ghost = ghostLayout.bars.map((g, k) => {
|
|
1118
|
+
const cur = layout.bars[k] ?? g;
|
|
1119
|
+
const kind = deltaKind(prevRows[g.seriesIndex]?.[g.categoryIndex] ?? 0, nextRows[g.seriesIndex]?.[g.categoryIndex] ?? 0);
|
|
1120
|
+
const delta = orientation === 'vertical'
|
|
1121
|
+
? span(barEnd(g, 'vertical'), barEnd(cur, 'vertical'), (a, b) => ({ x: cur.rect.x, y: a, width: cur.rect.width, height: b - a }))
|
|
1122
|
+
: span(barEnd(g, 'horizontal'), barEnd(cur, 'horizontal'), (a, b) => ({ x: a, y: cur.rect.y, width: b - a, height: cur.rect.height }));
|
|
1123
|
+
return { key: ghostState.id + ':ser:' + names[g.seriesIndex] + '#' + k, path: g.path, delta: { ...delta, kind } };
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
762
1126
|
const cat = orientation === 'vertical'
|
|
763
1127
|
? bandScale(c.labels.length, plot.x, plot.x + plot.width, 0.2)
|
|
764
1128
|
: bandScale(c.labels.length, plot.y, plot.y + plot.height, 0.2);
|
|
765
1129
|
if (orientation === 'vertical') {
|
|
766
1130
|
return {
|
|
767
1131
|
orientation,
|
|
1132
|
+
plot,
|
|
768
1133
|
bars,
|
|
769
1134
|
grid: layout.ticks.map((t) => ({ x1: plot.x, y1: t.pos, x2: plot.x + plot.width, y2: t.pos })),
|
|
770
1135
|
valueLabels: layout.ticks.map((t) => ({ x: plot.x - 8, y: t.pos + 3, text: formatNumber(t.value), anchor: 'end' })),
|
|
771
1136
|
catLabels: c.labels.map((l, idx) => ({ x: cat.center(idx), y: plot.y + plot.height + 18, text: l, anchor: 'middle' })),
|
|
1137
|
+
ghost,
|
|
772
1138
|
};
|
|
773
1139
|
}
|
|
774
1140
|
return {
|
|
775
1141
|
orientation,
|
|
1142
|
+
plot,
|
|
776
1143
|
bars,
|
|
777
1144
|
grid: layout.ticks.map((t) => ({ x1: t.pos, y1: plot.y, x2: t.pos, y2: plot.y + plot.height })),
|
|
778
1145
|
valueLabels: layout.ticks.map((t) => ({ x: t.pos, y: plot.y + plot.height + 18, text: formatNumber(t.value), anchor: 'middle' })),
|
|
779
1146
|
catLabels: c.labels.map((l, idx) => ({ x: plot.x - 8, y: cat.center(idx) + 3, text: l, anchor: 'end' })),
|
|
1147
|
+
ghost,
|
|
780
1148
|
};
|
|
781
1149
|
}, /* @ts-ignore */
|
|
782
1150
|
...(ngDevMode ? [{ debugName: "barVm" }] : /* istanbul ignore next */ []));
|
|
783
1151
|
// --- Pie / Doughnut / Polar Area ---
|
|
784
1152
|
this.pieVm = computed(() => {
|
|
785
|
-
const c = this.
|
|
1153
|
+
const c = this.view();
|
|
786
1154
|
if (c.type !== 'pie' && c.type !== 'doughnut' && c.type !== 'polarArea')
|
|
787
1155
|
return null;
|
|
788
1156
|
const h = this.hidden();
|
|
@@ -806,7 +1174,7 @@ class KptChart {
|
|
|
806
1174
|
...(ngDevMode ? [{ debugName: "pieVm" }] : /* istanbul ignore next */ []));
|
|
807
1175
|
// --- Radar ---
|
|
808
1176
|
this.radarVm = computed(() => {
|
|
809
|
-
const c = this.
|
|
1177
|
+
const c = this.view();
|
|
810
1178
|
if (c.type !== 'radar')
|
|
811
1179
|
return null;
|
|
812
1180
|
const h = this.hidden();
|
|
@@ -852,40 +1220,112 @@ class KptChart {
|
|
|
852
1220
|
const cat = vm.catLabels[i];
|
|
853
1221
|
if (!cat)
|
|
854
1222
|
return null;
|
|
1223
|
+
// Prowadnica i pigułka jadą razem z dymkiem.
|
|
1224
|
+
const x = this.frame().tip?.x ?? cat.x;
|
|
855
1225
|
const w = Math.max(28, cat.text.length * 7 + 16);
|
|
856
1226
|
return {
|
|
857
|
-
x
|
|
1227
|
+
x,
|
|
858
1228
|
y1: vm.plot.y,
|
|
859
1229
|
y2: vm.plot.y + vm.plot.height,
|
|
860
1230
|
text: cat.text,
|
|
861
|
-
labelX:
|
|
1231
|
+
labelX: x,
|
|
862
1232
|
labelY: cat.y,
|
|
863
|
-
pillX:
|
|
1233
|
+
pillX: x - w / 2,
|
|
864
1234
|
pillY: cat.y - 13,
|
|
865
1235
|
pillW: w,
|
|
866
1236
|
pillH: 18,
|
|
867
1237
|
};
|
|
868
1238
|
}, /* @ts-ignore */
|
|
869
1239
|
...(ngDevMode ? [{ debugName: "crosshair" }] : /* istanbul ignore next */ []));
|
|
1240
|
+
// Nowe wartości w tym samym wykresie -> przejście; inny wykres -> zwykłe wejście z CSS.
|
|
1241
|
+
effect(() => {
|
|
1242
|
+
const next = this.config();
|
|
1243
|
+
untracked(() => this.onConfig(next));
|
|
1244
|
+
});
|
|
1245
|
+
inject(DestroyRef).onDestroy(() => {
|
|
1246
|
+
this.motion.stop();
|
|
1247
|
+
clearTimeout(this.hideTimer);
|
|
1248
|
+
});
|
|
870
1249
|
}
|
|
871
1250
|
// --- Zdarzenia ---
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1251
|
+
/**
|
|
1252
|
+
* Linia i słupki: najbliższa kategoria pod kursorem w całym obszarze wykresu. Dymek ma wiersze
|
|
1253
|
+
* wszystkich widocznych serii i jedzie między kategoriami - przerwa między punktami go nie gasi.
|
|
1254
|
+
*/
|
|
1255
|
+
onCategoryMove(event) {
|
|
1256
|
+
const svg = event.currentTarget?.ownerSVGElement;
|
|
1257
|
+
const matrix = svg?.getScreenCTM();
|
|
1258
|
+
if (!matrix)
|
|
1259
|
+
return;
|
|
1260
|
+
const p = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix.inverse());
|
|
1261
|
+
const line = this.lineVm();
|
|
1262
|
+
if (line) {
|
|
1263
|
+
const idx = nearestIndex(line.catLabels.map((l) => l.x), p.x);
|
|
1264
|
+
if (this.keepTip(idx))
|
|
1265
|
+
return;
|
|
1266
|
+
const points = line.series.map((s) => ({ s, pt: s.points[idx] })).filter((e) => e.pt);
|
|
1267
|
+
const top = points.reduce((a, b) => (b.pt.y < a.pt.y ? b : a), points[0]);
|
|
1268
|
+
if (!top)
|
|
1269
|
+
return;
|
|
1270
|
+
const label = this.config().labels[idx] ?? '';
|
|
1271
|
+
const moved = this.tooltip() !== null && this.lastTipIndex !== null;
|
|
1272
|
+
this.activeIndex.set(idx);
|
|
1273
|
+
this.openTip(top.pt.x, top.pt.y, label, points.map((e) => this.row(e.s.name, label, e.pt.value, e.s.color)), idx);
|
|
1274
|
+
if (moved && this.tipMotion())
|
|
1275
|
+
this.ripple.set([{ id: ++nextRippleId, x: top.pt.x, y: top.pt.y, color: top.s.color }]);
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
const bars = this.barVm();
|
|
1279
|
+
if (!bars)
|
|
1280
|
+
return;
|
|
1281
|
+
const vertical = bars.orientation === 'vertical';
|
|
1282
|
+
const idx = nearestIndex(bars.catLabels.map((l) => (vertical ? l.x : l.y - 3)), vertical ? p.x : p.y);
|
|
1283
|
+
if (this.keepTip(idx))
|
|
1284
|
+
return;
|
|
1285
|
+
const group = bars.bars.filter((b) => b.cat === idx);
|
|
1286
|
+
if (!group.length)
|
|
1287
|
+
return;
|
|
1288
|
+
const label = this.config().labels[idx] ?? '';
|
|
1289
|
+
const center = bars.catLabels[idx];
|
|
1290
|
+
const x = vertical ? (center?.x ?? group[0].tipX) : Math.max(...group.map((b) => b.tipX));
|
|
1291
|
+
const y = vertical ? Math.min(...group.map((b) => b.tipY)) : (center ? center.y - 3 : group[0].tipY);
|
|
1292
|
+
this.openTip(x, y, label, group.map((b) => this.row(b.name, label, b.value, b.color)), idx);
|
|
879
1293
|
}
|
|
1294
|
+
/** Wycinki i radar: dymek jednego elementu pod kursorem. */
|
|
880
1295
|
showTip(tipX, tipY, name, label, value, color) {
|
|
1296
|
+
this.openTip(tipX, tipY, label, [this.row(name, label, value, color)], null);
|
|
1297
|
+
}
|
|
1298
|
+
/** Ten sam punkt pod kursorem - dymek zostaje (i nie zgaśnie, jeśli właśnie miał). */
|
|
1299
|
+
keepTip(idx) {
|
|
1300
|
+
if (this.tipContent() === null || this.lastTipIndex !== idx)
|
|
1301
|
+
return false;
|
|
1302
|
+
clearTimeout(this.hideTimer);
|
|
1303
|
+
return true;
|
|
1304
|
+
}
|
|
1305
|
+
row(name, label, value, color) {
|
|
1306
|
+
const fmt = this.config().tooltip?.format;
|
|
1307
|
+
return { name, value: fmt ? fmt({ series: name, label, value }) : formatNumber(value), color };
|
|
1308
|
+
}
|
|
1309
|
+
openTip(x, y, label, rows, index) {
|
|
881
1310
|
if (this.config().tooltip?.enabled === false)
|
|
882
1311
|
return;
|
|
883
|
-
|
|
884
|
-
const
|
|
885
|
-
|
|
1312
|
+
clearTimeout(this.hideTimer);
|
|
1313
|
+
const first = this.tipContent() === null;
|
|
1314
|
+
const animate = this.tipMotion();
|
|
1315
|
+
const dir = first || index === null || this.lastTipIndex === null ? 0 : Math.sign(index - this.lastTipIndex);
|
|
1316
|
+
this.lastTipIndex = index;
|
|
1317
|
+
this.tipContent.set({ label, rows, dir, live: !first && animate });
|
|
1318
|
+
this.motion.moveTip(x, y, first || !animate);
|
|
886
1319
|
}
|
|
887
1320
|
hideTip() {
|
|
888
|
-
this.
|
|
1321
|
+
clearTimeout(this.hideTimer);
|
|
1322
|
+
this.hideTimer = setTimeout(() => {
|
|
1323
|
+
this.tipContent.set(null);
|
|
1324
|
+
this.activeIndex.set(null);
|
|
1325
|
+
this.lastTipIndex = null;
|
|
1326
|
+
this.ripple.set([]);
|
|
1327
|
+
this.motion.hideTip();
|
|
1328
|
+
}, TIP_HIDE_DELAY);
|
|
889
1329
|
}
|
|
890
1330
|
onToggle(key) {
|
|
891
1331
|
const set = new Set(this.hidden());
|
|
@@ -903,38 +1343,74 @@ class KptChart {
|
|
|
903
1343
|
const hi = this.highlighted();
|
|
904
1344
|
return hi !== null && hi !== key;
|
|
905
1345
|
}
|
|
1346
|
+
// --- Ruch ---
|
|
1347
|
+
/** Ruch sterowany z kodu: wyłącza go config, globalne `provideKptMotion` i systemowe "ogranicz ruch". */
|
|
1348
|
+
motionAllowed() {
|
|
1349
|
+
if (!this.anim().enabled || this.motionConfig?.enabled === false)
|
|
1350
|
+
return false;
|
|
1351
|
+
return typeof matchMedia === 'undefined' || !matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
1352
|
+
}
|
|
1353
|
+
tipMotion() {
|
|
1354
|
+
return this.motionAllowed() && this.config().tooltip?.motion !== false;
|
|
1355
|
+
}
|
|
1356
|
+
onConfig(next) {
|
|
1357
|
+
const prev = this.prevConfig;
|
|
1358
|
+
this.prevConfig = next;
|
|
1359
|
+
if (!prev || !sameChartShape(prev, next)) {
|
|
1360
|
+
this.motion.reset();
|
|
1361
|
+
this.tipContent.set(null);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
if (prev.series.every((s, i) => s.data.every((v, k) => v === next.series[i]?.data[k])))
|
|
1365
|
+
return;
|
|
1366
|
+
if (!this.motionAllowed() || next.animation?.update === false) {
|
|
1367
|
+
this.motion.cancelData();
|
|
1368
|
+
return;
|
|
1369
|
+
}
|
|
1370
|
+
const from = this.motion.current(prev.series.map((s) => s.data));
|
|
1371
|
+
const to = next.series.map((s) => [...s.data]);
|
|
1372
|
+
const withAxis = next.type === 'line' || next.type === 'bar';
|
|
1373
|
+
const hidden = this.hidden();
|
|
1374
|
+
const visible = (rows) => rows.filter((_, i) => !hidden.has('ser:' + (next.series[i]?.name ?? '')));
|
|
1375
|
+
const scales = withAxis
|
|
1376
|
+
? { start: dataScale(visible(from)), hold: dataScale([holdDomain(visible(from), visible(to))]), end: dataScale(visible(to)) }
|
|
1377
|
+
: null;
|
|
1378
|
+
this.motion.transition(from, to, { delta: withAxis && next.animation?.delta !== false, scales });
|
|
1379
|
+
}
|
|
906
1380
|
static { this.ɵfac = function KptChart_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChart)(); }; }
|
|
907
1381
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChart, selectors: [["kpt-chart"]], hostAttrs: [1, "kpt-chart-host"], hostVars: 8, hostBindings: function KptChart_HostBindings(rf, ctx) { if (rf & 2) {
|
|
908
1382
|
i0.ɵɵstyleProp("--%NS%kpt-chart-duration", ctx.anim().duration + "ms")("--%NS%kpt-chart-stagger", ctx.anim().stagger + "ms")("--%NS%kpt-chart-delay", ctx.anim().delay + "ms");
|
|
909
1383
|
i0.ɵɵclassProp("kpt-chart--no-anim", !ctx.anim().enabled);
|
|
910
|
-
} }, inputs: { config: [1, "config"], width: [1, "width"], height: [1, "height"] }, decls:
|
|
1384
|
+
} }, inputs: { config: [1, "config"], width: [1, "width"], height: [1, "height"] }, decls: 26, vars: 14, consts: [[1, "kpt-chart"], [1, "kpt-chart__title", 3, "text-align", "color", "font-family", "font-size", "font-weight", "padding-top", "padding-bottom"], [1, "kpt-chart__subtitle", 3, "text-align", "color", "font-family", "font-size", "font-weight", "padding-top", "padding-bottom"], [1, "kpt-chart__body"], [1, "kpt-chart__canvas"], ["role", "img", "preserveAspectRatio", "xMidYMid meet", 1, "kpt-chart__svg"], [1, "kpt-chart__sr", 3, "id"], [1, "kpt-chart__sr"], ["scope", "col"], [3, "state"], [3, "items", "position", "align", "pointStyle", "title"], [1, "kpt-chart__title"], [1, "kpt-chart__subtitle"], ["gradientUnits", "userSpaceOnUse"], ["offset", "0", "stop-opacity", "0", 1, "kpt-chart__sheen-stop"], ["offset", "0.5", "stop-opacity", "0.95", 1, "kpt-chart__sheen-stop"], ["offset", "1", "stop-opacity", "0", 1, "kpt-chart__sheen-stop"], [1, "kpt-chart__grid"], [1, "kpt-chart__gridline"], [1, "kpt-chart__crosshair"], [1, "kpt-chart__axis"], [1, "kpt-chart__cat-active"], ["aria-hidden", "true", 1, "kpt-chart__ghost"], [1, "kpt-chart__series", 3, "kpt-chart__series--dim"], ["r", "5", "aria-hidden", "true", 1, "kpt-chart__ripple", 3, "stroke"], [1, "kpt-chart__hover", 3, "pointermove", "pointerleave"], ["text-anchor", "middle"], [1, "kpt-chart__ghost-line"], [1, "kpt-chart__delta"], [1, "kpt-chart__series"], [1, "kpt-chart__area", 3, "fill"], ["pathLength", "1", 1, "kpt-chart__line"], [1, "kpt-chart__area"], ["r", "4", 1, "kpt-chart__point", 3, "kpt-chart__point--active", "fill", "--%NS%kpt-chart-i"], ["r", "4", 1, "kpt-chart__point"], ["aria-hidden", "true", 1, "kpt-chart__sheen-line", 3, "opacity"], ["aria-hidden", "true", 1, "kpt-chart__sheen-line"], ["text-anchor", "middle", "aria-hidden", "true", 1, "kpt-chart__chip", 3, "--%NS%kpt-chart-i"], ["text-anchor", "middle", "aria-hidden", "true", 1, "kpt-chart__chip"], ["r", "5", "aria-hidden", "true", 1, "kpt-chart__ripple"], [1, "kpt-chart__bars"], [1, "kpt-chart__bar", 3, "kpt-chart__series--dim", "fill", "--%NS%kpt-chart-i"], [1, "kpt-chart__ghost-bar"], [1, "kpt-chart__bar"], ["rx", "2", 1, "kpt-chart__delta-bar"], ["aria-hidden", "true", 1, "kpt-chart__sheen-bar", 3, "opacity"], ["aria-hidden", "true", 1, "kpt-chart__sheen-bar"], [1, "kpt-chart__ring"], [1, "kpt-chart__series", "kpt-chart__radar", 3, "kpt-chart__series--dim"], [1, "kpt-chart__series", "kpt-chart__radar"], [1, "kpt-chart__radar-area"], ["r", "4", 1, "kpt-chart__point", 3, "fill", "--%NS%kpt-chart-i"], ["r", "4", 1, "kpt-chart__point", 3, "pointerenter", "pointerleave"], [1, "kpt-chart__slices"], [1, "kpt-chart__slice", 3, "kpt-chart__series--dim", "fill", "--%NS%kpt-chart-i"], [1, "kpt-chart__slice", 3, "pointerenter", "pointerleave"], ["scope", "row"], [3, "seriesToggle", "highlight", "items", "position", "align", "pointStyle", "title"]], template: function KptChart_Template(rf, ctx) { if (rf & 1) {
|
|
911
1385
|
i0.ɵɵelementStart(0, "div", 0);
|
|
912
1386
|
i0.ɵɵconditionalCreate(1, KptChart_Conditional_1_Template, 2, 15, "div", 1);
|
|
913
1387
|
i0.ɵɵconditionalCreate(2, KptChart_Conditional_2_Template, 2, 15, "div", 2);
|
|
914
1388
|
i0.ɵɵelementStart(3, "div", 3)(4, "div", 4);
|
|
915
1389
|
i0.ɵɵnamespaceSVG();
|
|
916
1390
|
i0.ɵɵelementStart(5, "svg", 5);
|
|
917
|
-
i0.ɵɵconditionalCreate(6,
|
|
1391
|
+
i0.ɵɵconditionalCreate(6, KptChart_Conditional_6_Template, 5, 5, ":svg:defs");
|
|
1392
|
+
i0.ɵɵconditionalCreate(7, KptChart_Case_7_Template, 1, 1)(8, KptChart_Case_8_Template, 1, 1)(9, KptChart_Case_9_Template, 1, 1)(10, KptChart_Case_10_Template, 1, 1);
|
|
918
1393
|
i0.ɵɵelementEnd();
|
|
919
|
-
i0.ɵɵconditionalCreate(
|
|
1394
|
+
i0.ɵɵconditionalCreate(11, KptChart_Conditional_11_Template, 2, 2, "p", 6);
|
|
920
1395
|
i0.ɵɵnamespaceHTML();
|
|
921
|
-
i0.ɵɵelementStart(
|
|
922
|
-
i0.ɵɵtext(
|
|
1396
|
+
i0.ɵɵelementStart(12, "table", 7)(13, "caption");
|
|
1397
|
+
i0.ɵɵtext(14);
|
|
923
1398
|
i0.ɵɵelementEnd();
|
|
924
|
-
i0.ɵɵelementStart(
|
|
925
|
-
i0.ɵɵtext(
|
|
1399
|
+
i0.ɵɵelementStart(15, "thead")(16, "tr")(17, "th", 8);
|
|
1400
|
+
i0.ɵɵtext(18);
|
|
926
1401
|
i0.ɵɵelementEnd();
|
|
927
|
-
i0.ɵɵrepeaterCreate(
|
|
1402
|
+
i0.ɵɵrepeaterCreate(19, KptChart_For_20_Template, 2, 1, "th", 8, i0.ɵɵrepeaterTrackByIndex);
|
|
928
1403
|
i0.ɵɵelementEnd()();
|
|
929
|
-
i0.ɵɵelementStart(
|
|
930
|
-
i0.ɵɵrepeaterCreate(
|
|
1404
|
+
i0.ɵɵelementStart(21, "tbody");
|
|
1405
|
+
i0.ɵɵrepeaterCreate(22, KptChart_For_23_Template, 5, 1, "tr", null, i0.ɵɵrepeaterTrackByIndex);
|
|
931
1406
|
i0.ɵɵelementEnd()();
|
|
932
|
-
i0.ɵɵelement(
|
|
1407
|
+
i0.ɵɵelement(24, "kpt-chart-tooltip", 9);
|
|
933
1408
|
i0.ɵɵelementEnd();
|
|
934
|
-
i0.ɵɵconditionalCreate(
|
|
1409
|
+
i0.ɵɵconditionalCreate(25, KptChart_Conditional_25_Template, 1, 5, "kpt-chart-legend", 10);
|
|
935
1410
|
i0.ɵɵelementEnd()();
|
|
936
1411
|
} if (rf & 2) {
|
|
937
1412
|
let tmp_6_0;
|
|
1413
|
+
let tmp_7_0;
|
|
938
1414
|
i0.ɵɵattribute("data-legend", ctx.legendOpts().display ? ctx.legendOpts().position : null);
|
|
939
1415
|
i0.ɵɵadvance();
|
|
940
1416
|
i0.ɵɵconditional(ctx.titleOpts()?.display && ctx.titleOpts()?.text ? 1 : -1);
|
|
@@ -943,9 +1419,11 @@ class KptChart {
|
|
|
943
1419
|
i0.ɵɵadvance(3);
|
|
944
1420
|
i0.ɵɵattribute("viewBox", "0 0 " + ctx.width() + " " + ctx.height())("aria-label", ctx.accessibleName())("aria-describedby", ctx.config().description ? ctx.descId : null);
|
|
945
1421
|
i0.ɵɵadvance();
|
|
946
|
-
i0.ɵɵconditional((tmp_6_0 = ctx.
|
|
1422
|
+
i0.ɵɵconditional((tmp_6_0 = ctx.sheen()) ? 6 : -1, tmp_6_0);
|
|
1423
|
+
i0.ɵɵadvance();
|
|
1424
|
+
i0.ɵɵconditional((tmp_7_0 = ctx.type()) === "line" ? 7 : tmp_7_0 === "bar" ? 8 : tmp_7_0 === "radar" ? 9 : 10);
|
|
947
1425
|
i0.ɵɵadvance(4);
|
|
948
|
-
i0.ɵɵconditional(ctx.config().description ?
|
|
1426
|
+
i0.ɵɵconditional(ctx.config().description ? 11 : -1);
|
|
949
1427
|
i0.ɵɵadvance(3);
|
|
950
1428
|
i0.ɵɵtextInterpolate2("", ctx.i18n.t("chart.dataTable"), ": ", ctx.accessibleName());
|
|
951
1429
|
i0.ɵɵadvance(4);
|
|
@@ -957,8 +1435,8 @@ class KptChart {
|
|
|
957
1435
|
i0.ɵɵadvance(2);
|
|
958
1436
|
i0.ɵɵproperty("state", ctx.tooltip());
|
|
959
1437
|
i0.ɵɵadvance();
|
|
960
|
-
i0.ɵɵconditional(ctx.legendOpts().display ?
|
|
961
|
-
} }, dependencies: [KptChartLegend, KptChartTooltip], styles: ["@layer kpt.components{.kpt-chart-host{display:block;--%NS%kpt-chart-duration: .4s;--%NS%kpt-chart-stagger: 60ms;--%NS%kpt-chart-delay: 0ms;--%NS%kpt-chart-ease: cubic-bezier(.25, 1, .5, 1)}.kpt-chart{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem);color:var(--%NS%kpt-color-on-surface)}.kpt-chart__title{font-size:var(--%NS%kpt-font-size-lg, 1.125rem);font-weight:var(--%NS%kpt-font-weight-semibold, 600);color:var(--%NS%kpt-color-on-surface)}.kpt-chart__subtitle{font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted, #6b7280)}.kpt-chart__body{display:flex;gap:var(--%NS%kpt-space-3, .75rem);align-items:center;min-width:0}.kpt-chart[data-legend=top] .kpt-chart__body,.kpt-chart[data-legend=bottom] .kpt-chart__body{flex-direction:column}.kpt-chart[data-legend=top] .kpt-chart-legend-host,.kpt-chart[data-legend=left] .kpt-chart-legend-host{order:-1}.kpt-chart__canvas{position:relative;flex:1 1 auto;min-width:0;width:100%}.kpt-chart__svg{display:block;width:100%;height:auto}.kpt-chart__gridline{stroke:var(--%NS%kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__ring{fill:none;stroke:var(--%NS%kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__axis text{fill:var(--%NS%kpt-color-on-surface-muted, #6b7280);font-size:11px;font-family:var(--%NS%kpt-font-family-sans)}.kpt-chart__crosshair{stroke:var(--%NS%kpt-color-border-strong);stroke-width:1;stroke-dasharray:4 4;opacity:.75;pointer-events:none}.kpt-chart__cat-active{pointer-events:none}.kpt-chart__cat-active rect{fill:var(--%NS%kpt-color-on-surface)}.kpt-chart__cat-active text{fill:var(--%NS%kpt-color-surface);font-size:11px;font-weight:var(--%NS%kpt-font-weight-medium, 500);font-family:var(--%NS%kpt-font-family-sans)}.kpt-chart__series,.kpt-chart__bar,.kpt-chart__slice{transition:opacity .2s var(--%NS%kpt-chart-ease)}.kpt-chart__series--dim{opacity:.22}.kpt-chart__line{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.kpt-chart__area{stroke:none;opacity:.15}.kpt-chart__point{stroke:var(--%NS%kpt-color-surface);stroke-width:2;cursor:pointer;transition:transform .15s var(--%NS%kpt-chart-ease);transform-box:fill-box;transform-origin:center}.kpt-chart__point:hover{transform:scale(1.4)}.kpt-chart__point--active{transform:scale(1.5)}.kpt-chart__hit{fill:transparent;pointer-events:all;cursor:pointer}.kpt-chart__bar{cursor:pointer}.kpt-chart__slice{cursor:pointer;stroke:var(--%NS%kpt-color-surface);stroke-width:1.5}.kpt-chart__radar-area{fill-opacity:.18;stroke-width:2;stroke-linejoin:round}.kpt-chart__legend-title{font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);color:var(--%NS%kpt-color-on-surface-muted);margin-bottom:var(--%NS%kpt-space-1, .25rem)}.kpt-chart__legend-list{display:flex;flex-wrap:wrap;gap:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-4, 1rem);align-items:center;justify-content:center;margin:0;padding:0;list-style:none}.kpt-chart__legend[data-align=start] .kpt-chart__legend-list{justify-content:flex-start}.kpt-chart__legend[data-align=end] .kpt-chart__legend-list{justify-content:flex-end}.kpt-chart__legend[data-position=left] .kpt-chart__legend-list,.kpt-chart__legend[data-position=right] .kpt-chart__legend-list{flex-direction:column;align-items:flex-start}.kpt-chart__legend-item{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);padding:0;border:0;background:none;cursor:pointer;font:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-chart__legend-item--hidden{opacity:.45}.kpt-chart__legend-item--hidden .kpt-chart__legend-label{text-decoration:line-through}.kpt-chart__legend-marker{display:inline-block;width:12px;height:12px;background:var(--%NS%kpt-chart-legend-color);flex:none}.kpt-chart__legend-marker[data-style=circle]{border-radius:var(--%NS%kpt-radius-full, 9999px)}.kpt-chart__legend-marker[data-style=rect]{border-radius:var(--%NS%kpt-radius-sm, .25rem)}.kpt-chart__legend-marker[data-style=rectRot]{transform:rotate(45deg);border-radius:2px}.kpt-chart__legend-marker[data-style=triangle]{background:none;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:12px solid var(--%NS%kpt-chart-legend-color)}.kpt-chart__legend-marker[data-style=line]{height:3px;border-radius:var(--%NS%kpt-radius-full, 9999px)}.kpt-chart__tooltip{position:absolute;transform:translate(-50%,calc(-100% - 10px));pointer-events:none;background:var(--%NS%kpt-color-surface-raised, var(--%NS%kpt-color-surface));color:var(--%NS%kpt-color-on-surface);border:1px solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:0 4px 16px #0000001f;padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);white-space:nowrap;z-index:2}.kpt-chart__tooltip--flip{transform:translate(-50%,12px)}.kpt-chart__tooltip-title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);margin-bottom:2px}.kpt-chart__tooltip-row{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-chart__tooltip-dot{width:8px;height:8px;border-radius:var(--%NS%kpt-radius-full, 9999px);flex:none}.kpt-chart__tooltip-name{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-chart__tooltip-val{margin-left:auto;font-weight:var(--%NS%kpt-font-weight-medium, 500)}.kpt-chart__line{stroke-dasharray:1;stroke-dashoffset:1;animation:kpt-chart-draw var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) var(--%NS%kpt-chart-delay) forwards}.kpt-chart__area{animation:kpt-chart-fade var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) var(--%NS%kpt-chart-delay) backwards}.kpt-chart__point{animation:kpt-chart-fade var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-duration) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=vertical] .kpt-chart__bar{transform-box:fill-box;transform-origin:bottom;animation:kpt-chart-grow-y var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=horizontal] .kpt-chart__bar{transform-box:fill-box;transform-origin:left;animation:kpt-chart-grow-x var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__slice,.kpt-chart__radar-area{transform-box:fill-box;transform-origin:center}.kpt-chart__slice{animation:kpt-chart-pop var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__radar-area{animation:kpt-chart-pop var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) var(--%NS%kpt-chart-delay) backwards}@keyframes kpt-chart-draw{to{stroke-dashoffset:0}}@keyframes kpt-chart-fade{0%{opacity:0}}@keyframes kpt-chart-grow-y{0%{transform:scaleY(0)}}@keyframes kpt-chart-grow-x{0%{transform:scaleX(0)}}@keyframes kpt-chart-pop{0%{transform:scale(0);opacity:0}}.kpt-chart--%NS%no-anim :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}@media(prefers-reduced-motion:reduce){.kpt-chart :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}}.kpt-chart__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}\n"], encapsulation: 2 }); }
|
|
1438
|
+
i0.ɵɵconditional(ctx.legendOpts().display ? 25 : -1);
|
|
1439
|
+
} }, dependencies: [KptChartLegend, KptChartTooltip], styles: ["@layer kpt.components{.kpt-chart-host{display:block;--%NS%kpt-chart-duration: .4s;--%NS%kpt-chart-stagger: 60ms;--%NS%kpt-chart-delay: 0ms;--%NS%kpt-chart-ease: cubic-bezier(.25, 1, .5, 1);--%NS%kpt-chart-spring: linear(0, .0521, .1747, .3278, .4847, .6288, .7513, .849, .9224, .9741, 1.0077, 1.0272, 1.0364, 1.0384, 1.0359, 1.031, 1.025, 1.019, 1.0136, 1.009, 1.0054, 1.0027, 1.0008, .9996, .9989, .9986, .9985, .9986, .9988, .9991, .9993, .9995, .9997, .9998, .9999, 1, 1, 1, 1.0001, 1.0001, 1)}.kpt-chart{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem);color:var(--%NS%kpt-color-on-surface)}.kpt-chart__title{font-size:var(--%NS%kpt-font-size-lg, 1.125rem);font-weight:var(--%NS%kpt-font-weight-semibold, 600);color:var(--%NS%kpt-color-on-surface)}.kpt-chart__subtitle{font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted, #6b7280)}.kpt-chart__body{display:flex;gap:var(--%NS%kpt-space-3, .75rem);align-items:center;min-width:0}.kpt-chart[data-legend=top] .kpt-chart__body,.kpt-chart[data-legend=bottom] .kpt-chart__body{flex-direction:column}.kpt-chart[data-legend=top] .kpt-chart-legend-host,.kpt-chart[data-legend=left] .kpt-chart-legend-host{order:-1}.kpt-chart__canvas{position:relative;flex:1 1 auto;min-width:0;width:100%}.kpt-chart__svg{display:block;width:100%;height:auto}.kpt-chart__gridline{stroke:var(--%NS%kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__ring{fill:none;stroke:var(--%NS%kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__axis text{fill:var(--%NS%kpt-color-on-surface-muted, #6b7280);font-size:11px;font-family:var(--%NS%kpt-font-family-sans)}.kpt-chart__crosshair{stroke:var(--%NS%kpt-color-border-strong);stroke-width:1;stroke-dasharray:4 4;opacity:.75;pointer-events:none}.kpt-chart__cat-active{pointer-events:none}.kpt-chart__cat-active rect{fill:var(--%NS%kpt-color-on-surface)}.kpt-chart__cat-active text{fill:var(--%NS%kpt-color-surface);font-size:11px;font-weight:var(--%NS%kpt-font-weight-medium, 500);font-family:var(--%NS%kpt-font-family-sans)}.kpt-chart__series,.kpt-chart__bar,.kpt-chart__slice{transition:opacity .2s var(--%NS%kpt-chart-ease)}.kpt-chart__series--dim{opacity:.22}.kpt-chart__line{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.kpt-chart__area{stroke:none;opacity:.15}.kpt-chart__point{stroke:var(--%NS%kpt-color-surface);stroke-width:2;cursor:pointer;transition:transform .15s var(--%NS%kpt-chart-ease);transform-box:fill-box;transform-origin:center}.kpt-chart__point:hover{transform:scale(1.4)}.kpt-chart__point--active{transform:scale(1.5)}.kpt-chart__hover{fill:transparent;pointer-events:all}.kpt-chart__bar{cursor:pointer}.kpt-chart__slice{cursor:pointer;stroke:var(--%NS%kpt-color-surface);stroke-width:1.5}.kpt-chart__radar-area{fill-opacity:.18;stroke-width:2;stroke-linejoin:round}.kpt-chart__legend-title{font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);color:var(--%NS%kpt-color-on-surface-muted);margin-bottom:var(--%NS%kpt-space-1, .25rem)}.kpt-chart__legend-list{display:flex;flex-wrap:wrap;gap:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-4, 1rem);align-items:center;justify-content:center;margin:0;padding:0;list-style:none}.kpt-chart__legend[data-align=start] .kpt-chart__legend-list{justify-content:flex-start}.kpt-chart__legend[data-align=end] .kpt-chart__legend-list{justify-content:flex-end}.kpt-chart__legend[data-position=left] .kpt-chart__legend-list,.kpt-chart__legend[data-position=right] .kpt-chart__legend-list{flex-direction:column;align-items:flex-start}.kpt-chart__legend-item{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);padding:0;border:0;background:none;cursor:pointer;font:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-chart__legend-item--hidden{opacity:.45}.kpt-chart__legend-item--hidden .kpt-chart__legend-label{text-decoration:line-through}.kpt-chart__legend-marker{display:inline-block;width:12px;height:12px;background:var(--%NS%kpt-chart-legend-color);flex:none}.kpt-chart__legend-marker[data-style=circle]{border-radius:var(--%NS%kpt-radius-full, 9999px)}.kpt-chart__legend-marker[data-style=rect]{border-radius:var(--%NS%kpt-radius-sm, .25rem)}.kpt-chart__legend-marker[data-style=rectRot]{transform:rotate(45deg);border-radius:2px}.kpt-chart__legend-marker[data-style=triangle]{background:none;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:12px solid var(--%NS%kpt-chart-legend-color)}.kpt-chart__legend-marker[data-style=line]{height:3px;border-radius:var(--%NS%kpt-radius-full, 9999px)}.kpt-chart__tooltip{position:absolute;transform:translate(-50%,calc(-100% - 10px));pointer-events:none;background:var(--%NS%kpt-color-surface-raised, var(--%NS%kpt-color-surface));color:var(--%NS%kpt-color-on-surface);border:1px solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:0 4px 16px #0000001f;padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);white-space:nowrap;z-index:2}.kpt-chart__tooltip--flip{transform:translate(-50%,12px)}.kpt-chart__tooltip{transform-origin:50% 100%;transition:opacity calc(.16s * var(--%NS%kpt-motion-scale, 1)) var(--%NS%kpt-chart-ease),scale calc(.16s * var(--%NS%kpt-motion-scale, 1)) var(--%NS%kpt-chart-ease),visibility 0s}.kpt-chart__tooltip--hidden{opacity:0;scale:.96;visibility:hidden;transition:opacity calc(.14s * var(--%NS%kpt-motion-scale, 1)) ease-in,scale calc(.14s * var(--%NS%kpt-motion-scale, 1)) ease-in,visibility 0s calc(.14s * var(--%NS%kpt-motion-scale, 1))}.kpt-chart__tooltip-label{display:inline-block}.kpt-chart__reels{display:inline-flex;font-variant-numeric:tabular-nums}.kpt-chart__reel{display:inline-block;height:1.25em;line-height:1.25em;overflow:hidden;-webkit-mask-image:linear-gradient(transparent,var(--%NS%kpt-color-on-surface) 12%,var(--%NS%kpt-color-on-surface) 88%,transparent);mask-image:linear-gradient(transparent,var(--%NS%kpt-color-on-surface) 12%,var(--%NS%kpt-color-on-surface) 88%,transparent)}.kpt-chart__reel-strip{display:flex;flex-direction:column;translate:0 calc(var(--%NS%kpt-chart-digit, 0) * -1.25em);transition:translate calc(.52s * var(--%NS%kpt-motion-scale, 1)) var(--%NS%kpt-chart-spring)}.kpt-chart__reel-strip>span,.kpt-chart__reel-text{height:1.25em;line-height:1.25em;white-space:pre}.kpt-chart__tooltip-title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);margin-bottom:2px}.kpt-chart__tooltip-row{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-chart__tooltip-dot{width:8px;height:8px;border-radius:var(--%NS%kpt-radius-full, 9999px);flex:none}.kpt-chart__tooltip-name{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-chart__tooltip-val{margin-left:auto;font-weight:var(--%NS%kpt-font-weight-medium, 500)}.kpt-chart__line{stroke-dasharray:1;stroke-dashoffset:1;animation:kpt-chart-draw var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) var(--%NS%kpt-chart-delay) forwards}.kpt-chart__area{animation:kpt-chart-fade var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) var(--%NS%kpt-chart-delay) backwards}.kpt-chart__point{animation:kpt-chart-fade var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-duration) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=vertical] .kpt-chart__bar{transform-box:fill-box;transform-origin:bottom;animation:kpt-chart-grow-y var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=horizontal] .kpt-chart__bar{transform-box:fill-box;transform-origin:left;animation:kpt-chart-grow-x var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__slice,.kpt-chart__radar-area{transform-box:fill-box;transform-origin:center}.kpt-chart__slice{animation:kpt-chart-pop var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) calc(var(--%NS%kpt-chart-delay) + var(--%NS%kpt-chart-i, 0) * var(--%NS%kpt-chart-stagger)) backwards}.kpt-chart__radar-area{animation:kpt-chart-pop var(--%NS%kpt-chart-duration) var(--%NS%kpt-chart-ease) var(--%NS%kpt-chart-delay) backwards}@keyframes kpt-chart-draw{to{stroke-dashoffset:0}}@keyframes kpt-chart-fade{0%{opacity:0}}@keyframes kpt-chart-grow-y{0%{transform:scaleY(0)}}@keyframes kpt-chart-grow-x{0%{transform:scaleX(0)}}@keyframes kpt-chart-pop{0%{transform:scale(0);opacity:0}}.kpt-chart__ghost{pointer-events:none}.kpt-chart__ghost-line,.kpt-chart__ghost-bar{fill:none;stroke:var(--%NS%kpt-color-on-surface-muted);stroke-dasharray:4 4;animation:kpt-chart-ghost calc(1.7s * var(--%NS%kpt-motion-scale, 1)) ease-in forwards}.kpt-chart__ghost-line{stroke-width:1.5}.kpt-chart__ghost-bar{stroke-width:1;stroke-dasharray:3 3}.kpt-chart__delta,.kpt-chart__delta-bar,.kpt-chart__chip{--%NS%_kpt-chart-delta: var(--%NS%kpt-chart-delta-up, var(--%NS%kpt-color-success))}[data-kind=down]:is(.kpt-chart__delta,.kpt-chart__delta-bar,.kpt-chart__chip){--%NS%_kpt-chart-delta: var(--%NS%kpt-chart-delta-down, var(--%NS%kpt-color-danger))}[data-kind=same]:is(.kpt-chart__delta,.kpt-chart__delta-bar,.kpt-chart__chip){display:none}.kpt-chart__delta{stroke:var(--%NS%_kpt-chart-delta);stroke-width:2;stroke-linecap:round;animation:kpt-chart-ghost calc(1.7s * var(--%NS%kpt-motion-scale, 1)) ease-in forwards}.kpt-chart__delta-bar{fill:var(--%NS%_kpt-chart-delta);animation:kpt-chart-ghost-soft calc(1.7s * var(--%NS%kpt-motion-scale, 1)) ease-in forwards}.kpt-chart__chip{fill:var(--%NS%_kpt-chart-delta);font-size:10px;font-weight:var(--%NS%kpt-font-weight-bold, 700);font-family:var(--%NS%kpt-font-family-sans);font-variant-numeric:tabular-nums;pointer-events:none;animation:kpt-chart-chip calc(1.3s * var(--%NS%kpt-motion-scale, 1)) cubic-bezier(.2,0,0,1) calc((.38s + var(--%NS%kpt-chart-i, 0) * .04s) * var(--%NS%kpt-motion-scale, 1)) both}.kpt-chart__sheen-stop{stop-color:var(--%NS%kpt-chart-sheen, var(--%NS%kpt-color-info))}.kpt-chart__sheen-line{fill:none;stroke-width:5;stroke-linecap:round;filter:blur(1.2px);pointer-events:none}.kpt-chart__sheen-bar{mix-blend-mode:screen;pointer-events:none}[data-theme=dark] .kpt-chart__sheen-bar{mix-blend-mode:normal}.kpt-chart__ripple{fill:none;stroke-width:2;transform-box:fill-box;transform-origin:center;pointer-events:none;animation:kpt-chart-ripple calc(.52s * var(--%NS%kpt-motion-scale, 1)) cubic-bezier(.2,0,0,1) calc(.24s * var(--%NS%kpt-motion-scale, 1)) both}@keyframes kpt-chart-ghost{0%,50%{opacity:1}to{opacity:0}}@keyframes kpt-chart-ghost-soft{0%,50%{opacity:.45}to{opacity:0}}@keyframes kpt-chart-chip{0%{opacity:0;translate:0 6px}25%,75%{opacity:1;translate:0 0}to{opacity:0;translate:0 -6px}}@keyframes kpt-chart-ripple{0%{opacity:.55;scale:1}to{opacity:0;scale:3.2}}.kpt-chart--%NS%no-anim :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}@media(prefers-reduced-motion:reduce){.kpt-chart :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}.kpt-chart__tooltip,.kpt-chart__tooltip--hidden,.kpt-chart__reel-strip{transition:none}}.kpt-chart--%NS%no-anim :is(.kpt-chart__tooltip,.kpt-chart__tooltip--hidden,.kpt-chart__reel-strip){transition:none}.kpt-chart__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}\n"], encapsulation: 2 }); }
|
|
962
1440
|
}
|
|
963
1441
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptChart, [{
|
|
964
1442
|
type: Component,
|
|
@@ -968,9 +1446,32 @@ class KptChart {
|
|
|
968
1446
|
'[style.--kpt-chart-duration]': "anim().duration + 'ms'",
|
|
969
1447
|
'[style.--kpt-chart-stagger]': "anim().stagger + 'ms'",
|
|
970
1448
|
'[style.--kpt-chart-delay]': "anim().delay + 'ms'",
|
|
971
|
-
}, template: "<div class=\"kpt-chart\" [attr.data-legend]=\"legendOpts().display ? legendOpts().position : null\">\n @if (titleOpts()?.display && titleOpts()?.text) {\n <div\n class=\"kpt-chart__title\"\n [style.text-align]=\"titleStyle()\"\n [style.color]=\"titleOpts()?.color\"\n [style.font-family]=\"titleOpts()?.font?.family\"\n [style.font-size.px]=\"titleOpts()?.font?.size\"\n [style.font-weight]=\"titleOpts()?.font?.weight\"\n [style.padding-top.px]=\"titleOpts()?.padding?.top\"\n [style.padding-bottom.px]=\"titleOpts()?.padding?.bottom\"\n >\n {{ titleOpts()?.text }}\n </div>\n }\n @if (subtitleOpts()?.display && subtitleOpts()?.text) {\n <div\n class=\"kpt-chart__subtitle\"\n [style.text-align]=\"subtitleStyle()\"\n [style.color]=\"subtitleOpts()?.color\"\n [style.font-family]=\"subtitleOpts()?.font?.family\"\n [style.font-size.px]=\"subtitleOpts()?.font?.size\"\n [style.font-weight]=\"subtitleOpts()?.font?.weight\"\n [style.padding-top.px]=\"subtitleOpts()?.padding?.top\"\n [style.padding-bottom.px]=\"subtitleOpts()?.padding?.bottom\"\n >\n {{ subtitleOpts()?.text }}\n </div>\n }\n\n <div class=\"kpt-chart__body\">\n <div class=\"kpt-chart__canvas\">\n <svg\n [attr.viewBox]=\"'0 0 ' + width() + ' ' + height()\"\n class=\"kpt-chart__svg\"\n role=\"img\"\n [attr.aria-label]=\"accessibleName()\"\n [attr.aria-describedby]=\"config().description ? descId : null\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n @switch (type()) {\n @case ('line') {\n @if (lineVm(); as vm) {\n <g class=\"kpt-chart__grid\">\n @for (g of vm.grid; track $index) {\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"g.x1\" [attr.y1]=\"g.y1\" [attr.x2]=\"g.x2\" [attr.y2]=\"g.y2\" />\n }\n </g>\n @if (crosshair(); as ch) {\n <line class=\"kpt-chart__crosshair\" [attr.x1]=\"ch.x\" [attr.y1]=\"ch.y1\" [attr.x2]=\"ch.x\" [attr.y2]=\"ch.y2\" />\n }\n <g class=\"kpt-chart__axis\">\n @for (l of vm.valueLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n @for (l of vm.catLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n </g>\n @if (crosshair(); as ch) {\n <g class=\"kpt-chart__cat-active\">\n <rect [attr.x]=\"ch.pillX\" [attr.y]=\"ch.pillY\" [attr.width]=\"ch.pillW\" [attr.height]=\"ch.pillH\" [attr.rx]=\"ch.pillH / 2\" />\n <text [attr.x]=\"ch.labelX\" [attr.y]=\"ch.labelY\" text-anchor=\"middle\">{{ ch.text }}</text>\n </g>\n }\n @for (s of vm.series; track s.key) {\n <g class=\"kpt-chart__series\" [class.kpt-chart__series--dim]=\"dim(s.key)\">\n @if (s.area) {\n <path class=\"kpt-chart__area\" [attr.d]=\"s.area\" [style.fill]=\"s.color\" />\n }\n <path class=\"kpt-chart__line\" [attr.d]=\"s.path\" [style.stroke]=\"s.color\" pathLength=\"1\" />\n @for (p of s.points; track $index) {\n @if (vm.showPoints) {\n <circle\n class=\"kpt-chart__point\"\n [class.kpt-chart__point--active]=\"activeIndex() === $index\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n r=\"4\"\n [style.fill]=\"s.color\"\n [style.--kpt-chart-i]=\"$index\"\n />\n }\n <circle\n class=\"kpt-chart__hit\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n r=\"12\"\n (pointerenter)=\"onLineEnter($index, p.x, p.y, s.name, p.label, p.value, s.color)\"\n (pointerleave)=\"onLineLeave()\"\n />\n }\n </g>\n }\n }\n }\n\n @case ('bar') {\n @if (barVm(); as vm) {\n <g class=\"kpt-chart__grid\">\n @for (g of vm.grid; track $index) {\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"g.x1\" [attr.y1]=\"g.y1\" [attr.x2]=\"g.x2\" [attr.y2]=\"g.y2\" />\n }\n </g>\n <g class=\"kpt-chart__axis\">\n @for (l of vm.valueLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n @for (l of vm.catLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n </g>\n <g class=\"kpt-chart__bars\" [attr.data-orientation]=\"vm.orientation\">\n @for (b of vm.bars; track b.key + '#' + b.index) {\n <path\n class=\"kpt-chart__bar\"\n [class.kpt-chart__series--dim]=\"dim(b.key)\"\n [attr.d]=\"b.path\"\n [style.fill]=\"b.color\"\n [style.--kpt-chart-i]=\"b.index\"\n (pointerenter)=\"showTip(b.tipX, b.tipY, b.name, b.label, b.value, b.color)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n </g>\n }\n }\n\n @case ('radar') {\n @if (radarVm(); as vm) {\n <g class=\"kpt-chart__grid\">\n @for (r of vm.rings; track $index) {\n <path class=\"kpt-chart__ring\" [attr.d]=\"r\" />\n }\n @for (a of vm.axisLines; track $index) {\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"a.x1\" [attr.y1]=\"a.y1\" [attr.x2]=\"a.x2\" [attr.y2]=\"a.y2\" />\n }\n </g>\n <g class=\"kpt-chart__axis\">\n @for (l of vm.axisLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n </g>\n @for (s of vm.series; track s.key) {\n <g class=\"kpt-chart__series kpt-chart__radar\" [class.kpt-chart__series--dim]=\"dim(s.key)\">\n <path class=\"kpt-chart__radar-area\" [attr.d]=\"s.polygon\" [style.fill]=\"s.color\" [style.stroke]=\"s.color\" />\n @for (p of s.points; track $index) {\n <circle\n class=\"kpt-chart__point\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n r=\"4\"\n [style.fill]=\"s.color\"\n [style.--kpt-chart-i]=\"$index\"\n (pointerenter)=\"showTip(p.x, p.y, s.name, p.label, p.value, s.color)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n </g>\n }\n }\n }\n\n @default {\n @if (pieVm(); as slices) {\n <g class=\"kpt-chart__slices\">\n @for (sl of slices; track sl.key) {\n <path\n class=\"kpt-chart__slice\"\n [class.kpt-chart__series--dim]=\"dim(sl.key)\"\n [attr.d]=\"sl.path\"\n [style.fill]=\"sl.color\"\n [style.--kpt-chart-i]=\"$index\"\n (pointerenter)=\"showTip(sl.tipX, sl.tipY, sl.label, '', sl.value, sl.color)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n </g>\n }\n }\n }\n </svg>\n @if (config().description) {\n <p class=\"kpt-chart__sr\" [id]=\"descId\">{{ config().description }}</p>\n }\n <!-- Dane wykresu dla czytnika: tabela ukryta wizualnie, nie przez display:none. -->\n <table class=\"kpt-chart__sr\">\n <caption>{{ i18n.t('chart.dataTable') }}: {{ accessibleName() }}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ i18n.t('chart.category') }}</th>\n @for (col of dataTable().columns; track $index) {\n <th scope=\"col\">{{ col }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of dataTable().rows; track $index) {\n <tr>\n <th scope=\"row\">{{ row.label }}</th>\n @for (value of row.values; track $index) {\n <td>{{ value }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n\n <kpt-chart-tooltip [state]=\"tooltip()\" />\n </div>\n\n @if (legendOpts().display) {\n <kpt-chart-legend\n [items]=\"legendItems()\"\n [position]=\"legendOpts().position\"\n [align]=\"legendOpts().align\"\n [pointStyle]=\"legendOpts().pointStyle\"\n [title]=\"legendOpts().title\"\n (seriesToggle)=\"onToggle($event)\"\n (highlight)=\"onHighlight($event)\"\n />\n }\n </div>\n</div>\n", styles: ["@layer kpt.components{.kpt-chart-host{display:block;--kpt-chart-duration: .4s;--kpt-chart-stagger: 60ms;--kpt-chart-delay: 0ms;--kpt-chart-ease: cubic-bezier(.25, 1, .5, 1)}.kpt-chart{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem);color:var(--kpt-color-on-surface)}.kpt-chart__title{font-size:var(--kpt-font-size-lg, 1.125rem);font-weight:var(--kpt-font-weight-semibold, 600);color:var(--kpt-color-on-surface)}.kpt-chart__subtitle{font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted, #6b7280)}.kpt-chart__body{display:flex;gap:var(--kpt-space-3, .75rem);align-items:center;min-width:0}.kpt-chart[data-legend=top] .kpt-chart__body,.kpt-chart[data-legend=bottom] .kpt-chart__body{flex-direction:column}.kpt-chart[data-legend=top] .kpt-chart-legend-host,.kpt-chart[data-legend=left] .kpt-chart-legend-host{order:-1}.kpt-chart__canvas{position:relative;flex:1 1 auto;min-width:0;width:100%}.kpt-chart__svg{display:block;width:100%;height:auto}.kpt-chart__gridline{stroke:var(--kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__ring{fill:none;stroke:var(--kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__axis text{fill:var(--kpt-color-on-surface-muted, #6b7280);font-size:11px;font-family:var(--kpt-font-family-sans)}.kpt-chart__crosshair{stroke:var(--kpt-color-border-strong);stroke-width:1;stroke-dasharray:4 4;opacity:.75;pointer-events:none}.kpt-chart__cat-active{pointer-events:none}.kpt-chart__cat-active rect{fill:var(--kpt-color-on-surface)}.kpt-chart__cat-active text{fill:var(--kpt-color-surface);font-size:11px;font-weight:var(--kpt-font-weight-medium, 500);font-family:var(--kpt-font-family-sans)}.kpt-chart__series,.kpt-chart__bar,.kpt-chart__slice{transition:opacity .2s var(--kpt-chart-ease)}.kpt-chart__series--dim{opacity:.22}.kpt-chart__line{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.kpt-chart__area{stroke:none;opacity:.15}.kpt-chart__point{stroke:var(--kpt-color-surface);stroke-width:2;cursor:pointer;transition:transform .15s var(--kpt-chart-ease);transform-box:fill-box;transform-origin:center}.kpt-chart__point:hover{transform:scale(1.4)}.kpt-chart__point--active{transform:scale(1.5)}.kpt-chart__hit{fill:transparent;pointer-events:all;cursor:pointer}.kpt-chart__bar{cursor:pointer}.kpt-chart__slice{cursor:pointer;stroke:var(--kpt-color-surface);stroke-width:1.5}.kpt-chart__radar-area{fill-opacity:.18;stroke-width:2;stroke-linejoin:round}.kpt-chart__legend-title{font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500);color:var(--kpt-color-on-surface-muted);margin-bottom:var(--kpt-space-1, .25rem)}.kpt-chart__legend-list{display:flex;flex-wrap:wrap;gap:var(--kpt-space-2, .5rem) var(--kpt-space-4, 1rem);align-items:center;justify-content:center;margin:0;padding:0;list-style:none}.kpt-chart__legend[data-align=start] .kpt-chart__legend-list{justify-content:flex-start}.kpt-chart__legend[data-align=end] .kpt-chart__legend-list{justify-content:flex-end}.kpt-chart__legend[data-position=left] .kpt-chart__legend-list,.kpt-chart__legend[data-position=right] .kpt-chart__legend-list{flex-direction:column;align-items:flex-start}.kpt-chart__legend-item{display:inline-flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:0;border:0;background:none;cursor:pointer;font:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-chart__legend-item--hidden{opacity:.45}.kpt-chart__legend-item--hidden .kpt-chart__legend-label{text-decoration:line-through}.kpt-chart__legend-marker{display:inline-block;width:12px;height:12px;background:var(--kpt-chart-legend-color);flex:none}.kpt-chart__legend-marker[data-style=circle]{border-radius:var(--kpt-radius-full, 9999px)}.kpt-chart__legend-marker[data-style=rect]{border-radius:var(--kpt-radius-sm, .25rem)}.kpt-chart__legend-marker[data-style=rectRot]{transform:rotate(45deg);border-radius:2px}.kpt-chart__legend-marker[data-style=triangle]{background:none;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:12px solid var(--kpt-chart-legend-color)}.kpt-chart__legend-marker[data-style=line]{height:3px;border-radius:var(--kpt-radius-full, 9999px)}.kpt-chart__tooltip{position:absolute;transform:translate(-50%,calc(-100% - 10px));pointer-events:none;background:var(--kpt-color-surface-raised, var(--kpt-color-surface));color:var(--kpt-color-on-surface);border:1px solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:0 4px 16px #0000001f;padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);font-size:var(--kpt-font-size-sm, .875rem);white-space:nowrap;z-index:2}.kpt-chart__tooltip--flip{transform:translate(-50%,12px)}.kpt-chart__tooltip-title{font-weight:var(--kpt-font-weight-semibold, 600);margin-bottom:2px}.kpt-chart__tooltip-row{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem)}.kpt-chart__tooltip-dot{width:8px;height:8px;border-radius:var(--kpt-radius-full, 9999px);flex:none}.kpt-chart__tooltip-name{color:var(--kpt-color-on-surface-muted)}.kpt-chart__tooltip-val{margin-left:auto;font-weight:var(--kpt-font-weight-medium, 500)}.kpt-chart__line{stroke-dasharray:1;stroke-dashoffset:1;animation:kpt-chart-draw var(--kpt-chart-duration) var(--kpt-chart-ease) var(--kpt-chart-delay) forwards}.kpt-chart__area{animation:kpt-chart-fade var(--kpt-chart-duration) var(--kpt-chart-ease) var(--kpt-chart-delay) backwards}.kpt-chart__point{animation:kpt-chart-fade var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-duration) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=vertical] .kpt-chart__bar{transform-box:fill-box;transform-origin:bottom;animation:kpt-chart-grow-y var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=horizontal] .kpt-chart__bar{transform-box:fill-box;transform-origin:left;animation:kpt-chart-grow-x var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__slice,.kpt-chart__radar-area{transform-box:fill-box;transform-origin:center}.kpt-chart__slice{animation:kpt-chart-pop var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__radar-area{animation:kpt-chart-pop var(--kpt-chart-duration) var(--kpt-chart-ease) var(--kpt-chart-delay) backwards}@keyframes kpt-chart-draw{to{stroke-dashoffset:0}}@keyframes kpt-chart-fade{0%{opacity:0}}@keyframes kpt-chart-grow-y{0%{transform:scaleY(0)}}@keyframes kpt-chart-grow-x{0%{transform:scaleX(0)}}@keyframes kpt-chart-pop{0%{transform:scale(0);opacity:0}}.kpt-chart--no-anim :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}@media(prefers-reduced-motion:reduce){.kpt-chart :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}}.kpt-chart__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}\n"] }]
|
|
972
|
-
}],
|
|
973
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber:
|
|
1449
|
+
}, template: "<div class=\"kpt-chart\" [attr.data-legend]=\"legendOpts().display ? legendOpts().position : null\">\n @if (titleOpts()?.display && titleOpts()?.text) {\n <div\n class=\"kpt-chart__title\"\n [style.text-align]=\"titleStyle()\"\n [style.color]=\"titleOpts()?.color\"\n [style.font-family]=\"titleOpts()?.font?.family\"\n [style.font-size.px]=\"titleOpts()?.font?.size\"\n [style.font-weight]=\"titleOpts()?.font?.weight\"\n [style.padding-top.px]=\"titleOpts()?.padding?.top\"\n [style.padding-bottom.px]=\"titleOpts()?.padding?.bottom\"\n >\n {{ titleOpts()?.text }}\n </div>\n }\n @if (subtitleOpts()?.display && subtitleOpts()?.text) {\n <div\n class=\"kpt-chart__subtitle\"\n [style.text-align]=\"subtitleStyle()\"\n [style.color]=\"subtitleOpts()?.color\"\n [style.font-family]=\"subtitleOpts()?.font?.family\"\n [style.font-size.px]=\"subtitleOpts()?.font?.size\"\n [style.font-weight]=\"subtitleOpts()?.font?.weight\"\n [style.padding-top.px]=\"subtitleOpts()?.padding?.top\"\n [style.padding-bottom.px]=\"subtitleOpts()?.padding?.bottom\"\n >\n {{ subtitleOpts()?.text }}\n </div>\n }\n\n <div class=\"kpt-chart__body\">\n <div class=\"kpt-chart__canvas\">\n <svg\n [attr.viewBox]=\"'0 0 ' + width() + ' ' + height()\"\n class=\"kpt-chart__svg\"\n role=\"img\"\n [attr.aria-label]=\"accessibleName()\"\n [attr.aria-describedby]=\"config().description ? descId : null\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n @if (sheen(); as sh) {\n <defs>\n <linearGradient [attr.id]=\"sheenId\" gradientUnits=\"userSpaceOnUse\" [attr.x1]=\"sh.x1\" [attr.x2]=\"sh.x2\" [attr.y1]=\"sh.y1\" [attr.y2]=\"sh.y2\">\n <stop offset=\"0\" class=\"kpt-chart__sheen-stop\" stop-opacity=\"0\" />\n <stop offset=\"0.5\" class=\"kpt-chart__sheen-stop\" stop-opacity=\"0.95\" />\n <stop offset=\"1\" class=\"kpt-chart__sheen-stop\" stop-opacity=\"0\" />\n </linearGradient>\n </defs>\n }\n @switch (type()) {\n @case ('line') {\n @if (lineVm(); as vm) {\n <g class=\"kpt-chart__grid\">\n @for (g of vm.grid; track $index) {\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"g.x1\" [attr.y1]=\"g.y1\" [attr.x2]=\"g.x2\" [attr.y2]=\"g.y2\" />\n }\n </g>\n @if (crosshair(); as ch) {\n <line class=\"kpt-chart__crosshair\" [attr.x1]=\"ch.x\" [attr.y1]=\"ch.y1\" [attr.x2]=\"ch.x\" [attr.y2]=\"ch.y2\" />\n }\n <g class=\"kpt-chart__axis\">\n @for (l of vm.valueLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n @for (l of vm.catLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n </g>\n @if (crosshair(); as ch) {\n <g class=\"kpt-chart__cat-active\">\n <rect [attr.x]=\"ch.pillX\" [attr.y]=\"ch.pillY\" [attr.width]=\"ch.pillW\" [attr.height]=\"ch.pillH\" [attr.rx]=\"ch.pillH / 2\" />\n <text [attr.x]=\"ch.labelX\" [attr.y]=\"ch.labelY\" text-anchor=\"middle\">{{ ch.text }}</text>\n </g>\n }\n <!-- Duch poprzedniego stanu i odcinki zmiany - tylko na czas przej\u015Bcia danych. -->\n @for (g of vm.ghost; track g.key) {\n <g class=\"kpt-chart__ghost\" aria-hidden=\"true\">\n <path class=\"kpt-chart__ghost-line\" [attr.d]=\"g.path\" />\n @for (t of g.ticks; track $index) {\n <line class=\"kpt-chart__delta\" [attr.data-kind]=\"t.kind\" [attr.x1]=\"t.x\" [attr.x2]=\"t.x\" [attr.y1]=\"t.y1\" [attr.y2]=\"t.y2\" />\n }\n </g>\n }\n @for (s of vm.series; track s.key) {\n <g class=\"kpt-chart__series\" [class.kpt-chart__series--dim]=\"dim(s.key)\">\n @if (s.area) {\n <path class=\"kpt-chart__area\" [attr.d]=\"s.area\" [style.fill]=\"s.color\" />\n }\n <path class=\"kpt-chart__line\" [attr.d]=\"s.path\" [style.stroke]=\"s.color\" pathLength=\"1\" />\n @for (p of s.points; track $index) {\n @if (vm.showPoints) {\n <circle\n class=\"kpt-chart__point\"\n [class.kpt-chart__point--active]=\"activeIndex() === $index\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n r=\"4\"\n [style.fill]=\"s.color\"\n [style.--kpt-chart-i]=\"$index\"\n />\n }\n }\n </g>\n }\n @if (sheen(); as sh) {\n @for (s of vm.series; track s.key) {\n <path class=\"kpt-chart__sheen-line\" [attr.d]=\"s.path\" [attr.stroke]=\"'url(#' + sheenId + ')'\" [style.opacity]=\"sh.opacity\" aria-hidden=\"true\" />\n }\n }\n @for (g of vm.ghost; track g.key) {\n @for (c of g.chips; track c.index) {\n <text\n class=\"kpt-chart__chip\"\n [attr.data-kind]=\"c.kind\"\n [attr.x]=\"c.x\"\n [attr.y]=\"c.y\"\n text-anchor=\"middle\"\n [style.--kpt-chart-i]=\"c.index\"\n aria-hidden=\"true\"\n >{{ c.text }}</text>\n }\n }\n @for (r of ripple(); track r.id) {\n <circle class=\"kpt-chart__ripple\" [attr.cx]=\"r.x\" [attr.cy]=\"r.y\" r=\"5\" [style.stroke]=\"r.color\" aria-hidden=\"true\" />\n }\n <!-- Najechanie: najbli\u017Csza kategoria w ca\u0142ym obszarze wykresu - dymek jedzie mi\u0119dzy punktami bez ga\u015Bni\u0119cia. -->\n <rect\n class=\"kpt-chart__hover\"\n [attr.x]=\"vm.plot.x - 12\"\n [attr.y]=\"vm.plot.y - 12\"\n [attr.width]=\"vm.plot.width + 24\"\n [attr.height]=\"vm.plot.height + 24\"\n (pointermove)=\"onCategoryMove($event)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n }\n\n @case ('bar') {\n @if (barVm(); as vm) {\n <g class=\"kpt-chart__grid\">\n @for (g of vm.grid; track $index) {\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"g.x1\" [attr.y1]=\"g.y1\" [attr.x2]=\"g.x2\" [attr.y2]=\"g.y2\" />\n }\n </g>\n <g class=\"kpt-chart__axis\">\n @for (l of vm.valueLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n @for (l of vm.catLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n </g>\n @if (vm.ghost.length) {\n <g class=\"kpt-chart__ghost\" aria-hidden=\"true\">\n @for (g of vm.ghost; track g.key) {\n <path class=\"kpt-chart__ghost-bar\" [attr.d]=\"g.path\" />\n }\n </g>\n }\n <g class=\"kpt-chart__bars\" [attr.data-orientation]=\"vm.orientation\">\n @for (b of vm.bars; track b.key + '#' + b.index) {\n <path\n class=\"kpt-chart__bar\"\n [class.kpt-chart__series--dim]=\"dim(b.key)\"\n [attr.d]=\"b.path\"\n [style.fill]=\"b.color\"\n [style.--kpt-chart-i]=\"b.index\"\n />\n }\n </g>\n @if (vm.ghost.length) {\n <g class=\"kpt-chart__ghost\" aria-hidden=\"true\">\n @for (g of vm.ghost; track g.key) {\n <rect\n class=\"kpt-chart__delta-bar\"\n [attr.data-kind]=\"g.delta.kind\"\n [attr.x]=\"g.delta.x\"\n [attr.y]=\"g.delta.y\"\n [attr.width]=\"g.delta.width\"\n [attr.height]=\"g.delta.height\"\n rx=\"2\"\n />\n }\n </g>\n }\n @if (sheen(); as sh) {\n @for (b of vm.bars; track b.key + '#' + b.index) {\n <path class=\"kpt-chart__sheen-bar\" [attr.d]=\"b.path\" [attr.fill]=\"'url(#' + sheenId + ')'\" [style.opacity]=\"sh.opacity * 0.7\" aria-hidden=\"true\" />\n }\n }\n <rect\n class=\"kpt-chart__hover\"\n [attr.x]=\"vm.plot.x\"\n [attr.y]=\"vm.plot.y\"\n [attr.width]=\"vm.plot.width\"\n [attr.height]=\"vm.plot.height\"\n (pointermove)=\"onCategoryMove($event)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n }\n\n @case ('radar') {\n @if (radarVm(); as vm) {\n <g class=\"kpt-chart__grid\">\n @for (r of vm.rings; track $index) {\n <path class=\"kpt-chart__ring\" [attr.d]=\"r\" />\n }\n @for (a of vm.axisLines; track $index) {\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"a.x1\" [attr.y1]=\"a.y1\" [attr.x2]=\"a.x2\" [attr.y2]=\"a.y2\" />\n }\n </g>\n <g class=\"kpt-chart__axis\">\n @for (l of vm.axisLabels; track $index) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n </g>\n @for (s of vm.series; track s.key) {\n <g class=\"kpt-chart__series kpt-chart__radar\" [class.kpt-chart__series--dim]=\"dim(s.key)\">\n <path class=\"kpt-chart__radar-area\" [attr.d]=\"s.polygon\" [style.fill]=\"s.color\" [style.stroke]=\"s.color\" />\n @for (p of s.points; track $index) {\n <circle\n class=\"kpt-chart__point\"\n [attr.cx]=\"p.x\"\n [attr.cy]=\"p.y\"\n r=\"4\"\n [style.fill]=\"s.color\"\n [style.--kpt-chart-i]=\"$index\"\n (pointerenter)=\"showTip(p.x, p.y, s.name, p.label, p.value, s.color)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n </g>\n }\n }\n }\n\n @default {\n @if (pieVm(); as slices) {\n <g class=\"kpt-chart__slices\">\n @for (sl of slices; track sl.key) {\n <path\n class=\"kpt-chart__slice\"\n [class.kpt-chart__series--dim]=\"dim(sl.key)\"\n [attr.d]=\"sl.path\"\n [style.fill]=\"sl.color\"\n [style.--kpt-chart-i]=\"$index\"\n (pointerenter)=\"showTip(sl.tipX, sl.tipY, sl.label, '', sl.value, sl.color)\"\n (pointerleave)=\"hideTip()\"\n />\n }\n </g>\n }\n }\n }\n </svg>\n @if (config().description) {\n <p class=\"kpt-chart__sr\" [id]=\"descId\">{{ config().description }}</p>\n }\n <!-- Dane wykresu dla czytnika: tabela ukryta wizualnie, nie przez display:none. -->\n <table class=\"kpt-chart__sr\">\n <caption>{{ i18n.t('chart.dataTable') }}: {{ accessibleName() }}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ i18n.t('chart.category') }}</th>\n @for (col of dataTable().columns; track $index) {\n <th scope=\"col\">{{ col }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of dataTable().rows; track $index) {\n <tr>\n <th scope=\"row\">{{ row.label }}</th>\n @for (value of row.values; track $index) {\n <td>{{ value }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n\n <kpt-chart-tooltip [state]=\"tooltip()\" />\n </div>\n\n @if (legendOpts().display) {\n <kpt-chart-legend\n [items]=\"legendItems()\"\n [position]=\"legendOpts().position\"\n [align]=\"legendOpts().align\"\n [pointStyle]=\"legendOpts().pointStyle\"\n [title]=\"legendOpts().title\"\n (seriesToggle)=\"onToggle($event)\"\n (highlight)=\"onHighlight($event)\"\n />\n }\n </div>\n</div>\n", styles: ["@layer kpt.components{.kpt-chart-host{display:block;--kpt-chart-duration: .4s;--kpt-chart-stagger: 60ms;--kpt-chart-delay: 0ms;--kpt-chart-ease: cubic-bezier(.25, 1, .5, 1);--kpt-chart-spring: linear(0, .0521, .1747, .3278, .4847, .6288, .7513, .849, .9224, .9741, 1.0077, 1.0272, 1.0364, 1.0384, 1.0359, 1.031, 1.025, 1.019, 1.0136, 1.009, 1.0054, 1.0027, 1.0008, .9996, .9989, .9986, .9985, .9986, .9988, .9991, .9993, .9995, .9997, .9998, .9999, 1, 1, 1, 1.0001, 1.0001, 1)}.kpt-chart{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem);color:var(--kpt-color-on-surface)}.kpt-chart__title{font-size:var(--kpt-font-size-lg, 1.125rem);font-weight:var(--kpt-font-weight-semibold, 600);color:var(--kpt-color-on-surface)}.kpt-chart__subtitle{font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted, #6b7280)}.kpt-chart__body{display:flex;gap:var(--kpt-space-3, .75rem);align-items:center;min-width:0}.kpt-chart[data-legend=top] .kpt-chart__body,.kpt-chart[data-legend=bottom] .kpt-chart__body{flex-direction:column}.kpt-chart[data-legend=top] .kpt-chart-legend-host,.kpt-chart[data-legend=left] .kpt-chart-legend-host{order:-1}.kpt-chart__canvas{position:relative;flex:1 1 auto;min-width:0;width:100%}.kpt-chart__svg{display:block;width:100%;height:auto}.kpt-chart__gridline{stroke:var(--kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__ring{fill:none;stroke:var(--kpt-color-border);stroke-width:1;opacity:.7}.kpt-chart__axis text{fill:var(--kpt-color-on-surface-muted, #6b7280);font-size:11px;font-family:var(--kpt-font-family-sans)}.kpt-chart__crosshair{stroke:var(--kpt-color-border-strong);stroke-width:1;stroke-dasharray:4 4;opacity:.75;pointer-events:none}.kpt-chart__cat-active{pointer-events:none}.kpt-chart__cat-active rect{fill:var(--kpt-color-on-surface)}.kpt-chart__cat-active text{fill:var(--kpt-color-surface);font-size:11px;font-weight:var(--kpt-font-weight-medium, 500);font-family:var(--kpt-font-family-sans)}.kpt-chart__series,.kpt-chart__bar,.kpt-chart__slice{transition:opacity .2s var(--kpt-chart-ease)}.kpt-chart__series--dim{opacity:.22}.kpt-chart__line{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.kpt-chart__area{stroke:none;opacity:.15}.kpt-chart__point{stroke:var(--kpt-color-surface);stroke-width:2;cursor:pointer;transition:transform .15s var(--kpt-chart-ease);transform-box:fill-box;transform-origin:center}.kpt-chart__point:hover{transform:scale(1.4)}.kpt-chart__point--active{transform:scale(1.5)}.kpt-chart__hover{fill:transparent;pointer-events:all}.kpt-chart__bar{cursor:pointer}.kpt-chart__slice{cursor:pointer;stroke:var(--kpt-color-surface);stroke-width:1.5}.kpt-chart__radar-area{fill-opacity:.18;stroke-width:2;stroke-linejoin:round}.kpt-chart__legend-title{font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500);color:var(--kpt-color-on-surface-muted);margin-bottom:var(--kpt-space-1, .25rem)}.kpt-chart__legend-list{display:flex;flex-wrap:wrap;gap:var(--kpt-space-2, .5rem) var(--kpt-space-4, 1rem);align-items:center;justify-content:center;margin:0;padding:0;list-style:none}.kpt-chart__legend[data-align=start] .kpt-chart__legend-list{justify-content:flex-start}.kpt-chart__legend[data-align=end] .kpt-chart__legend-list{justify-content:flex-end}.kpt-chart__legend[data-position=left] .kpt-chart__legend-list,.kpt-chart__legend[data-position=right] .kpt-chart__legend-list{flex-direction:column;align-items:flex-start}.kpt-chart__legend-item{display:inline-flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:0;border:0;background:none;cursor:pointer;font:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-chart__legend-item--hidden{opacity:.45}.kpt-chart__legend-item--hidden .kpt-chart__legend-label{text-decoration:line-through}.kpt-chart__legend-marker{display:inline-block;width:12px;height:12px;background:var(--kpt-chart-legend-color);flex:none}.kpt-chart__legend-marker[data-style=circle]{border-radius:var(--kpt-radius-full, 9999px)}.kpt-chart__legend-marker[data-style=rect]{border-radius:var(--kpt-radius-sm, .25rem)}.kpt-chart__legend-marker[data-style=rectRot]{transform:rotate(45deg);border-radius:2px}.kpt-chart__legend-marker[data-style=triangle]{background:none;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:12px solid var(--kpt-chart-legend-color)}.kpt-chart__legend-marker[data-style=line]{height:3px;border-radius:var(--kpt-radius-full, 9999px)}.kpt-chart__tooltip{position:absolute;transform:translate(-50%,calc(-100% - 10px));pointer-events:none;background:var(--kpt-color-surface-raised, var(--kpt-color-surface));color:var(--kpt-color-on-surface);border:1px solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:0 4px 16px #0000001f;padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);font-size:var(--kpt-font-size-sm, .875rem);white-space:nowrap;z-index:2}.kpt-chart__tooltip--flip{transform:translate(-50%,12px)}.kpt-chart__tooltip{transform-origin:50% 100%;transition:opacity calc(.16s * var(--kpt-motion-scale, 1)) var(--kpt-chart-ease),scale calc(.16s * var(--kpt-motion-scale, 1)) var(--kpt-chart-ease),visibility 0s}.kpt-chart__tooltip--hidden{opacity:0;scale:.96;visibility:hidden;transition:opacity calc(.14s * var(--kpt-motion-scale, 1)) ease-in,scale calc(.14s * var(--kpt-motion-scale, 1)) ease-in,visibility 0s calc(.14s * var(--kpt-motion-scale, 1))}.kpt-chart__tooltip-label{display:inline-block}.kpt-chart__reels{display:inline-flex;font-variant-numeric:tabular-nums}.kpt-chart__reel{display:inline-block;height:1.25em;line-height:1.25em;overflow:hidden;-webkit-mask-image:linear-gradient(transparent,var(--kpt-color-on-surface) 12%,var(--kpt-color-on-surface) 88%,transparent);mask-image:linear-gradient(transparent,var(--kpt-color-on-surface) 12%,var(--kpt-color-on-surface) 88%,transparent)}.kpt-chart__reel-strip{display:flex;flex-direction:column;translate:0 calc(var(--kpt-chart-digit, 0) * -1.25em);transition:translate calc(.52s * var(--kpt-motion-scale, 1)) var(--kpt-chart-spring)}.kpt-chart__reel-strip>span,.kpt-chart__reel-text{height:1.25em;line-height:1.25em;white-space:pre}.kpt-chart__tooltip-title{font-weight:var(--kpt-font-weight-semibold, 600);margin-bottom:2px}.kpt-chart__tooltip-row{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem)}.kpt-chart__tooltip-dot{width:8px;height:8px;border-radius:var(--kpt-radius-full, 9999px);flex:none}.kpt-chart__tooltip-name{color:var(--kpt-color-on-surface-muted)}.kpt-chart__tooltip-val{margin-left:auto;font-weight:var(--kpt-font-weight-medium, 500)}.kpt-chart__line{stroke-dasharray:1;stroke-dashoffset:1;animation:kpt-chart-draw var(--kpt-chart-duration) var(--kpt-chart-ease) var(--kpt-chart-delay) forwards}.kpt-chart__area{animation:kpt-chart-fade var(--kpt-chart-duration) var(--kpt-chart-ease) var(--kpt-chart-delay) backwards}.kpt-chart__point{animation:kpt-chart-fade var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-duration) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=vertical] .kpt-chart__bar{transform-box:fill-box;transform-origin:bottom;animation:kpt-chart-grow-y var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__bars[data-orientation=horizontal] .kpt-chart__bar{transform-box:fill-box;transform-origin:left;animation:kpt-chart-grow-x var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__slice,.kpt-chart__radar-area{transform-box:fill-box;transform-origin:center}.kpt-chart__slice{animation:kpt-chart-pop var(--kpt-chart-duration) var(--kpt-chart-ease) calc(var(--kpt-chart-delay) + var(--kpt-chart-i, 0) * var(--kpt-chart-stagger)) backwards}.kpt-chart__radar-area{animation:kpt-chart-pop var(--kpt-chart-duration) var(--kpt-chart-ease) var(--kpt-chart-delay) backwards}@keyframes kpt-chart-draw{to{stroke-dashoffset:0}}@keyframes kpt-chart-fade{0%{opacity:0}}@keyframes kpt-chart-grow-y{0%{transform:scaleY(0)}}@keyframes kpt-chart-grow-x{0%{transform:scaleX(0)}}@keyframes kpt-chart-pop{0%{transform:scale(0);opacity:0}}.kpt-chart__ghost{pointer-events:none}.kpt-chart__ghost-line,.kpt-chart__ghost-bar{fill:none;stroke:var(--kpt-color-on-surface-muted);stroke-dasharray:4 4;animation:kpt-chart-ghost calc(1.7s * var(--kpt-motion-scale, 1)) ease-in forwards}.kpt-chart__ghost-line{stroke-width:1.5}.kpt-chart__ghost-bar{stroke-width:1;stroke-dasharray:3 3}.kpt-chart__delta,.kpt-chart__delta-bar,.kpt-chart__chip{--_kpt-chart-delta: var(--kpt-chart-delta-up, var(--kpt-color-success))}[data-kind=down]:is(.kpt-chart__delta,.kpt-chart__delta-bar,.kpt-chart__chip){--_kpt-chart-delta: var(--kpt-chart-delta-down, var(--kpt-color-danger))}[data-kind=same]:is(.kpt-chart__delta,.kpt-chart__delta-bar,.kpt-chart__chip){display:none}.kpt-chart__delta{stroke:var(--_kpt-chart-delta);stroke-width:2;stroke-linecap:round;animation:kpt-chart-ghost calc(1.7s * var(--kpt-motion-scale, 1)) ease-in forwards}.kpt-chart__delta-bar{fill:var(--_kpt-chart-delta);animation:kpt-chart-ghost-soft calc(1.7s * var(--kpt-motion-scale, 1)) ease-in forwards}.kpt-chart__chip{fill:var(--_kpt-chart-delta);font-size:10px;font-weight:var(--kpt-font-weight-bold, 700);font-family:var(--kpt-font-family-sans);font-variant-numeric:tabular-nums;pointer-events:none;animation:kpt-chart-chip calc(1.3s * var(--kpt-motion-scale, 1)) cubic-bezier(.2,0,0,1) calc((.38s + var(--kpt-chart-i, 0) * .04s) * var(--kpt-motion-scale, 1)) both}.kpt-chart__sheen-stop{stop-color:var(--kpt-chart-sheen, var(--kpt-color-info))}.kpt-chart__sheen-line{fill:none;stroke-width:5;stroke-linecap:round;filter:blur(1.2px);pointer-events:none}.kpt-chart__sheen-bar{mix-blend-mode:screen;pointer-events:none}[data-theme=dark] .kpt-chart__sheen-bar{mix-blend-mode:normal}.kpt-chart__ripple{fill:none;stroke-width:2;transform-box:fill-box;transform-origin:center;pointer-events:none;animation:kpt-chart-ripple calc(.52s * var(--kpt-motion-scale, 1)) cubic-bezier(.2,0,0,1) calc(.24s * var(--kpt-motion-scale, 1)) both}@keyframes kpt-chart-ghost{0%,50%{opacity:1}to{opacity:0}}@keyframes kpt-chart-ghost-soft{0%,50%{opacity:.45}to{opacity:0}}@keyframes kpt-chart-chip{0%{opacity:0;translate:0 6px}25%,75%{opacity:1;translate:0 0}to{opacity:0;translate:0 -6px}}@keyframes kpt-chart-ripple{0%{opacity:.55;scale:1}to{opacity:0;scale:3.2}}.kpt-chart--no-anim :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}@media(prefers-reduced-motion:reduce){.kpt-chart :is(.kpt-chart__line,.kpt-chart__area,.kpt-chart__point,.kpt-chart__bar,.kpt-chart__slice,.kpt-chart__radar-area){animation:none;stroke-dashoffset:0}.kpt-chart__tooltip,.kpt-chart__tooltip--hidden,.kpt-chart__reel-strip{transition:none}}.kpt-chart--no-anim :is(.kpt-chart__tooltip,.kpt-chart__tooltip--hidden,.kpt-chart__reel-strip){transition:none}.kpt-chart__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}\n"] }]
|
|
1450
|
+
}], () => [], { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }] }); })();
|
|
1451
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber: 179 }); })();
|
|
1452
|
+
/** Indeks najbliższej pozycji (środka kategorii) do współrzędnej kursora. */
|
|
1453
|
+
function nearestIndex(positions, at) {
|
|
1454
|
+
let best = 0;
|
|
1455
|
+
positions.forEach((p, i) => {
|
|
1456
|
+
if (Math.abs(p - at) < Math.abs((positions[best] ?? p) - at))
|
|
1457
|
+
best = i;
|
|
1458
|
+
});
|
|
1459
|
+
return best;
|
|
1460
|
+
}
|
|
1461
|
+
/** Różnica ze znakiem (plus albo minus z myślnikiem ASCII). */
|
|
1462
|
+
function signed(delta) {
|
|
1463
|
+
const text = formatNumber(Math.abs(Math.round(delta)));
|
|
1464
|
+
return delta > 0 ? '+' + text : '-' + text;
|
|
1465
|
+
}
|
|
1466
|
+
/** Koniec słupka po stronie wartości (dla ujemnych - po drugiej stronie osi). */
|
|
1467
|
+
function barEnd(bar, orientation) {
|
|
1468
|
+
if (orientation === 'vertical')
|
|
1469
|
+
return bar.value >= 0 ? bar.rect.y : bar.rect.y + bar.rect.height;
|
|
1470
|
+
return bar.value >= 0 ? bar.rect.x + bar.rect.width : bar.rect.x;
|
|
1471
|
+
}
|
|
1472
|
+
function span(a, b, make) {
|
|
1473
|
+
return make(Math.min(a, b), Math.max(a, b));
|
|
1474
|
+
}
|
|
974
1475
|
// Buduje SliceVm z pozycją tooltipa na promieniu środka wycinka.
|
|
975
1476
|
function tipSlice(entry, midAngle, tipRadius, cx, cy, path) {
|
|
976
1477
|
const p = polarToCartesian(cx, cy, tipRadius, midAngle);
|