@konce-pt/angular 0.18.1 → 0.18.3

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, linkedSignal, computed, viewChild, afterRenderEffect, inject, signal, effect, untracked, DestroyRef } from '@angular/core';
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, estimateLabelWidth, axisLabelIndices, clampLabel, 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", 11);
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", 12);
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 KptChart_Conditional_6_Template(rf, ctx) { if (rf & 1) {
343
+ function KptChart_Conditional_7_Template(rf, ctx) { if (rf & 1) {
343
344
  i0.ɵɵnamespaceSVG();
344
- i0.ɵɵelementStart(0, "defs")(1, "linearGradient", 13);
345
- i0.ɵɵelement(2, "stop", 14)(3, "stop", 15)(4, "stop", 16);
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 KptChart_Case_7_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
354
+ function KptChart_Case_8_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
354
355
  i0.ɵɵnamespaceSVG();
355
- i0.ɵɵelement(0, "line", 18);
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 KptChart_Case_7_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
361
+ function KptChart_Case_8_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
361
362
  i0.ɵɵnamespaceSVG();
362
- i0.ɵɵelement(0, "line", 19);
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 KptChart_Case_7_Conditional_0_For_6_Template(rf, ctx) { if (rf & 1) {
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,7 +376,7 @@ 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 KptChart_Case_7_Conditional_0_For_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
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);
@@ -386,15 +387,15 @@ function KptChart_Case_7_Conditional_0_For_8_Conditional_0_Template(rf, ctx) { i
386
387
  i0.ɵɵadvance();
387
388
  i0.ɵɵtextInterpolate(l_r7.text);
388
389
  } }
389
- function KptChart_Case_7_Conditional_0_For_8_Template(rf, ctx) { if (rf & 1) {
390
- i0.ɵɵconditionalCreate(0, KptChart_Case_7_Conditional_0_For_8_Conditional_0_Template, 2, 4, ":svg:text");
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");
391
392
  } if (rf & 2) {
392
393
  const l_r7 = ctx.$implicit;
393
394
  i0.ɵɵconditional(l_r7.visible ? 0 : -1);
394
395
  } }
395
- function KptChart_Case_7_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
396
+ function KptChart_Case_8_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
396
397
  i0.ɵɵnamespaceSVG();
397
- i0.ɵɵelement(0, "circle", 28);
398
+ i0.ɵɵelement(0, "circle", 29);
398
399
  } if (rf & 2) {
399
400
  const t_r8 = ctx.$implicit;
400
401
  const $index_r9 = ctx.$index;
@@ -402,11 +403,11 @@ function KptChart_Case_7_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
402
403
  i0.ɵɵclassProp("kpt-chart__cat-tick--active", ctx_r0.activeIndex() === $index_r9);
403
404
  i0.ɵɵattribute("cx", t_r8.x)("cy", t_r8.y);
404
405
  } }
405
- function KptChart_Case_7_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
406
+ function KptChart_Case_8_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
406
407
  i0.ɵɵnamespaceSVG();
407
- i0.ɵɵelementStart(0, "g", 23);
408
+ i0.ɵɵelementStart(0, "g", 24);
408
409
  i0.ɵɵelement(1, "rect");
409
- i0.ɵɵelementStart(2, "text", 29);
410
+ i0.ɵɵelementStart(2, "text", 30);
410
411
  i0.ɵɵtext(3);
411
412
  i0.ɵɵelementEnd()();
412
413
  } if (rf & 2) {
@@ -418,18 +419,18 @@ function KptChart_Case_7_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf
418
419
  i0.ɵɵadvance();
419
420
  i0.ɵɵtextInterpolate(ch_r10.text);
420
421
  } }
421
- function KptChart_Case_7_Conditional_0_For_14_For_3_Template(rf, ctx) { if (rf & 1) {
422
+ function KptChart_Case_8_Conditional_0_For_14_For_3_Template(rf, ctx) { if (rf & 1) {
422
423
  i0.ɵɵnamespaceSVG();
423
- i0.ɵɵelement(0, "line", 31);
424
+ i0.ɵɵelement(0, "line", 32);
424
425
  } if (rf & 2) {
425
426
  const t_r11 = ctx.$implicit;
426
427
  i0.ɵɵattribute("data-kind", t_r11.kind)("x1", t_r11.x)("x2", t_r11.x)("y1", t_r11.y1)("y2", t_r11.y2);
427
428
  } }
428
- function KptChart_Case_7_Conditional_0_For_14_Template(rf, ctx) { if (rf & 1) {
429
+ function KptChart_Case_8_Conditional_0_For_14_Template(rf, ctx) { if (rf & 1) {
429
430
  i0.ɵɵnamespaceSVG();
430
- i0.ɵɵelementStart(0, "g", 24);
431
- i0.ɵɵelement(1, "path", 30);
432
- i0.ɵɵrepeaterCreate(2, KptChart_Case_7_Conditional_0_For_14_For_3_Template, 1, 5, ":svg:line", 31, i0.ɵɵrepeaterTrackByIndex);
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);
433
434
  i0.ɵɵelementEnd();
434
435
  } if (rf & 2) {
435
436
  const g_r12 = ctx.$implicit;
@@ -438,17 +439,17 @@ function KptChart_Case_7_Conditional_0_For_14_Template(rf, ctx) { if (rf & 1) {
438
439
  i0.ɵɵadvance();
439
440
  i0.ɵɵrepeater(g_r12.ticks);
440
441
  } }
441
- function KptChart_Case_7_Conditional_0_For_16_Conditional_1_Template(rf, ctx) { if (rf & 1) {
442
+ function KptChart_Case_8_Conditional_0_For_16_Conditional_1_Template(rf, ctx) { if (rf & 1) {
442
443
  i0.ɵɵnamespaceSVG();
443
- i0.ɵɵelement(0, "path", 35);
444
+ i0.ɵɵelement(0, "path", 36);
444
445
  } if (rf & 2) {
445
446
  const s_r13 = i0.ɵɵnextContext().$implicit;
446
447
  i0.ɵɵstyleProp("fill", s_r13.color);
447
448
  i0.ɵɵattribute("d", s_r13.area);
448
449
  } }
449
- function KptChart_Case_7_Conditional_0_For_16_For_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
450
+ function KptChart_Case_8_Conditional_0_For_16_For_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
450
451
  i0.ɵɵnamespaceSVG();
451
- i0.ɵɵelement(0, "circle", 37);
452
+ i0.ɵɵelement(0, "circle", 38);
452
453
  } if (rf & 2) {
453
454
  const ctx_r13 = i0.ɵɵnextContext();
454
455
  const p_r15 = ctx_r13.$implicit;
@@ -459,18 +460,18 @@ function KptChart_Case_7_Conditional_0_For_16_For_4_Conditional_0_Template(rf, c
459
460
  i0.ɵɵclassProp("kpt-chart__point--active", ctx_r0.activeIndex() === $index_r16);
460
461
  i0.ɵɵattribute("cx", p_r15.x)("cy", p_r15.y);
461
462
  } }
462
- function KptChart_Case_7_Conditional_0_For_16_For_4_Template(rf, ctx) { if (rf & 1) {
463
- i0.ɵɵconditionalCreate(0, KptChart_Case_7_Conditional_0_For_16_For_4_Conditional_0_Template, 1, 8, ":svg:circle", 36);
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);
464
465
  } if (rf & 2) {
465
466
  const vm_r17 = i0.ɵɵnextContext(2);
466
467
  i0.ɵɵconditional(vm_r17.showPoints ? 0 : -1);
467
468
  } }
468
- function KptChart_Case_7_Conditional_0_For_16_Template(rf, ctx) { if (rf & 1) {
469
+ function KptChart_Case_8_Conditional_0_For_16_Template(rf, ctx) { if (rf & 1) {
469
470
  i0.ɵɵnamespaceSVG();
470
- i0.ɵɵelementStart(0, "g", 32);
471
- i0.ɵɵconditionalCreate(1, KptChart_Case_7_Conditional_0_For_16_Conditional_1_Template, 1, 3, ":svg:path", 33);
472
- i0.ɵɵelement(2, "path", 34);
473
- i0.ɵɵrepeaterCreate(3, KptChart_Case_7_Conditional_0_For_16_For_4_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
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);
474
475
  i0.ɵɵelementEnd();
475
476
  } if (rf & 2) {
476
477
  const s_r13 = ctx.$implicit;
@@ -484,9 +485,9 @@ function KptChart_Case_7_Conditional_0_For_16_Template(rf, ctx) { if (rf & 1) {
484
485
  i0.ɵɵadvance();
485
486
  i0.ɵɵrepeater(s_r13.points);
486
487
  } }
487
- function KptChart_Case_7_Conditional_0_Conditional_17_For_1_Template(rf, ctx) { if (rf & 1) {
488
+ function KptChart_Case_8_Conditional_0_Conditional_17_For_1_Template(rf, ctx) { if (rf & 1) {
488
489
  i0.ɵɵnamespaceSVG();
489
- i0.ɵɵelement(0, "path", 39);
490
+ i0.ɵɵelement(0, "path", 40);
490
491
  } if (rf & 2) {
491
492
  const s_r18 = ctx.$implicit;
492
493
  const sh_r19 = i0.ɵɵnextContext();
@@ -494,15 +495,15 @@ function KptChart_Case_7_Conditional_0_Conditional_17_For_1_Template(rf, ctx) {
494
495
  i0.ɵɵstyleProp("opacity", sh_r19.opacity);
495
496
  i0.ɵɵattribute("d", s_r18.path)("stroke", "url(#" + ctx_r0.sheenId + ")");
496
497
  } }
497
- function KptChart_Case_7_Conditional_0_Conditional_17_Template(rf, ctx) { if (rf & 1) {
498
- i0.ɵɵrepeaterCreate(0, KptChart_Case_7_Conditional_0_Conditional_17_For_1_Template, 1, 4, ":svg:path", 38, _forTrack0);
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);
499
500
  } if (rf & 2) {
500
501
  const vm_r17 = i0.ɵɵnextContext();
501
502
  i0.ɵɵrepeater(vm_r17.series);
502
503
  } }
503
- function KptChart_Case_7_Conditional_0_For_19_For_1_Template(rf, ctx) { if (rf & 1) {
504
+ function KptChart_Case_8_Conditional_0_For_19_For_1_Template(rf, ctx) { if (rf & 1) {
504
505
  i0.ɵɵnamespaceSVG();
505
- i0.ɵɵelementStart(0, "text", 41);
506
+ i0.ɵɵelementStart(0, "text", 42);
506
507
  i0.ɵɵtext(1);
507
508
  i0.ɵɵelementEnd();
508
509
  } if (rf & 2) {
@@ -512,53 +513,53 @@ function KptChart_Case_7_Conditional_0_For_19_For_1_Template(rf, ctx) { if (rf &
512
513
  i0.ɵɵadvance();
513
514
  i0.ɵɵtextInterpolate(c_r20.text);
514
515
  } }
515
- function KptChart_Case_7_Conditional_0_For_19_Template(rf, ctx) { if (rf & 1) {
516
- i0.ɵɵrepeaterCreate(0, KptChart_Case_7_Conditional_0_For_19_For_1_Template, 2, 6, ":svg:text", 40, _forTrack2);
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);
517
518
  } if (rf & 2) {
518
519
  const g_r21 = ctx.$implicit;
519
520
  i0.ɵɵrepeater(g_r21.chips);
520
521
  } }
521
- function KptChart_Case_7_Conditional_0_For_21_Template(rf, ctx) { if (rf & 1) {
522
+ function KptChart_Case_8_Conditional_0_For_21_Template(rf, ctx) { if (rf & 1) {
522
523
  i0.ɵɵnamespaceSVG();
523
- i0.ɵɵelement(0, "circle", 42);
524
+ i0.ɵɵelement(0, "circle", 43);
524
525
  } if (rf & 2) {
525
526
  const r_r22 = ctx.$implicit;
526
527
  i0.ɵɵstyleProp("stroke", r_r22.color);
527
528
  i0.ɵɵattribute("cx", r_r22.x)("cy", r_r22.y);
528
529
  } }
529
- function KptChart_Case_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
530
+ function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
530
531
  const _r3 = i0.ɵɵgetCurrentView();
531
532
  i0.ɵɵnamespaceSVG();
532
- i0.ɵɵelementStart(0, "g", 17);
533
- i0.ɵɵrepeaterCreate(1, KptChart_Case_7_Conditional_0_For_2_Template, 1, 4, ":svg:line", 18, i0.ɵɵrepeaterTrackByIndex);
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);
534
535
  i0.ɵɵelementEnd();
535
- i0.ɵɵconditionalCreate(3, KptChart_Case_7_Conditional_0_Conditional_3_Template, 1, 4, ":svg:line", 19);
536
- i0.ɵɵelementStart(4, "g", 20);
537
- i0.ɵɵrepeaterCreate(5, KptChart_Case_7_Conditional_0_For_6_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
538
- i0.ɵɵrepeaterCreate(7, KptChart_Case_7_Conditional_0_For_8_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
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);
539
540
  i0.ɵɵelementEnd();
540
- i0.ɵɵelementStart(9, "g", 21);
541
- i0.ɵɵrepeaterCreate(10, KptChart_Case_7_Conditional_0_For_11_Template, 1, 4, ":svg:circle", 22, i0.ɵɵrepeaterTrackByIndex);
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);
542
543
  i0.ɵɵelementEnd();
543
- i0.ɵɵconditionalCreate(12, KptChart_Case_7_Conditional_0_Conditional_12_Template, 4, 8, ":svg:g", 23);
544
- i0.ɵɵrepeaterCreate(13, KptChart_Case_7_Conditional_0_For_14_Template, 4, 1, ":svg:g", 24, _forTrack0);
545
- i0.ɵɵrepeaterCreate(15, KptChart_Case_7_Conditional_0_For_16_Template, 5, 6, ":svg:g", 25, _forTrack0);
546
- i0.ɵɵconditionalCreate(17, KptChart_Case_7_Conditional_0_Conditional_17_Template, 2, 0);
547
- i0.ɵɵrepeaterCreate(18, KptChart_Case_7_Conditional_0_For_19_Template, 2, 0, null, null, _forTrack0);
548
- i0.ɵɵrepeaterCreate(20, KptChart_Case_7_Conditional_0_For_21_Template, 1, 4, ":svg:circle", 26, _forTrack1);
549
- i0.ɵɵelementStart(22, "rect", 27);
550
- i0.ɵɵlistener("pointermove", function KptChart_Case_7_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_7_Conditional_0_Template_rect_pointerleave_22_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.hideTip()); });
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()); });
551
552
  i0.ɵɵelementEnd();
552
553
  } if (rf & 2) {
553
- let tmp_4_0;
554
- let tmp_8_0;
555
- let tmp_11_0;
554
+ let tmp_5_0;
555
+ let tmp_9_0;
556
+ let tmp_12_0;
556
557
  const vm_r17 = ctx;
557
558
  const ctx_r0 = i0.ɵɵnextContext(2);
558
559
  i0.ɵɵadvance();
559
560
  i0.ɵɵrepeater(vm_r17.grid);
560
561
  i0.ɵɵadvance(2);
561
- i0.ɵɵconditional((tmp_4_0 = ctx_r0.crosshair()) ? 3 : -1, tmp_4_0);
562
+ i0.ɵɵconditional((tmp_5_0 = ctx_r0.crosshair()) ? 3 : -1, tmp_5_0);
562
563
  i0.ɵɵadvance(2);
563
564
  i0.ɵɵrepeater(vm_r17.valueLabels);
564
565
  i0.ɵɵadvance(2);
@@ -566,13 +567,13 @@ function KptChart_Case_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
566
567
  i0.ɵɵadvance(3);
567
568
  i0.ɵɵrepeater(vm_r17.catTicks);
568
569
  i0.ɵɵadvance(2);
569
- i0.ɵɵconditional((tmp_8_0 = ctx_r0.crosshair()) ? 12 : -1, tmp_8_0);
570
+ i0.ɵɵconditional((tmp_9_0 = ctx_r0.crosshair()) ? 12 : -1, tmp_9_0);
570
571
  i0.ɵɵadvance();
571
572
  i0.ɵɵrepeater(vm_r17.ghost);
572
573
  i0.ɵɵadvance(2);
573
574
  i0.ɵɵrepeater(vm_r17.series);
574
575
  i0.ɵɵadvance(2);
575
- i0.ɵɵconditional((tmp_11_0 = ctx_r0.sheen()) ? 17 : -1, tmp_11_0);
576
+ i0.ɵɵconditional((tmp_12_0 = ctx_r0.sheen()) ? 17 : -1, tmp_12_0);
576
577
  i0.ɵɵadvance();
577
578
  i0.ɵɵrepeater(vm_r17.ghost);
578
579
  i0.ɵɵadvance(2);
@@ -580,21 +581,21 @@ function KptChart_Case_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
580
581
  i0.ɵɵadvance(2);
581
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);
582
583
  } }
583
- function KptChart_Case_7_Template(rf, ctx) { if (rf & 1) {
584
- i0.ɵɵconditionalCreate(0, KptChart_Case_7_Conditional_0_Template, 23, 7);
584
+ function KptChart_Case_8_Template(rf, ctx) { if (rf & 1) {
585
+ i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_Template, 23, 7);
585
586
  } if (rf & 2) {
586
- let tmp_1_0;
587
+ let tmp_2_0;
587
588
  const ctx_r0 = i0.ɵɵnextContext();
588
- i0.ɵɵconditional((tmp_1_0 = ctx_r0.lineVm()) ? 0 : -1, tmp_1_0);
589
+ i0.ɵɵconditional((tmp_2_0 = ctx_r0.lineVm()) ? 0 : -1, tmp_2_0);
589
590
  } }
590
- function KptChart_Case_8_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
591
+ function KptChart_Case_9_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
591
592
  i0.ɵɵnamespaceSVG();
592
- i0.ɵɵelement(0, "line", 18);
593
+ i0.ɵɵelement(0, "line", 19);
593
594
  } if (rf & 2) {
594
595
  const g_r24 = ctx.$implicit;
595
596
  i0.ɵɵattribute("x1", g_r24.x1)("y1", g_r24.y1)("x2", g_r24.x2)("y2", g_r24.y2);
596
597
  } }
597
- function KptChart_Case_8_Conditional_0_For_5_Template(rf, ctx) { if (rf & 1) {
598
+ function KptChart_Case_9_Conditional_0_For_5_Template(rf, ctx) { if (rf & 1) {
598
599
  i0.ɵɵnamespaceSVG();
599
600
  i0.ɵɵelementStart(0, "text");
600
601
  i0.ɵɵtext(1);
@@ -605,7 +606,7 @@ function KptChart_Case_8_Conditional_0_For_5_Template(rf, ctx) { if (rf & 1) {
605
606
  i0.ɵɵadvance();
606
607
  i0.ɵɵtextInterpolate(l_r25.text);
607
608
  } }
608
- function KptChart_Case_8_Conditional_0_For_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
609
+ function KptChart_Case_9_Conditional_0_For_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
609
610
  i0.ɵɵnamespaceSVG();
610
611
  i0.ɵɵelementStart(0, "text");
611
612
  i0.ɵɵtext(1);
@@ -616,32 +617,32 @@ function KptChart_Case_8_Conditional_0_For_7_Conditional_0_Template(rf, ctx) { i
616
617
  i0.ɵɵadvance();
617
618
  i0.ɵɵtextInterpolate(l_r26.text);
618
619
  } }
619
- function KptChart_Case_8_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
620
- i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_For_7_Conditional_0_Template, 2, 4, ":svg:text");
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");
621
622
  } if (rf & 2) {
622
623
  const l_r26 = ctx.$implicit;
623
624
  i0.ɵɵconditional(l_r26.visible ? 0 : -1);
624
625
  } }
625
- function KptChart_Case_8_Conditional_0_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
626
+ function KptChart_Case_9_Conditional_0_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
626
627
  i0.ɵɵnamespaceSVG();
627
- i0.ɵɵelement(0, "path", 45);
628
+ i0.ɵɵelement(0, "path", 46);
628
629
  } if (rf & 2) {
629
630
  const g_r27 = ctx.$implicit;
630
631
  i0.ɵɵattribute("d", g_r27.path);
631
632
  } }
632
- function KptChart_Case_8_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
633
+ function KptChart_Case_9_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
633
634
  i0.ɵɵnamespaceSVG();
634
- i0.ɵɵelementStart(0, "g", 24);
635
- i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_Conditional_8_For_2_Template, 1, 1, ":svg:path", 45, _forTrack0);
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);
636
637
  i0.ɵɵelementEnd();
637
638
  } if (rf & 2) {
638
639
  const vm_r28 = i0.ɵɵnextContext();
639
640
  i0.ɵɵadvance();
640
641
  i0.ɵɵrepeater(vm_r28.ghost);
641
642
  } }
642
- function KptChart_Case_8_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
643
+ function KptChart_Case_9_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
643
644
  i0.ɵɵnamespaceSVG();
644
- i0.ɵɵelement(0, "path", 46);
645
+ i0.ɵɵelement(0, "path", 47);
645
646
  } if (rf & 2) {
646
647
  const b_r29 = ctx.$implicit;
647
648
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -649,26 +650,26 @@ function KptChart_Case_8_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
649
650
  i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(b_r29.key));
650
651
  i0.ɵɵattribute("d", b_r29.path);
651
652
  } }
652
- function KptChart_Case_8_Conditional_0_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
653
+ function KptChart_Case_9_Conditional_0_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
653
654
  i0.ɵɵnamespaceSVG();
654
- i0.ɵɵelement(0, "rect", 47);
655
+ i0.ɵɵelement(0, "rect", 48);
655
656
  } if (rf & 2) {
656
657
  const g_r30 = ctx.$implicit;
657
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);
658
659
  } }
659
- function KptChart_Case_8_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
660
+ function KptChart_Case_9_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
660
661
  i0.ɵɵnamespaceSVG();
661
- i0.ɵɵelementStart(0, "g", 24);
662
- i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_Conditional_12_For_2_Template, 1, 5, ":svg:rect", 47, _forTrack0);
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);
663
664
  i0.ɵɵelementEnd();
664
665
  } if (rf & 2) {
665
666
  const vm_r28 = i0.ɵɵnextContext();
666
667
  i0.ɵɵadvance();
667
668
  i0.ɵɵrepeater(vm_r28.ghost);
668
669
  } }
669
- function KptChart_Case_8_Conditional_0_Conditional_13_For_1_Template(rf, ctx) { if (rf & 1) {
670
+ function KptChart_Case_9_Conditional_0_Conditional_13_For_1_Template(rf, ctx) { if (rf & 1) {
670
671
  i0.ɵɵnamespaceSVG();
671
- i0.ɵɵelement(0, "path", 49);
672
+ i0.ɵɵelement(0, "path", 50);
672
673
  } if (rf & 2) {
673
674
  const b_r31 = ctx.$implicit;
674
675
  const sh_r32 = i0.ɵɵnextContext();
@@ -676,33 +677,33 @@ function KptChart_Case_8_Conditional_0_Conditional_13_For_1_Template(rf, ctx) {
676
677
  i0.ɵɵstyleProp("opacity", sh_r32.opacity * 0.7);
677
678
  i0.ɵɵattribute("d", b_r31.path)("fill", "url(#" + ctx_r0.sheenId + ")");
678
679
  } }
679
- function KptChart_Case_8_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
680
- i0.ɵɵrepeaterCreate(0, KptChart_Case_8_Conditional_0_Conditional_13_For_1_Template, 1, 4, ":svg:path", 48, _forTrack3);
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);
681
682
  } if (rf & 2) {
682
683
  const vm_r28 = i0.ɵɵnextContext();
683
684
  i0.ɵɵrepeater(vm_r28.bars);
684
685
  } }
685
- function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
686
+ function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
686
687
  const _r23 = i0.ɵɵgetCurrentView();
687
688
  i0.ɵɵnamespaceSVG();
688
- i0.ɵɵelementStart(0, "g", 17);
689
- i0.ɵɵrepeaterCreate(1, KptChart_Case_8_Conditional_0_For_2_Template, 1, 4, ":svg:line", 18, i0.ɵɵrepeaterTrackByIndex);
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);
690
691
  i0.ɵɵelementEnd();
691
- i0.ɵɵelementStart(3, "g", 20);
692
- i0.ɵɵrepeaterCreate(4, KptChart_Case_8_Conditional_0_For_5_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
693
- i0.ɵɵrepeaterCreate(6, KptChart_Case_8_Conditional_0_For_7_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
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);
694
695
  i0.ɵɵelementEnd();
695
- i0.ɵɵconditionalCreate(8, KptChart_Case_8_Conditional_0_Conditional_8_Template, 3, 0, ":svg:g", 24);
696
- i0.ɵɵelementStart(9, "g", 43);
697
- i0.ɵɵrepeaterCreate(10, KptChart_Case_8_Conditional_0_For_11_Template, 1, 7, ":svg:path", 44, _forTrack3);
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);
698
699
  i0.ɵɵelementEnd();
699
- i0.ɵɵconditionalCreate(12, KptChart_Case_8_Conditional_0_Conditional_12_Template, 3, 0, ":svg:g", 24);
700
- i0.ɵɵconditionalCreate(13, KptChart_Case_8_Conditional_0_Conditional_13_Template, 2, 0);
701
- i0.ɵɵelementStart(14, "rect", 27);
702
- i0.ɵɵlistener("pointermove", function KptChart_Case_8_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_8_Conditional_0_Template_rect_pointerleave_14_listener() { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.hideTip()); });
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()); });
703
704
  i0.ɵɵelementEnd();
704
705
  } if (rf & 2) {
705
- let tmp_10_0;
706
+ let tmp_11_0;
706
707
  const vm_r28 = ctx;
707
708
  const ctx_r0 = i0.ɵɵnextContext(2);
708
709
  i0.ɵɵadvance();
@@ -720,32 +721,32 @@ function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
720
721
  i0.ɵɵadvance(2);
721
722
  i0.ɵɵconditional(vm_r28.ghost.length ? 12 : -1);
722
723
  i0.ɵɵadvance();
723
- i0.ɵɵconditional((tmp_10_0 = ctx_r0.sheen()) ? 13 : -1, tmp_10_0);
724
+ i0.ɵɵconditional((tmp_11_0 = ctx_r0.sheen()) ? 13 : -1, tmp_11_0);
724
725
  i0.ɵɵadvance();
725
726
  i0.ɵɵattribute("x", vm_r28.plot.x)("y", vm_r28.plot.y)("width", vm_r28.plot.width)("height", vm_r28.plot.height);
726
727
  } }
727
- function KptChart_Case_8_Template(rf, ctx) { if (rf & 1) {
728
- i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_Template, 15, 8);
728
+ function KptChart_Case_9_Template(rf, ctx) { if (rf & 1) {
729
+ i0.ɵɵconditionalCreate(0, KptChart_Case_9_Conditional_0_Template, 15, 8);
729
730
  } if (rf & 2) {
730
- let tmp_1_0;
731
+ let tmp_2_0;
731
732
  const ctx_r0 = i0.ɵɵnextContext();
732
- i0.ɵɵconditional((tmp_1_0 = ctx_r0.barVm()) ? 0 : -1, tmp_1_0);
733
+ i0.ɵɵconditional((tmp_2_0 = ctx_r0.barVm()) ? 0 : -1, tmp_2_0);
733
734
  } }
734
- function KptChart_Case_9_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
735
+ function KptChart_Case_10_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
735
736
  i0.ɵɵnamespaceSVG();
736
- i0.ɵɵelement(0, "path", 50);
737
+ i0.ɵɵelement(0, "path", 51);
737
738
  } if (rf & 2) {
738
739
  const r_r33 = ctx.$implicit;
739
740
  i0.ɵɵattribute("d", r_r33);
740
741
  } }
741
- function KptChart_Case_9_Conditional_0_For_4_Template(rf, ctx) { if (rf & 1) {
742
+ function KptChart_Case_10_Conditional_0_For_4_Template(rf, ctx) { if (rf & 1) {
742
743
  i0.ɵɵnamespaceSVG();
743
- i0.ɵɵelement(0, "line", 18);
744
+ i0.ɵɵelement(0, "line", 19);
744
745
  } if (rf & 2) {
745
746
  const a_r34 = ctx.$implicit;
746
747
  i0.ɵɵattribute("x1", a_r34.x1)("y1", a_r34.y1)("x2", a_r34.x2)("y2", a_r34.y2);
747
748
  } }
748
- function KptChart_Case_9_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
749
+ function KptChart_Case_10_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
749
750
  i0.ɵɵnamespaceSVG();
750
751
  i0.ɵɵelementStart(0, "text");
751
752
  i0.ɵɵtext(1);
@@ -756,11 +757,11 @@ function KptChart_Case_9_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
756
757
  i0.ɵɵadvance();
757
758
  i0.ɵɵtextInterpolate(l_r35.text);
758
759
  } }
759
- function KptChart_Case_9_Conditional_0_For_9_For_3_Template(rf, ctx) { if (rf & 1) {
760
+ function KptChart_Case_10_Conditional_0_For_9_For_3_Template(rf, ctx) { if (rf & 1) {
760
761
  const _r36 = i0.ɵɵgetCurrentView();
761
762
  i0.ɵɵnamespaceSVG();
762
- i0.ɵɵelementStart(0, "circle", 55);
763
- i0.ɵɵlistener("pointerenter", function KptChart_Case_9_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_9_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()); });
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()); });
764
765
  i0.ɵɵelementEnd();
765
766
  } if (rf & 2) {
766
767
  const p_r37 = ctx.$implicit;
@@ -769,11 +770,11 @@ function KptChart_Case_9_Conditional_0_For_9_For_3_Template(rf, ctx) { if (rf &
769
770
  i0.ɵɵstyleProp("fill", s_r38.color)("--%NS%kpt-chart-i", $index_r39);
770
771
  i0.ɵɵattribute("cx", p_r37.x)("cy", p_r37.y);
771
772
  } }
772
- function KptChart_Case_9_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
773
+ function KptChart_Case_10_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
773
774
  i0.ɵɵnamespaceSVG();
774
- i0.ɵɵelementStart(0, "g", 52);
775
- i0.ɵɵelement(1, "path", 53);
776
- i0.ɵɵrepeaterCreate(2, KptChart_Case_9_Conditional_0_For_9_For_3_Template, 1, 6, ":svg:circle", 54, i0.ɵɵrepeaterTrackByIndex);
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);
777
778
  i0.ɵɵelementEnd();
778
779
  } if (rf & 2) {
779
780
  const s_r38 = ctx.$implicit;
@@ -785,16 +786,16 @@ function KptChart_Case_9_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
785
786
  i0.ɵɵadvance();
786
787
  i0.ɵɵrepeater(s_r38.points);
787
788
  } }
788
- function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
789
+ function KptChart_Case_10_Conditional_0_Template(rf, ctx) { if (rf & 1) {
789
790
  i0.ɵɵnamespaceSVG();
790
- i0.ɵɵelementStart(0, "g", 17);
791
- i0.ɵɵrepeaterCreate(1, KptChart_Case_9_Conditional_0_For_2_Template, 1, 1, ":svg:path", 50, i0.ɵɵrepeaterTrackByIndex);
792
- i0.ɵɵrepeaterCreate(3, KptChart_Case_9_Conditional_0_For_4_Template, 1, 4, ":svg:line", 18, i0.ɵɵrepeaterTrackByIndex);
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);
793
794
  i0.ɵɵelementEnd();
794
- i0.ɵɵelementStart(5, "g", 20);
795
- i0.ɵɵrepeaterCreate(6, KptChart_Case_9_Conditional_0_For_7_Template, 2, 4, ":svg:text", null, i0.ɵɵrepeaterTrackByIndex);
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);
796
797
  i0.ɵɵelementEnd();
797
- i0.ɵɵrepeaterCreate(8, KptChart_Case_9_Conditional_0_For_9_Template, 4, 7, ":svg:g", 51, _forTrack0);
798
+ i0.ɵɵrepeaterCreate(8, KptChart_Case_10_Conditional_0_For_9_Template, 4, 7, ":svg:g", 52, _forTrack0);
798
799
  } if (rf & 2) {
799
800
  const vm_r40 = ctx;
800
801
  i0.ɵɵadvance();
@@ -806,18 +807,18 @@ function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
806
807
  i0.ɵɵadvance(2);
807
808
  i0.ɵɵrepeater(vm_r40.series);
808
809
  } }
809
- function KptChart_Case_9_Template(rf, ctx) { if (rf & 1) {
810
- i0.ɵɵconditionalCreate(0, KptChart_Case_9_Conditional_0_Template, 10, 0);
810
+ function KptChart_Case_10_Template(rf, ctx) { if (rf & 1) {
811
+ i0.ɵɵconditionalCreate(0, KptChart_Case_10_Conditional_0_Template, 10, 0);
811
812
  } if (rf & 2) {
812
- let tmp_1_0;
813
+ let tmp_2_0;
813
814
  const ctx_r0 = i0.ɵɵnextContext();
814
- i0.ɵɵconditional((tmp_1_0 = ctx_r0.radarVm()) ? 0 : -1, tmp_1_0);
815
+ i0.ɵɵconditional((tmp_2_0 = ctx_r0.radarVm()) ? 0 : -1, tmp_2_0);
815
816
  } }
816
- function KptChart_Case_10_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
817
+ function KptChart_Case_11_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
817
818
  const _r41 = i0.ɵɵgetCurrentView();
818
819
  i0.ɵɵnamespaceSVG();
819
- i0.ɵɵelementStart(0, "path", 58);
820
- i0.ɵɵlistener("pointerenter", function KptChart_Case_10_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_10_Conditional_0_For_2_Template_path_pointerleave_0_listener() { i0.ɵɵrestoreView(_r41); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.hideTip()); });
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()); });
821
822
  i0.ɵɵelementEnd();
822
823
  } if (rf & 2) {
823
824
  const sl_r42 = ctx.$implicit;
@@ -827,24 +828,24 @@ function KptChart_Case_10_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
827
828
  i0.ɵɵclassProp("kpt-chart__series--dim", ctx_r0.dim(sl_r42.key));
828
829
  i0.ɵɵattribute("d", sl_r42.path);
829
830
  } }
830
- function KptChart_Case_10_Conditional_0_Template(rf, ctx) { if (rf & 1) {
831
+ function KptChart_Case_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
831
832
  i0.ɵɵnamespaceSVG();
832
- i0.ɵɵelementStart(0, "g", 56);
833
- i0.ɵɵrepeaterCreate(1, KptChart_Case_10_Conditional_0_For_2_Template, 1, 7, ":svg:path", 57, _forTrack0);
833
+ i0.ɵɵelementStart(0, "g", 57);
834
+ i0.ɵɵrepeaterCreate(1, KptChart_Case_11_Conditional_0_For_2_Template, 1, 7, ":svg:path", 58, _forTrack0);
834
835
  i0.ɵɵelementEnd();
835
836
  } if (rf & 2) {
836
837
  i0.ɵɵadvance();
837
838
  i0.ɵɵrepeater(ctx);
838
839
  } }
839
- function KptChart_Case_10_Template(rf, ctx) { if (rf & 1) {
840
- i0.ɵɵconditionalCreate(0, KptChart_Case_10_Conditional_0_Template, 3, 0, ":svg:g", 56);
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);
841
842
  } if (rf & 2) {
842
- let tmp_1_0;
843
+ let tmp_2_0;
843
844
  const ctx_r0 = i0.ɵɵnextContext();
844
- i0.ɵɵconditional((tmp_1_0 = ctx_r0.pieVm()) ? 0 : -1, tmp_1_0);
845
+ i0.ɵɵconditional((tmp_2_0 = ctx_r0.pieVm()) ? 0 : -1, tmp_2_0);
845
846
  } }
846
- function KptChart_Conditional_11_Template(rf, ctx) { if (rf & 1) {
847
- i0.ɵɵelementStart(0, "p", 6);
847
+ function KptChart_Conditional_12_Template(rf, ctx) { if (rf & 1) {
848
+ i0.ɵɵelementStart(0, "p", 7);
848
849
  i0.ɵɵtext(1);
849
850
  i0.ɵɵelementEnd();
850
851
  } if (rf & 2) {
@@ -853,8 +854,8 @@ function KptChart_Conditional_11_Template(rf, ctx) { if (rf & 1) {
853
854
  i0.ɵɵadvance();
854
855
  i0.ɵɵtextInterpolate(ctx_r0.config().description);
855
856
  } }
856
- function KptChart_For_20_Template(rf, ctx) { if (rf & 1) {
857
- i0.ɵɵelementStart(0, "th", 8);
857
+ function KptChart_For_21_Template(rf, ctx) { if (rf & 1) {
858
+ i0.ɵɵelementStart(0, "th", 9);
858
859
  i0.ɵɵtext(1);
859
860
  i0.ɵɵelementEnd();
860
861
  } if (rf & 2) {
@@ -862,7 +863,7 @@ function KptChart_For_20_Template(rf, ctx) { if (rf & 1) {
862
863
  i0.ɵɵadvance();
863
864
  i0.ɵɵtextInterpolate(col_r44);
864
865
  } }
865
- function KptChart_For_23_For_4_Template(rf, ctx) { if (rf & 1) {
866
+ function KptChart_For_24_For_4_Template(rf, ctx) { if (rf & 1) {
866
867
  i0.ɵɵelementStart(0, "td");
867
868
  i0.ɵɵtext(1);
868
869
  i0.ɵɵelementEnd();
@@ -871,11 +872,11 @@ function KptChart_For_23_For_4_Template(rf, ctx) { if (rf & 1) {
871
872
  i0.ɵɵadvance();
872
873
  i0.ɵɵtextInterpolate(value_r45);
873
874
  } }
874
- function KptChart_For_23_Template(rf, ctx) { if (rf & 1) {
875
- i0.ɵɵelementStart(0, "tr")(1, "th", 59);
875
+ function KptChart_For_24_Template(rf, ctx) { if (rf & 1) {
876
+ i0.ɵɵelementStart(0, "tr")(1, "th", 60);
876
877
  i0.ɵɵtext(2);
877
878
  i0.ɵɵelementEnd();
878
- i0.ɵɵrepeaterCreate(3, KptChart_For_23_For_4_Template, 2, 1, "td", null, i0.ɵɵrepeaterTrackByIndex);
879
+ i0.ɵɵrepeaterCreate(3, KptChart_For_24_For_4_Template, 2, 1, "td", null, i0.ɵɵrepeaterTrackByIndex);
879
880
  i0.ɵɵelementEnd();
880
881
  } if (rf & 2) {
881
882
  const row_r46 = ctx.$implicit;
@@ -884,10 +885,10 @@ function KptChart_For_23_Template(rf, ctx) { if (rf & 1) {
884
885
  i0.ɵɵadvance();
885
886
  i0.ɵɵrepeater(row_r46.values);
886
887
  } }
887
- function KptChart_Conditional_25_Template(rf, ctx) { if (rf & 1) {
888
+ function KptChart_Conditional_26_Template(rf, ctx) { if (rf & 1) {
888
889
  const _r47 = i0.ɵɵgetCurrentView();
889
- i0.ɵɵelementStart(0, "kpt-chart-legend", 60);
890
- i0.ɵɵlistener("seriesToggle", function KptChart_Conditional_25_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_25_Template_kpt_chart_legend_highlight_0_listener($event) { i0.ɵɵrestoreView(_r47); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onHighlight($event)); });
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)); });
891
892
  i0.ɵɵelementEnd();
892
893
  } if (rf & 2) {
893
894
  const ctx_r0 = i0.ɵɵnextContext();
@@ -895,20 +896,16 @@ function KptChart_Conditional_25_Template(rf, ctx) { if (rf & 1) {
895
896
  } }
896
897
  let nextChartId = 0;
897
898
  let nextRippleId = 0;
898
- const VERTICAL_INSETS = { top: 12, right: 16, bottom: 28, left: 46 };
899
- const HORIZONTAL_INSETS = { top: 12, right: 16, bottom: 28, left: 76 };
900
899
  /** Szerokość pasma smugi światła (jednostki viewBoxa) - połowa po każdej stronie czoła fali. */
901
900
  const SHEEN_HALF = 90;
902
901
  /** Zjechanie z punktu na sąsiedni to `leave` i zaraz `enter` - dymek czeka chwilę, zamiast gasnąć. */
903
902
  const TIP_HIDE_DELAY = 60;
904
- /** Wysokość linii etykiety kategorii na osi pionowej (słupki poziome) - jednostki viewBoxa. */
905
- const CATEGORY_LINE = 12;
906
903
  /**
907
904
  * Etykiety osi poziomej: wszystkie, jeśli się mieszczą, inaczej równy podział 9/5/3/2
908
905
  * (`axisLabelIndices`). Pełna nazwa każdej kategorii zostaje w pigułce prowadnicy i w dymku.
909
906
  */
910
- function bottomLabels(labels, centers, y, width) {
911
- const sizes = labels.map((l) => estimateLabelWidth(l));
907
+ function bottomLabels(labels, centers, y, width, m) {
908
+ const sizes = labels.map((l) => estimateLabelWidth(l, m.fontSize));
912
909
  const shown = new Set(axisLabelIndices(centers, sizes));
913
910
  return labels.map((text, i) => ({
914
911
  at: centers[i],
@@ -920,9 +917,9 @@ function bottomLabels(labels, centers, y, width) {
920
917
  }));
921
918
  }
922
919
  /** Etykiety osi pionowej (słupki poziome): ten sam podział, rozmiarem jest wysokość linii. */
923
- function sideLabels(labels, centers, x) {
924
- const shown = new Set(axisLabelIndices(centers, centers.map(() => CATEGORY_LINE), 2));
925
- return labels.map((text, i) => ({ at: centers[i], x, y: centers[i] + 3, text, anchor: 'end', visible: shown.has(i) }));
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) }));
926
923
  }
927
924
  /**
928
925
  * Wykres SVG w pełni konfigurowalny przez obiekt `config`.
@@ -942,12 +939,45 @@ class KptChart {
942
939
  constructor() {
943
940
  this.config = input.required(/* @ts-ignore */
944
941
  ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
945
- /** Szerokość viewBoxa (jednostki SVG). Wykres skaluje się do kontenera. */
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
+ */
946
947
  this.width = input(600, /* @ts-ignore */
947
948
  ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
948
- /** Wysokość viewBoxa (jednostki SVG). */
949
+ /** Wysokość projektowa - patrz `width`. */
949
950
  this.height = input(360, /* @ts-ignore */
950
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 */ []));
951
981
  this.i18n = inject(KptI18n);
952
982
  this.motionConfig = inject(KPT_MOTION_CONFIG, { optional: true });
953
983
  this.uid = ++nextChartId;
@@ -997,7 +1027,7 @@ class KptChart {
997
1027
  const pos = this.frame().tip;
998
1028
  if (!content || !pos)
999
1029
  return null;
1000
- return { x: (pos.x / this.width()) * 100, y: (pos.y / this.height()) * 100, ...content };
1030
+ return { x: (pos.x / this.vw()) * 100, y: (pos.y / this.vh()) * 100, ...content };
1001
1031
  }, /* @ts-ignore */
1002
1032
  ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
1003
1033
  /**
@@ -1009,7 +1039,7 @@ class KptChart {
1009
1039
  if (!s)
1010
1040
  return null;
1011
1041
  const horizontal = this.config().type === 'bar' && this.config().orientation === 'horizontal';
1012
- const plot = plotArea(this.width(), this.height(), horizontal ? HORIZONTAL_INSETS : VERTICAL_INSETS);
1042
+ const plot = plotArea(this.vw(), this.vh(), horizontal ? this.metrics().horizontalInsets : this.metrics().verticalInsets);
1013
1043
  const start = horizontal ? plot.y : plot.x;
1014
1044
  const length = horizontal ? plot.height : plot.width;
1015
1045
  const mid = start - SHEEN_HALF + (length + 2 * SHEEN_HALF) * s.progress;
@@ -1075,7 +1105,8 @@ class KptChart {
1075
1105
  : chartScale(rows, { valueAxis: c.valueAxis, stacked: c.stacked });
1076
1106
  // Stos: punkty serii na narastającej sumie, pasmo od linii serii pod nią.
1077
1107
  const stack = c.stacked ? stackSeries(rows) : null;
1078
- const plot = plotArea(this.width(), this.height(), VERTICAL_INSETS);
1108
+ const m = this.metrics();
1109
+ const plot = plotArea(this.vw(), this.vh(), m.verticalInsets);
1079
1110
  const yScale = linearScale(scale.min, scale.max, plot.y + plot.height, plot.y);
1080
1111
  const n = c.labels.length;
1081
1112
  const xAt = (i) => (n > 1 ? plot.x + (i / (n - 1)) * plot.width : plot.x + plot.width / 2);
@@ -1126,8 +1157,8 @@ class KptChart {
1126
1157
  plot,
1127
1158
  series,
1128
1159
  grid: scale.ticks.map((t) => ({ x1: plot.x, y1: yScale(t), x2: plot.x + plot.width, y2: yScale(t) })),
1129
- valueLabels: scale.ticks.map((t) => ({ x: plot.x - 8, y: yScale(t) + 3, text: formatNumber(t), anchor: 'end' })),
1130
- catLabels: bottomLabels(c.labels, c.labels.map((_, idx) => xAt(idx)), plot.y + plot.height + 18, this.width()),
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),
1131
1162
  catTicks: c.labels.map((_, idx) => ({ x: xAt(idx), y: plot.y + plot.height })),
1132
1163
  showPoints: c.points ?? true,
1133
1164
  ghost,
@@ -1142,7 +1173,8 @@ class KptChart {
1142
1173
  const h = this.hidden();
1143
1174
  const orientation = c.orientation ?? 'vertical';
1144
1175
  const active = c.series.map((s, i) => ({ s, i })).filter(({ s }) => !h.has('ser:' + s.name));
1145
- const plot = plotArea(this.width(), this.height(), orientation === 'vertical' ? VERTICAL_INSETS : HORIZONTAL_INSETS);
1176
+ const m = this.metrics();
1177
+ const plot = plotArea(this.vw(), this.vh(), orientation === 'vertical' ? m.verticalInsets : m.horizontalInsets);
1146
1178
  const domain = this.frame().domain;
1147
1179
  const radius = c.borderRadius ?? 4;
1148
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 });
@@ -1189,8 +1221,8 @@ class KptChart {
1189
1221
  plot,
1190
1222
  bars,
1191
1223
  grid: layout.ticks.map((t) => ({ x1: plot.x, y1: t.pos, x2: plot.x + plot.width, y2: t.pos })),
1192
- valueLabels: layout.ticks.map((t) => ({ x: plot.x - 8, y: t.pos + 3, text: formatNumber(t.value), anchor: 'end' })),
1193
- catLabels: bottomLabels(c.labels, c.labels.map((_, idx) => cat.center(idx)), plot.y + plot.height + 18, this.width()),
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),
1194
1226
  ghost,
1195
1227
  };
1196
1228
  }
@@ -1199,8 +1231,8 @@ class KptChart {
1199
1231
  plot,
1200
1232
  bars,
1201
1233
  grid: layout.ticks.map((t) => ({ x1: t.pos, y1: plot.y, x2: t.pos, y2: plot.y + plot.height })),
1202
- valueLabels: layout.ticks.map((t) => ({ x: t.pos, y: plot.y + plot.height + 18, text: formatNumber(t.value), anchor: 'middle' })),
1203
- catLabels: sideLabels(c.labels, c.labels.map((_, idx) => cat.center(idx)), plot.x - 8),
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),
1204
1236
  ghost,
1205
1237
  };
1206
1238
  }, /* @ts-ignore */
@@ -1214,7 +1246,7 @@ class KptChart {
1214
1246
  const s0 = c.series[0];
1215
1247
  if (!s0)
1216
1248
  return [];
1217
- const { cx, cy, radius } = radialArea(this.width(), this.height(), 8);
1249
+ const { cx, cy, radius } = radialArea(this.vw(), this.vh(), this.metrics().radialPadding.plain);
1218
1250
  const entries = c.labels
1219
1251
  .map((label, i) => ({ label, i, value: s0.data[i] ?? 0, color: seriesColor(s0.color, i) }))
1220
1252
  .filter((e) => !h.has('cat:' + e.i));
@@ -1236,7 +1268,8 @@ class KptChart {
1236
1268
  return null;
1237
1269
  const h = this.hidden();
1238
1270
  const count = c.labels.length;
1239
- const { cx, cy, radius } = radialArea(this.width(), this.height(), 30);
1271
+ const m = this.metrics();
1272
+ const { cx, cy, radius } = radialArea(this.vw(), this.vh(), m.radialPadding.labelled);
1240
1273
  const grid = radarGrid(count, cx, cy, radius, 4);
1241
1274
  const active = c.series.map((s, i) => ({ s, i })).filter(({ s }) => !h.has('ser:' + s.name));
1242
1275
  let max = 1;
@@ -1257,9 +1290,9 @@ class KptChart {
1257
1290
  rings: grid.rings,
1258
1291
  axisLines: grid.axes.map((a) => ({ x1: cx, y1: cy, x2: a.end.x, y2: a.end.y })),
1259
1292
  axisLabels: grid.axes.map((a) => {
1260
- const p = polarToCartesian(cx, cy, radius + 14, a.angle);
1293
+ const p = polarToCartesian(cx, cy, radius + m.radarLabelGap, a.angle);
1261
1294
  const anchor = Math.abs(p.x - cx) < 1 ? 'middle' : p.x > cx ? 'start' : 'end';
1262
- return { x: p.x, y: p.y + 3, text: c.labels[a.labelIndex] ?? '', anchor };
1295
+ return { x: p.x, y: p.y + m.baselineShift, text: c.labels[a.labelIndex] ?? '', anchor };
1263
1296
  }),
1264
1297
  series,
1265
1298
  };
@@ -1279,9 +1312,10 @@ class KptChart {
1279
1312
  return null;
1280
1313
  // Prowadnica i pigułka jadą razem z dymkiem.
1281
1314
  const x = this.frame().tip?.x ?? cat.at;
1282
- const w = Math.max(28, cat.text.length * 7 + 16);
1315
+ const m = this.metrics();
1316
+ const w = Math.max(m.pill.minWidth, estimateLabelWidth(cat.text, m.fontSize) + 2 * m.pill.padding);
1283
1317
  // Pigułka przy skrajnej kategorii przesuwa się do środka zamiast wyjść poza viewBox.
1284
- const labelX = clampLabel(x, w, 0, this.width());
1318
+ const labelX = clampLabel(x, w, 0, this.vw());
1285
1319
  return {
1286
1320
  x,
1287
1321
  y1: vm.plot.y,
@@ -1290,9 +1324,9 @@ class KptChart {
1290
1324
  labelX,
1291
1325
  labelY: cat.y,
1292
1326
  pillX: labelX - w / 2,
1293
- pillY: cat.y - 13,
1327
+ pillY: cat.y - m.pill.rise,
1294
1328
  pillW: w,
1295
- pillH: 18,
1329
+ pillH: m.pill.height,
1296
1330
  };
1297
1331
  }, /* @ts-ignore */
1298
1332
  ...(ngDevMode ? [{ debugName: "crosshair" }] : /* istanbul ignore next */ []));
@@ -1301,10 +1335,34 @@ class KptChart {
1301
1335
  const next = this.config();
1302
1336
  untracked(() => this.onConfig(next));
1303
1337
  });
1304
- inject(DestroyRef).onDestroy(() => {
1338
+ const destroyRef = inject(DestroyRef);
1339
+ destroyRef.onDestroy(() => {
1305
1340
  this.motion.stop();
1306
1341
  clearTimeout(this.hideTimer);
1307
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
+ });
1308
1366
  }
1309
1367
  // --- Zdarzenia ---
1310
1368
  /**
@@ -1440,52 +1498,56 @@ class KptChart {
1440
1498
  this.motion.transition(from, to, { delta: withAxis && next.animation?.delta !== false, scales });
1441
1499
  }
1442
1500
  static { this.ɵfac = function KptChart_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChart)(); }; }
1443
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChart, selectors: [["kpt-chart"]], hostAttrs: [1, "kpt-chart-host"], hostVars: 8, hostBindings: function KptChart_HostBindings(rf, ctx) { if (rf & 2) {
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) {
1444
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");
1445
1507
  i0.ɵɵclassProp("kpt-chart--no-anim", !ctx.anim().enabled);
1446
- } }, inputs: { config: [1, "config"], width: [1, "width"], height: [1, "height"] }, decls: 26, vars: 14, consts: [[1, "kpt-chart"], [1, "kpt-chart__title", 3, "text-align", "color", "font-family", "font-size", "font-weight", "padding-top", "padding-bottom"], [1, "kpt-chart__subtitle", 3, "text-align", "color", "font-family", "font-size", "font-weight", "padding-top", "padding-bottom"], [1, "kpt-chart__body"], [1, "kpt-chart__canvas"], ["role", "img", "preserveAspectRatio", "xMidYMid meet", 1, "kpt-chart__svg"], [1, "kpt-chart__sr", 3, "id"], [1, "kpt-chart__sr"], ["scope", "col"], [3, "state"], [3, "items", "position", "align", "pointStyle", "title"], [1, "kpt-chart__title"], [1, "kpt-chart__subtitle"], ["gradientUnits", "userSpaceOnUse"], ["offset", "0", "stop-opacity", "0", 1, "kpt-chart__sheen-stop"], ["offset", "0.5", "stop-opacity", "0.95", 1, "kpt-chart__sheen-stop"], ["offset", "1", "stop-opacity", "0", 1, "kpt-chart__sheen-stop"], [1, "kpt-chart__grid"], [1, "kpt-chart__gridline"], [1, "kpt-chart__crosshair"], [1, "kpt-chart__axis"], ["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) {
1447
- i0.ɵɵelementStart(0, "div", 0);
1448
- i0.ɵɵconditionalCreate(1, KptChart_Conditional_1_Template, 2, 15, "div", 1);
1449
- i0.ɵɵconditionalCreate(2, KptChart_Conditional_2_Template, 2, 15, "div", 2);
1450
- i0.ɵɵelementStart(3, "div", 3)(4, "div", 4);
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);
1451
1513
  i0.ɵɵnamespaceSVG();
1452
- i0.ɵɵelementStart(5, "svg", 5);
1453
- i0.ɵɵconditionalCreate(6, KptChart_Conditional_6_Template, 5, 5, ":svg:defs");
1454
- i0.ɵɵconditionalCreate(7, KptChart_Case_7_Template, 1, 1)(8, KptChart_Case_8_Template, 1, 1)(9, KptChart_Case_9_Template, 1, 1)(10, KptChart_Case_10_Template, 1, 1);
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);
1455
1517
  i0.ɵɵelementEnd();
1456
- i0.ɵɵconditionalCreate(11, KptChart_Conditional_11_Template, 2, 2, "p", 6);
1518
+ i0.ɵɵconditionalCreate(12, KptChart_Conditional_12_Template, 2, 2, "p", 7);
1457
1519
  i0.ɵɵnamespaceHTML();
1458
- i0.ɵɵelementStart(12, "table", 7)(13, "caption");
1459
- i0.ɵɵtext(14);
1520
+ i0.ɵɵelementStart(13, "table", 8)(14, "caption");
1521
+ i0.ɵɵtext(15);
1460
1522
  i0.ɵɵelementEnd();
1461
- i0.ɵɵelementStart(15, "thead")(16, "tr")(17, "th", 8);
1462
- i0.ɵɵtext(18);
1523
+ i0.ɵɵelementStart(16, "thead")(17, "tr")(18, "th", 9);
1524
+ i0.ɵɵtext(19);
1463
1525
  i0.ɵɵelementEnd();
1464
- i0.ɵɵrepeaterCreate(19, KptChart_For_20_Template, 2, 1, "th", 8, i0.ɵɵrepeaterTrackByIndex);
1526
+ i0.ɵɵrepeaterCreate(20, KptChart_For_21_Template, 2, 1, "th", 9, i0.ɵɵrepeaterTrackByIndex);
1465
1527
  i0.ɵɵelementEnd()();
1466
- i0.ɵɵelementStart(21, "tbody");
1467
- i0.ɵɵrepeaterCreate(22, KptChart_For_23_Template, 5, 1, "tr", null, i0.ɵɵrepeaterTrackByIndex);
1528
+ i0.ɵɵelementStart(22, "tbody");
1529
+ i0.ɵɵrepeaterCreate(23, KptChart_For_24_Template, 5, 1, "tr", null, i0.ɵɵrepeaterTrackByIndex);
1468
1530
  i0.ɵɵelementEnd()();
1469
- i0.ɵɵelement(24, "kpt-chart-tooltip", 9);
1531
+ i0.ɵɵelement(25, "kpt-chart-tooltip", 10);
1470
1532
  i0.ɵɵelementEnd();
1471
- i0.ɵɵconditionalCreate(25, KptChart_Conditional_25_Template, 1, 5, "kpt-chart-legend", 10);
1533
+ i0.ɵɵconditionalCreate(26, KptChart_Conditional_26_Template, 1, 5, "kpt-chart-legend", 11);
1472
1534
  i0.ɵɵelementEnd()();
1473
1535
  } if (rf & 2) {
1474
- let tmp_6_0;
1475
1536
  let tmp_7_0;
1537
+ let tmp_8_0;
1476
1538
  i0.ɵɵattribute("data-legend", ctx.legendOpts().display ? ctx.legendOpts().position : null);
1477
1539
  i0.ɵɵadvance();
1478
1540
  i0.ɵɵconditional(ctx.titleOpts()?.display && ctx.titleOpts()?.text ? 1 : -1);
1479
1541
  i0.ɵɵadvance();
1480
1542
  i0.ɵɵconditional(ctx.subtitleOpts()?.display && ctx.subtitleOpts()?.text ? 2 : -1);
1481
- i0.ɵɵadvance(3);
1482
- i0.ɵɵattribute("viewBox", "0 0 " + ctx.width() + " " + ctx.height())("aria-label", ctx.accessibleName())("aria-describedby", ctx.config().description ? ctx.descId : null);
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);
1483
1545
  i0.ɵɵadvance();
1484
- i0.ɵɵconditional((tmp_6_0 = ctx.sheen()) ? 6 : -1, tmp_6_0);
1546
+ i0.ɵɵconditional((tmp_7_0 = ctx.sheen()) ? 7 : -1, tmp_7_0);
1485
1547
  i0.ɵɵadvance();
1486
- i0.ɵɵconditional((tmp_7_0 = ctx.type()) === "line" ? 7 : tmp_7_0 === "bar" ? 8 : tmp_7_0 === "radar" ? 9 : 10);
1548
+ i0.ɵɵconditional((tmp_8_0 = ctx.type()) === "line" ? 8 : tmp_8_0 === "bar" ? 9 : tmp_8_0 === "radar" ? 10 : 11);
1487
1549
  i0.ɵɵadvance(4);
1488
- i0.ɵɵconditional(ctx.config().description ? 11 : -1);
1550
+ i0.ɵɵconditional(ctx.config().description ? 12 : -1);
1489
1551
  i0.ɵɵadvance(3);
1490
1552
  i0.ɵɵtextInterpolate2("", ctx.i18n.t("chart.dataTable"), ": ", ctx.accessibleName());
1491
1553
  i0.ɵɵadvance(4);
@@ -1497,8 +1559,8 @@ class KptChart {
1497
1559
  i0.ɵɵadvance(2);
1498
1560
  i0.ɵɵproperty("state", ctx.tooltip());
1499
1561
  i0.ɵɵadvance();
1500
- i0.ɵɵconditional(ctx.legendOpts().display ? 25 : -1);
1501
- } }, 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-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: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 }); }
1502
1564
  }
1503
1565
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptChart, [{
1504
1566
  type: Component,
@@ -1508,8 +1570,8 @@ class KptChart {
1508
1570
  '[style.--kpt-chart-duration]': "anim().duration + 'ms'",
1509
1571
  '[style.--kpt-chart-stagger]': "anim().stagger + 'ms'",
1510
1572
  '[style.--kpt-chart-delay]': "anim().delay + 'ms'",
1511
- }, 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 @if (l.visible) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\n }\n }\n </g>\n <!-- Kropka pod ka\u017Cd\u0105 kategori\u0105: mi\u0119dzy etykietami wida\u0107, gdzie s\u0105 punkty i kt\u00F3ry jest aktywny. -->\n <g class=\"kpt-chart__cat-ticks\" aria-hidden=\"true\">\n @for (t of vm.catTicks; track $index) {\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\" />\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 @if (l.visible) {\n <text [attr.x]=\"l.x\" [attr.y]=\"l.y\" [attr.text-anchor]=\"l.anchor\">{{ l.text }}</text>\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 <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-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: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"] }]
1512
- }], () => [], { 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 }] }] }); })();
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 }] }] }); })();
1513
1575
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber: 220 }); })();
1514
1576
  /** Indeks najbliższej pozycji (środka kategorii) do współrzędnej kursora. */
1515
1577
  function nearestIndex(positions, at) {