@konce-pt/angular 0.18.5 → 0.18.6

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
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, 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';
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, KPT_CHART_POINTER, pickCategory, 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;
@@ -190,7 +190,7 @@ function KptChartTooltip_Conditional_0_Template(rf, ctx) { if (rf & 1) {
190
190
  const t_r1 = ctx;
191
191
  const ctx_r3 = i0.ɵɵnextContext();
192
192
  i0.ɵɵstyleProp("top", t_r1.y, "%");
193
- i0.ɵɵclassProp("kpt-chart__tooltip--flip", t_r1.y < 22)("kpt-chart__tooltip--hidden", !ctx_r3.state());
193
+ i0.ɵɵclassProp("kpt-chart__tooltip--flip", t_r1.y < 22)("kpt-chart__tooltip--hidden", !ctx_r3.state())("kpt-chart__tooltip--scrub", t_r1.scrub);
194
194
  i0.ɵɵattribute("aria-hidden", ctx_r3.state() ? null : "true");
195
195
  i0.ɵɵadvance(2);
196
196
  i0.ɵɵconditional(t_r1.label ? 2 : -1);
@@ -256,8 +256,8 @@ class KptChartTooltip {
256
256
  i0.ɵɵviewQuerySignal(ctx.bubble, _c0$1, 5)(ctx.label, _c1, 5);
257
257
  } if (rf & 2) {
258
258
  i0.ɵɵqueryAdvance(2);
259
- } }, hostAttrs: [1, "kpt-chart-tooltip-host"], inputs: { state: [1, "state"] }, decls: 1, vars: 1, consts: [["bubble", ""], ["label", ""], ["role", "tooltip", 1, "kpt-chart__tooltip", 3, "kpt-chart__tooltip--flip", "kpt-chart__tooltip--hidden", "top"], ["role", "tooltip", 1, "kpt-chart__tooltip"], [1, "kpt-chart__tooltip-title"], [1, "kpt-chart__tooltip-row"], [1, "kpt-chart__tooltip-label"], [1, "kpt-chart__tooltip-dot"], [1, "kpt-chart__tooltip-name"], [1, "kpt-chart__tooltip-val"], [1, "kpt-chart__sr"], ["aria-hidden", "true", 1, "kpt-chart__reels"], [1, "kpt-chart__reel"], [1, "kpt-chart__reel-text"], [1, "kpt-chart__reel-strip"]], template: function KptChartTooltip_Template(rf, ctx) { if (rf & 1) {
260
- i0.ɵɵconditionalCreate(0, KptChartTooltip_Conditional_0_Template, 5, 8, "div", 2);
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", "kpt-chart__tooltip--scrub", "top"], ["role", "tooltip", 1, "kpt-chart__tooltip"], [1, "kpt-chart__tooltip-title"], [1, "kpt-chart__tooltip-row"], [1, "kpt-chart__tooltip-label"], [1, "kpt-chart__tooltip-dot"], [1, "kpt-chart__tooltip-name"], [1, "kpt-chart__tooltip-val"], [1, "kpt-chart__sr"], ["aria-hidden", "true", 1, "kpt-chart__reels"], [1, "kpt-chart__reel"], [1, "kpt-chart__reel-text"], [1, "kpt-chart__reel-strip"]], template: function KptChartTooltip_Template(rf, ctx) { if (rf & 1) {
260
+ i0.ɵɵconditionalCreate(0, KptChartTooltip_Conditional_0_Template, 5, 10, "div", 2);
261
261
  } if (rf & 2) {
262
262
  let tmp_0_0;
263
263
  i0.ɵɵconditional((tmp_0_0 = ctx.shown()) ? 0 : -1, tmp_0_0);
@@ -269,51 +269,52 @@ class KptChartTooltip {
269
269
  selector: 'kpt-chart-tooltip',
270
270
  changeDetection: ChangeDetectionStrategy.OnPush,
271
271
  encapsulation: ViewEncapsulation.None,
272
- template: `
273
- @if (shown(); as t) {
274
- <div
275
- #bubble
276
- class="kpt-chart__tooltip"
277
- [class.kpt-chart__tooltip--flip]="t.y < 22"
278
- [class.kpt-chart__tooltip--hidden]="!state()"
279
- [style.top.%]="t.y"
280
- role="tooltip"
281
- [attr.aria-hidden]="state() ? null : 'true'"
282
- >
283
- @if (t.label) {
284
- <div class="kpt-chart__tooltip-title">
285
- <span #label class="kpt-chart__tooltip-label">{{ t.label }}</span>
286
- </div>
287
- }
288
- @for (row of rows(); track $index) {
289
- <div class="kpt-chart__tooltip-row">
290
- <span class="kpt-chart__tooltip-dot" [style.background-color]="row.color"></span>
291
- <span class="kpt-chart__tooltip-name">{{ row.name }}</span>
292
- <span class="kpt-chart__tooltip-val">
293
- <span class="kpt-chart__sr">{{ row.value }}</span>
294
- <span class="kpt-chart__reels" aria-hidden="true">
295
- @for (cell of row.cells; track cell.key) {
296
- @if (cell.kind === 'digit') {
297
- <span class="kpt-chart__reel"
298
- ><span class="kpt-chart__reel-strip" [style.--kpt-chart-digit]="cell.digit"
299
- >@for (d of digits; track d) {<span>{{ d }}</span>}</span
300
- ></span
301
- >
302
- } @else {
303
- <span class="kpt-chart__reel-text">{{ cell.text }}</span>
304
- }
305
- }
306
- </span>
307
- </span>
308
- </div>
309
- }
310
- </div>
311
- }
272
+ template: `
273
+ @if (shown(); as t) {
274
+ <div
275
+ #bubble
276
+ class="kpt-chart__tooltip"
277
+ [class.kpt-chart__tooltip--flip]="t.y < 22"
278
+ [class.kpt-chart__tooltip--hidden]="!state()"
279
+ [class.kpt-chart__tooltip--scrub]="t.scrub"
280
+ [style.top.%]="t.y"
281
+ role="tooltip"
282
+ [attr.aria-hidden]="state() ? null : 'true'"
283
+ >
284
+ @if (t.label) {
285
+ <div class="kpt-chart__tooltip-title">
286
+ <span #label class="kpt-chart__tooltip-label">{{ t.label }}</span>
287
+ </div>
288
+ }
289
+ @for (row of rows(); track $index) {
290
+ <div class="kpt-chart__tooltip-row">
291
+ <span class="kpt-chart__tooltip-dot" [style.background-color]="row.color"></span>
292
+ <span class="kpt-chart__tooltip-name">{{ row.name }}</span>
293
+ <span class="kpt-chart__tooltip-val">
294
+ <span class="kpt-chart__sr">{{ row.value }}</span>
295
+ <span class="kpt-chart__reels" aria-hidden="true">
296
+ @for (cell of row.cells; track cell.key) {
297
+ @if (cell.kind === 'digit') {
298
+ <span class="kpt-chart__reel"
299
+ ><span class="kpt-chart__reel-strip" [style.--kpt-chart-digit]="cell.digit"
300
+ >@for (d of digits; track d) {<span>{{ d }}</span>}</span
301
+ ></span
302
+ >
303
+ } @else {
304
+ <span class="kpt-chart__reel-text">{{ cell.text }}</span>
305
+ }
306
+ }
307
+ </span>
308
+ </span>
309
+ </div>
310
+ }
311
+ </div>
312
+ }
312
313
  `,
313
314
  host: { class: 'kpt-chart-tooltip-host' },
314
315
  }]
315
316
  }], () => [], { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], bubble: [{ type: i0.ViewChild, args: ['bubble', { isSignal: true }] }], label: [{ type: i0.ViewChild, args: ['label', { isSignal: true }] }] }); })();
316
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChartTooltip, { className: "KptChartTooltip", filePath: "lib/chart-tooltip.component.ts", lineNumber: 78 }); })();
317
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChartTooltip, { className: "KptChartTooltip", filePath: "lib/chart-tooltip.component.ts", lineNumber: 81 }); })();
317
318
 
318
319
  const _c0 = ["canvas"];
319
320
  const _forTrack0 = ($index, $item) => $item.key;
@@ -548,7 +549,7 @@ function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
548
549
  i0.ɵɵrepeaterCreate(18, KptChart_Case_8_Conditional_0_For_19_Template, 2, 0, null, null, _forTrack0);
549
550
  i0.ɵɵrepeaterCreate(20, KptChart_Case_8_Conditional_0_For_21_Template, 1, 4, ":svg:circle", 27, _forTrack1);
550
551
  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()); });
552
+ i0.ɵɵlistener("pointerdown", function KptChart_Case_8_Conditional_0_Template_rect_pointerdown_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryDown($event)); })("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)); })("pointerup", function KptChart_Case_8_Conditional_0_Template_rect_pointerup_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryUp($event)); })("pointercancel", function KptChart_Case_8_Conditional_0_Template_rect_pointercancel_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryUp($event)); })("pointerleave", function KptChart_Case_8_Conditional_0_Template_rect_pointerleave_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryLeave($event)); });
552
553
  i0.ɵɵelementEnd();
553
554
  } if (rf & 2) {
554
555
  let tmp_5_0;
@@ -579,7 +580,7 @@ function KptChart_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
579
580
  i0.ɵɵadvance(2);
580
581
  i0.ɵɵrepeater(ctx_r0.ripple());
581
582
  i0.ɵɵadvance(2);
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);
583
+ i0.ɵɵattribute("x", vm_r17.hit.x)("y", vm_r17.hit.y)("width", vm_r17.hit.width)("height", vm_r17.hit.height);
583
584
  } }
584
585
  function KptChart_Case_8_Template(rf, ctx) { if (rf & 1) {
585
586
  i0.ɵɵconditionalCreate(0, KptChart_Case_8_Conditional_0_Template, 23, 7);
@@ -700,7 +701,7 @@ function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
700
701
  i0.ɵɵconditionalCreate(12, KptChart_Case_9_Conditional_0_Conditional_12_Template, 3, 0, ":svg:g", 25);
701
702
  i0.ɵɵconditionalCreate(13, KptChart_Case_9_Conditional_0_Conditional_13_Template, 2, 0);
702
703
  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()); });
704
+ i0.ɵɵlistener("pointerdown", function KptChart_Case_9_Conditional_0_Template_rect_pointerdown_14_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryDown($event)); })("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)); })("pointerup", function KptChart_Case_9_Conditional_0_Template_rect_pointerup_14_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryUp($event)); })("pointercancel", function KptChart_Case_9_Conditional_0_Template_rect_pointercancel_14_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryUp($event)); })("pointerleave", function KptChart_Case_9_Conditional_0_Template_rect_pointerleave_14_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryLeave($event)); });
704
705
  i0.ɵɵelementEnd();
705
706
  } if (rf & 2) {
706
707
  let tmp_11_0;
@@ -723,7 +724,7 @@ function KptChart_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
723
724
  i0.ɵɵadvance();
724
725
  i0.ɵɵconditional((tmp_11_0 = ctx_r0.sheen()) ? 13 : -1, tmp_11_0);
725
726
  i0.ɵɵadvance();
726
- i0.ɵɵattribute("x", vm_r28.plot.x)("y", vm_r28.plot.y)("width", vm_r28.plot.width)("height", vm_r28.plot.height);
727
+ i0.ɵɵattribute("x", vm_r28.hit.x)("y", vm_r28.hit.y)("width", vm_r28.hit.width)("height", vm_r28.hit.height);
727
728
  } }
728
729
  function KptChart_Case_9_Template(rf, ctx) { if (rf & 1) {
729
730
  i0.ɵɵconditionalCreate(0, KptChart_Case_9_Conditional_0_Template, 15, 8);
@@ -760,21 +761,25 @@ function KptChart_Case_10_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
760
761
  function KptChart_Case_10_Conditional_0_For_9_For_3_Template(rf, ctx) { if (rf & 1) {
761
762
  const _r36 = i0.ɵɵgetCurrentView();
762
763
  i0.ɵɵnamespaceSVG();
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
+ i0.ɵɵelementStart(0, "g", 56);
765
+ i0.ɵɵlistener("pointerenter", function KptChart_Case_10_Conditional_0_For_9_For_3_Template_g_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_g_pointerleave_0_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.onElementLeave($event)); });
766
+ i0.ɵɵelement(1, "circle", 38)(2, "circle", 57);
765
767
  i0.ɵɵelementEnd();
766
768
  } if (rf & 2) {
767
769
  const p_r37 = ctx.$implicit;
768
770
  const $index_r39 = ctx.$index;
769
771
  const s_r38 = i0.ɵɵnextContext().$implicit;
772
+ i0.ɵɵadvance();
770
773
  i0.ɵɵstyleProp("fill", s_r38.color)("--%NS%kpt-chart-i", $index_r39);
771
774
  i0.ɵɵattribute("cx", p_r37.x)("cy", p_r37.y);
775
+ i0.ɵɵadvance();
776
+ i0.ɵɵattribute("cx", p_r37.x)("cy", p_r37.y);
772
777
  } }
773
778
  function KptChart_Case_10_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
774
779
  i0.ɵɵnamespaceSVG();
775
780
  i0.ɵɵelementStart(0, "g", 53);
776
781
  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);
782
+ i0.ɵɵrepeaterCreate(2, KptChart_Case_10_Conditional_0_For_9_For_3_Template, 3, 8, ":svg:g", 55, i0.ɵɵrepeaterTrackByIndex);
778
783
  i0.ɵɵelementEnd();
779
784
  } if (rf & 2) {
780
785
  const s_r38 = ctx.$implicit;
@@ -817,8 +822,8 @@ function KptChart_Case_10_Template(rf, ctx) { if (rf & 1) {
817
822
  function KptChart_Case_11_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
818
823
  const _r41 = i0.ɵɵgetCurrentView();
819
824
  i0.ɵɵnamespaceSVG();
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()); });
825
+ i0.ɵɵelementStart(0, "path", 60);
826
+ 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($event) { i0.ɵɵrestoreView(_r41); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onElementLeave($event)); });
822
827
  i0.ɵɵelementEnd();
823
828
  } if (rf & 2) {
824
829
  const sl_r42 = ctx.$implicit;
@@ -830,15 +835,15 @@ function KptChart_Case_11_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
830
835
  } }
831
836
  function KptChart_Case_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
832
837
  i0.ɵɵnamespaceSVG();
833
- i0.ɵɵelementStart(0, "g", 57);
834
- i0.ɵɵrepeaterCreate(1, KptChart_Case_11_Conditional_0_For_2_Template, 1, 7, ":svg:path", 58, _forTrack0);
838
+ i0.ɵɵelementStart(0, "g", 58);
839
+ i0.ɵɵrepeaterCreate(1, KptChart_Case_11_Conditional_0_For_2_Template, 1, 7, ":svg:path", 59, _forTrack0);
835
840
  i0.ɵɵelementEnd();
836
841
  } if (rf & 2) {
837
842
  i0.ɵɵadvance();
838
843
  i0.ɵɵrepeater(ctx);
839
844
  } }
840
845
  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);
846
+ i0.ɵɵconditionalCreate(0, KptChart_Case_11_Conditional_0_Template, 3, 0, ":svg:g", 58);
842
847
  } if (rf & 2) {
843
848
  let tmp_2_0;
844
849
  const ctx_r0 = i0.ɵɵnextContext();
@@ -873,7 +878,7 @@ function KptChart_For_24_For_4_Template(rf, ctx) { if (rf & 1) {
873
878
  i0.ɵɵtextInterpolate(value_r45);
874
879
  } }
875
880
  function KptChart_For_24_Template(rf, ctx) { if (rf & 1) {
876
- i0.ɵɵelementStart(0, "tr")(1, "th", 60);
881
+ i0.ɵɵelementStart(0, "tr")(1, "th", 61);
877
882
  i0.ɵɵtext(2);
878
883
  i0.ɵɵelementEnd();
879
884
  i0.ɵɵrepeaterCreate(3, KptChart_For_24_For_4_Template, 2, 1, "td", null, i0.ɵɵrepeaterTrackByIndex);
@@ -887,7 +892,7 @@ function KptChart_For_24_Template(rf, ctx) { if (rf & 1) {
887
892
  } }
888
893
  function KptChart_Conditional_26_Template(rf, ctx) { if (rf & 1) {
889
894
  const _r47 = i0.ɵɵgetCurrentView();
890
- i0.ɵɵelementStart(0, "kpt-chart-legend", 61);
895
+ i0.ɵɵelementStart(0, "kpt-chart-legend", 62);
891
896
  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)); });
892
897
  i0.ɵɵelementEnd();
893
898
  } if (rf & 2) {
@@ -898,8 +903,6 @@ let nextChartId = 0;
898
903
  let nextRippleId = 0;
899
904
  /** Szerokość pasma smugi światła (jednostki viewBoxa) - połowa po każdej stronie czoła fali. */
900
905
  const SHEEN_HALF = 90;
901
- /** Zjechanie z punktu na sąsiedni to `leave` i zaraz `enter` - dymek czeka chwilę, zamiast gasnąć. */
902
- const TIP_HIDE_DELAY = 60;
903
906
  /**
904
907
  * Etykiety osi poziomej: wszystkie, jeśli się mieszczą, inaczej równy podział 9/5/3/2
905
908
  * (`axisLabelIndices`). Pełna nazwa każdej kategorii zostaje w pigułce prowadnicy i w dymku.
@@ -1008,6 +1011,11 @@ class KptChart {
1008
1011
  this.motion = new KptChartMotion((f) => this.frame.set(f));
1009
1012
  this.prevConfig = null;
1010
1013
  this.lastTipIndex = null;
1014
+ /**
1015
+ * Palec (albo rysik) przeciąga po wykresie: dymek idzie za nim sztywną sprężyną, cyfry
1016
+ * przeskakują bez bębnów, a fala i wjazd etykiety milkną - wartości mają być czytelne w ruchu.
1017
+ */
1018
+ this.scrubbing = false;
1011
1019
  this.tipContent = signal(null, /* @ts-ignore */
1012
1020
  ...(ngDevMode ? [{ debugName: "tipContent" }] : /* istanbul ignore next */ []));
1013
1021
  /** Fala z punktu docelowego dymka (wykres liniowy). */
@@ -1160,6 +1168,7 @@ class KptChart {
1160
1168
  valueLabels: scale.ticks.map((t) => ({ x: plot.x - m.sideGap, y: yScale(t) + m.baselineShift, text: formatNumber(t), anchor: 'end' })),
1161
1169
  catLabels: bottomLabels(c.labels, c.labels.map((_, idx) => xAt(idx)), plot.y + plot.height + m.labelOffset, this.vw(), m),
1162
1170
  catTicks: c.labels.map((_, idx) => ({ x: xAt(idx), y: plot.y + plot.height })),
1171
+ hit: { x: plot.x - 12, y: plot.y - 12, width: plot.width + 24, height: this.vh() - plot.y + 12 },
1163
1172
  showPoints: c.points ?? true,
1164
1173
  ghost,
1165
1174
  };
@@ -1219,6 +1228,7 @@ class KptChart {
1219
1228
  return {
1220
1229
  orientation,
1221
1230
  plot,
1231
+ hit: { x: plot.x, y: plot.y, width: plot.width, height: this.vh() - plot.y },
1222
1232
  bars,
1223
1233
  grid: layout.ticks.map((t) => ({ x1: plot.x, y1: t.pos, x2: plot.x + plot.width, y2: t.pos })),
1224
1234
  valueLabels: layout.ticks.map((t) => ({ x: plot.x - m.sideGap, y: t.pos + m.baselineShift, text: formatNumber(t.value), anchor: 'end' })),
@@ -1229,6 +1239,7 @@ class KptChart {
1229
1239
  return {
1230
1240
  orientation,
1231
1241
  plot,
1242
+ hit: { x: 0, y: plot.y, width: plot.x + plot.width, height: plot.height },
1232
1243
  bars,
1233
1244
  grid: layout.ticks.map((t) => ({ x1: t.pos, y1: plot.y, x2: t.pos, y2: plot.y + plot.height })),
1234
1245
  valueLabels: layout.ticks.map((t) => ({ x: t.pos, y: plot.y + plot.height + m.labelOffset, text: formatNumber(t.value), anchor: 'middle' })),
@@ -1365,6 +1376,32 @@ class KptChart {
1365
1376
  });
1366
1377
  }
1367
1378
  // --- Zdarzenia ---
1379
+ /**
1380
+ * Linia i słupki: wciśnięcie pokazuje dymek od razu - stuknięcie palcem często nie daje żadnego
1381
+ * `pointermove`. Palec i rysik wchodzą w tryb przeciągania (`scrubbing`).
1382
+ */
1383
+ onCategoryDown(event) {
1384
+ this.scrubbing = event.pointerType !== 'mouse';
1385
+ this.onCategoryMove(event);
1386
+ }
1387
+ /**
1388
+ * Koniec przeciągania. Palec: po oderwaniu dymek zostaje z ostatnią wartością i gaśnie sam.
1389
+ * `pointercancel` to przeglądarka zabierająca gest na przewijanie strony - wtedy gaśnie od razu.
1390
+ */
1391
+ onCategoryUp(event) {
1392
+ if (!this.scrubbing)
1393
+ return;
1394
+ this.scrubbing = false;
1395
+ if (event.pointerType !== 'touch')
1396
+ return;
1397
+ this.hideTip(event.type === 'pointerup' ? KPT_CHART_POINTER.touchLinger : KPT_CHART_POINTER.leaveDelay);
1398
+ }
1399
+ /** Dotyk zawsze kończy się `pointerleave` po oderwaniu palca - o dymku decyduje wtedy `onCategoryUp`. */
1400
+ onCategoryLeave(event) {
1401
+ if (event.pointerType === 'touch')
1402
+ return;
1403
+ this.hideTip();
1404
+ }
1368
1405
  /**
1369
1406
  * Linia i słupki: najbliższa kategoria pod kursorem w całym obszarze wykresu. Dymek ma wiersze
1370
1407
  * wszystkich widocznych serii i jedzie między kategoriami - przerwa między punktami go nie gasi.
@@ -1377,8 +1414,8 @@ class KptChart {
1377
1414
  const p = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix.inverse());
1378
1415
  const line = this.lineVm();
1379
1416
  if (line) {
1380
- const idx = nearestIndex(line.catLabels.map((l) => l.at), p.x);
1381
- if (this.keepTip(idx))
1417
+ const idx = pickCategory(line.catLabels.map((l) => l.at), p.x, this.lastTipIndex);
1418
+ if (idx < 0 || this.keepTip(idx))
1382
1419
  return;
1383
1420
  const points = line.series.map((s) => ({ s, pt: s.points[idx] })).filter((e) => e.pt);
1384
1421
  const top = points.reduce((a, b) => (b.pt.y < a.pt.y ? b : a), points[0]);
@@ -1388,7 +1425,7 @@ class KptChart {
1388
1425
  const moved = this.tooltip() !== null && this.lastTipIndex !== null;
1389
1426
  this.activeIndex.set(idx);
1390
1427
  this.openTip(top.pt.x, top.pt.y, label, points.map((e) => this.row(e.s.name, label, e.pt.value, e.s.color)), idx);
1391
- if (moved && this.tipMotion())
1428
+ if (moved && this.tipMotion() && !this.scrubbing)
1392
1429
  this.ripple.set([{ id: ++nextRippleId, x: top.pt.x, y: top.pt.y, color: top.s.color }]);
1393
1430
  return;
1394
1431
  }
@@ -1396,8 +1433,8 @@ class KptChart {
1396
1433
  if (!bars)
1397
1434
  return;
1398
1435
  const vertical = bars.orientation === 'vertical';
1399
- const idx = nearestIndex(bars.catLabels.map((l) => l.at), vertical ? p.x : p.y);
1400
- if (this.keepTip(idx))
1436
+ const idx = pickCategory(bars.catLabels.map((l) => l.at), vertical ? p.x : p.y, this.lastTipIndex);
1437
+ if (idx < 0 || this.keepTip(idx))
1401
1438
  return;
1402
1439
  const group = bars.bars.filter((b) => b.cat === idx);
1403
1440
  if (!group.length)
@@ -1412,6 +1449,25 @@ class KptChart {
1412
1449
  showTip(tipX, tipY, name, label, value, color) {
1413
1450
  this.openTip(tipX, tipY, label, [this.row(name, label, value, color)], null);
1414
1451
  }
1452
+ /**
1453
+ * Wycinki i radar przy dotyku: niejawne przechwycenie wskaźnika trzymałoby cały gest na elemencie,
1454
+ * na którym się zaczął (wycinku albo tle `svg`), a wtedy `pointerenter` na kolejnych nigdy nie
1455
+ * przychodzi. Zwolnione - palec przechodzi po wycinkach jak mysz. Nasłuch na `svg`, bo gest często
1456
+ * zaczyna się obok koła. Linia i słupki trzymają przechwycenie - przeciąganie jedzie na powierzchni
1457
+ * `__hover` także wtedy, gdy palec wyjdzie poza nią.
1458
+ */
1459
+ releaseTouch(event) {
1460
+ const type = this.type();
1461
+ if (event.pointerType === 'mouse' || type === 'line' || type === 'bar')
1462
+ return;
1463
+ const el = event.target;
1464
+ if (el?.hasPointerCapture(event.pointerId))
1465
+ el.releasePointerCapture(event.pointerId);
1466
+ }
1467
+ /** Wycinki i radar: zejście palcem zostawia dymek do przeczytania, zejście myszą gasi go zaraz. */
1468
+ onElementLeave(event) {
1469
+ this.hideTip(event.pointerType === 'touch' ? KPT_CHART_POINTER.touchLinger : KPT_CHART_POINTER.leaveDelay);
1470
+ }
1415
1471
  /** Ten sam punkt pod kursorem - dymek zostaje (i nie zgaśnie, jeśli właśnie miał). */
1416
1472
  keepTip(idx) {
1417
1473
  if (this.tipContent() === null || this.lastTipIndex !== idx)
@@ -1431,10 +1487,10 @@ class KptChart {
1431
1487
  const animate = this.tipMotion();
1432
1488
  const dir = first || index === null || this.lastTipIndex === null ? 0 : Math.sign(index - this.lastTipIndex);
1433
1489
  this.lastTipIndex = index;
1434
- this.tipContent.set({ label, rows, dir, live: !first && animate });
1435
- this.motion.moveTip(x, y, first || !animate);
1490
+ this.tipContent.set({ label, rows, dir, live: !first && animate && !this.scrubbing, scrub: this.scrubbing });
1491
+ this.motion.moveTip(x, y, first || !animate, this.scrubbing);
1436
1492
  }
1437
- hideTip() {
1493
+ hideTip(delay = KPT_CHART_POINTER.leaveDelay) {
1438
1494
  clearTimeout(this.hideTimer);
1439
1495
  this.hideTimer = setTimeout(() => {
1440
1496
  this.tipContent.set(null);
@@ -1442,7 +1498,7 @@ class KptChart {
1442
1498
  this.lastTipIndex = null;
1443
1499
  this.ripple.set([]);
1444
1500
  this.motion.hideTip();
1445
- }, TIP_HIDE_DELAY);
1501
+ }, delay);
1446
1502
  }
1447
1503
  onToggle(key) {
1448
1504
  const set = new Set(this.hidden());
@@ -1505,13 +1561,14 @@ class KptChart {
1505
1561
  } }, hostAttrs: [1, "kpt-chart-host"], hostVars: 8, hostBindings: function KptChart_HostBindings(rf, ctx) { if (rf & 2) {
1506
1562
  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");
1507
1563
  i0.ɵɵclassProp("kpt-chart--no-anim", !ctx.anim().enabled);
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) {
1564
+ } }, 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", 3, "pointerdown"], [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, "pointerdown", "pointermove", "pointerup", "pointercancel", "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"], [1, "kpt-chart__radar-pt"], [1, "kpt-chart__radar-pt", 3, "pointerenter", "pointerleave"], ["r", "14", 1, "kpt-chart__hit"], [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
1565
  i0.ɵɵelementStart(0, "div", 1);
1510
1566
  i0.ɵɵconditionalCreate(1, KptChart_Conditional_1_Template, 2, 15, "div", 2);
1511
1567
  i0.ɵɵconditionalCreate(2, KptChart_Conditional_2_Template, 2, 15, "div", 3);
1512
1568
  i0.ɵɵelementStart(3, "div", 4)(4, "div", 5, 0);
1513
1569
  i0.ɵɵnamespaceSVG();
1514
1570
  i0.ɵɵelementStart(6, "svg", 6);
1571
+ i0.ɵɵlistener("pointerdown", function KptChart_Template_svg_pointerdown_6_listener($event) { return ctx.releaseTouch($event); });
1515
1572
  i0.ɵɵconditionalCreate(7, KptChart_Conditional_7_Template, 5, 5, ":svg:defs");
1516
1573
  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);
1517
1574
  i0.ɵɵelementEnd();
@@ -1560,7 +1617,7 @@ class KptChart {
1560
1617
  i0.ɵɵproperty("state", ctx.tooltip());
1561
1618
  i0.ɵɵadvance();
1562
1619
  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 }); }
1620
+ } }, 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;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.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__radar-pt:hover .kpt-chart__point{transform:scale(1.4)}.kpt-chart__hit{fill:transparent;pointer-events:all}.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__tooltip--scrub .kpt-chart__reel-strip{transition:none}.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 }); }
1564
1621
  }
1565
1622
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptChart, [{
1566
1623
  type: Component,
@@ -1570,18 +1627,9 @@ class KptChart {
1570
1627
  '[style.--kpt-chart-duration]': "anim().duration + 'ms'",
1571
1628
  '[style.--kpt-chart-stagger]': "anim().stagger + 'ms'",
1572
1629
  '[style.--kpt-chart-delay]': "anim().delay + 'ms'",
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"] }]
1630
+ }, 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 (pointerdown)=\"releaseTouch($event)\"\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.hit.x\"\r\n [attr.y]=\"vm.hit.y\"\r\n [attr.width]=\"vm.hit.width\"\r\n [attr.height]=\"vm.hit.height\"\r\n (pointerdown)=\"onCategoryDown($event)\"\r\n (pointermove)=\"onCategoryMove($event)\"\r\n (pointerup)=\"onCategoryUp($event)\"\r\n (pointercancel)=\"onCategoryUp($event)\"\r\n (pointerleave)=\"onCategoryLeave($event)\"\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.hit.x\"\r\n [attr.y]=\"vm.hit.y\"\r\n [attr.width]=\"vm.hit.width\"\r\n [attr.height]=\"vm.hit.height\"\r\n (pointerdown)=\"onCategoryDown($event)\"\r\n (pointermove)=\"onCategoryMove($event)\"\r\n (pointerup)=\"onCategoryUp($event)\"\r\n (pointercancel)=\"onCategoryUp($event)\"\r\n (pointerleave)=\"onCategoryLeave($event)\"\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 <!-- Kropka ma 4 px, pole trafie\u0144 wok\u00F3\u0142 niej 14 px - cel na palec. -->\r\n <g\r\n class=\"kpt-chart__radar-pt\"\r\n (pointerenter)=\"showTip(p.x, p.y, s.name, p.label, p.value, s.color)\"\r\n (pointerleave)=\"onElementLeave($event)\"\r\n >\r\n <circle class=\"kpt-chart__point\" [attr.cx]=\"p.x\" [attr.cy]=\"p.y\" r=\"4\" [style.fill]=\"s.color\" [style.--kpt-chart-i]=\"$index\" />\r\n <circle class=\"kpt-chart__hit\" [attr.cx]=\"p.x\" [attr.cy]=\"p.y\" r=\"14\" />\r\n </g>\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)=\"onElementLeave($event)\"\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;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.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__radar-pt:hover .kpt-chart__point{transform:scale(1.4)}.kpt-chart__hit{fill:transparent;pointer-events:all}.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__tooltip--scrub .kpt-chart__reel-strip{transition:none}.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
1631
  }], () => [], { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] }); })();
1575
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber: 220 }); })();
1576
- /** Indeks najbliższej pozycji (środka kategorii) do współrzędnej kursora. */
1577
- function nearestIndex(positions, at) {
1578
- let best = 0;
1579
- positions.forEach((p, i) => {
1580
- if (Math.abs(p - at) < Math.abs((positions[best] ?? p) - at))
1581
- best = i;
1582
- });
1583
- return best;
1584
- }
1632
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChart, { className: "KptChart", filePath: "lib/chart.component.ts", lineNumber: 232 }); })();
1585
1633
  /** Różnica ze znakiem (plus albo minus z myślnikiem ASCII). */
1586
1634
  function signed(delta) {
1587
1635
  const text = formatNumber(Math.abs(Math.round(delta)));