@aquera/nile-visualization 2.9.7 → 2.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/nile-chart/nile-chart-config.d.ts +1 -2
- package/dist/src/nile-chart/nile-chart.css.js +45 -399
- package/dist/src/nile-chart/nile-chart.d.ts +2 -0
- package/dist/src/nile-chart/nile-chart.js +38 -3
- package/dist/src/nile-filter-chart/nile-filter-chart.css.js +184 -107
- package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +20 -3
- package/dist/src/nile-filter-chart/nile-filter-chart.js +97 -25
- package/dist/src/nile-filter-chart/utils/prompt.js +210 -60
- package/dist/src/nile-filter-chart/utils/types.d.ts +59 -25
- package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +18 -314
- package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +2 -4
- package/dist/src/nile-kpi-chart/nile-kpi-chart.js +26 -145
- package/package.json +1 -1
- package/dist/src/nile-chart/nile-chart-skeleton.d.ts +0 -2
- package/dist/src/nile-chart/nile-chart-skeleton.js +0 -188
|
@@ -117,6 +117,7 @@ export interface NileAiConfig {
|
|
|
117
117
|
export interface NileChartConfigBase {
|
|
118
118
|
chartTitle?: string;
|
|
119
119
|
chartSubtitle?: string;
|
|
120
|
+
noHeader?: boolean;
|
|
120
121
|
height?: string;
|
|
121
122
|
loading?: boolean;
|
|
122
123
|
options?: import('highcharts').Options;
|
|
@@ -524,8 +525,6 @@ export interface NileKpiChartConfig extends NileChartConfigBase {
|
|
|
524
525
|
cardPaddingVertical?: string | number;
|
|
525
526
|
cardPaddingHorizontal?: string | number;
|
|
526
527
|
contentGap?: string | number;
|
|
527
|
-
/** Accent bar colour for the 'accent' variant. */
|
|
528
|
-
accentColor?: string;
|
|
529
528
|
/** Abbreviation scale. Default 'auto'. */
|
|
530
529
|
valueFormat?: KpiValueFormat;
|
|
531
530
|
/** Decimal places on the abbreviated value. */
|
|
@@ -172,6 +172,15 @@ export const styles = css `
|
|
|
172
172
|
contain: layout style;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
:host([no-header]) .nile-chart-inner {
|
|
176
|
+
border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-xl));
|
|
177
|
+
padding-top: var(--nile-spacing-2xl, var(--ng-spacing-2xl));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host([no-header][appearance="minimal"]) .nile-chart-inner {
|
|
181
|
+
padding-top: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
175
184
|
/* Grid layout:
|
|
176
185
|
- card uses clip-path (not overflow:hidden) so position:sticky on the header is not broken
|
|
177
186
|
- height goes on nile-data-grid itself so .scroll-container inside shadow DOM scrolls,
|
|
@@ -421,13 +430,6 @@ export const styles = css `
|
|
|
421
430
|
overflow-y: auto;
|
|
422
431
|
-webkit-overflow-scrolling: touch;
|
|
423
432
|
contain: none;
|
|
424
|
-
display: flex;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
:host([fit]) .nile-chart-inner--kpi > nile-kpi-chart {
|
|
428
|
-
flex: 1 1 auto;
|
|
429
|
-
min-height: 0;
|
|
430
|
-
height: 100%;
|
|
431
433
|
}
|
|
432
434
|
|
|
433
435
|
.nile-chart-inner--filter {
|
|
@@ -466,36 +468,19 @@ export const styles = css `
|
|
|
466
468
|
pointer-events: none;
|
|
467
469
|
}
|
|
468
470
|
|
|
469
|
-
/* When loading, the card becomes a flex column that fills the host so the
|
|
470
|
-
skeleton can shrink with the container instead of forcing a fixed size. */
|
|
471
|
-
.nile-chart-card--loading {
|
|
472
|
-
display: flex;
|
|
473
|
-
flex-direction: column;
|
|
474
|
-
height: 100%;
|
|
475
|
-
}
|
|
476
|
-
.nile-chart-card--loading .nile-chart-wrapper {
|
|
477
|
-
flex: 1 1 auto;
|
|
478
|
-
min-height: 0;
|
|
479
|
-
}
|
|
480
|
-
.nile-chart-card--loading .nile-chart-inner {
|
|
481
|
-
height: 100%;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
471
|
.nile-chart-skeleton {
|
|
485
472
|
display: flex;
|
|
486
473
|
flex-direction: column;
|
|
487
474
|
gap: 0;
|
|
488
475
|
padding: var(--nile-spacing-3xl, var(--ng-spacing-3xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl)) var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
489
|
-
height:
|
|
490
|
-
box-sizing: border-box;
|
|
476
|
+
min-height: var(--nile-chart-skeleton-height, 300px);
|
|
491
477
|
}
|
|
492
478
|
|
|
493
479
|
.nile-chart-skeleton-body {
|
|
494
480
|
display: flex;
|
|
495
481
|
flex-direction: column;
|
|
496
482
|
justify-content: space-around;
|
|
497
|
-
flex: 1
|
|
498
|
-
min-height: 0;
|
|
483
|
+
flex: 1;
|
|
499
484
|
gap: var(--nile-spacing-14px, var(--ng-spacing-lg));
|
|
500
485
|
padding-left: 44px;
|
|
501
486
|
position: relative;
|
|
@@ -508,8 +493,8 @@ export const styles = css `
|
|
|
508
493
|
left: 34px;
|
|
509
494
|
top: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
510
495
|
bottom: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
511
|
-
width:
|
|
512
|
-
border-radius:
|
|
496
|
+
width: var(--nile-border-width-2, var(--ng-stroke-width-2));
|
|
497
|
+
border-radius: var(--nile-border-width-1, var(--ng-stroke-width-1));
|
|
513
498
|
background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
514
499
|
}
|
|
515
500
|
|
|
@@ -517,398 +502,59 @@ export const styles = css `
|
|
|
517
502
|
display: flex;
|
|
518
503
|
align-items: center;
|
|
519
504
|
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
520
|
-
|
|
521
|
-
min-height: 0;
|
|
522
|
-
max-height: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
505
|
+
height: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
523
506
|
}
|
|
524
507
|
|
|
525
|
-
.nile-chart-skeleton-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
.nile-chart-skeleton-bar-sk::part(base) {
|
|
530
|
-
width: 100%;
|
|
531
|
-
height: 100%;
|
|
532
|
-
}
|
|
533
|
-
.nile-chart-skeleton-row:nth-child(1) .nile-chart-skeleton-bar-rect { animation-delay: 0ms; }
|
|
534
|
-
.nile-chart-skeleton-row:nth-child(2) .nile-chart-skeleton-bar-rect { animation-delay: 100ms; }
|
|
535
|
-
.nile-chart-skeleton-row:nth-child(3) .nile-chart-skeleton-bar-rect { animation-delay: 200ms; }
|
|
536
|
-
.nile-chart-skeleton-row:nth-child(4) .nile-chart-skeleton-bar-rect { animation-delay: 300ms; }
|
|
537
|
-
.nile-chart-skeleton-row:nth-child(5) .nile-chart-skeleton-bar-rect { animation-delay: 400ms; }
|
|
538
|
-
|
|
539
|
-
/* Horizontal x-axis labels row */
|
|
540
|
-
.nile-chart-skeleton-xaxis-row {
|
|
541
|
-
display: flex;
|
|
542
|
-
justify-content: space-around;
|
|
543
|
-
padding-left: 44px;
|
|
544
|
-
margin-top: var(--nile-spacing-14px, var(--ng-spacing-lg));
|
|
508
|
+
.nile-chart-skeleton-ylabel {
|
|
509
|
+
width: var(--nile-height-26px, 26px);
|
|
510
|
+
height: var(--nile-spacing-10px, var(--ng-spacing-md-alt));
|
|
511
|
+
border-radius: var(--nile-radius-radius-sm, var(--ng-radius-xs));
|
|
545
512
|
flex-shrink: 0;
|
|
546
|
-
min-width: 0;
|
|
547
|
-
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
548
|
-
}
|
|
549
|
-
.nile-chart-skeleton-xaxis-row nile-skeleton-loader { flex-shrink: 1; min-width: 0; }
|
|
550
|
-
|
|
551
|
-
/* Compact paddings + y-axis offset for narrow widths so the skeleton
|
|
552
|
-
doesn't overflow when the chart is shrunk. */
|
|
553
|
-
@container (max-width: 400px) {
|
|
554
|
-
.nile-chart-skeleton {
|
|
555
|
-
padding: var(--nile-spacing-xl, var(--ng-spacing-xl)) var(--nile-spacing-2xl, var(--ng-spacing-2xl)) var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
556
|
-
}
|
|
557
|
-
.nile-chart-skeleton-body { padding-left: 32px; }
|
|
558
|
-
.nile-chart-skeleton-body::before { left: 24px; }
|
|
559
|
-
.nile-chart-skeleton-xaxis-row { padding-left: 32px; }
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
@container (max-width: 280px) {
|
|
563
|
-
.nile-chart-skeleton {
|
|
564
|
-
padding: var(--nile-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
565
|
-
}
|
|
566
|
-
.nile-chart-skeleton-body { padding-left: 22px; }
|
|
567
|
-
.nile-chart-skeleton-body::before { left: 14px; }
|
|
568
|
-
.nile-chart-skeleton-xaxis-row { padding-left: 22px; }
|
|
569
|
-
.nile-chart-skeleton-ylabel { display: none; }
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
@keyframes nile-skeleton-blink {
|
|
573
|
-
0%, 100% { opacity: 0.5; }
|
|
574
|
-
50% { opacity: 1; }
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
/* ── Variant: columns (vertical bars) — wraps nile-skeleton-loader ── */
|
|
578
|
-
.nile-chart-skeleton-columns {
|
|
579
|
-
display: flex;
|
|
580
|
-
align-items: flex-end;
|
|
581
|
-
justify-content: space-between;
|
|
582
|
-
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
583
|
-
flex: 1 1 auto;
|
|
584
|
-
min-height: 0;
|
|
585
|
-
padding-left: 28px;
|
|
586
|
-
position: relative;
|
|
587
|
-
}
|
|
588
|
-
.nile-chart-skeleton-columns::before,
|
|
589
|
-
.nile-chart-skeleton-columns::after {
|
|
590
|
-
content: '';
|
|
591
|
-
position: absolute;
|
|
592
|
-
background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
593
|
-
border-radius: 1px;
|
|
594
|
-
}
|
|
595
|
-
.nile-chart-skeleton-columns::before { left: 18px; top: 0; bottom: 0; width: 2px; }
|
|
596
|
-
.nile-chart-skeleton-columns::after { left: 18px; right: 0; bottom: 0; height: 2px; }
|
|
597
|
-
.nile-chart-skeleton-col-cell {
|
|
598
|
-
flex: 1 1 0;
|
|
599
|
-
min-width: 0;
|
|
600
|
-
height: 60%;
|
|
601
|
-
display: flex;
|
|
602
|
-
align-items: stretch;
|
|
603
|
-
border-radius: var(--nile-radius-radius-sm, var(--ng-radius-xs)) var(--nile-radius-radius-sm, var(--ng-radius-xs)) 0 0;
|
|
604
|
-
overflow: hidden;
|
|
605
|
-
}
|
|
606
|
-
.nile-chart-skeleton-col-cell nile-skeleton-loader {
|
|
607
|
-
width: 100%;
|
|
608
|
-
height: 100%;
|
|
609
|
-
display: block;
|
|
610
|
-
}
|
|
611
|
-
/* Percentage heights don't pass through the loader's shadow DOM by default.
|
|
612
|
-
Use ::part() to push height: 100% all the way to the shimmer rectangle. */
|
|
613
|
-
.nile-chart-skeleton-col-cell nile-skeleton-loader::part(base),
|
|
614
|
-
.nile-chart-skeleton-col-cell nile-skeleton-loader::part(skeleton),
|
|
615
|
-
.nile-chart-skeleton-heatmap-cell nile-skeleton-loader::part(base),
|
|
616
|
-
.nile-chart-skeleton-heatmap-cell nile-skeleton-loader::part(skeleton) {
|
|
617
|
-
height: 100%;
|
|
618
|
-
width: 100%;
|
|
619
|
-
}
|
|
620
|
-
.nile-chart-skeleton-xaxis-row--columns { padding-left: 28px; }
|
|
621
|
-
|
|
622
|
-
/* ── Variant: line ── */
|
|
623
|
-
.nile-chart-skeleton-line {
|
|
624
|
-
flex: 1 1 auto;
|
|
625
|
-
min-height: 0;
|
|
626
|
-
padding-left: 28px;
|
|
627
|
-
position: relative;
|
|
628
|
-
}
|
|
629
|
-
.nile-chart-skeleton-line::before {
|
|
630
|
-
content: '';
|
|
631
|
-
position: absolute;
|
|
632
|
-
left: 18px; top: 0; bottom: 0;
|
|
633
|
-
width: 2px;
|
|
634
|
-
border-radius: 1px;
|
|
635
513
|
background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
636
|
-
}
|
|
637
|
-
.nile-chart-skeleton-line svg { width: 100%; height: 100%; display: block; }
|
|
638
|
-
.nile-chart-skeleton-line-area {
|
|
639
|
-
fill: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
640
|
-
opacity: 0.35;
|
|
641
|
-
animation: nile-skeleton-blink 1.6s ease-in-out infinite;
|
|
642
|
-
}
|
|
643
|
-
.nile-chart-skeleton-line-stroke {
|
|
644
|
-
fill: none;
|
|
645
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
646
|
-
stroke-width: 1.6;
|
|
647
|
-
stroke-linecap: round;
|
|
648
|
-
stroke-linejoin: round;
|
|
649
|
-
animation: nile-skeleton-blink 1.2s ease-in-out infinite;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
/* Trendline: faint guide line + actuals stroke + dashed forecast + split rule */
|
|
653
|
-
.nile-chart-skeleton-trend-line {
|
|
654
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
655
|
-
stroke-width: 0.8;
|
|
656
|
-
opacity: 0.45;
|
|
657
|
-
}
|
|
658
|
-
.nile-chart-skeleton-trend-forecast {
|
|
659
|
-
fill: none;
|
|
660
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
661
|
-
stroke-width: 1.6;
|
|
662
|
-
stroke-linecap: round;
|
|
663
|
-
stroke-dasharray: 3 3;
|
|
664
514
|
animation: nile-skeleton-blink 1.2s ease-in-out infinite;
|
|
665
|
-
animation-delay: 200ms;
|
|
666
|
-
}
|
|
667
|
-
.nile-chart-skeleton-trend-divider {
|
|
668
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
669
|
-
stroke-width: 0.5;
|
|
670
|
-
stroke-dasharray: 1 2;
|
|
671
|
-
opacity: 0.5;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
/* Anomaly: halo pulses around outlier dots, dot itself blinks */
|
|
675
|
-
.nile-chart-skeleton-anomaly-dot {
|
|
676
|
-
fill: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
677
|
-
animation: nile-skeleton-blink 1.1s ease-in-out infinite;
|
|
678
|
-
}
|
|
679
|
-
.nile-chart-skeleton-anomaly-halo {
|
|
680
|
-
fill: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
681
|
-
opacity: 0.25;
|
|
682
|
-
transform-origin: center;
|
|
683
|
-
transform-box: fill-box;
|
|
684
|
-
animation: nile-skeleton-anomaly-pulse 1.8s ease-in-out infinite;
|
|
685
|
-
}
|
|
686
|
-
.nile-chart-skeleton-anomaly-halo:nth-of-type(1) { animation-delay: 0ms; }
|
|
687
|
-
.nile-chart-skeleton-anomaly-halo:nth-of-type(2) { animation-delay: 300ms; }
|
|
688
|
-
.nile-chart-skeleton-anomaly-halo:nth-of-type(3) { animation-delay: 600ms; }
|
|
689
|
-
@keyframes nile-skeleton-anomaly-pulse {
|
|
690
|
-
0%, 100% { opacity: 0.15; transform: scale(0.7); }
|
|
691
|
-
50% { opacity: 0.35; transform: scale(1.2); }
|
|
692
515
|
}
|
|
693
516
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
justify-content: center;
|
|
699
|
-
gap: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
700
|
-
flex: 1 1 auto;
|
|
701
|
-
min-height: 0;
|
|
702
|
-
}
|
|
703
|
-
.nile-chart-skeleton-pie {
|
|
704
|
-
width: min(60%, 220px);
|
|
705
|
-
aspect-ratio: 1;
|
|
706
|
-
border-radius: 50%;
|
|
707
|
-
background: conic-gradient(
|
|
708
|
-
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary)) 0 25%,
|
|
709
|
-
var(--nile-colors-neutral-300, #e5e7eb) 25% 55%,
|
|
710
|
-
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary)) 55% 80%,
|
|
711
|
-
var(--nile-colors-neutral-300, #e5e7eb) 80% 100%
|
|
712
|
-
);
|
|
713
|
-
mask: radial-gradient(circle, transparent 28%, black 30%);
|
|
714
|
-
-webkit-mask: radial-gradient(circle, transparent 28%, black 30%);
|
|
715
|
-
animation: nile-skeleton-spin 6s linear infinite, nile-skeleton-blink 1.6s ease-in-out infinite;
|
|
716
|
-
}
|
|
717
|
-
.nile-chart-skeleton-legend {
|
|
718
|
-
display: flex;
|
|
719
|
-
flex-direction: column;
|
|
720
|
-
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
721
|
-
flex-shrink: 0;
|
|
722
|
-
}
|
|
723
|
-
.nile-chart-skeleton-legend-row {
|
|
724
|
-
display: flex;
|
|
725
|
-
align-items: center;
|
|
726
|
-
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
727
|
-
}
|
|
728
|
-
@container (max-width: 320px) {
|
|
729
|
-
.nile-chart-skeleton-legend { display: none; }
|
|
730
|
-
}
|
|
731
|
-
@keyframes nile-skeleton-spin { to { transform: rotate(360deg); } }
|
|
732
|
-
|
|
733
|
-
/* ── Variant: scatter ── */
|
|
734
|
-
.nile-chart-skeleton-scatter {
|
|
735
|
-
flex: 1 1 auto;
|
|
736
|
-
min-height: 0;
|
|
737
|
-
position: relative;
|
|
738
|
-
padding-left: 28px;
|
|
739
|
-
}
|
|
740
|
-
.nile-chart-skeleton-scatter::before,
|
|
741
|
-
.nile-chart-skeleton-scatter::after {
|
|
742
|
-
content: '';
|
|
743
|
-
position: absolute;
|
|
517
|
+
.nile-chart-skeleton-bar {
|
|
518
|
+
height: var(--nile-spacing-2xl, var(--ng-spacing-2xl));
|
|
519
|
+
width: var(--w, 60%);
|
|
520
|
+
border-radius: 0 var(--nile-radius-radius-sm, var(--ng-radius-xs)) var(--nile-radius-radius-sm, var(--ng-radius-xs)) 0;
|
|
744
521
|
background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
745
|
-
border-radius: 1px;
|
|
746
|
-
}
|
|
747
|
-
.nile-chart-skeleton-scatter::before { left: 18px; top: 0; bottom: 0; width: 2px; }
|
|
748
|
-
.nile-chart-skeleton-scatter::after { left: 18px; right: 0; bottom: 0; height: 2px; }
|
|
749
|
-
.nile-chart-skeleton-dot-pos {
|
|
750
|
-
position: absolute;
|
|
751
|
-
transform: translate(-50%, -50%);
|
|
752
|
-
display: inline-flex;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
/* ── Variant: heatmap ── */
|
|
756
|
-
.nile-chart-skeleton-heatmap {
|
|
757
|
-
display: flex;
|
|
758
|
-
flex-direction: column;
|
|
759
|
-
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
760
|
-
flex: 1 1 auto;
|
|
761
|
-
min-height: 0;
|
|
762
|
-
}
|
|
763
|
-
.nile-chart-skeleton-heatmap-row {
|
|
764
|
-
display: flex;
|
|
765
|
-
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
766
|
-
flex: 1 1 0;
|
|
767
|
-
min-height: 0;
|
|
768
|
-
}
|
|
769
|
-
.nile-chart-skeleton-heatmap-cell {
|
|
770
|
-
flex: 1 1 0;
|
|
771
|
-
min-width: 0;
|
|
772
|
-
display: flex;
|
|
773
|
-
}
|
|
774
|
-
.nile-chart-skeleton-heatmap-cell nile-skeleton-loader { width: 100%; height: 100%; }
|
|
775
|
-
|
|
776
|
-
/* ── Variant: radar ── */
|
|
777
|
-
.nile-chart-skeleton-radar-wrap {
|
|
778
|
-
display: flex;
|
|
779
|
-
align-items: center;
|
|
780
|
-
justify-content: center;
|
|
781
|
-
flex: 1 1 auto;
|
|
782
|
-
min-height: 0;
|
|
783
|
-
}
|
|
784
|
-
.nile-chart-skeleton-radar-svg {
|
|
785
|
-
width: min(78%, 260px);
|
|
786
|
-
aspect-ratio: 1;
|
|
787
|
-
display: block;
|
|
788
|
-
}
|
|
789
|
-
.nile-chart-skeleton-radar-grid {
|
|
790
|
-
fill: none;
|
|
791
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
792
|
-
stroke-width: 0.8;
|
|
793
|
-
stroke-linejoin: round;
|
|
794
|
-
opacity: 0.7;
|
|
795
|
-
}
|
|
796
|
-
.nile-chart-skeleton-radar-spoke {
|
|
797
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
798
|
-
stroke-width: 0.6;
|
|
799
|
-
opacity: 0.5;
|
|
800
|
-
}
|
|
801
|
-
.nile-chart-skeleton-radar-data {
|
|
802
|
-
fill: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
803
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
804
|
-
stroke-width: 1.2;
|
|
805
|
-
stroke-linejoin: round;
|
|
806
|
-
opacity: 0.45;
|
|
807
|
-
animation: nile-skeleton-blink 1.4s ease-in-out infinite;
|
|
808
|
-
transform-origin: 50px 50px;
|
|
809
|
-
transform-box: fill-box;
|
|
810
|
-
}
|
|
811
|
-
.nile-chart-skeleton-radar-dot {
|
|
812
|
-
fill: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
813
522
|
animation: nile-skeleton-blink 1.2s ease-in-out infinite;
|
|
814
523
|
}
|
|
815
|
-
.nile-chart-skeleton-radar-dot:nth-child(5) { animation-delay: 0ms; }
|
|
816
|
-
.nile-chart-skeleton-radar-dot:nth-child(6) { animation-delay: 120ms; }
|
|
817
|
-
.nile-chart-skeleton-radar-dot:nth-child(7) { animation-delay: 240ms; }
|
|
818
|
-
.nile-chart-skeleton-radar-dot:nth-child(8) { animation-delay: 360ms; }
|
|
819
|
-
.nile-chart-skeleton-radar-dot:nth-child(9) { animation-delay: 480ms; }
|
|
820
524
|
|
|
821
|
-
/*
|
|
822
|
-
.nile-chart-skeleton-
|
|
525
|
+
/* Staggered wave across the bars */
|
|
526
|
+
.nile-chart-skeleton-row:nth-child(1) .nile-chart-skeleton-bar { animation-delay: 0ms; }
|
|
527
|
+
.nile-chart-skeleton-row:nth-child(2) .nile-chart-skeleton-bar { animation-delay: 100ms; }
|
|
528
|
+
.nile-chart-skeleton-row:nth-child(3) .nile-chart-skeleton-bar { animation-delay: 200ms; }
|
|
529
|
+
.nile-chart-skeleton-row:nth-child(4) .nile-chart-skeleton-bar { animation-delay: 300ms; }
|
|
530
|
+
.nile-chart-skeleton-row:nth-child(5) .nile-chart-skeleton-bar { animation-delay: 400ms; }
|
|
531
|
+
|
|
532
|
+
/* Horizontal x-axis labels row */
|
|
533
|
+
.nile-chart-skeleton-xaxis-row {
|
|
823
534
|
display: flex;
|
|
824
|
-
flex-direction: column;
|
|
825
|
-
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
826
|
-
flex: 1 1 auto;
|
|
827
|
-
min-height: 0;
|
|
828
535
|
justify-content: space-around;
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
position: relative;
|
|
832
|
-
height: 12px;
|
|
833
|
-
}
|
|
834
|
-
.nile-chart-skeleton-tl-bar-pos {
|
|
835
|
-
position: absolute;
|
|
836
|
-
top: 0; bottom: 0;
|
|
837
|
-
display: inline-flex;
|
|
536
|
+
padding-left: 44px;
|
|
537
|
+
margin-top: var(--nile-spacing-14px, var(--ng-spacing-lg));
|
|
838
538
|
}
|
|
839
539
|
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
flex: 1 1 auto;
|
|
846
|
-
min-height: 0;
|
|
847
|
-
justify-content: center;
|
|
848
|
-
}
|
|
849
|
-
.nile-chart-skeleton-kpi-spark {
|
|
850
|
-
width: 100%;
|
|
851
|
-
height: 40px;
|
|
852
|
-
margin-top: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
853
|
-
}
|
|
854
|
-
.nile-chart-skeleton-kpi-spark path {
|
|
855
|
-
fill: none;
|
|
856
|
-
stroke: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
857
|
-
stroke-width: 1.6;
|
|
858
|
-
stroke-linecap: round;
|
|
859
|
-
stroke-linejoin: round;
|
|
540
|
+
.nile-chart-skeleton-xlabel {
|
|
541
|
+
height: var(--nile-spacing-10px, var(--ng-spacing-md-alt));
|
|
542
|
+
width: var(--nile-height-30px, 30px);
|
|
543
|
+
border-radius: var(--nile-radius-radius-sm, var(--ng-radius-xs));
|
|
544
|
+
background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
860
545
|
animation: nile-skeleton-blink 1.2s ease-in-out infinite;
|
|
546
|
+
animation-delay: var(--d, 0ms);
|
|
861
547
|
}
|
|
862
548
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
flex-direction: column;
|
|
867
|
-
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
868
|
-
flex: 1 1 auto;
|
|
869
|
-
min-height: 0;
|
|
870
|
-
}
|
|
871
|
-
.nile-chart-skeleton-grid-head,
|
|
872
|
-
.nile-chart-skeleton-grid-row {
|
|
873
|
-
display: flex;
|
|
874
|
-
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
875
|
-
align-items: center;
|
|
876
|
-
flex: 1 1 0;
|
|
877
|
-
min-height: 0;
|
|
878
|
-
max-height: 28px;
|
|
879
|
-
}
|
|
880
|
-
.nile-chart-skeleton-grid-head {
|
|
881
|
-
border-bottom: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
882
|
-
padding-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
883
|
-
}
|
|
884
|
-
.nile-chart-skeleton-grid-head nile-skeleton-loader,
|
|
885
|
-
.nile-chart-skeleton-grid-row nile-skeleton-loader {
|
|
886
|
-
flex: 1 1 0;
|
|
887
|
-
min-width: 0;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/* ── Variant: filter ── */
|
|
891
|
-
.nile-chart-skeleton-filter {
|
|
892
|
-
display: flex;
|
|
893
|
-
flex-direction: column;
|
|
894
|
-
gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
895
|
-
flex: 1 1 auto;
|
|
896
|
-
min-height: 0;
|
|
897
|
-
justify-content: center;
|
|
898
|
-
}
|
|
899
|
-
.nile-chart-skeleton-filter-chips {
|
|
900
|
-
display: flex;
|
|
901
|
-
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
902
|
-
flex-wrap: wrap;
|
|
549
|
+
@keyframes nile-skeleton-blink {
|
|
550
|
+
0%, 100% { opacity: 0.5; }
|
|
551
|
+
50% { opacity: 1; }
|
|
903
552
|
}
|
|
904
553
|
|
|
905
554
|
@media (prefers-reduced-motion: reduce) {
|
|
906
|
-
.nile-chart-skeleton-
|
|
907
|
-
.nile-chart-skeleton-
|
|
908
|
-
.nile-chart-skeleton-
|
|
909
|
-
.nile-chart-skeleton-radar-data,
|
|
910
|
-
.nile-chart-skeleton-radar-dot,
|
|
911
|
-
.nile-chart-skeleton-kpi-spark path {
|
|
555
|
+
.nile-chart-skeleton-bar,
|
|
556
|
+
.nile-chart-skeleton-ylabel,
|
|
557
|
+
.nile-chart-skeleton-xlabel {
|
|
912
558
|
animation: none;
|
|
913
559
|
opacity: 0.7;
|
|
914
560
|
}
|
|
@@ -66,6 +66,8 @@ export declare class NileChart extends NileElement {
|
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
68
|
loading: boolean;
|
|
69
|
+
noHeader: boolean;
|
|
70
|
+
appearance: string | null;
|
|
69
71
|
/**
|
|
70
72
|
* When set, fills `chart.type` if the config omits it (same values as `chart.type`, e.g. `stacked`, `pie`).
|
|
71
73
|
* Usage: `<nile-chart chart-type="pie" />` plus `config.chart` with series data only.
|
|
@@ -4,7 +4,6 @@ import { html, nothing } from 'lit';
|
|
|
4
4
|
import NileElement from '../internal/nile-element.js';
|
|
5
5
|
import { styles, tooltipCss } from './nile-chart.css.js';
|
|
6
6
|
import { nileChartConfig } from './nile-chart-config-builder.js';
|
|
7
|
-
import { renderChartSkeleton } from './nile-chart-skeleton.js';
|
|
8
7
|
import { convertConfig } from '../internal/chart-adapters.js';
|
|
9
8
|
import { deepMerge } from '../internal/utils.js';
|
|
10
9
|
import { initNileChartExporting, getHighcharts } from '../internal/highcharts-provider.js';
|
|
@@ -136,6 +135,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
136
135
|
* ```
|
|
137
136
|
*/
|
|
138
137
|
this.loading = false;
|
|
138
|
+
this.noHeader = false;
|
|
139
|
+
this.appearance = null;
|
|
139
140
|
/**
|
|
140
141
|
* When set, fills `chart.type` if the config omits it (same values as `chart.type`, e.g. `stacked`, `pie`).
|
|
141
142
|
* Usage: `<nile-chart chart-type="pie" />` plus `config.chart` with series data only.
|
|
@@ -249,6 +250,14 @@ let NileChart = class NileChart extends NileElement {
|
|
|
249
250
|
this.resolvedConfig = this.resolveConfig(this.config);
|
|
250
251
|
this.activeType = this.resolvedConfig.type;
|
|
251
252
|
this.activeConfig = this.resolvedConfig;
|
|
253
|
+
const resolved = this.resolvedConfig;
|
|
254
|
+
// appearance="minimal" on filter charts implies a header-less compact layout.
|
|
255
|
+
const minimalFilter = resolved.type === 'filter' && resolved.appearance === 'minimal';
|
|
256
|
+
const cfgNoHeader = resolved.noHeader === true || minimalFilter;
|
|
257
|
+
if (cfgNoHeader && !this.noHeader)
|
|
258
|
+
this.noHeader = true;
|
|
259
|
+
if (resolved.appearance && this.appearance !== resolved.appearance)
|
|
260
|
+
this.appearance = resolved.appearance;
|
|
252
261
|
}
|
|
253
262
|
}
|
|
254
263
|
toggleMenu(e) {
|
|
@@ -361,6 +370,12 @@ let NileChart = class NileChart extends NileElement {
|
|
|
361
370
|
return false;
|
|
362
371
|
}
|
|
363
372
|
shouldShowHeader() {
|
|
373
|
+
if (this.noHeader)
|
|
374
|
+
return false;
|
|
375
|
+
if (this.resolvedConfig?.noHeader === true)
|
|
376
|
+
return false;
|
|
377
|
+
if (this.activeConfig?.noHeader === true)
|
|
378
|
+
return false;
|
|
364
379
|
const hasTitles = !!(this.headerTitle || this.headerSubtitle);
|
|
365
380
|
const menuEnabled = this.resolvedConfig?.menu?.enabled === true || this.menu?.enabled === true;
|
|
366
381
|
const hasBuiltinActions = this.aiEnabled || (this.resolvedConfig?.switchableTypes?.length ?? 0) > 0 || menuEnabled;
|
|
@@ -1711,13 +1726,27 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1711
1726
|
}
|
|
1712
1727
|
}
|
|
1713
1728
|
renderSkeleton() {
|
|
1714
|
-
return
|
|
1729
|
+
return html `
|
|
1730
|
+
<div class="nile-chart-skeleton" aria-busy="true" aria-label="Loading chart">
|
|
1731
|
+
<div class="nile-chart-skeleton-body">
|
|
1732
|
+
${[78, 55, 91, 42, 68].map(w => html `
|
|
1733
|
+
<div class="nile-chart-skeleton-row">
|
|
1734
|
+
<div class="nile-chart-skeleton-ylabel"></div>
|
|
1735
|
+
<div class="nile-chart-skeleton-bar" style="--w: ${w}%"></div>
|
|
1736
|
+
</div>
|
|
1737
|
+
`)}
|
|
1738
|
+
</div>
|
|
1739
|
+
<div class="nile-chart-skeleton-xaxis-row">
|
|
1740
|
+
${[0, 1, 2, 3, 4].map(i => html `<div class="nile-chart-skeleton-xlabel" style="--d: ${i * 80}ms"></div>`)}
|
|
1741
|
+
</div>
|
|
1742
|
+
</div>
|
|
1743
|
+
`;
|
|
1715
1744
|
}
|
|
1716
1745
|
render() {
|
|
1717
1746
|
const isLoading = this.loading || (this.activeConfig?.loading ?? false);
|
|
1718
1747
|
const isGrid = this.activeConfig?.type === 'grid';
|
|
1719
1748
|
return html `
|
|
1720
|
-
<div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''}
|
|
1749
|
+
<div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''}" part="chart-card">
|
|
1721
1750
|
${this.renderHeader()}
|
|
1722
1751
|
<div class="nile-chart-wrapper">
|
|
1723
1752
|
<div class="nile-chart-inner ${this.activeConfig?.type === 'kpi' ? 'nile-chart-inner--kpi' : ''} ${this.activeConfig?.type === 'filter' ? 'nile-chart-inner--filter' : ''}" part="chart-inner">
|
|
@@ -1742,6 +1771,12 @@ __decorate([
|
|
|
1742
1771
|
__decorate([
|
|
1743
1772
|
property({ type: Boolean, reflect: true })
|
|
1744
1773
|
], NileChart.prototype, "loading", void 0);
|
|
1774
|
+
__decorate([
|
|
1775
|
+
property({ type: Boolean, reflect: true, attribute: 'no-header' })
|
|
1776
|
+
], NileChart.prototype, "noHeader", void 0);
|
|
1777
|
+
__decorate([
|
|
1778
|
+
property({ type: String, reflect: true })
|
|
1779
|
+
], NileChart.prototype, "appearance", void 0);
|
|
1745
1780
|
__decorate([
|
|
1746
1781
|
property({ type: String, attribute: 'chart-type' })
|
|
1747
1782
|
], NileChart.prototype, "chartTypeAttr", void 0);
|