@konce-pt/angular 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/charts/src/lib/llms.txt +116 -100
- package/fesm2022/konce-pt-angular-charts.mjs +451 -336
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +13 -13
- package/types/konce-pt-angular-charts.d.ts +48 -7
- package/types/konce-pt-angular-charts.d.ts.map +1 -1
- package/types/konce-pt-angular.d.ts +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, linkedSignal, computed, viewChild, afterRenderEffect,
|
|
2
|
+
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, linkedSignal, computed, viewChild, afterRenderEffect, signal, inject, effect, untracked, DestroyRef, afterNextRender } from '@angular/core';
|
|
3
3
|
import { KptI18n, KPT_MOTION_CONFIG } from '@konce-pt/angular';
|
|
4
|
-
import { reelCells, chartAccessibleName, chartDataTable, KptChartMotion, plotArea, seriesColor, domainScale, chartScale, stackSeries, linearScale, axisBase, bandPath, areaPath, linePath, significantDelta, deltaKind, formatNumber, barLayout, bandScale, radialArea, polarSlices, pieSlices, radarGrid, radarPoints, polygonPath, polarToCartesian, sameChartShape, scaleRows, dataScale } from '@konce-pt/chart';
|
|
4
|
+
import { reelCells, estimateLabelWidth, axisLabelIndices, clampLabel, chartMetrics, chartAccessibleName, chartDataTable, KptChartMotion, plotArea, seriesColor, domainScale, chartScale, stackSeries, linearScale, axisBase, bandPath, areaPath, linePath, significantDelta, deltaKind, formatNumber, barLayout, bandScale, radialArea, polarSlices, pieSlices, radarGrid, radarPoints, polygonPath, polarToCartesian, sameChartShape, scaleRows, dataScale } 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
7
|
const _forTrack0$2 = ($index, $item) => $item.key;
|
|
@@ -110,7 +110,7 @@ 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
|
-
const _c0 = ["bubble"];
|
|
113
|
+
const _c0$1 = ["bubble"];
|
|
114
114
|
const _c1 = ["label"];
|
|
115
115
|
const _forTrack0$1 = ($index, $item) => $item.key;
|
|
116
116
|
function KptChartTooltip_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -253,7 +253,7 @@ class KptChartTooltip {
|
|
|
253
253
|
}
|
|
254
254
|
static { this.ɵfac = function KptChartTooltip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChartTooltip)(); }; }
|
|
255
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);
|
|
256
|
+
i0.ɵɵviewQuerySignal(ctx.bubble, _c0$1, 5)(ctx.label, _c1, 5);
|
|
257
257
|
} if (rf & 2) {
|
|
258
258
|
i0.ɵɵqueryAdvance(2);
|
|
259
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) {
|
|
@@ -315,12 +315,13 @@ class KptChartTooltip {
|
|
|
315
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
316
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChartTooltip, { className: "KptChartTooltip", filePath: "lib/chart-tooltip.component.ts", lineNumber: 78 }); })();
|
|
317
317
|
|
|
318
|
+
const _c0 = ["canvas"];
|
|
318
319
|
const _forTrack0 = ($index, $item) => $item.key;
|
|
319
320
|
const _forTrack1 = ($index, $item) => $item.id;
|
|
320
321
|
const _forTrack2 = ($index, $item) => $item.index;
|
|
321
322
|
const _forTrack3 = ($index, $item) => $item.key + "#" + $item.index;
|
|
322
323
|
function KptChart_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
323
|
-
i0.ɵɵelementStart(0, "div",
|
|
324
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
324
325
|
i0.ɵɵtext(1);
|
|
325
326
|
i0.ɵɵelementEnd();
|
|
326
327
|
} if (rf & 2) {
|
|
@@ -330,7 +331,7 @@ function KptChart_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
330
331
|
i0.ɵɵtextInterpolate1(" ", ctx_r0.titleOpts()?.text, " ");
|
|
331
332
|
} }
|
|
332
333
|
function KptChart_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
333
|
-
i0.ɵɵelementStart(0, "div",
|
|
334
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
334
335
|
i0.ɵɵtext(1);
|
|
335
336
|
i0.ɵɵelementEnd();
|
|
336
337
|
} if (rf & 2) {
|
|
@@ -339,10 +340,10 @@ function KptChart_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
339
340
|
i0.ɵɵadvance();
|
|
340
341
|
i0.ɵɵtextInterpolate1(" ", ctx_r0.subtitleOpts()?.text, " ");
|
|
341
342
|
} }
|
|
342
|
-
function
|
|
343
|
+
function KptChart_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
343
344
|
i0.ɵɵnamespaceSVG();
|
|
344
|
-
i0.ɵɵelementStart(0, "defs")(1, "linearGradient",
|
|
345
|
-
i0.ɵɵelement(2, "stop",
|
|
345
|
+
i0.ɵɵelementStart(0, "defs")(1, "linearGradient", 14);
|
|
346
|
+
i0.ɵɵelement(2, "stop", 15)(3, "stop", 16)(4, "stop", 17);
|
|
346
347
|
i0.ɵɵelementEnd()();
|
|
347
348
|
} if (rf & 2) {
|
|
348
349
|
const sh_r2 = ctx;
|
|
@@ -350,21 +351,21 @@ function KptChart_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
350
351
|
i0.ɵɵadvance();
|
|
351
352
|
i0.ɵɵattribute("id", ctx_r0.sheenId)("x1", sh_r2.x1)("x2", sh_r2.x2)("y1", sh_r2.y1)("y2", sh_r2.y2);
|
|
352
353
|
} }
|
|
353
|
-
function
|
|
354
|
+
function KptChart_Case_8_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
354
355
|
i0.ɵɵnamespaceSVG();
|
|
355
|
-
i0.ɵɵelement(0, "line",
|
|
356
|
+
i0.ɵɵelement(0, "line", 19);
|
|
356
357
|
} if (rf & 2) {
|
|
357
358
|
const g_r4 = ctx.$implicit;
|
|
358
359
|
i0.ɵɵattribute("x1", g_r4.x1)("y1", g_r4.y1)("x2", g_r4.x2)("y2", g_r4.y2);
|
|
359
360
|
} }
|
|
360
|
-
function
|
|
361
|
+
function KptChart_Case_8_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
361
362
|
i0.ɵɵnamespaceSVG();
|
|
362
|
-
i0.ɵɵelement(0, "line",
|
|
363
|
+
i0.ɵɵelement(0, "line", 20);
|
|
363
364
|
} if (rf & 2) {
|
|
364
365
|
const ch_r5 = ctx;
|
|
365
366
|
i0.ɵɵattribute("x1", ch_r5.x)("y1", ch_r5.y1)("x2", ch_r5.x)("y2", ch_r5.y2);
|
|
366
367
|
} }
|
|
367
|
-
function
|
|
368
|
+
function KptChart_Case_8_Conditional_0_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
368
369
|
i0.ɵɵnamespaceSVG();
|
|
369
370
|
i0.ɵɵelementStart(0, "text");
|
|
370
371
|
i0.ɵɵtext(1);
|
|
@@ -375,449 +376,476 @@ function KptChart_Case_7_Conditional_0_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
375
376
|
i0.ɵɵadvance();
|
|
376
377
|
i0.ɵɵtextInterpolate(l_r6.text);
|
|
377
378
|
} }
|
|
378
|
-
function
|
|
379
|
+
function KptChart_Case_8_Conditional_0_For_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
379
380
|
i0.ɵɵnamespaceSVG();
|
|
380
381
|
i0.ɵɵelementStart(0, "text");
|
|
381
382
|
i0.ɵɵtext(1);
|
|
382
383
|
i0.ɵɵelementEnd();
|
|
383
384
|
} if (rf & 2) {
|
|
384
|
-
const l_r7 =
|
|
385
|
+
const l_r7 = i0.ɵɵnextContext().$implicit;
|
|
385
386
|
i0.ɵɵattribute("x", l_r7.x)("y", l_r7.y)("text-anchor", l_r7.anchor);
|
|
386
387
|
i0.ɵɵadvance();
|
|
387
388
|
i0.ɵɵtextInterpolate(l_r7.text);
|
|
388
389
|
} }
|
|
389
|
-
function
|
|
390
|
+
function KptChart_Case_8_Conditional_0_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
391
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_For_8_Conditional_0_Template, 2, 4, ":svg:text");
|
|
392
|
+
} if (rf & 2) {
|
|
393
|
+
const l_r7 = ctx.$implicit;
|
|
394
|
+
i0.ɵɵconditional(l_r7.visible ? 0 : -1);
|
|
395
|
+
} }
|
|
396
|
+
function KptChart_Case_8_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
390
397
|
i0.ɵɵnamespaceSVG();
|
|
391
|
-
i0.ɵɵ
|
|
398
|
+
i0.ɵɵelement(0, "circle", 29);
|
|
399
|
+
} if (rf & 2) {
|
|
400
|
+
const t_r8 = ctx.$implicit;
|
|
401
|
+
const $index_r9 = ctx.$index;
|
|
402
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
403
|
+
i0.ɵɵclassProp("kpt-chart__cat-tick--active", ctx_r0.activeIndex() === $index_r9);
|
|
404
|
+
i0.ɵɵattribute("cx", t_r8.x)("cy", t_r8.y);
|
|
405
|
+
} }
|
|
406
|
+
function KptChart_Case_8_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
407
|
+
i0.ɵɵnamespaceSVG();
|
|
408
|
+
i0.ɵɵelementStart(0, "g", 24);
|
|
392
409
|
i0.ɵɵelement(1, "rect");
|
|
393
|
-
i0.ɵɵelementStart(2, "text",
|
|
410
|
+
i0.ɵɵelementStart(2, "text", 30);
|
|
394
411
|
i0.ɵɵtext(3);
|
|
395
412
|
i0.ɵɵelementEnd()();
|
|
396
413
|
} if (rf & 2) {
|
|
397
|
-
const
|
|
414
|
+
const ch_r10 = ctx;
|
|
398
415
|
i0.ɵɵadvance();
|
|
399
|
-
i0.ɵɵattribute("x",
|
|
416
|
+
i0.ɵɵattribute("x", ch_r10.pillX)("y", ch_r10.pillY)("width", ch_r10.pillW)("height", ch_r10.pillH)("rx", ch_r10.pillH / 2);
|
|
400
417
|
i0.ɵɵadvance();
|
|
401
|
-
i0.ɵɵattribute("x",
|
|
418
|
+
i0.ɵɵattribute("x", ch_r10.labelX)("y", ch_r10.labelY);
|
|
402
419
|
i0.ɵɵadvance();
|
|
403
|
-
i0.ɵɵtextInterpolate(
|
|
420
|
+
i0.ɵɵtextInterpolate(ch_r10.text);
|
|
404
421
|
} }
|
|
405
|
-
function
|
|
422
|
+
function KptChart_Case_8_Conditional_0_For_14_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
406
423
|
i0.ɵɵnamespaceSVG();
|
|
407
|
-
i0.ɵɵelement(0, "line",
|
|
424
|
+
i0.ɵɵelement(0, "line", 32);
|
|
408
425
|
} if (rf & 2) {
|
|
409
|
-
const
|
|
410
|
-
i0.ɵɵattribute("data-kind",
|
|
426
|
+
const t_r11 = ctx.$implicit;
|
|
427
|
+
i0.ɵɵattribute("data-kind", t_r11.kind)("x1", t_r11.x)("x2", t_r11.x)("y1", t_r11.y1)("y2", t_r11.y2);
|
|
411
428
|
} }
|
|
412
|
-
function
|
|
429
|
+
function KptChart_Case_8_Conditional_0_For_14_Template(rf, ctx) { if (rf & 1) {
|
|
413
430
|
i0.ɵɵnamespaceSVG();
|
|
414
|
-
i0.ɵɵelementStart(0, "g",
|
|
415
|
-
i0.ɵɵelement(1, "path",
|
|
416
|
-
i0.ɵɵrepeaterCreate(2,
|
|
431
|
+
i0.ɵɵelementStart(0, "g", 25);
|
|
432
|
+
i0.ɵɵelement(1, "path", 31);
|
|
433
|
+
i0.ɵɵrepeaterCreate(2, KptChart_Case_8_Conditional_0_For_14_For_3_Template, 1, 5, ":svg:line", 32, i0.ɵɵrepeaterTrackByIndex);
|
|
417
434
|
i0.ɵɵelementEnd();
|
|
418
435
|
} if (rf & 2) {
|
|
419
|
-
const
|
|
436
|
+
const g_r12 = ctx.$implicit;
|
|
420
437
|
i0.ɵɵadvance();
|
|
421
|
-
i0.ɵɵattribute("d",
|
|
438
|
+
i0.ɵɵattribute("d", g_r12.path);
|
|
422
439
|
i0.ɵɵadvance();
|
|
423
|
-
i0.ɵɵrepeater(
|
|
440
|
+
i0.ɵɵrepeater(g_r12.ticks);
|
|
424
441
|
} }
|
|
425
|
-
function
|
|
442
|
+
function KptChart_Case_8_Conditional_0_For_16_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
426
443
|
i0.ɵɵnamespaceSVG();
|
|
427
|
-
i0.ɵɵelement(0, "path",
|
|
444
|
+
i0.ɵɵelement(0, "path", 36);
|
|
428
445
|
} if (rf & 2) {
|
|
429
|
-
const
|
|
430
|
-
i0.ɵɵstyleProp("fill",
|
|
431
|
-
i0.ɵɵattribute("d",
|
|
446
|
+
const s_r13 = i0.ɵɵnextContext().$implicit;
|
|
447
|
+
i0.ɵɵstyleProp("fill", s_r13.color);
|
|
448
|
+
i0.ɵɵattribute("d", s_r13.area);
|
|
432
449
|
} }
|
|
433
|
-
function
|
|
450
|
+
function KptChart_Case_8_Conditional_0_For_16_For_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
434
451
|
i0.ɵɵnamespaceSVG();
|
|
435
|
-
i0.ɵɵelement(0, "circle",
|
|
452
|
+
i0.ɵɵelement(0, "circle", 38);
|
|
436
453
|
} if (rf & 2) {
|
|
437
|
-
const
|
|
438
|
-
const
|
|
439
|
-
const $
|
|
440
|
-
const
|
|
454
|
+
const ctx_r13 = i0.ɵɵnextContext();
|
|
455
|
+
const p_r15 = ctx_r13.$implicit;
|
|
456
|
+
const $index_r16 = ctx_r13.$index;
|
|
457
|
+
const s_r13 = i0.ɵɵnextContext().$implicit;
|
|
441
458
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
442
|
-
i0.ɵɵstyleProp("fill",
|
|
443
|
-
i0.ɵɵclassProp("kpt-chart__point--active", ctx_r0.activeIndex() === $
|
|
444
|
-
i0.ɵɵattribute("cx",
|
|
459
|
+
i0.ɵɵstyleProp("fill", s_r13.color)("--%NS%kpt-chart-i", $index_r16);
|
|
460
|
+
i0.ɵɵclassProp("kpt-chart__point--active", ctx_r0.activeIndex() === $index_r16);
|
|
461
|
+
i0.ɵɵattribute("cx", p_r15.x)("cy", p_r15.y);
|
|
445
462
|
} }
|
|
446
|
-
function
|
|
447
|
-
i0.ɵɵconditionalCreate(0,
|
|
463
|
+
function KptChart_Case_8_Conditional_0_For_16_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
464
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_For_16_For_4_Conditional_0_Template, 1, 8, ":svg:circle", 37);
|
|
448
465
|
} if (rf & 2) {
|
|
449
|
-
const
|
|
450
|
-
i0.ɵɵconditional(
|
|
466
|
+
const vm_r17 = i0.ɵɵnextContext(2);
|
|
467
|
+
i0.ɵɵconditional(vm_r17.showPoints ? 0 : -1);
|
|
451
468
|
} }
|
|
452
|
-
function
|
|
469
|
+
function KptChart_Case_8_Conditional_0_For_16_Template(rf, ctx) { if (rf & 1) {
|
|
453
470
|
i0.ɵɵnamespaceSVG();
|
|
454
|
-
i0.ɵɵelementStart(0, "g",
|
|
455
|
-
i0.ɵɵconditionalCreate(1,
|
|
456
|
-
i0.ɵɵelement(2, "path",
|
|
457
|
-
i0.ɵɵrepeaterCreate(3,
|
|
471
|
+
i0.ɵɵelementStart(0, "g", 33);
|
|
472
|
+
i0.ɵɵconditionalCreate(1, KptChart_Case_8_Conditional_0_For_16_Conditional_1_Template, 1, 3, ":svg:path", 34);
|
|
473
|
+
i0.ɵɵelement(2, "path", 35);
|
|
474
|
+
i0.ɵɵrepeaterCreate(3, KptChart_Case_8_Conditional_0_For_16_For_4_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
458
475
|
i0.ɵɵelementEnd();
|
|
459
476
|
} if (rf & 2) {
|
|
460
|
-
const
|
|
477
|
+
const s_r13 = ctx.$implicit;
|
|
461
478
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
462
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
479
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(s_r13.key));
|
|
463
480
|
i0.ɵɵadvance();
|
|
464
|
-
i0.ɵɵconditional(
|
|
481
|
+
i0.ɵɵconditional(s_r13.area ? 1 : -1);
|
|
465
482
|
i0.ɵɵadvance();
|
|
466
|
-
i0.ɵɵstyleProp("stroke",
|
|
467
|
-
i0.ɵɵattribute("d",
|
|
483
|
+
i0.ɵɵstyleProp("stroke", s_r13.color);
|
|
484
|
+
i0.ɵɵattribute("d", s_r13.path);
|
|
468
485
|
i0.ɵɵadvance();
|
|
469
|
-
i0.ɵɵrepeater(
|
|
486
|
+
i0.ɵɵrepeater(s_r13.points);
|
|
470
487
|
} }
|
|
471
|
-
function
|
|
488
|
+
function KptChart_Case_8_Conditional_0_Conditional_17_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
472
489
|
i0.ɵɵnamespaceSVG();
|
|
473
|
-
i0.ɵɵelement(0, "path",
|
|
490
|
+
i0.ɵɵelement(0, "path", 40);
|
|
474
491
|
} if (rf & 2) {
|
|
475
|
-
const
|
|
476
|
-
const
|
|
492
|
+
const s_r18 = ctx.$implicit;
|
|
493
|
+
const sh_r19 = i0.ɵɵnextContext();
|
|
477
494
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
478
|
-
i0.ɵɵstyleProp("opacity",
|
|
479
|
-
i0.ɵɵattribute("d",
|
|
495
|
+
i0.ɵɵstyleProp("opacity", sh_r19.opacity);
|
|
496
|
+
i0.ɵɵattribute("d", s_r18.path)("stroke", "url(#" + ctx_r0.sheenId + ")");
|
|
480
497
|
} }
|
|
481
|
-
function
|
|
482
|
-
i0.ɵɵrepeaterCreate(0,
|
|
498
|
+
function KptChart_Case_8_Conditional_0_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
499
|
+
i0.ɵɵrepeaterCreate(0, KptChart_Case_8_Conditional_0_Conditional_17_For_1_Template, 1, 4, ":svg:path", 39, _forTrack0);
|
|
483
500
|
} if (rf & 2) {
|
|
484
|
-
const
|
|
485
|
-
i0.ɵɵrepeater(
|
|
501
|
+
const vm_r17 = i0.ɵɵnextContext();
|
|
502
|
+
i0.ɵɵrepeater(vm_r17.series);
|
|
486
503
|
} }
|
|
487
|
-
function
|
|
504
|
+
function KptChart_Case_8_Conditional_0_For_19_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
488
505
|
i0.ɵɵnamespaceSVG();
|
|
489
|
-
i0.ɵɵelementStart(0, "text",
|
|
506
|
+
i0.ɵɵelementStart(0, "text", 42);
|
|
490
507
|
i0.ɵɵtext(1);
|
|
491
508
|
i0.ɵɵelementEnd();
|
|
492
509
|
} if (rf & 2) {
|
|
493
|
-
const
|
|
494
|
-
i0.ɵɵstyleProp("--%NS%kpt-chart-i",
|
|
495
|
-
i0.ɵɵattribute("data-kind",
|
|
510
|
+
const c_r20 = ctx.$implicit;
|
|
511
|
+
i0.ɵɵstyleProp("--%NS%kpt-chart-i", c_r20.index);
|
|
512
|
+
i0.ɵɵattribute("data-kind", c_r20.kind)("x", c_r20.x)("y", c_r20.y);
|
|
496
513
|
i0.ɵɵadvance();
|
|
497
|
-
i0.ɵɵtextInterpolate(
|
|
514
|
+
i0.ɵɵtextInterpolate(c_r20.text);
|
|
498
515
|
} }
|
|
499
|
-
function
|
|
500
|
-
i0.ɵɵrepeaterCreate(0,
|
|
516
|
+
function KptChart_Case_8_Conditional_0_For_19_Template(rf, ctx) { if (rf & 1) {
|
|
517
|
+
i0.ɵɵrepeaterCreate(0, KptChart_Case_8_Conditional_0_For_19_For_1_Template, 2, 6, ":svg:text", 41, _forTrack2);
|
|
501
518
|
} if (rf & 2) {
|
|
502
|
-
const
|
|
503
|
-
i0.ɵɵrepeater(
|
|
519
|
+
const g_r21 = ctx.$implicit;
|
|
520
|
+
i0.ɵɵrepeater(g_r21.chips);
|
|
504
521
|
} }
|
|
505
|
-
function
|
|
522
|
+
function KptChart_Case_8_Conditional_0_For_21_Template(rf, ctx) { if (rf & 1) {
|
|
506
523
|
i0.ɵɵnamespaceSVG();
|
|
507
|
-
i0.ɵɵelement(0, "circle",
|
|
524
|
+
i0.ɵɵelement(0, "circle", 43);
|
|
508
525
|
} if (rf & 2) {
|
|
509
|
-
const
|
|
510
|
-
i0.ɵɵstyleProp("stroke",
|
|
511
|
-
i0.ɵɵattribute("cx",
|
|
526
|
+
const r_r22 = ctx.$implicit;
|
|
527
|
+
i0.ɵɵstyleProp("stroke", r_r22.color);
|
|
528
|
+
i0.ɵɵattribute("cx", r_r22.x)("cy", r_r22.y);
|
|
512
529
|
} }
|
|
513
|
-
function
|
|
530
|
+
function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
514
531
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
515
532
|
i0.ɵɵnamespaceSVG();
|
|
516
|
-
i0.ɵɵelementStart(0, "g",
|
|
517
|
-
i0.ɵɵrepeaterCreate(1,
|
|
533
|
+
i0.ɵɵelementStart(0, "g", 18);
|
|
534
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_For_2_Template, 1, 4, ":svg:line", 19, i0.ɵɵrepeaterTrackByIndex);
|
|
518
535
|
i0.ɵɵelementEnd();
|
|
519
|
-
i0.ɵɵconditionalCreate(3,
|
|
520
|
-
i0.ɵɵelementStart(4, "g",
|
|
521
|
-
i0.ɵɵrepeaterCreate(5,
|
|
522
|
-
i0.ɵɵrepeaterCreate(7,
|
|
536
|
+
i0.ɵɵconditionalCreate(3, KptChart_Case_8_Conditional_0_Conditional_3_Template, 1, 4, ":svg:line", 20);
|
|
537
|
+
i0.ɵɵelementStart(4, "g", 21);
|
|
538
|
+
i0.ɵɵrepeaterCreate(5, KptChart_Case_8_Conditional_0_For_6_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
539
|
+
i0.ɵɵrepeaterCreate(7, KptChart_Case_8_Conditional_0_For_8_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
523
540
|
i0.ɵɵelementEnd();
|
|
524
|
-
i0.ɵɵ
|
|
525
|
-
i0.ɵɵrepeaterCreate(10,
|
|
526
|
-
i0.ɵɵ
|
|
527
|
-
i0.ɵɵconditionalCreate(
|
|
528
|
-
i0.ɵɵrepeaterCreate(
|
|
529
|
-
i0.ɵɵrepeaterCreate(
|
|
530
|
-
i0.ɵɵ
|
|
531
|
-
i0.ɵɵ
|
|
541
|
+
i0.ɵɵelementStart(9, "g", 22);
|
|
542
|
+
i0.ɵɵrepeaterCreate(10, KptChart_Case_8_Conditional_0_For_11_Template, 1, 4, ":svg:circle", 23, i0.ɵɵrepeaterTrackByIndex);
|
|
543
|
+
i0.ɵɵelementEnd();
|
|
544
|
+
i0.ɵɵconditionalCreate(12, KptChart_Case_8_Conditional_0_Conditional_12_Template, 4, 8, ":svg:g", 24);
|
|
545
|
+
i0.ɵɵrepeaterCreate(13, KptChart_Case_8_Conditional_0_For_14_Template, 4, 1, ":svg:g", 25, _forTrack0);
|
|
546
|
+
i0.ɵɵrepeaterCreate(15, KptChart_Case_8_Conditional_0_For_16_Template, 5, 6, ":svg:g", 26, _forTrack0);
|
|
547
|
+
i0.ɵɵconditionalCreate(17, KptChart_Case_8_Conditional_0_Conditional_17_Template, 2, 0);
|
|
548
|
+
i0.ɵɵrepeaterCreate(18, KptChart_Case_8_Conditional_0_For_19_Template, 2, 0, null, null, _forTrack0);
|
|
549
|
+
i0.ɵɵrepeaterCreate(20, KptChart_Case_8_Conditional_0_For_21_Template, 1, 4, ":svg:circle", 27, _forTrack1);
|
|
550
|
+
i0.ɵɵelementStart(22, "rect", 28);
|
|
551
|
+
i0.ɵɵlistener("pointermove", function KptChart_Case_8_Conditional_0_Template_rect_pointermove_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryMove($event)); })("pointerleave", function KptChart_Case_8_Conditional_0_Template_rect_pointerleave_22_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
532
552
|
i0.ɵɵelementEnd();
|
|
533
553
|
} if (rf & 2) {
|
|
534
|
-
let
|
|
535
|
-
let
|
|
536
|
-
let
|
|
537
|
-
const
|
|
554
|
+
let tmp_5_0;
|
|
555
|
+
let tmp_9_0;
|
|
556
|
+
let tmp_12_0;
|
|
557
|
+
const vm_r17 = ctx;
|
|
538
558
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
539
559
|
i0.ɵɵadvance();
|
|
540
|
-
i0.ɵɵrepeater(
|
|
560
|
+
i0.ɵɵrepeater(vm_r17.grid);
|
|
541
561
|
i0.ɵɵadvance(2);
|
|
542
|
-
i0.ɵɵconditional((
|
|
562
|
+
i0.ɵɵconditional((tmp_5_0 = ctx_r0.crosshair()) ? 3 : -1, tmp_5_0);
|
|
543
563
|
i0.ɵɵadvance(2);
|
|
544
|
-
i0.ɵɵrepeater(
|
|
564
|
+
i0.ɵɵrepeater(vm_r17.valueLabels);
|
|
545
565
|
i0.ɵɵadvance(2);
|
|
546
|
-
i0.ɵɵrepeater(
|
|
566
|
+
i0.ɵɵrepeater(vm_r17.catLabels);
|
|
567
|
+
i0.ɵɵadvance(3);
|
|
568
|
+
i0.ɵɵrepeater(vm_r17.catTicks);
|
|
547
569
|
i0.ɵɵadvance(2);
|
|
548
|
-
i0.ɵɵconditional((
|
|
570
|
+
i0.ɵɵconditional((tmp_9_0 = ctx_r0.crosshair()) ? 12 : -1, tmp_9_0);
|
|
549
571
|
i0.ɵɵadvance();
|
|
550
|
-
i0.ɵɵrepeater(
|
|
572
|
+
i0.ɵɵrepeater(vm_r17.ghost);
|
|
551
573
|
i0.ɵɵadvance(2);
|
|
552
|
-
i0.ɵɵrepeater(
|
|
574
|
+
i0.ɵɵrepeater(vm_r17.series);
|
|
553
575
|
i0.ɵɵadvance(2);
|
|
554
|
-
i0.ɵɵconditional((
|
|
576
|
+
i0.ɵɵconditional((tmp_12_0 = ctx_r0.sheen()) ? 17 : -1, tmp_12_0);
|
|
555
577
|
i0.ɵɵadvance();
|
|
556
|
-
i0.ɵɵrepeater(
|
|
578
|
+
i0.ɵɵrepeater(vm_r17.ghost);
|
|
557
579
|
i0.ɵɵadvance(2);
|
|
558
580
|
i0.ɵɵrepeater(ctx_r0.ripple());
|
|
559
581
|
i0.ɵɵadvance(2);
|
|
560
|
-
i0.ɵɵattribute("x",
|
|
582
|
+
i0.ɵɵattribute("x", vm_r17.plot.x - 12)("y", vm_r17.plot.y - 12)("width", vm_r17.plot.width + 24)("height", vm_r17.plot.height + 24);
|
|
561
583
|
} }
|
|
562
|
-
function
|
|
563
|
-
i0.ɵɵconditionalCreate(0,
|
|
584
|
+
function KptChart_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
585
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_Template, 23, 7);
|
|
564
586
|
} if (rf & 2) {
|
|
565
|
-
let
|
|
587
|
+
let tmp_2_0;
|
|
566
588
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
567
|
-
i0.ɵɵconditional((
|
|
589
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r0.lineVm()) ? 0 : -1, tmp_2_0);
|
|
568
590
|
} }
|
|
569
|
-
function
|
|
591
|
+
function KptChart_Case_9_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
570
592
|
i0.ɵɵnamespaceSVG();
|
|
571
|
-
i0.ɵɵelement(0, "line",
|
|
593
|
+
i0.ɵɵelement(0, "line", 19);
|
|
572
594
|
} if (rf & 2) {
|
|
573
|
-
const
|
|
574
|
-
i0.ɵɵattribute("x1",
|
|
595
|
+
const g_r24 = ctx.$implicit;
|
|
596
|
+
i0.ɵɵattribute("x1", g_r24.x1)("y1", g_r24.y1)("x2", g_r24.x2)("y2", g_r24.y2);
|
|
575
597
|
} }
|
|
576
|
-
function
|
|
598
|
+
function KptChart_Case_9_Conditional_0_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
577
599
|
i0.ɵɵnamespaceSVG();
|
|
578
600
|
i0.ɵɵelementStart(0, "text");
|
|
579
601
|
i0.ɵɵtext(1);
|
|
580
602
|
i0.ɵɵelementEnd();
|
|
581
603
|
} if (rf & 2) {
|
|
582
|
-
const
|
|
583
|
-
i0.ɵɵattribute("x",
|
|
604
|
+
const l_r25 = ctx.$implicit;
|
|
605
|
+
i0.ɵɵattribute("x", l_r25.x)("y", l_r25.y)("text-anchor", l_r25.anchor);
|
|
584
606
|
i0.ɵɵadvance();
|
|
585
|
-
i0.ɵɵtextInterpolate(
|
|
607
|
+
i0.ɵɵtextInterpolate(l_r25.text);
|
|
586
608
|
} }
|
|
587
|
-
function
|
|
609
|
+
function KptChart_Case_9_Conditional_0_For_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
588
610
|
i0.ɵɵnamespaceSVG();
|
|
589
611
|
i0.ɵɵelementStart(0, "text");
|
|
590
612
|
i0.ɵɵtext(1);
|
|
591
613
|
i0.ɵɵelementEnd();
|
|
592
614
|
} if (rf & 2) {
|
|
593
|
-
const
|
|
594
|
-
i0.ɵɵattribute("x",
|
|
615
|
+
const l_r26 = i0.ɵɵnextContext().$implicit;
|
|
616
|
+
i0.ɵɵattribute("x", l_r26.x)("y", l_r26.y)("text-anchor", l_r26.anchor);
|
|
595
617
|
i0.ɵɵadvance();
|
|
596
|
-
i0.ɵɵtextInterpolate(
|
|
618
|
+
i0.ɵɵtextInterpolate(l_r26.text);
|
|
619
|
+
} }
|
|
620
|
+
function KptChart_Case_9_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
621
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_9_Conditional_0_For_7_Conditional_0_Template, 2, 4, ":svg:text");
|
|
622
|
+
} if (rf & 2) {
|
|
623
|
+
const l_r26 = ctx.$implicit;
|
|
624
|
+
i0.ɵɵconditional(l_r26.visible ? 0 : -1);
|
|
597
625
|
} }
|
|
598
|
-
function
|
|
626
|
+
function KptChart_Case_9_Conditional_0_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
599
627
|
i0.ɵɵnamespaceSVG();
|
|
600
|
-
i0.ɵɵelement(0, "path",
|
|
628
|
+
i0.ɵɵelement(0, "path", 46);
|
|
601
629
|
} if (rf & 2) {
|
|
602
|
-
const
|
|
603
|
-
i0.ɵɵattribute("d",
|
|
630
|
+
const g_r27 = ctx.$implicit;
|
|
631
|
+
i0.ɵɵattribute("d", g_r27.path);
|
|
604
632
|
} }
|
|
605
|
-
function
|
|
633
|
+
function KptChart_Case_9_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
606
634
|
i0.ɵɵnamespaceSVG();
|
|
607
|
-
i0.ɵɵelementStart(0, "g",
|
|
608
|
-
i0.ɵɵrepeaterCreate(1,
|
|
635
|
+
i0.ɵɵelementStart(0, "g", 25);
|
|
636
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_9_Conditional_0_Conditional_8_For_2_Template, 1, 1, ":svg:path", 46, _forTrack0);
|
|
609
637
|
i0.ɵɵelementEnd();
|
|
610
638
|
} if (rf & 2) {
|
|
611
|
-
const
|
|
639
|
+
const vm_r28 = i0.ɵɵnextContext();
|
|
612
640
|
i0.ɵɵadvance();
|
|
613
|
-
i0.ɵɵrepeater(
|
|
641
|
+
i0.ɵɵrepeater(vm_r28.ghost);
|
|
614
642
|
} }
|
|
615
|
-
function
|
|
643
|
+
function KptChart_Case_9_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
616
644
|
i0.ɵɵnamespaceSVG();
|
|
617
|
-
i0.ɵɵelement(0, "path",
|
|
645
|
+
i0.ɵɵelement(0, "path", 47);
|
|
618
646
|
} if (rf & 2) {
|
|
619
|
-
const
|
|
647
|
+
const b_r29 = ctx.$implicit;
|
|
620
648
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
621
|
-
i0.ɵɵstyleProp("fill",
|
|
622
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
623
|
-
i0.ɵɵattribute("d",
|
|
649
|
+
i0.ɵɵstyleProp("fill", b_r29.color)("--%NS%kpt-chart-i", b_r29.index);
|
|
650
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(b_r29.key));
|
|
651
|
+
i0.ɵɵattribute("d", b_r29.path);
|
|
624
652
|
} }
|
|
625
|
-
function
|
|
653
|
+
function KptChart_Case_9_Conditional_0_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
626
654
|
i0.ɵɵnamespaceSVG();
|
|
627
|
-
i0.ɵɵelement(0, "rect",
|
|
655
|
+
i0.ɵɵelement(0, "rect", 48);
|
|
628
656
|
} if (rf & 2) {
|
|
629
|
-
const
|
|
630
|
-
i0.ɵɵattribute("data-kind",
|
|
657
|
+
const g_r30 = ctx.$implicit;
|
|
658
|
+
i0.ɵɵattribute("data-kind", g_r30.delta.kind)("x", g_r30.delta.x)("y", g_r30.delta.y)("width", g_r30.delta.width)("height", g_r30.delta.height);
|
|
631
659
|
} }
|
|
632
|
-
function
|
|
660
|
+
function KptChart_Case_9_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
633
661
|
i0.ɵɵnamespaceSVG();
|
|
634
|
-
i0.ɵɵelementStart(0, "g",
|
|
635
|
-
i0.ɵɵrepeaterCreate(1,
|
|
662
|
+
i0.ɵɵelementStart(0, "g", 25);
|
|
663
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_9_Conditional_0_Conditional_12_For_2_Template, 1, 5, ":svg:rect", 48, _forTrack0);
|
|
636
664
|
i0.ɵɵelementEnd();
|
|
637
665
|
} if (rf & 2) {
|
|
638
|
-
const
|
|
666
|
+
const vm_r28 = i0.ɵɵnextContext();
|
|
639
667
|
i0.ɵɵadvance();
|
|
640
|
-
i0.ɵɵrepeater(
|
|
668
|
+
i0.ɵɵrepeater(vm_r28.ghost);
|
|
641
669
|
} }
|
|
642
|
-
function
|
|
670
|
+
function KptChart_Case_9_Conditional_0_Conditional_13_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
643
671
|
i0.ɵɵnamespaceSVG();
|
|
644
|
-
i0.ɵɵelement(0, "path",
|
|
672
|
+
i0.ɵɵelement(0, "path", 50);
|
|
645
673
|
} if (rf & 2) {
|
|
646
|
-
const
|
|
647
|
-
const
|
|
674
|
+
const b_r31 = ctx.$implicit;
|
|
675
|
+
const sh_r32 = i0.ɵɵnextContext();
|
|
648
676
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
649
|
-
i0.ɵɵstyleProp("opacity",
|
|
650
|
-
i0.ɵɵattribute("d",
|
|
677
|
+
i0.ɵɵstyleProp("opacity", sh_r32.opacity * 0.7);
|
|
678
|
+
i0.ɵɵattribute("d", b_r31.path)("fill", "url(#" + ctx_r0.sheenId + ")");
|
|
651
679
|
} }
|
|
652
|
-
function
|
|
653
|
-
i0.ɵɵrepeaterCreate(0,
|
|
680
|
+
function KptChart_Case_9_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
681
|
+
i0.ɵɵrepeaterCreate(0, KptChart_Case_9_Conditional_0_Conditional_13_For_1_Template, 1, 4, ":svg:path", 49, _forTrack3);
|
|
654
682
|
} if (rf & 2) {
|
|
655
|
-
const
|
|
656
|
-
i0.ɵɵrepeater(
|
|
683
|
+
const vm_r28 = i0.ɵɵnextContext();
|
|
684
|
+
i0.ɵɵrepeater(vm_r28.bars);
|
|
657
685
|
} }
|
|
658
|
-
function
|
|
659
|
-
const
|
|
686
|
+
function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
687
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
660
688
|
i0.ɵɵnamespaceSVG();
|
|
661
|
-
i0.ɵɵelementStart(0, "g",
|
|
662
|
-
i0.ɵɵrepeaterCreate(1,
|
|
689
|
+
i0.ɵɵelementStart(0, "g", 18);
|
|
690
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_9_Conditional_0_For_2_Template, 1, 4, ":svg:line", 19, i0.ɵɵrepeaterTrackByIndex);
|
|
663
691
|
i0.ɵɵelementEnd();
|
|
664
|
-
i0.ɵɵelementStart(3, "g",
|
|
665
|
-
i0.ɵɵrepeaterCreate(4,
|
|
666
|
-
i0.ɵɵrepeaterCreate(6,
|
|
692
|
+
i0.ɵɵelementStart(3, "g", 21);
|
|
693
|
+
i0.ɵɵrepeaterCreate(4, KptChart_Case_9_Conditional_0_For_5_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
694
|
+
i0.ɵɵrepeaterCreate(6, KptChart_Case_9_Conditional_0_For_7_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
667
695
|
i0.ɵɵelementEnd();
|
|
668
|
-
i0.ɵɵconditionalCreate(8,
|
|
669
|
-
i0.ɵɵelementStart(9, "g",
|
|
670
|
-
i0.ɵɵrepeaterCreate(10,
|
|
696
|
+
i0.ɵɵconditionalCreate(8, KptChart_Case_9_Conditional_0_Conditional_8_Template, 3, 0, ":svg:g", 25);
|
|
697
|
+
i0.ɵɵelementStart(9, "g", 44);
|
|
698
|
+
i0.ɵɵrepeaterCreate(10, KptChart_Case_9_Conditional_0_For_11_Template, 1, 7, ":svg:path", 45, _forTrack3);
|
|
671
699
|
i0.ɵɵelementEnd();
|
|
672
|
-
i0.ɵɵconditionalCreate(12,
|
|
673
|
-
i0.ɵɵconditionalCreate(13,
|
|
674
|
-
i0.ɵɵelementStart(14, "rect",
|
|
675
|
-
i0.ɵɵlistener("pointermove", function
|
|
700
|
+
i0.ɵɵconditionalCreate(12, KptChart_Case_9_Conditional_0_Conditional_12_Template, 3, 0, ":svg:g", 25);
|
|
701
|
+
i0.ɵɵconditionalCreate(13, KptChart_Case_9_Conditional_0_Conditional_13_Template, 2, 0);
|
|
702
|
+
i0.ɵɵelementStart(14, "rect", 28);
|
|
703
|
+
i0.ɵɵlistener("pointermove", function KptChart_Case_9_Conditional_0_Template_rect_pointermove_14_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryMove($event)); })("pointerleave", function KptChart_Case_9_Conditional_0_Template_rect_pointerleave_14_listener() { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
676
704
|
i0.ɵɵelementEnd();
|
|
677
705
|
} if (rf & 2) {
|
|
678
|
-
let
|
|
679
|
-
const
|
|
706
|
+
let tmp_11_0;
|
|
707
|
+
const vm_r28 = ctx;
|
|
680
708
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
681
709
|
i0.ɵɵadvance();
|
|
682
|
-
i0.ɵɵrepeater(
|
|
710
|
+
i0.ɵɵrepeater(vm_r28.grid);
|
|
683
711
|
i0.ɵɵadvance(3);
|
|
684
|
-
i0.ɵɵrepeater(
|
|
712
|
+
i0.ɵɵrepeater(vm_r28.valueLabels);
|
|
685
713
|
i0.ɵɵadvance(2);
|
|
686
|
-
i0.ɵɵrepeater(
|
|
714
|
+
i0.ɵɵrepeater(vm_r28.catLabels);
|
|
687
715
|
i0.ɵɵadvance(2);
|
|
688
|
-
i0.ɵɵconditional(
|
|
716
|
+
i0.ɵɵconditional(vm_r28.ghost.length ? 8 : -1);
|
|
689
717
|
i0.ɵɵadvance();
|
|
690
|
-
i0.ɵɵattribute("data-orientation",
|
|
718
|
+
i0.ɵɵattribute("data-orientation", vm_r28.orientation);
|
|
691
719
|
i0.ɵɵadvance();
|
|
692
|
-
i0.ɵɵrepeater(
|
|
720
|
+
i0.ɵɵrepeater(vm_r28.bars);
|
|
693
721
|
i0.ɵɵadvance(2);
|
|
694
|
-
i0.ɵɵconditional(
|
|
722
|
+
i0.ɵɵconditional(vm_r28.ghost.length ? 12 : -1);
|
|
695
723
|
i0.ɵɵadvance();
|
|
696
|
-
i0.ɵɵconditional((
|
|
724
|
+
i0.ɵɵconditional((tmp_11_0 = ctx_r0.sheen()) ? 13 : -1, tmp_11_0);
|
|
697
725
|
i0.ɵɵadvance();
|
|
698
|
-
i0.ɵɵattribute("x",
|
|
726
|
+
i0.ɵɵattribute("x", vm_r28.plot.x)("y", vm_r28.plot.y)("width", vm_r28.plot.width)("height", vm_r28.plot.height);
|
|
699
727
|
} }
|
|
700
|
-
function
|
|
701
|
-
i0.ɵɵconditionalCreate(0,
|
|
728
|
+
function KptChart_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
729
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_9_Conditional_0_Template, 15, 8);
|
|
702
730
|
} if (rf & 2) {
|
|
703
|
-
let
|
|
731
|
+
let tmp_2_0;
|
|
704
732
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
705
|
-
i0.ɵɵconditional((
|
|
733
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r0.barVm()) ? 0 : -1, tmp_2_0);
|
|
706
734
|
} }
|
|
707
|
-
function
|
|
735
|
+
function KptChart_Case_10_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
708
736
|
i0.ɵɵnamespaceSVG();
|
|
709
|
-
i0.ɵɵelement(0, "path",
|
|
737
|
+
i0.ɵɵelement(0, "path", 51);
|
|
710
738
|
} if (rf & 2) {
|
|
711
|
-
const
|
|
712
|
-
i0.ɵɵattribute("d",
|
|
739
|
+
const r_r33 = ctx.$implicit;
|
|
740
|
+
i0.ɵɵattribute("d", r_r33);
|
|
713
741
|
} }
|
|
714
|
-
function
|
|
742
|
+
function KptChart_Case_10_Conditional_0_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
715
743
|
i0.ɵɵnamespaceSVG();
|
|
716
|
-
i0.ɵɵelement(0, "line",
|
|
744
|
+
i0.ɵɵelement(0, "line", 19);
|
|
717
745
|
} if (rf & 2) {
|
|
718
|
-
const
|
|
719
|
-
i0.ɵɵattribute("x1",
|
|
746
|
+
const a_r34 = ctx.$implicit;
|
|
747
|
+
i0.ɵɵattribute("x1", a_r34.x1)("y1", a_r34.y1)("x2", a_r34.x2)("y2", a_r34.y2);
|
|
720
748
|
} }
|
|
721
|
-
function
|
|
749
|
+
function KptChart_Case_10_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
722
750
|
i0.ɵɵnamespaceSVG();
|
|
723
751
|
i0.ɵɵelementStart(0, "text");
|
|
724
752
|
i0.ɵɵtext(1);
|
|
725
753
|
i0.ɵɵelementEnd();
|
|
726
754
|
} if (rf & 2) {
|
|
727
|
-
const
|
|
728
|
-
i0.ɵɵattribute("x",
|
|
755
|
+
const l_r35 = ctx.$implicit;
|
|
756
|
+
i0.ɵɵattribute("x", l_r35.x)("y", l_r35.y)("text-anchor", l_r35.anchor);
|
|
729
757
|
i0.ɵɵadvance();
|
|
730
|
-
i0.ɵɵtextInterpolate(
|
|
758
|
+
i0.ɵɵtextInterpolate(l_r35.text);
|
|
731
759
|
} }
|
|
732
|
-
function
|
|
733
|
-
const
|
|
760
|
+
function KptChart_Case_10_Conditional_0_For_9_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
761
|
+
const _r36 = i0.ɵɵgetCurrentView();
|
|
734
762
|
i0.ɵɵnamespaceSVG();
|
|
735
|
-
i0.ɵɵelementStart(0, "circle",
|
|
736
|
-
i0.ɵɵlistener("pointerenter", function
|
|
763
|
+
i0.ɵɵelementStart(0, "circle", 56);
|
|
764
|
+
i0.ɵɵlistener("pointerenter", function KptChart_Case_10_Conditional_0_For_9_For_3_Template_circle_pointerenter_0_listener() { const p_r37 = i0.ɵɵrestoreView(_r36).$implicit; const s_r38 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.showTip(p_r37.x, p_r37.y, s_r38.name, p_r37.label, p_r37.value, s_r38.color)); })("pointerleave", function KptChart_Case_10_Conditional_0_For_9_For_3_Template_circle_pointerleave_0_listener() { i0.ɵɵrestoreView(_r36); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
737
765
|
i0.ɵɵelementEnd();
|
|
738
766
|
} if (rf & 2) {
|
|
739
|
-
const
|
|
740
|
-
const $
|
|
741
|
-
const
|
|
742
|
-
i0.ɵɵstyleProp("fill",
|
|
743
|
-
i0.ɵɵattribute("cx",
|
|
767
|
+
const p_r37 = ctx.$implicit;
|
|
768
|
+
const $index_r39 = ctx.$index;
|
|
769
|
+
const s_r38 = i0.ɵɵnextContext().$implicit;
|
|
770
|
+
i0.ɵɵstyleProp("fill", s_r38.color)("--%NS%kpt-chart-i", $index_r39);
|
|
771
|
+
i0.ɵɵattribute("cx", p_r37.x)("cy", p_r37.y);
|
|
744
772
|
} }
|
|
745
|
-
function
|
|
773
|
+
function KptChart_Case_10_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
746
774
|
i0.ɵɵnamespaceSVG();
|
|
747
|
-
i0.ɵɵelementStart(0, "g",
|
|
748
|
-
i0.ɵɵelement(1, "path",
|
|
749
|
-
i0.ɵɵrepeaterCreate(2,
|
|
775
|
+
i0.ɵɵelementStart(0, "g", 53);
|
|
776
|
+
i0.ɵɵelement(1, "path", 54);
|
|
777
|
+
i0.ɵɵrepeaterCreate(2, KptChart_Case_10_Conditional_0_For_9_For_3_Template, 1, 6, ":svg:circle", 55, i0.ɵɵrepeaterTrackByIndex);
|
|
750
778
|
i0.ɵɵelementEnd();
|
|
751
779
|
} if (rf & 2) {
|
|
752
|
-
const
|
|
780
|
+
const s_r38 = ctx.$implicit;
|
|
753
781
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
754
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
782
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(s_r38.key));
|
|
755
783
|
i0.ɵɵadvance();
|
|
756
|
-
i0.ɵɵstyleProp("fill",
|
|
757
|
-
i0.ɵɵattribute("d",
|
|
784
|
+
i0.ɵɵstyleProp("fill", s_r38.color)("stroke", s_r38.color);
|
|
785
|
+
i0.ɵɵattribute("d", s_r38.polygon);
|
|
758
786
|
i0.ɵɵadvance();
|
|
759
|
-
i0.ɵɵrepeater(
|
|
787
|
+
i0.ɵɵrepeater(s_r38.points);
|
|
760
788
|
} }
|
|
761
|
-
function
|
|
789
|
+
function KptChart_Case_10_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
762
790
|
i0.ɵɵnamespaceSVG();
|
|
763
|
-
i0.ɵɵelementStart(0, "g",
|
|
764
|
-
i0.ɵɵrepeaterCreate(1,
|
|
765
|
-
i0.ɵɵrepeaterCreate(3,
|
|
791
|
+
i0.ɵɵelementStart(0, "g", 18);
|
|
792
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_10_Conditional_0_For_2_Template, 1, 1, ":svg:path", 51, i0.ɵɵrepeaterTrackByIndex);
|
|
793
|
+
i0.ɵɵrepeaterCreate(3, KptChart_Case_10_Conditional_0_For_4_Template, 1, 4, ":svg:line", 19, i0.ɵɵrepeaterTrackByIndex);
|
|
766
794
|
i0.ɵɵelementEnd();
|
|
767
|
-
i0.ɵɵelementStart(5, "g",
|
|
768
|
-
i0.ɵɵrepeaterCreate(6,
|
|
795
|
+
i0.ɵɵelementStart(5, "g", 21);
|
|
796
|
+
i0.ɵɵrepeaterCreate(6, KptChart_Case_10_Conditional_0_For_7_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
|
|
769
797
|
i0.ɵɵelementEnd();
|
|
770
|
-
i0.ɵɵrepeaterCreate(8,
|
|
798
|
+
i0.ɵɵrepeaterCreate(8, KptChart_Case_10_Conditional_0_For_9_Template, 4, 7, ":svg:g", 52, _forTrack0);
|
|
771
799
|
} if (rf & 2) {
|
|
772
|
-
const
|
|
800
|
+
const vm_r40 = ctx;
|
|
773
801
|
i0.ɵɵadvance();
|
|
774
|
-
i0.ɵɵrepeater(
|
|
802
|
+
i0.ɵɵrepeater(vm_r40.rings);
|
|
775
803
|
i0.ɵɵadvance(2);
|
|
776
|
-
i0.ɵɵrepeater(
|
|
804
|
+
i0.ɵɵrepeater(vm_r40.axisLines);
|
|
777
805
|
i0.ɵɵadvance(3);
|
|
778
|
-
i0.ɵɵrepeater(
|
|
806
|
+
i0.ɵɵrepeater(vm_r40.axisLabels);
|
|
779
807
|
i0.ɵɵadvance(2);
|
|
780
|
-
i0.ɵɵrepeater(
|
|
808
|
+
i0.ɵɵrepeater(vm_r40.series);
|
|
781
809
|
} }
|
|
782
|
-
function
|
|
783
|
-
i0.ɵɵconditionalCreate(0,
|
|
810
|
+
function KptChart_Case_10_Template(rf, ctx) { if (rf & 1) {
|
|
811
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_10_Conditional_0_Template, 10, 0);
|
|
784
812
|
} if (rf & 2) {
|
|
785
|
-
let
|
|
813
|
+
let tmp_2_0;
|
|
786
814
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
787
|
-
i0.ɵɵconditional((
|
|
815
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r0.radarVm()) ? 0 : -1, tmp_2_0);
|
|
788
816
|
} }
|
|
789
|
-
function
|
|
790
|
-
const
|
|
817
|
+
function KptChart_Case_11_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
818
|
+
const _r41 = i0.ɵɵgetCurrentView();
|
|
791
819
|
i0.ɵɵnamespaceSVG();
|
|
792
|
-
i0.ɵɵelementStart(0, "path",
|
|
793
|
-
i0.ɵɵlistener("pointerenter", function
|
|
820
|
+
i0.ɵɵelementStart(0, "path", 59);
|
|
821
|
+
i0.ɵɵlistener("pointerenter", function KptChart_Case_11_Conditional_0_For_2_Template_path_pointerenter_0_listener() { const sl_r42 = i0.ɵɵrestoreView(_r41).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.showTip(sl_r42.tipX, sl_r42.tipY, sl_r42.label, "", sl_r42.value, sl_r42.color)); })("pointerleave", function KptChart_Case_11_Conditional_0_For_2_Template_path_pointerleave_0_listener() { i0.ɵɵrestoreView(_r41); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.hideTip()); });
|
|
794
822
|
i0.ɵɵelementEnd();
|
|
795
823
|
} if (rf & 2) {
|
|
796
|
-
const
|
|
797
|
-
const $
|
|
824
|
+
const sl_r42 = ctx.$implicit;
|
|
825
|
+
const $index_r43 = ctx.$index;
|
|
798
826
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
799
|
-
i0.ɵɵstyleProp("fill",
|
|
800
|
-
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(
|
|
801
|
-
i0.ɵɵattribute("d",
|
|
827
|
+
i0.ɵɵstyleProp("fill", sl_r42.color)("--%NS%kpt-chart-i", $index_r43);
|
|
828
|
+
i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(sl_r42.key));
|
|
829
|
+
i0.ɵɵattribute("d", sl_r42.path);
|
|
802
830
|
} }
|
|
803
|
-
function
|
|
831
|
+
function KptChart_Case_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
804
832
|
i0.ɵɵnamespaceSVG();
|
|
805
|
-
i0.ɵɵelementStart(0, "g",
|
|
806
|
-
i0.ɵɵrepeaterCreate(1,
|
|
833
|
+
i0.ɵɵelementStart(0, "g", 57);
|
|
834
|
+
i0.ɵɵrepeaterCreate(1, KptChart_Case_11_Conditional_0_For_2_Template, 1, 7, ":svg:path", 58, _forTrack0);
|
|
807
835
|
i0.ɵɵelementEnd();
|
|
808
836
|
} if (rf & 2) {
|
|
809
837
|
i0.ɵɵadvance();
|
|
810
838
|
i0.ɵɵrepeater(ctx);
|
|
811
839
|
} }
|
|
812
|
-
function
|
|
813
|
-
i0.ɵɵconditionalCreate(0,
|
|
840
|
+
function KptChart_Case_11_Template(rf, ctx) { if (rf & 1) {
|
|
841
|
+
i0.ɵɵconditionalCreate(0, KptChart_Case_11_Conditional_0_Template, 3, 0, ":svg:g", 57);
|
|
814
842
|
} if (rf & 2) {
|
|
815
|
-
let
|
|
843
|
+
let tmp_2_0;
|
|
816
844
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
817
|
-
i0.ɵɵconditional((
|
|
845
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r0.pieVm()) ? 0 : -1, tmp_2_0);
|
|
818
846
|
} }
|
|
819
|
-
function
|
|
820
|
-
i0.ɵɵelementStart(0, "p",
|
|
847
|
+
function KptChart_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
848
|
+
i0.ɵɵelementStart(0, "p", 7);
|
|
821
849
|
i0.ɵɵtext(1);
|
|
822
850
|
i0.ɵɵelementEnd();
|
|
823
851
|
} if (rf & 2) {
|
|
@@ -826,41 +854,41 @@ function KptChart_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
826
854
|
i0.ɵɵadvance();
|
|
827
855
|
i0.ɵɵtextInterpolate(ctx_r0.config().description);
|
|
828
856
|
} }
|
|
829
|
-
function
|
|
830
|
-
i0.ɵɵelementStart(0, "th",
|
|
857
|
+
function KptChart_For_21_Template(rf, ctx) { if (rf & 1) {
|
|
858
|
+
i0.ɵɵelementStart(0, "th", 9);
|
|
831
859
|
i0.ɵɵtext(1);
|
|
832
860
|
i0.ɵɵelementEnd();
|
|
833
861
|
} if (rf & 2) {
|
|
834
|
-
const
|
|
862
|
+
const col_r44 = ctx.$implicit;
|
|
835
863
|
i0.ɵɵadvance();
|
|
836
|
-
i0.ɵɵtextInterpolate(
|
|
864
|
+
i0.ɵɵtextInterpolate(col_r44);
|
|
837
865
|
} }
|
|
838
|
-
function
|
|
866
|
+
function KptChart_For_24_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
839
867
|
i0.ɵɵelementStart(0, "td");
|
|
840
868
|
i0.ɵɵtext(1);
|
|
841
869
|
i0.ɵɵelementEnd();
|
|
842
870
|
} if (rf & 2) {
|
|
843
|
-
const
|
|
871
|
+
const value_r45 = ctx.$implicit;
|
|
844
872
|
i0.ɵɵadvance();
|
|
845
|
-
i0.ɵɵtextInterpolate(
|
|
873
|
+
i0.ɵɵtextInterpolate(value_r45);
|
|
846
874
|
} }
|
|
847
|
-
function
|
|
848
|
-
i0.ɵɵelementStart(0, "tr")(1, "th",
|
|
875
|
+
function KptChart_For_24_Template(rf, ctx) { if (rf & 1) {
|
|
876
|
+
i0.ɵɵelementStart(0, "tr")(1, "th", 60);
|
|
849
877
|
i0.ɵɵtext(2);
|
|
850
878
|
i0.ɵɵelementEnd();
|
|
851
|
-
i0.ɵɵrepeaterCreate(3,
|
|
879
|
+
i0.ɵɵrepeaterCreate(3, KptChart_For_24_For_4_Template, 2, 1, "td", null, i0.ɵɵrepeaterTrackByIndex);
|
|
852
880
|
i0.ɵɵelementEnd();
|
|
853
881
|
} if (rf & 2) {
|
|
854
|
-
const
|
|
882
|
+
const row_r46 = ctx.$implicit;
|
|
855
883
|
i0.ɵɵadvance(2);
|
|
856
|
-
i0.ɵɵtextInterpolate(
|
|
884
|
+
i0.ɵɵtextInterpolate(row_r46.label);
|
|
857
885
|
i0.ɵɵadvance();
|
|
858
|
-
i0.ɵɵrepeater(
|
|
886
|
+
i0.ɵɵrepeater(row_r46.values);
|
|
859
887
|
} }
|
|
860
|
-
function
|
|
861
|
-
const
|
|
862
|
-
i0.ɵɵelementStart(0, "kpt-chart-legend",
|
|
863
|
-
i0.ɵɵlistener("seriesToggle", function
|
|
888
|
+
function KptChart_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
889
|
+
const _r47 = i0.ɵɵgetCurrentView();
|
|
890
|
+
i0.ɵɵelementStart(0, "kpt-chart-legend", 61);
|
|
891
|
+
i0.ɵɵlistener("seriesToggle", function KptChart_Conditional_26_Template_kpt_chart_legend_seriesToggle_0_listener($event) { i0.ɵɵrestoreView(_r47); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onToggle($event)); })("highlight", function KptChart_Conditional_26_Template_kpt_chart_legend_highlight_0_listener($event) { i0.ɵɵrestoreView(_r47); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onHighlight($event)); });
|
|
864
892
|
i0.ɵɵelementEnd();
|
|
865
893
|
} if (rf & 2) {
|
|
866
894
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -868,12 +896,31 @@ function KptChart_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
|
868
896
|
} }
|
|
869
897
|
let nextChartId = 0;
|
|
870
898
|
let nextRippleId = 0;
|
|
871
|
-
const VERTICAL_INSETS = { top: 12, right: 16, bottom: 28, left: 46 };
|
|
872
|
-
const HORIZONTAL_INSETS = { top: 12, right: 16, bottom: 28, left: 76 };
|
|
873
899
|
/** Szerokość pasma smugi światła (jednostki viewBoxa) - połowa po każdej stronie czoła fali. */
|
|
874
900
|
const SHEEN_HALF = 90;
|
|
875
901
|
/** Zjechanie z punktu na sąsiedni to `leave` i zaraz `enter` - dymek czeka chwilę, zamiast gasnąć. */
|
|
876
902
|
const TIP_HIDE_DELAY = 60;
|
|
903
|
+
/**
|
|
904
|
+
* Etykiety osi poziomej: wszystkie, jeśli się mieszczą, inaczej równy podział 9/5/3/2
|
|
905
|
+
* (`axisLabelIndices`). Pełna nazwa każdej kategorii zostaje w pigułce prowadnicy i w dymku.
|
|
906
|
+
*/
|
|
907
|
+
function bottomLabels(labels, centers, y, width, m) {
|
|
908
|
+
const sizes = labels.map((l) => estimateLabelWidth(l, m.fontSize));
|
|
909
|
+
const shown = new Set(axisLabelIndices(centers, sizes));
|
|
910
|
+
return labels.map((text, i) => ({
|
|
911
|
+
at: centers[i],
|
|
912
|
+
x: clampLabel(centers[i], sizes[i], 0, width),
|
|
913
|
+
y,
|
|
914
|
+
text,
|
|
915
|
+
anchor: 'middle',
|
|
916
|
+
visible: shown.has(i),
|
|
917
|
+
}));
|
|
918
|
+
}
|
|
919
|
+
/** Etykiety osi pionowej (słupki poziome): ten sam podział, rozmiarem jest wysokość linii. */
|
|
920
|
+
function sideLabels(labels, centers, x, m) {
|
|
921
|
+
const shown = new Set(axisLabelIndices(centers, centers.map(() => m.categoryLine), 2));
|
|
922
|
+
return labels.map((text, i) => ({ at: centers[i], x, y: centers[i] + m.baselineShift, text, anchor: 'end', visible: shown.has(i) }));
|
|
923
|
+
}
|
|
877
924
|
/**
|
|
878
925
|
* Wykres SVG w pełni konfigurowalny przez obiekt `config`.
|
|
879
926
|
* Typy: line, bar, pie, doughnut, polarArea, radar. Sygnały + zoneless,
|
|
@@ -892,12 +939,45 @@ class KptChart {
|
|
|
892
939
|
constructor() {
|
|
893
940
|
this.config = input.required(/* @ts-ignore */
|
|
894
941
|
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
895
|
-
/**
|
|
942
|
+
/**
|
|
943
|
+
* Szerokość projektowa. Wykres rysuje się w pikselach swojego kontenera (mierzy go
|
|
944
|
+
* `ResizeObserver`), więc `width`/`height` wyznaczają dziś proporcję (wysokość = szerokość
|
|
945
|
+
* kontenera x height / width) i rozmiar pierwszej klatki, zanim pomiar dotrze (SSR, testy).
|
|
946
|
+
*/
|
|
896
947
|
this.width = input(600, /* @ts-ignore */
|
|
897
948
|
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
898
|
-
/** Wysokość
|
|
949
|
+
/** Wysokość projektowa - patrz `width`. */
|
|
899
950
|
this.height = input(360, /* @ts-ignore */
|
|
900
951
|
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
952
|
+
/**
|
|
953
|
+
* Zmierzona szerokość płótna w pikselach CSS; `null` przed pierwszym pomiarem.
|
|
954
|
+
*
|
|
955
|
+
* viewBox równy pikselom ekranu to cała różnica: długości rosną z kontenerem, a czcionka
|
|
956
|
+
* (11px) i grubość kresek zostają prawdziwymi pikselami. Wcześniej stały viewBox 600x360
|
|
957
|
+
* skalował się w całości - na szerokim ekranie etykiety puchły i rozmywały się, w wąskiej
|
|
958
|
+
* kolumnie malały do nieczytelności. Przerzedzanie etykiet osi liczy się teraz na realnej
|
|
959
|
+
* szerokości, więc odpowiada temu, co widać.
|
|
960
|
+
*/
|
|
961
|
+
this.measured = signal(null, /* @ts-ignore */
|
|
962
|
+
...(ngDevMode ? [{ debugName: "measured" }] : /* istanbul ignore next */ []));
|
|
963
|
+
this.canvas = viewChild('canvas', /* @ts-ignore */
|
|
964
|
+
...(ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []));
|
|
965
|
+
/** Szerokość viewBoxa - zmierzona albo projektowa. */
|
|
966
|
+
this.vw = computed(() => this.measured() ?? this.width(), /* @ts-ignore */
|
|
967
|
+
...(ngDevMode ? [{ debugName: "vw" }] : /* istanbul ignore next */ []));
|
|
968
|
+
/** Wysokość viewBoxa - z proporcji `width`/`height`. */
|
|
969
|
+
this.vh = computed(() => Math.round((this.vw() * this.height()) / this.width()), /* @ts-ignore */
|
|
970
|
+
...(ngDevMode ? [{ debugName: "vh" }] : /* istanbul ignore next */ []));
|
|
971
|
+
/**
|
|
972
|
+
* Rozmiar tekstu osi w px, odczytany z CSS płótna (`--kpt-chart-font-size`, domyślnie
|
|
973
|
+
* `--kpt-font-size-sm`). Tekst w SVG go dziedziczy, a marginesy, odstęp etykiet od osi,
|
|
974
|
+
* pigułka prowadnicy i przerzedzanie etykiet liczą się z niego (`chartMetrics`). 14 to wartość
|
|
975
|
+
* domyślnego tokenu - pierwsza klatka przed odczytem.
|
|
976
|
+
*/
|
|
977
|
+
this.fontPx = signal(14, /* @ts-ignore */
|
|
978
|
+
...(ngDevMode ? [{ debugName: "fontPx" }] : /* istanbul ignore next */ []));
|
|
979
|
+
this.metrics = computed(() => chartMetrics(this.fontPx()), /* @ts-ignore */
|
|
980
|
+
...(ngDevMode ? [{ debugName: "metrics" }] : /* istanbul ignore next */ []));
|
|
901
981
|
this.i18n = inject(KptI18n);
|
|
902
982
|
this.motionConfig = inject(KPT_MOTION_CONFIG, { optional: true });
|
|
903
983
|
this.uid = ++nextChartId;
|
|
@@ -947,7 +1027,7 @@ class KptChart {
|
|
|
947
1027
|
const pos = this.frame().tip;
|
|
948
1028
|
if (!content || !pos)
|
|
949
1029
|
return null;
|
|
950
|
-
return { x: (pos.x / this.
|
|
1030
|
+
return { x: (pos.x / this.vw()) * 100, y: (pos.y / this.vh()) * 100, ...content };
|
|
951
1031
|
}, /* @ts-ignore */
|
|
952
1032
|
...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
953
1033
|
/**
|
|
@@ -959,7 +1039,7 @@ class KptChart {
|
|
|
959
1039
|
if (!s)
|
|
960
1040
|
return null;
|
|
961
1041
|
const horizontal = this.config().type === 'bar' && this.config().orientation === 'horizontal';
|
|
962
|
-
const plot = plotArea(this.
|
|
1042
|
+
const plot = plotArea(this.vw(), this.vh(), horizontal ? this.metrics().horizontalInsets : this.metrics().verticalInsets);
|
|
963
1043
|
const start = horizontal ? plot.y : plot.x;
|
|
964
1044
|
const length = horizontal ? plot.height : plot.width;
|
|
965
1045
|
const mid = start - SHEEN_HALF + (length + 2 * SHEEN_HALF) * s.progress;
|
|
@@ -1025,7 +1105,8 @@ class KptChart {
|
|
|
1025
1105
|
: chartScale(rows, { valueAxis: c.valueAxis, stacked: c.stacked });
|
|
1026
1106
|
// Stos: punkty serii na narastającej sumie, pasmo od linii serii pod nią.
|
|
1027
1107
|
const stack = c.stacked ? stackSeries(rows) : null;
|
|
1028
|
-
const
|
|
1108
|
+
const m = this.metrics();
|
|
1109
|
+
const plot = plotArea(this.vw(), this.vh(), m.verticalInsets);
|
|
1029
1110
|
const yScale = linearScale(scale.min, scale.max, plot.y + plot.height, plot.y);
|
|
1030
1111
|
const n = c.labels.length;
|
|
1031
1112
|
const xAt = (i) => (n > 1 ? plot.x + (i / (n - 1)) * plot.width : plot.x + plot.width / 2);
|
|
@@ -1076,8 +1157,9 @@ class KptChart {
|
|
|
1076
1157
|
plot,
|
|
1077
1158
|
series,
|
|
1078
1159
|
grid: scale.ticks.map((t) => ({ x1: plot.x, y1: yScale(t), x2: plot.x + plot.width, y2: yScale(t) })),
|
|
1079
|
-
valueLabels: scale.ticks.map((t) => ({ x: plot.x -
|
|
1080
|
-
catLabels: c.labels.map((
|
|
1160
|
+
valueLabels: scale.ticks.map((t) => ({ x: plot.x - m.sideGap, y: yScale(t) + m.baselineShift, text: formatNumber(t), anchor: 'end' })),
|
|
1161
|
+
catLabels: bottomLabels(c.labels, c.labels.map((_, idx) => xAt(idx)), plot.y + plot.height + m.labelOffset, this.vw(), m),
|
|
1162
|
+
catTicks: c.labels.map((_, idx) => ({ x: xAt(idx), y: plot.y + plot.height })),
|
|
1081
1163
|
showPoints: c.points ?? true,
|
|
1082
1164
|
ghost,
|
|
1083
1165
|
};
|
|
@@ -1091,7 +1173,8 @@ class KptChart {
|
|
|
1091
1173
|
const h = this.hidden();
|
|
1092
1174
|
const orientation = c.orientation ?? 'vertical';
|
|
1093
1175
|
const active = c.series.map((s, i) => ({ s, i })).filter(({ s }) => !h.has('ser:' + s.name));
|
|
1094
|
-
const
|
|
1176
|
+
const m = this.metrics();
|
|
1177
|
+
const plot = plotArea(this.vw(), this.vh(), orientation === 'vertical' ? m.verticalInsets : m.horizontalInsets);
|
|
1095
1178
|
const domain = this.frame().domain;
|
|
1096
1179
|
const radius = c.borderRadius ?? 4;
|
|
1097
1180
|
const layout = barLayout(active.map(({ s }) => s.data), c.labels.length, plot, orientation, radius, domain ? domainScale(domain.target, domain.min, domain.max) : undefined, { stacked: c.stacked, valueAxis: c.valueAxis });
|
|
@@ -1138,8 +1221,8 @@ class KptChart {
|
|
|
1138
1221
|
plot,
|
|
1139
1222
|
bars,
|
|
1140
1223
|
grid: layout.ticks.map((t) => ({ x1: plot.x, y1: t.pos, x2: plot.x + plot.width, y2: t.pos })),
|
|
1141
|
-
valueLabels: layout.ticks.map((t) => ({ x: plot.x -
|
|
1142
|
-
catLabels: c.labels.map((
|
|
1224
|
+
valueLabels: layout.ticks.map((t) => ({ x: plot.x - m.sideGap, y: t.pos + m.baselineShift, text: formatNumber(t.value), anchor: 'end' })),
|
|
1225
|
+
catLabels: bottomLabels(c.labels, c.labels.map((_, idx) => cat.center(idx)), plot.y + plot.height + m.labelOffset, this.vw(), m),
|
|
1143
1226
|
ghost,
|
|
1144
1227
|
};
|
|
1145
1228
|
}
|
|
@@ -1148,8 +1231,8 @@ class KptChart {
|
|
|
1148
1231
|
plot,
|
|
1149
1232
|
bars,
|
|
1150
1233
|
grid: layout.ticks.map((t) => ({ x1: t.pos, y1: plot.y, x2: t.pos, y2: plot.y + plot.height })),
|
|
1151
|
-
valueLabels: layout.ticks.map((t) => ({ x: t.pos, y: plot.y + plot.height +
|
|
1152
|
-
catLabels: c.labels.map((
|
|
1234
|
+
valueLabels: layout.ticks.map((t) => ({ x: t.pos, y: plot.y + plot.height + m.labelOffset, text: formatNumber(t.value), anchor: 'middle' })),
|
|
1235
|
+
catLabels: sideLabels(c.labels, c.labels.map((_, idx) => cat.center(idx)), plot.x - m.sideGap, m),
|
|
1153
1236
|
ghost,
|
|
1154
1237
|
};
|
|
1155
1238
|
}, /* @ts-ignore */
|
|
@@ -1163,7 +1246,7 @@ class KptChart {
|
|
|
1163
1246
|
const s0 = c.series[0];
|
|
1164
1247
|
if (!s0)
|
|
1165
1248
|
return [];
|
|
1166
|
-
const { cx, cy, radius } = radialArea(this.
|
|
1249
|
+
const { cx, cy, radius } = radialArea(this.vw(), this.vh(), this.metrics().radialPadding.plain);
|
|
1167
1250
|
const entries = c.labels
|
|
1168
1251
|
.map((label, i) => ({ label, i, value: s0.data[i] ?? 0, color: seriesColor(s0.color, i) }))
|
|
1169
1252
|
.filter((e) => !h.has('cat:' + e.i));
|
|
@@ -1185,7 +1268,8 @@ class KptChart {
|
|
|
1185
1268
|
return null;
|
|
1186
1269
|
const h = this.hidden();
|
|
1187
1270
|
const count = c.labels.length;
|
|
1188
|
-
const
|
|
1271
|
+
const m = this.metrics();
|
|
1272
|
+
const { cx, cy, radius } = radialArea(this.vw(), this.vh(), m.radialPadding.labelled);
|
|
1189
1273
|
const grid = radarGrid(count, cx, cy, radius, 4);
|
|
1190
1274
|
const active = c.series.map((s, i) => ({ s, i })).filter(({ s }) => !h.has('ser:' + s.name));
|
|
1191
1275
|
let max = 1;
|
|
@@ -1206,9 +1290,9 @@ class KptChart {
|
|
|
1206
1290
|
rings: grid.rings,
|
|
1207
1291
|
axisLines: grid.axes.map((a) => ({ x1: cx, y1: cy, x2: a.end.x, y2: a.end.y })),
|
|
1208
1292
|
axisLabels: grid.axes.map((a) => {
|
|
1209
|
-
const p = polarToCartesian(cx, cy, radius +
|
|
1293
|
+
const p = polarToCartesian(cx, cy, radius + m.radarLabelGap, a.angle);
|
|
1210
1294
|
const anchor = Math.abs(p.x - cx) < 1 ? 'middle' : p.x > cx ? 'start' : 'end';
|
|
1211
|
-
return { x: p.x, y: p.y +
|
|
1295
|
+
return { x: p.x, y: p.y + m.baselineShift, text: c.labels[a.labelIndex] ?? '', anchor };
|
|
1212
1296
|
}),
|
|
1213
1297
|
series,
|
|
1214
1298
|
};
|
|
@@ -1227,19 +1311,22 @@ class KptChart {
|
|
|
1227
1311
|
if (!cat)
|
|
1228
1312
|
return null;
|
|
1229
1313
|
// Prowadnica i pigułka jadą razem z dymkiem.
|
|
1230
|
-
const x = this.frame().tip?.x ?? cat.
|
|
1231
|
-
const
|
|
1314
|
+
const x = this.frame().tip?.x ?? cat.at;
|
|
1315
|
+
const m = this.metrics();
|
|
1316
|
+
const w = Math.max(m.pill.minWidth, estimateLabelWidth(cat.text, m.fontSize) + 2 * m.pill.padding);
|
|
1317
|
+
// Pigułka przy skrajnej kategorii przesuwa się do środka zamiast wyjść poza viewBox.
|
|
1318
|
+
const labelX = clampLabel(x, w, 0, this.vw());
|
|
1232
1319
|
return {
|
|
1233
1320
|
x,
|
|
1234
1321
|
y1: vm.plot.y,
|
|
1235
1322
|
y2: vm.plot.y + vm.plot.height,
|
|
1236
1323
|
text: cat.text,
|
|
1237
|
-
labelX
|
|
1324
|
+
labelX,
|
|
1238
1325
|
labelY: cat.y,
|
|
1239
|
-
pillX:
|
|
1240
|
-
pillY: cat.y -
|
|
1326
|
+
pillX: labelX - w / 2,
|
|
1327
|
+
pillY: cat.y - m.pill.rise,
|
|
1241
1328
|
pillW: w,
|
|
1242
|
-
pillH:
|
|
1329
|
+
pillH: m.pill.height,
|
|
1243
1330
|
};
|
|
1244
1331
|
}, /* @ts-ignore */
|
|
1245
1332
|
...(ngDevMode ? [{ debugName: "crosshair" }] : /* istanbul ignore next */ []));
|
|
@@ -1248,10 +1335,34 @@ class KptChart {
|
|
|
1248
1335
|
const next = this.config();
|
|
1249
1336
|
untracked(() => this.onConfig(next));
|
|
1250
1337
|
});
|
|
1251
|
-
inject(DestroyRef)
|
|
1338
|
+
const destroyRef = inject(DestroyRef);
|
|
1339
|
+
destroyRef.onDestroy(() => {
|
|
1252
1340
|
this.motion.stop();
|
|
1253
1341
|
clearTimeout(this.hideTimer);
|
|
1254
1342
|
});
|
|
1343
|
+
// Pomiar płótna. Wysokość wynika z szerokości, a szerokości kontenera nie zmienia wysokość
|
|
1344
|
+
// wykresu, więc obserwator nie wpada w pętlę. Zaokrąglenie gasi drgania o ułamek piksela.
|
|
1345
|
+
afterNextRender(() => {
|
|
1346
|
+
const el = this.canvas()?.nativeElement;
|
|
1347
|
+
if (!el || typeof ResizeObserver === 'undefined')
|
|
1348
|
+
return;
|
|
1349
|
+
const readFont = () => {
|
|
1350
|
+
const px = parseFloat(getComputedStyle(el).fontSize);
|
|
1351
|
+
if (px > 0 && px !== this.fontPx())
|
|
1352
|
+
this.fontPx.set(px);
|
|
1353
|
+
};
|
|
1354
|
+
readFont();
|
|
1355
|
+
// Rozmiar tekstu czytany przy każdej zmianie szerokości - zmiana tokenu (breakpoint, motyw)
|
|
1356
|
+
// zwykle idzie w parze ze zmianą układu.
|
|
1357
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
1358
|
+
const w = Math.round(entry?.contentRect.width ?? 0);
|
|
1359
|
+
if (w > 0 && w !== this.measured())
|
|
1360
|
+
this.measured.set(w);
|
|
1361
|
+
readFont();
|
|
1362
|
+
});
|
|
1363
|
+
observer.observe(el);
|
|
1364
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
1365
|
+
});
|
|
1255
1366
|
}
|
|
1256
1367
|
// --- Zdarzenia ---
|
|
1257
1368
|
/**
|
|
@@ -1266,7 +1377,7 @@ class KptChart {
|
|
|
1266
1377
|
const p = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix.inverse());
|
|
1267
1378
|
const line = this.lineVm();
|
|
1268
1379
|
if (line) {
|
|
1269
|
-
const idx = nearestIndex(line.catLabels.map((l) => l.
|
|
1380
|
+
const idx = nearestIndex(line.catLabels.map((l) => l.at), p.x);
|
|
1270
1381
|
if (this.keepTip(idx))
|
|
1271
1382
|
return;
|
|
1272
1383
|
const points = line.series.map((s) => ({ s, pt: s.points[idx] })).filter((e) => e.pt);
|
|
@@ -1285,7 +1396,7 @@ class KptChart {
|
|
|
1285
1396
|
if (!bars)
|
|
1286
1397
|
return;
|
|
1287
1398
|
const vertical = bars.orientation === 'vertical';
|
|
1288
|
-
const idx = nearestIndex(bars.catLabels.map((l) =>
|
|
1399
|
+
const idx = nearestIndex(bars.catLabels.map((l) => l.at), vertical ? p.x : p.y);
|
|
1289
1400
|
if (this.keepTip(idx))
|
|
1290
1401
|
return;
|
|
1291
1402
|
const group = bars.bars.filter((b) => b.cat === idx);
|
|
@@ -1293,8 +1404,8 @@ class KptChart {
|
|
|
1293
1404
|
return;
|
|
1294
1405
|
const label = this.config().labels[idx] ?? '';
|
|
1295
1406
|
const center = bars.catLabels[idx];
|
|
1296
|
-
const x = vertical ? (center?.
|
|
1297
|
-
const y = vertical ? Math.min(...group.map((b) => b.tipY)) : (center
|
|
1407
|
+
const x = vertical ? (center?.at ?? group[0].tipX) : Math.max(...group.map((b) => b.tipX));
|
|
1408
|
+
const y = vertical ? Math.min(...group.map((b) => b.tipY)) : (center?.at ?? group[0].tipY);
|
|
1298
1409
|
this.openTip(x, y, label, group.map((b) => this.row(b.name, label, b.value, b.color)), idx);
|
|
1299
1410
|
}
|
|
1300
1411
|
/** Wycinki i radar: dymek jednego elementu pod kursorem. */
|
|
@@ -1387,52 +1498,56 @@ class KptChart {
|
|
|
1387
1498
|
this.motion.transition(from, to, { delta: withAxis && next.animation?.delta !== false, scales });
|
|
1388
1499
|
}
|
|
1389
1500
|
static { this.ɵfac = function KptChart_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChart)(); }; }
|
|
1390
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChart, selectors: [["kpt-chart"]],
|
|
1501
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChart, selectors: [["kpt-chart"]], viewQuery: function KptChart_Query(rf, ctx) { if (rf & 1) {
|
|
1502
|
+
i0.ɵɵviewQuerySignal(ctx.canvas, _c0, 5);
|
|
1503
|
+
} if (rf & 2) {
|
|
1504
|
+
i0.ɵɵqueryAdvance();
|
|
1505
|
+
} }, hostAttrs: [1, "kpt-chart-host"], hostVars: 8, hostBindings: function KptChart_HostBindings(rf, ctx) { if (rf & 2) {
|
|
1391
1506
|
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");
|
|
1392
1507
|
i0.ɵɵclassProp("kpt-chart--no-anim", !ctx.anim().enabled);
|
|
1393
|
-
} }, inputs: { config: [1, "config"], width: [1, "width"], height: [1, "height"] }, decls:
|
|
1394
|
-
i0.ɵɵelementStart(0, "div",
|
|
1395
|
-
i0.ɵɵconditionalCreate(1, KptChart_Conditional_1_Template, 2, 15, "div",
|
|
1396
|
-
i0.ɵɵconditionalCreate(2, KptChart_Conditional_2_Template, 2, 15, "div",
|
|
1397
|
-
i0.ɵɵelementStart(3, "div",
|
|
1508
|
+
} }, inputs: { config: [1, "config"], width: [1, "width"], height: [1, "height"] }, decls: 27, vars: 14, consts: [["canvas", ""], [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"], ["aria-hidden", "true", 1, "kpt-chart__cat-ticks"], ["r", "2", 1, "kpt-chart__cat-tick", 3, "kpt-chart__cat-tick--active"], [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"], ["r", "2", 1, "kpt-chart__cat-tick"], ["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) {
|
|
1509
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
1510
|
+
i0.ɵɵconditionalCreate(1, KptChart_Conditional_1_Template, 2, 15, "div", 2);
|
|
1511
|
+
i0.ɵɵconditionalCreate(2, KptChart_Conditional_2_Template, 2, 15, "div", 3);
|
|
1512
|
+
i0.ɵɵelementStart(3, "div", 4)(4, "div", 5, 0);
|
|
1398
1513
|
i0.ɵɵnamespaceSVG();
|
|
1399
|
-
i0.ɵɵelementStart(
|
|
1400
|
-
i0.ɵɵconditionalCreate(
|
|
1401
|
-
i0.ɵɵconditionalCreate(
|
|
1514
|
+
i0.ɵɵelementStart(6, "svg", 6);
|
|
1515
|
+
i0.ɵɵconditionalCreate(7, KptChart_Conditional_7_Template, 5, 5, ":svg:defs");
|
|
1516
|
+
i0.ɵɵconditionalCreate(8, KptChart_Case_8_Template, 1, 1)(9, KptChart_Case_9_Template, 1, 1)(10, KptChart_Case_10_Template, 1, 1)(11, KptChart_Case_11_Template, 1, 1);
|
|
1402
1517
|
i0.ɵɵelementEnd();
|
|
1403
|
-
i0.ɵɵconditionalCreate(
|
|
1518
|
+
i0.ɵɵconditionalCreate(12, KptChart_Conditional_12_Template, 2, 2, "p", 7);
|
|
1404
1519
|
i0.ɵɵnamespaceHTML();
|
|
1405
|
-
i0.ɵɵelementStart(
|
|
1406
|
-
i0.ɵɵtext(
|
|
1520
|
+
i0.ɵɵelementStart(13, "table", 8)(14, "caption");
|
|
1521
|
+
i0.ɵɵtext(15);
|
|
1407
1522
|
i0.ɵɵelementEnd();
|
|
1408
|
-
i0.ɵɵelementStart(
|
|
1409
|
-
i0.ɵɵtext(
|
|
1523
|
+
i0.ɵɵelementStart(16, "thead")(17, "tr")(18, "th", 9);
|
|
1524
|
+
i0.ɵɵtext(19);
|
|
1410
1525
|
i0.ɵɵelementEnd();
|
|
1411
|
-
i0.ɵɵrepeaterCreate(
|
|
1526
|
+
i0.ɵɵrepeaterCreate(20, KptChart_For_21_Template, 2, 1, "th", 9, i0.ɵɵrepeaterTrackByIndex);
|
|
1412
1527
|
i0.ɵɵelementEnd()();
|
|
1413
|
-
i0.ɵɵelementStart(
|
|
1414
|
-
i0.ɵɵrepeaterCreate(
|
|
1528
|
+
i0.ɵɵelementStart(22, "tbody");
|
|
1529
|
+
i0.ɵɵrepeaterCreate(23, KptChart_For_24_Template, 5, 1, "tr", null, i0.ɵɵrepeaterTrackByIndex);
|
|
1415
1530
|
i0.ɵɵelementEnd()();
|
|
1416
|
-
i0.ɵɵelement(
|
|
1531
|
+
i0.ɵɵelement(25, "kpt-chart-tooltip", 10);
|
|
1417
1532
|
i0.ɵɵelementEnd();
|
|
1418
|
-
i0.ɵɵconditionalCreate(
|
|
1533
|
+
i0.ɵɵconditionalCreate(26, KptChart_Conditional_26_Template, 1, 5, "kpt-chart-legend", 11);
|
|
1419
1534
|
i0.ɵɵelementEnd()();
|
|
1420
1535
|
} if (rf & 2) {
|
|
1421
|
-
let tmp_6_0;
|
|
1422
1536
|
let tmp_7_0;
|
|
1537
|
+
let tmp_8_0;
|
|
1423
1538
|
i0.ɵɵattribute("data-legend", ctx.legendOpts().display ? ctx.legendOpts().position : null);
|
|
1424
1539
|
i0.ɵɵadvance();
|
|
1425
1540
|
i0.ɵɵconditional(ctx.titleOpts()?.display && ctx.titleOpts()?.text ? 1 : -1);
|
|
1426
1541
|
i0.ɵɵadvance();
|
|
1427
1542
|
i0.ɵɵconditional(ctx.subtitleOpts()?.display && ctx.subtitleOpts()?.text ? 2 : -1);
|
|
1428
|
-
i0.ɵɵadvance(
|
|
1429
|
-
i0.ɵɵattribute("viewBox", "0 0 " + ctx.
|
|
1543
|
+
i0.ɵɵadvance(4);
|
|
1544
|
+
i0.ɵɵattribute("viewBox", "0 0 " + ctx.vw() + " " + ctx.vh())("aria-label", ctx.accessibleName())("aria-describedby", ctx.config().description ? ctx.descId : null);
|
|
1430
1545
|
i0.ɵɵadvance();
|
|
1431
|
-
i0.ɵɵconditional((
|
|
1546
|
+
i0.ɵɵconditional((tmp_7_0 = ctx.sheen()) ? 7 : -1, tmp_7_0);
|
|
1432
1547
|
i0.ɵɵadvance();
|
|
1433
|
-
i0.ɵɵconditional((
|
|
1548
|
+
i0.ɵɵconditional((tmp_8_0 = ctx.type()) === "line" ? 8 : tmp_8_0 === "bar" ? 9 : tmp_8_0 === "radar" ? 10 : 11);
|
|
1434
1549
|
i0.ɵɵadvance(4);
|
|
1435
|
-
i0.ɵɵconditional(ctx.config().description ?
|
|
1550
|
+
i0.ɵɵconditional(ctx.config().description ? 12 : -1);
|
|
1436
1551
|
i0.ɵɵadvance(3);
|
|
1437
1552
|
i0.ɵɵtextInterpolate2("", ctx.i18n.t("chart.dataTable"), ": ", ctx.accessibleName());
|
|
1438
1553
|
i0.ɵɵadvance(4);
|
|
@@ -1444,8 +1559,8 @@ class KptChart {
|
|
|
1444
1559
|
i0.ɵɵadvance(2);
|
|
1445
1560
|
i0.ɵɵproperty("state", ctx.tooltip());
|
|
1446
1561
|
i0.ɵɵadvance();
|
|
1447
|
-
i0.ɵɵconditional(ctx.legendOpts().display ?
|
|
1448
|
-
} }, 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 }); }
|
|
1562
|
+
i0.ɵɵconditional(ctx.legendOpts().display ? 26 : -1);
|
|
1563
|
+
} }, 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%;font-size:var(--%NS%kpt-chart-font-size, var(--%NS%kpt-font-size-sm, .875rem))}.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:inherit;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-tick{r:2px;fill:var(--%NS%kpt-color-border-strong);pointer-events:none;transition:r calc(.15s * var(--%NS%kpt-motion-scale, 1)) var(--%NS%kpt-chart-ease),fill calc(.15s * var(--%NS%kpt-motion-scale, 1)) var(--%NS%kpt-chart-ease)}.kpt-chart__cat-tick--active{r:3.5px;fill:var(--%NS%kpt-color-on-surface)}.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:inherit;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:.85em;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 }); }
|
|
1449
1564
|
}
|
|
1450
1565
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptChart, [{
|
|
1451
1566
|
type: Component,
|
|
@@ -1455,9 +1570,9 @@ class KptChart {
|
|
|
1455
1570
|
'[style.--kpt-chart-duration]': "anim().duration + 'ms'",
|
|
1456
1571
|
'[style.--kpt-chart-stagger]': "anim().stagger + 'ms'",
|
|
1457
1572
|
'[style.--kpt-chart-delay]': "anim().delay + 'ms'",
|
|
1458
|
-
}, 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"] }]
|
|
1459
|
-
}], () => [], { 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 }] }] }); })();
|
|
1460
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber:
|
|
1573
|
+
}, template: "<div class=\"kpt-chart\" [attr.data-legend]=\"legendOpts().display ? legendOpts().position : null\">\r\n @if (titleOpts()?.display && titleOpts()?.text) {\r\n <div\r\n class=\"kpt-chart__title\"\r\n [style.text-align]=\"titleStyle()\"\r\n [style.color]=\"titleOpts()?.color\"\r\n [style.font-family]=\"titleOpts()?.font?.family\"\r\n [style.font-size.px]=\"titleOpts()?.font?.size\"\r\n [style.font-weight]=\"titleOpts()?.font?.weight\"\r\n [style.padding-top.px]=\"titleOpts()?.padding?.top\"\r\n [style.padding-bottom.px]=\"titleOpts()?.padding?.bottom\"\r\n >\r\n {{ titleOpts()?.text }}\r\n </div>\r\n }\r\n @if (subtitleOpts()?.display && subtitleOpts()?.text) {\r\n <div\r\n class=\"kpt-chart__subtitle\"\r\n [style.text-align]=\"subtitleStyle()\"\r\n [style.color]=\"subtitleOpts()?.color\"\r\n [style.font-family]=\"subtitleOpts()?.font?.family\"\r\n [style.font-size.px]=\"subtitleOpts()?.font?.size\"\r\n [style.font-weight]=\"subtitleOpts()?.font?.weight\"\r\n [style.padding-top.px]=\"subtitleOpts()?.padding?.top\"\r\n [style.padding-bottom.px]=\"subtitleOpts()?.padding?.bottom\"\r\n >\r\n {{ subtitleOpts()?.text }}\r\n </div>\r\n }\r\n\r\n <div class=\"kpt-chart__body\">\r\n <div class=\"kpt-chart__canvas\" #canvas>\r\n <svg\r\n [attr.viewBox]=\"'0 0 ' + vw() + ' ' + vh()\"\r\n class=\"kpt-chart__svg\"\r\n role=\"img\"\r\n [attr.aria-label]=\"accessibleName()\"\r\n [attr.aria-describedby]=\"config().description ? descId : null\"\r\n preserveAspectRatio=\"xMidYMid meet\"\r\n >\r\n @if (sheen(); as sh) {\r\n <defs>\r\n <linearGradient [attr.id]=\"sheenId\" gradientUnits=\"userSpaceOnUse\" [attr.x1]=\"sh.x1\" [attr.x2]=\"sh.x2\" [attr.y1]=\"sh.y1\" [attr.y2]=\"sh.y2\">\r\n <stop offset=\"0\" class=\"kpt-chart__sheen-stop\" stop-opacity=\"0\" />\r\n <stop offset=\"0.5\" class=\"kpt-chart__sheen-stop\" stop-opacity=\"0.95\" />\r\n <stop offset=\"1\" class=\"kpt-chart__sheen-stop\" stop-opacity=\"0\" />\r\n </linearGradient>\r\n </defs>\r\n }\r\n @switch (type()) {\r\n @case ('line') {\r\n @if (lineVm(); as vm) {\r\n <g class=\"kpt-chart__grid\">\r\n @for (g of vm.grid; track $index) {\r\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"g.x1\" [attr.y1]=\"g.y1\" [attr.x2]=\"g.x2\" [attr.y2]=\"g.y2\" />\r\n }\r\n </g>\r\n @if (crosshair(); as ch) {\r\n <line class=\"kpt-chart__crosshair\" [attr.x1]=\"ch.x\" [attr.y1]=\"ch.y1\" [attr.x2]=\"ch.x\" [attr.y2]=\"ch.y2\" />\r\n }\r\n <g class=\"kpt-chart__axis\">\r\n @for (l of vm.valueLabels; track $index) {\r\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\r\n }\r\n @for (l of vm.catLabels; track $index) {\r\n @if (l.visible) {\r\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\r\n }\r\n }\r\n </g>\r\n <!-- Kropka pod ka\u017Cd\u0105 kategori\u0105: mi\u0119dzy etykietami wida\u0107, gdzie s\u0105 punkty i kt\u00F3ry jest aktywny. -->\r\n <g class=\"kpt-chart__cat-ticks\" aria-hidden=\"true\">\r\n @for (t of vm.catTicks; track $index) {\r\n <circle class=\"kpt-chart__cat-tick\" r=\"2\" [class.kpt-chart__cat-tick--active]=\"activeIndex() === $index\" [attr.cx]=\"t.x\" [attr.cy]=\"t.y\" />\r\n }\r\n </g>\r\n @if (crosshair(); as ch) {\r\n <g class=\"kpt-chart__cat-active\">\r\n <rect [attr.x]=\"ch.pillX\" [attr.y]=\"ch.pillY\" [attr.width]=\"ch.pillW\" [attr.height]=\"ch.pillH\" [attr.rx]=\"ch.pillH / 2\" />\r\n <text [attr.x]=\"ch.labelX\" [attr.y]=\"ch.labelY\" text-anchor=\"middle\">{{ ch.text }}</text>\r\n </g>\r\n }\r\n <!-- Duch poprzedniego stanu i odcinki zmiany - tylko na czas przej\u015Bcia danych. -->\r\n @for (g of vm.ghost; track g.key) {\r\n <g class=\"kpt-chart__ghost\" aria-hidden=\"true\">\r\n <path class=\"kpt-chart__ghost-line\" [attr.d]=\"g.path\" />\r\n @for (t of g.ticks; track $index) {\r\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\" />\r\n }\r\n </g>\r\n }\r\n @for (s of vm.series; track s.key) {\r\n <g class=\"kpt-chart__series\" [class.kpt-chart__series--dim]=\"dim(s.key)\">\r\n @if (s.area) {\r\n <path class=\"kpt-chart__area\" [attr.d]=\"s.area\" [style.fill]=\"s.color\" />\r\n }\r\n <path class=\"kpt-chart__line\" [attr.d]=\"s.path\" [style.stroke]=\"s.color\" pathLength=\"1\" />\r\n @for (p of s.points; track $index) {\r\n @if (vm.showPoints) {\r\n <circle\r\n class=\"kpt-chart__point\"\r\n [class.kpt-chart__point--active]=\"activeIndex() === $index\"\r\n [attr.cx]=\"p.x\"\r\n [attr.cy]=\"p.y\"\r\n r=\"4\"\r\n [style.fill]=\"s.color\"\r\n [style.--kpt-chart-i]=\"$index\"\r\n />\r\n }\r\n }\r\n </g>\r\n }\r\n @if (sheen(); as sh) {\r\n @for (s of vm.series; track s.key) {\r\n <path class=\"kpt-chart__sheen-line\" [attr.d]=\"s.path\" [attr.stroke]=\"'url(#' + sheenId + ')'\" [style.opacity]=\"sh.opacity\" aria-hidden=\"true\" />\r\n }\r\n }\r\n @for (g of vm.ghost; track g.key) {\r\n @for (c of g.chips; track c.index) {\r\n <text\r\n class=\"kpt-chart__chip\"\r\n [attr.data-kind]=\"c.kind\"\r\n [attr.x]=\"c.x\"\r\n [attr.y]=\"c.y\"\r\n text-anchor=\"middle\"\r\n [style.--kpt-chart-i]=\"c.index\"\r\n aria-hidden=\"true\"\r\n >{{ c.text }}</text>\r\n }\r\n }\r\n @for (r of ripple(); track r.id) {\r\n <circle class=\"kpt-chart__ripple\" [attr.cx]=\"r.x\" [attr.cy]=\"r.y\" r=\"5\" [style.stroke]=\"r.color\" aria-hidden=\"true\" />\r\n }\r\n <!-- Najechanie: najbli\u017Csza kategoria w ca\u0142ym obszarze wykresu - dymek jedzie mi\u0119dzy punktami bez ga\u015Bni\u0119cia. -->\r\n <rect\r\n class=\"kpt-chart__hover\"\r\n [attr.x]=\"vm.plot.x - 12\"\r\n [attr.y]=\"vm.plot.y - 12\"\r\n [attr.width]=\"vm.plot.width + 24\"\r\n [attr.height]=\"vm.plot.height + 24\"\r\n (pointermove)=\"onCategoryMove($event)\"\r\n (pointerleave)=\"hideTip()\"\r\n />\r\n }\r\n }\r\n\r\n @case ('bar') {\r\n @if (barVm(); as vm) {\r\n <g class=\"kpt-chart__grid\">\r\n @for (g of vm.grid; track $index) {\r\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"g.x1\" [attr.y1]=\"g.y1\" [attr.x2]=\"g.x2\" [attr.y2]=\"g.y2\" />\r\n }\r\n </g>\r\n <g class=\"kpt-chart__axis\">\r\n @for (l of vm.valueLabels; track $index) {\r\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\r\n }\r\n @for (l of vm.catLabels; track $index) {\r\n @if (l.visible) {\r\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\r\n }\r\n }\r\n </g>\r\n @if (vm.ghost.length) {\r\n <g class=\"kpt-chart__ghost\" aria-hidden=\"true\">\r\n @for (g of vm.ghost; track g.key) {\r\n <path class=\"kpt-chart__ghost-bar\" [attr.d]=\"g.path\" />\r\n }\r\n </g>\r\n }\r\n <g class=\"kpt-chart__bars\" [attr.data-orientation]=\"vm.orientation\">\r\n @for (b of vm.bars; track b.key + '#' + b.index) {\r\n <path\r\n class=\"kpt-chart__bar\"\r\n [class.kpt-chart__series--dim]=\"dim(b.key)\"\r\n [attr.d]=\"b.path\"\r\n [style.fill]=\"b.color\"\r\n [style.--kpt-chart-i]=\"b.index\"\r\n />\r\n }\r\n </g>\r\n @if (vm.ghost.length) {\r\n <g class=\"kpt-chart__ghost\" aria-hidden=\"true\">\r\n @for (g of vm.ghost; track g.key) {\r\n <rect\r\n class=\"kpt-chart__delta-bar\"\r\n [attr.data-kind]=\"g.delta.kind\"\r\n [attr.x]=\"g.delta.x\"\r\n [attr.y]=\"g.delta.y\"\r\n [attr.width]=\"g.delta.width\"\r\n [attr.height]=\"g.delta.height\"\r\n rx=\"2\"\r\n />\r\n }\r\n </g>\r\n }\r\n @if (sheen(); as sh) {\r\n @for (b of vm.bars; track b.key + '#' + b.index) {\r\n <path class=\"kpt-chart__sheen-bar\" [attr.d]=\"b.path\" [attr.fill]=\"'url(#' + sheenId + ')'\" [style.opacity]=\"sh.opacity * 0.7\" aria-hidden=\"true\" />\r\n }\r\n }\r\n <rect\r\n class=\"kpt-chart__hover\"\r\n [attr.x]=\"vm.plot.x\"\r\n [attr.y]=\"vm.plot.y\"\r\n [attr.width]=\"vm.plot.width\"\r\n [attr.height]=\"vm.plot.height\"\r\n (pointermove)=\"onCategoryMove($event)\"\r\n (pointerleave)=\"hideTip()\"\r\n />\r\n }\r\n }\r\n\r\n @case ('radar') {\r\n @if (radarVm(); as vm) {\r\n <g class=\"kpt-chart__grid\">\r\n @for (r of vm.rings; track $index) {\r\n <path class=\"kpt-chart__ring\" [attr.d]=\"r\" />\r\n }\r\n @for (a of vm.axisLines; track $index) {\r\n <line class=\"kpt-chart__gridline\" [attr.x1]=\"a.x1\" [attr.y1]=\"a.y1\" [attr.x2]=\"a.x2\" [attr.y2]=\"a.y2\" />\r\n }\r\n </g>\r\n <g class=\"kpt-chart__axis\">\r\n @for (l of vm.axisLabels; track $index) {\r\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\r\n }\r\n </g>\r\n @for (s of vm.series; track s.key) {\r\n <g class=\"kpt-chart__series kpt-chart__radar\" [class.kpt-chart__series--dim]=\"dim(s.key)\">\r\n <path class=\"kpt-chart__radar-area\" [attr.d]=\"s.polygon\" [style.fill]=\"s.color\" [style.stroke]=\"s.color\" />\r\n @for (p of s.points; track $index) {\r\n <circle\r\n class=\"kpt-chart__point\"\r\n [attr.cx]=\"p.x\"\r\n [attr.cy]=\"p.y\"\r\n r=\"4\"\r\n [style.fill]=\"s.color\"\r\n [style.--kpt-chart-i]=\"$index\"\r\n (pointerenter)=\"showTip(p.x, p.y, s.name, p.label, p.value, s.color)\"\r\n (pointerleave)=\"hideTip()\"\r\n />\r\n }\r\n </g>\r\n }\r\n }\r\n }\r\n\r\n @default {\r\n @if (pieVm(); as slices) {\r\n <g class=\"kpt-chart__slices\">\r\n @for (sl of slices; track sl.key) {\r\n <path\r\n class=\"kpt-chart__slice\"\r\n [class.kpt-chart__series--dim]=\"dim(sl.key)\"\r\n [attr.d]=\"sl.path\"\r\n [style.fill]=\"sl.color\"\r\n [style.--kpt-chart-i]=\"$index\"\r\n (pointerenter)=\"showTip(sl.tipX, sl.tipY, sl.label, '', sl.value, sl.color)\"\r\n (pointerleave)=\"hideTip()\"\r\n />\r\n }\r\n </g>\r\n }\r\n }\r\n }\r\n </svg>\r\n @if (config().description) {\r\n <p class=\"kpt-chart__sr\" [id]=\"descId\">{{ config().description }}</p>\r\n }\r\n <!-- Dane wykresu dla czytnika: tabela ukryta wizualnie, nie przez display:none. -->\r\n <table class=\"kpt-chart__sr\">\r\n <caption>{{ i18n.t('chart.dataTable') }}: {{ accessibleName() }}</caption>\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">{{ i18n.t('chart.category') }}</th>\r\n @for (col of dataTable().columns; track $index) {\r\n <th scope=\"col\">{{ col }}</th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (row of dataTable().rows; track $index) {\r\n <tr>\r\n <th scope=\"row\">{{ row.label }}</th>\r\n @for (value of row.values; track $index) {\r\n <td>{{ value }}</td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n\r\n <kpt-chart-tooltip [state]=\"tooltip()\" />\r\n </div>\r\n\r\n @if (legendOpts().display) {\r\n <kpt-chart-legend\r\n [items]=\"legendItems()\"\r\n [position]=\"legendOpts().position\"\r\n [align]=\"legendOpts().align\"\r\n [pointStyle]=\"legendOpts().pointStyle\"\r\n [title]=\"legendOpts().title\"\r\n (seriesToggle)=\"onToggle($event)\"\r\n (highlight)=\"onHighlight($event)\"\r\n />\r\n }\r\n </div>\r\n</div>\r\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%;font-size:var(--kpt-chart-font-size, var(--kpt-font-size-sm, .875rem))}.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:inherit;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-tick{r:2px;fill:var(--kpt-color-border-strong);pointer-events:none;transition:r calc(.15s * var(--kpt-motion-scale, 1)) var(--kpt-chart-ease),fill calc(.15s * var(--kpt-motion-scale, 1)) var(--kpt-chart-ease)}.kpt-chart__cat-tick--active{r:3.5px;fill:var(--kpt-color-on-surface)}.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:inherit;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:.85em;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"] }]
|
|
1574
|
+
}], () => [], { 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 }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] }); })();
|
|
1575
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber: 220 }); })();
|
|
1461
1576
|
/** Indeks najbliższej pozycji (środka kategorii) do współrzędnej kursora. */
|
|
1462
1577
|
function nearestIndex(positions, at) {
|
|
1463
1578
|
let best = 0;
|