@aquera/nile-visualization 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +4 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +12 -0
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +2 -0
- package/dist/src/nile-area-chart/nile-area-chart.js +6 -1
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +4 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +12 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +4 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.js +12 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +4 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +12 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +2 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.js +9 -1
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +2 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +6 -1
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +2 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +6 -1
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +2 -0
- package/dist/src/nile-bubble-chart/nile-bubble-chart.js +6 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +8 -4
- package/dist/src/nile-chart/nile-chart.css.js +13 -15
- package/dist/src/nile-chart/nile-chart.js +103 -33
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +2 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.js +6 -1
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +2 -0
- package/dist/src/nile-column-chart/nile-column-chart.js +6 -1
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +4 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +12 -1
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +4 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +13 -1
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +4 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.js +12 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +2 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.js +6 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +3 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +6 -1
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +3 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +6 -1
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +3 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +6 -1
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +4 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.js +13 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +3 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.js +6 -1
- package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +4 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.js +12 -1
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +4 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.js +12 -1
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +4 -0
- package/dist/src/nile-gauge-chart/nile-gauge-chart.js +13 -1
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +2 -0
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +6 -1
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +2 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.js +6 -1
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +4 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +12 -0
- package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +10 -0
- package/dist/src/nile-kpi-chart/nile-kpi-chart.js +36 -5
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +2 -0
- package/dist/src/nile-line-chart/nile-line-chart.js +6 -1
- package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +4 -0
- package/dist/src/nile-line-column-chart/nile-line-column-chart.js +12 -1
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +4 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +13 -2
- package/dist/src/nile-map-chart/nile-map-chart.d.ts +4 -0
- package/dist/src/nile-map-chart/nile-map-chart.js +12 -3
- package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +4 -0
- package/dist/src/nile-organization-chart/nile-organization-chart.js +12 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +53 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.js +9 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +4 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.js +12 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +2 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.js +6 -1
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +2 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +6 -1
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +2 -0
- package/dist/src/nile-scatter-chart/nile-scatter-chart.js +6 -1
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +2 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +6 -1
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +2 -0
- package/dist/src/nile-spline-chart/nile-spline-chart.js +6 -1
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +2 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.js +6 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +3 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.js +6 -1
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +4 -0
- package/dist/src/nile-trendline-chart/nile-trendline-chart.js +12 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +2 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +6 -1
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +4 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.js +12 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +2 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +6 -1
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +2 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.js +6 -1
- package/package.json +1 -1
|
@@ -527,7 +527,14 @@ let NileChart = class NileChart extends NileElement {
|
|
|
527
527
|
const config = this.activeConfig;
|
|
528
528
|
// Suppress inner Highcharts title/subtitle — the card header shows them
|
|
529
529
|
const noTitle = { title: { text: undefined }, subtitle: { text: undefined } };
|
|
530
|
-
|
|
530
|
+
// Translate config.legend → Highcharts legend options and merge early so every
|
|
531
|
+
// chart type receives the full legend config (layout, align, navigation, etc.) via .options.
|
|
532
|
+
const legendOptions = {};
|
|
533
|
+
if (config.legend) {
|
|
534
|
+
const { show, ...rest } = config.legend;
|
|
535
|
+
legendOptions.legend = { enabled: show ?? true, ...rest };
|
|
536
|
+
}
|
|
537
|
+
const mergedOptions = deepMerge(deepMerge(deepMerge(config.options ?? {}, legendOptions), noTitle), this.buildExportingOptions());
|
|
531
538
|
switch (config.type) {
|
|
532
539
|
case 'bar':
|
|
533
540
|
return html `<nile-bar-chart
|
|
@@ -535,7 +542,7 @@ let NileChart = class NileChart extends NileElement {
|
|
|
535
542
|
.categories=${config.categories ?? []}
|
|
536
543
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
537
544
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
538
|
-
.
|
|
545
|
+
.legend=${config.legend ?? null}
|
|
539
546
|
.options=${mergedOptions}
|
|
540
547
|
.loading=${config.loading ?? false}
|
|
541
548
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -556,7 +563,7 @@ let NileChart = class NileChart extends NileElement {
|
|
|
556
563
|
.seriesName=${config.seriesName ?? ''}
|
|
557
564
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
558
565
|
.showDataLabels=${config.showDataLabels ?? true}
|
|
559
|
-
.
|
|
566
|
+
.legend=${config.legend ?? null}
|
|
560
567
|
.options=${mergedOptions}
|
|
561
568
|
.loading=${config.loading ?? false}
|
|
562
569
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -578,6 +585,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
578
585
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
579
586
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
580
587
|
.forecast=${config.forecast ?? null}
|
|
588
|
+
.showLegend=${config.legend?.show ?? true}
|
|
589
|
+
.legend=${config.legend ?? null}
|
|
581
590
|
.options=${mergedOptions}
|
|
582
591
|
.loading=${config.loading ?? false}
|
|
583
592
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -599,6 +608,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
599
608
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
600
609
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
601
610
|
.anomaly=${config.anomaly ?? {}}
|
|
611
|
+
.showLegend=${config.legend?.show ?? true}
|
|
612
|
+
.legend=${config.legend ?? null}
|
|
602
613
|
.options=${mergedOptions}
|
|
603
614
|
.loading=${config.loading ?? false}
|
|
604
615
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -619,7 +630,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
619
630
|
.categories=${config.categories ?? []}
|
|
620
631
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
621
632
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
622
|
-
.showLegend=${config.
|
|
633
|
+
.showLegend=${config.legend?.show ?? true}
|
|
634
|
+
.legend=${config.legend ?? null}
|
|
623
635
|
.options=${mergedOptions}
|
|
624
636
|
.loading=${config.loading ?? false}
|
|
625
637
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -641,7 +653,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
641
653
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
642
654
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
643
655
|
.stacked=${config.stacked ?? false}
|
|
644
|
-
.showLegend=${config.
|
|
656
|
+
.showLegend=${config.legend?.show ?? true}
|
|
657
|
+
.legend=${config.legend ?? null}
|
|
645
658
|
.options=${mergedOptions}
|
|
646
659
|
.loading=${config.loading ?? false}
|
|
647
660
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -662,7 +675,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
662
675
|
.categories=${config.categories ?? []}
|
|
663
676
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
664
677
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
665
|
-
.showLegend=${config.
|
|
678
|
+
.showLegend=${config.legend?.show ?? true}
|
|
679
|
+
.legend=${config.legend ?? null}
|
|
666
680
|
.options=${mergedOptions}
|
|
667
681
|
.loading=${config.loading ?? false}
|
|
668
682
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -685,7 +699,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
685
699
|
.innerSize=${config.innerSize ?? '50%'}
|
|
686
700
|
.semiCircle=${config.semiCircle ?? false}
|
|
687
701
|
.showDataLabels=${config.showDataLabels ?? true}
|
|
688
|
-
.showLegend=${config.
|
|
702
|
+
.showLegend=${config.legend?.show ?? true}
|
|
703
|
+
.legend=${config.legend ?? null}
|
|
689
704
|
.options=${mergedOptions}
|
|
690
705
|
.loading=${config.loading ?? false}
|
|
691
706
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -706,7 +721,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
706
721
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
707
722
|
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
708
723
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
709
|
-
.showLegend=${config.
|
|
724
|
+
.showLegend=${config.legend?.show ?? true}
|
|
725
|
+
.legend=${config.legend ?? null}
|
|
710
726
|
.options=${mergedOptions}
|
|
711
727
|
.loading=${config.loading ?? false}
|
|
712
728
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -727,7 +743,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
727
743
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
728
744
|
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
729
745
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
730
|
-
.showLegend=${config.
|
|
746
|
+
.showLegend=${config.legend?.show ?? true}
|
|
747
|
+
.legend=${config.legend ?? null}
|
|
731
748
|
.options=${mergedOptions}
|
|
732
749
|
.loading=${config.loading ?? false}
|
|
733
750
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -748,7 +765,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
748
765
|
.categories=${config.categories ?? []}
|
|
749
766
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
750
767
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
751
|
-
.showLegend=${config.
|
|
768
|
+
.showLegend=${config.legend?.show ?? true}
|
|
769
|
+
.legend=${config.legend ?? null}
|
|
752
770
|
.options=${mergedOptions}
|
|
753
771
|
.loading=${config.loading ?? false}
|
|
754
772
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -769,7 +787,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
769
787
|
.categories=${config.categories ?? []}
|
|
770
788
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
771
789
|
.showArea=${config.showArea ?? false}
|
|
772
|
-
.showLegend=${config.
|
|
790
|
+
.showLegend=${config.legend?.show ?? true}
|
|
791
|
+
.legend=${config.legend ?? null}
|
|
773
792
|
.options=${mergedOptions}
|
|
774
793
|
.loading=${config.loading ?? false}
|
|
775
794
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -792,6 +811,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
792
811
|
.suffix=${config.suffix ?? ''}
|
|
793
812
|
.bands=${config.bands ?? []}
|
|
794
813
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
814
|
+
.showLegend=${config.legend?.show ?? false}
|
|
815
|
+
.legend=${config.legend ?? null}
|
|
795
816
|
.options=${mergedOptions}
|
|
796
817
|
.loading=${config.loading ?? false}
|
|
797
818
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -811,7 +832,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
811
832
|
.data=${config.data}
|
|
812
833
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
813
834
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
814
|
-
.showLegend=${config.
|
|
835
|
+
.showLegend=${config.legend?.show ?? true}
|
|
836
|
+
.legend=${config.legend ?? null}
|
|
815
837
|
.options=${mergedOptions}
|
|
816
838
|
.loading=${config.loading ?? false}
|
|
817
839
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -834,6 +856,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
834
856
|
.seriesType=${config.seriesType ?? 'map'}
|
|
835
857
|
.zoom=${config.zoom ?? true}
|
|
836
858
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
859
|
+
.showLegend=${config.legend?.show ?? true}
|
|
860
|
+
.legend=${config.legend ?? null}
|
|
837
861
|
.options=${mergedOptions}
|
|
838
862
|
.loading=${config.loading ?? false}
|
|
839
863
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -855,7 +879,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
855
879
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
856
880
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
857
881
|
.stackMode=${config.stackMode ?? 'normal'}
|
|
858
|
-
.showLegend=${config.
|
|
882
|
+
.showLegend=${config.legend?.show ?? true}
|
|
883
|
+
.legend=${config.legend ?? null}
|
|
859
884
|
.pointPadding=${config.pointPadding ?? 0.05}
|
|
860
885
|
.options=${mergedOptions}
|
|
861
886
|
.loading=${config.loading ?? false}
|
|
@@ -877,7 +902,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
877
902
|
.categories=${config.categories ?? []}
|
|
878
903
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
879
904
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
880
|
-
.showLegend=${config.
|
|
905
|
+
.showLegend=${config.legend?.show ?? true}
|
|
906
|
+
.legend=${config.legend ?? null}
|
|
881
907
|
.groupPadding=${config.groupPadding ?? 0.15}
|
|
882
908
|
.pointPadding=${config.pointPadding ?? 0.05}
|
|
883
909
|
.options=${mergedOptions}
|
|
@@ -905,7 +931,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
905
931
|
.histogramColor=${config.histogramColor ?? '#3b82f6'}
|
|
906
932
|
.binsNumber=${String(config.binsNumber ?? 'square-root')}
|
|
907
933
|
.binWidth=${config.binWidth ?? 0}
|
|
908
|
-
.showLegend=${config.
|
|
934
|
+
.showLegend=${config.legend?.show ?? true}
|
|
935
|
+
.legend=${config.legend ?? null}
|
|
909
936
|
.options=${mergedOptions}
|
|
910
937
|
.loading=${config.loading ?? false}
|
|
911
938
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -932,7 +959,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
932
959
|
.bellcurveFill=${config.bellcurveFill ?? 'rgba(99, 102, 241, 0.2)'}
|
|
933
960
|
.intervals=${config.intervals ?? 3}
|
|
934
961
|
.pointsInInterval=${config.pointsInInterval ?? 40}
|
|
935
|
-
.showLegend=${config.
|
|
962
|
+
.showLegend=${config.legend?.show ?? true}
|
|
963
|
+
.legend=${config.legend ?? null}
|
|
936
964
|
.options=${mergedOptions}
|
|
937
965
|
.loading=${config.loading ?? false}
|
|
938
966
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -955,7 +983,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
955
983
|
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
956
984
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
957
985
|
.horizontal=${config.horizontal ?? false}
|
|
958
|
-
.showLegend=${config.
|
|
986
|
+
.showLegend=${config.legend?.show ?? true}
|
|
987
|
+
.legend=${config.legend ?? null}
|
|
959
988
|
.options=${mergedOptions}
|
|
960
989
|
.loading=${config.loading ?? false}
|
|
961
990
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -978,7 +1007,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
978
1007
|
.datetimeAxis=${config.datetimeAxis ?? false}
|
|
979
1008
|
.inverted=${config.inverted ?? false}
|
|
980
1009
|
.alternateLabels=${config.alternateLabels ?? false}
|
|
981
|
-
.showLegend=${config.
|
|
1010
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1011
|
+
.legend=${config.legend ?? null}
|
|
982
1012
|
.options=${mergedOptions}
|
|
983
1013
|
.loading=${config.loading ?? false}
|
|
984
1014
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1002,7 +1032,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1002
1032
|
.lowMarkerColor=${config.lowMarkerColor ?? ''}
|
|
1003
1033
|
.connectorColor=${config.connectorColor ?? ''}
|
|
1004
1034
|
.horizontal=${config.horizontal ?? false}
|
|
1005
|
-
.showLegend=${config.
|
|
1035
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1036
|
+
.legend=${config.legend ?? null}
|
|
1006
1037
|
.options=${mergedOptions}
|
|
1007
1038
|
.loading=${config.loading ?? false}
|
|
1008
1039
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1026,7 +1057,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1026
1057
|
.lowMarkerColor=${config.lowMarkerColor ?? ''}
|
|
1027
1058
|
.connectorColor=${config.connectorColor ?? ''}
|
|
1028
1059
|
.horizontal=${config.horizontal ?? false}
|
|
1029
|
-
.showLegend=${config.
|
|
1060
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1061
|
+
.legend=${config.legend ?? null}
|
|
1030
1062
|
.options=${mergedOptions}
|
|
1031
1063
|
.loading=${config.loading ?? false}
|
|
1032
1064
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1050,7 +1082,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1050
1082
|
.lowMarkerColor=${config.lowMarkerColor ?? ''}
|
|
1051
1083
|
.connectorColor=${config.connectorColor ?? ''}
|
|
1052
1084
|
.horizontal=${config.horizontal ?? false}
|
|
1053
|
-
.showLegend=${config.
|
|
1085
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1086
|
+
.legend=${config.legend ?? null}
|
|
1054
1087
|
.options=${mergedOptions}
|
|
1055
1088
|
.loading=${config.loading ?? false}
|
|
1056
1089
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1075,7 +1108,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1075
1108
|
.lineColor=${config.lineColor ?? '#1d4ed8'}
|
|
1076
1109
|
.forecastStartIndex=${config.forecastStartIndex ?? -1}
|
|
1077
1110
|
.forecastBandLabel=${config.forecastBandLabel ?? ''}
|
|
1078
|
-
.showLegend=${config.
|
|
1111
|
+
.showLegend=${config.legend?.show ?? false}
|
|
1112
|
+
.legend=${config.legend ?? null}
|
|
1079
1113
|
.options=${mergedOptions}
|
|
1080
1114
|
.loading=${config.loading ?? false}
|
|
1081
1115
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1096,6 +1130,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1096
1130
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1097
1131
|
.seriesName=${config.seriesName ?? ''}
|
|
1098
1132
|
.showDataLabels=${config.showDataLabels ?? true}
|
|
1133
|
+
.showLegend=${config.legend?.show ?? false}
|
|
1134
|
+
.legend=${config.legend ?? null}
|
|
1099
1135
|
.options=${mergedOptions}
|
|
1100
1136
|
.loading=${config.loading ?? false}
|
|
1101
1137
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1117,6 +1153,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1117
1153
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1118
1154
|
.seriesName=${config.seriesName ?? ''}
|
|
1119
1155
|
.inverted=${config.inverted ?? true}
|
|
1156
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1157
|
+
.legend=${config.legend ?? null}
|
|
1120
1158
|
.options=${mergedOptions}
|
|
1121
1159
|
.loading=${config.loading ?? false}
|
|
1122
1160
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1139,6 +1177,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1139
1177
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1140
1178
|
.columnAxisTitle=${config.columnAxisTitle ?? ''}
|
|
1141
1179
|
.lineAxisTitle=${config.lineAxisTitle ?? ''}
|
|
1180
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1181
|
+
.legend=${config.legend ?? null}
|
|
1142
1182
|
.options=${mergedOptions}
|
|
1143
1183
|
.loading=${config.loading ?? false}
|
|
1144
1184
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1166,7 +1206,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1166
1206
|
.maxColor=${config.maxColor ?? '#1e40af'}
|
|
1167
1207
|
.colorAxisTitle=${config.colorAxisTitle ?? ''}
|
|
1168
1208
|
.showDataLabels=${config.showDataLabels ?? true}
|
|
1169
|
-
.showLegend=${config.
|
|
1209
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1210
|
+
.legend=${config.legend ?? null}
|
|
1170
1211
|
.options=${mergedOptions}
|
|
1171
1212
|
.loading=${config.loading ?? false}
|
|
1172
1213
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1187,6 +1228,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1187
1228
|
.data=${config.data ?? []}
|
|
1188
1229
|
.sunburstData=${config.sunburstData ?? []}
|
|
1189
1230
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1231
|
+
.showLegend=${config.legend?.show ?? false}
|
|
1232
|
+
.legend=${config.legend ?? null}
|
|
1190
1233
|
.options=${mergedOptions}
|
|
1191
1234
|
.loading=${config.loading ?? false}
|
|
1192
1235
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1207,7 +1250,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1207
1250
|
.categories=${config.categories ?? []}
|
|
1208
1251
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1209
1252
|
.showArea=${config.showArea ?? false}
|
|
1210
|
-
.showLegend=${config.
|
|
1253
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1254
|
+
.legend=${config.legend ?? null}
|
|
1211
1255
|
.options=${mergedOptions}
|
|
1212
1256
|
.loading=${config.loading ?? false}
|
|
1213
1257
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1229,6 +1273,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1229
1273
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1230
1274
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1231
1275
|
.stacked=${config.stacked ?? false}
|
|
1276
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1277
|
+
.legend=${config.legend ?? null}
|
|
1232
1278
|
.options=${mergedOptions}
|
|
1233
1279
|
.loading=${config.loading ?? false}
|
|
1234
1280
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1248,6 +1294,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1248
1294
|
.data=${config.data}
|
|
1249
1295
|
.categories=${config.categories ?? []}
|
|
1250
1296
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1297
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1298
|
+
.legend=${config.legend ?? null}
|
|
1251
1299
|
.options=${mergedOptions}
|
|
1252
1300
|
.loading=${config.loading ?? false}
|
|
1253
1301
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1267,6 +1315,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1267
1315
|
.data=${config.data}
|
|
1268
1316
|
.categories=${config.categories ?? []}
|
|
1269
1317
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1318
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1319
|
+
.legend=${config.legend ?? null}
|
|
1270
1320
|
.options=${mergedOptions}
|
|
1271
1321
|
.loading=${config.loading ?? false}
|
|
1272
1322
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1288,6 +1338,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1288
1338
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1289
1339
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1290
1340
|
.stacked=${config.stacked ?? false}
|
|
1341
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1342
|
+
.legend=${config.legend ?? null}
|
|
1291
1343
|
.options=${mergedOptions}
|
|
1292
1344
|
.loading=${config.loading ?? false}
|
|
1293
1345
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1309,6 +1361,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1309
1361
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1310
1362
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1311
1363
|
.threshold=${config.threshold ?? 0}
|
|
1364
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1365
|
+
.legend=${config.legend ?? null}
|
|
1312
1366
|
.options=${mergedOptions}
|
|
1313
1367
|
.loading=${config.loading ?? false}
|
|
1314
1368
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1329,6 +1383,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1329
1383
|
.categories=${config.categories ?? []}
|
|
1330
1384
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1331
1385
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1386
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1387
|
+
.legend=${config.legend ?? null}
|
|
1332
1388
|
.options=${mergedOptions}
|
|
1333
1389
|
.loading=${config.loading ?? false}
|
|
1334
1390
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1349,6 +1405,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1349
1405
|
.categories=${config.categories ?? []}
|
|
1350
1406
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1351
1407
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1408
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1409
|
+
.legend=${config.legend ?? null}
|
|
1352
1410
|
.options=${mergedOptions}
|
|
1353
1411
|
.loading=${config.loading ?? false}
|
|
1354
1412
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1370,6 +1428,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1370
1428
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1371
1429
|
.seriesName=${config.seriesName ?? ''}
|
|
1372
1430
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1431
|
+
.showLegend=${config.legend?.show ?? false}
|
|
1432
|
+
.legend=${config.legend ?? null}
|
|
1373
1433
|
.options=${mergedOptions}
|
|
1374
1434
|
.loading=${config.loading ?? false}
|
|
1375
1435
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1392,7 +1452,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1392
1452
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1393
1453
|
.innerSize=${config.innerSize ?? '28%'}
|
|
1394
1454
|
.paneSize=${config.paneSize ?? '82%'}
|
|
1395
|
-
.showLegend=${config.
|
|
1455
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1456
|
+
.legend=${config.legend ?? null}
|
|
1396
1457
|
.options=${mergedOptions}
|
|
1397
1458
|
.loading=${config.loading ?? false}
|
|
1398
1459
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1413,7 +1474,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1413
1474
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1414
1475
|
.seriesName=${config.seriesName ?? ''}
|
|
1415
1476
|
.showDataLabels=${config.showDataLabels ?? true}
|
|
1416
|
-
.showLegend=${config.
|
|
1477
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1478
|
+
.legend=${config.legend ?? null}
|
|
1417
1479
|
.options=${mergedOptions}
|
|
1418
1480
|
.loading=${config.loading ?? false}
|
|
1419
1481
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1432,6 +1494,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1432
1494
|
return html `<nile-euler-chart
|
|
1433
1495
|
.data=${config.data}
|
|
1434
1496
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1497
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1498
|
+
.legend=${config.legend ?? null}
|
|
1435
1499
|
.options=${mergedOptions}
|
|
1436
1500
|
.loading=${config.loading ?? false}
|
|
1437
1501
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1452,6 +1516,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1452
1516
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1453
1517
|
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1454
1518
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1519
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1520
|
+
.legend=${config.legend ?? null}
|
|
1455
1521
|
.options=${mergedOptions}
|
|
1456
1522
|
.loading=${config.loading ?? false}
|
|
1457
1523
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1473,6 +1539,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1473
1539
|
.seriesName=${config.seriesName ?? ''}
|
|
1474
1540
|
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1475
1541
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1542
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1543
|
+
.legend=${config.legend ?? null}
|
|
1476
1544
|
.options=${mergedOptions}
|
|
1477
1545
|
.loading=${config.loading ?? false}
|
|
1478
1546
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1494,7 +1562,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1494
1562
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1495
1563
|
.seriesName=${config.seriesName ?? ''}
|
|
1496
1564
|
.datetimeAxis=${config.datetimeAxis ?? false}
|
|
1497
|
-
.showLegend=${config.
|
|
1565
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1566
|
+
.legend=${config.legend ?? null}
|
|
1498
1567
|
.options=${mergedOptions}
|
|
1499
1568
|
.loading=${config.loading ?? false}
|
|
1500
1569
|
.chartBg=${config.chartBg ?? ''}
|
|
@@ -1576,6 +1645,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1576
1645
|
valueFormat: k.valueFormat,
|
|
1577
1646
|
precision: k.precision,
|
|
1578
1647
|
unit: k.unit,
|
|
1648
|
+
locale: k.locale,
|
|
1649
|
+
numberSystem: k.numberSystem,
|
|
1579
1650
|
},
|
|
1580
1651
|
aq: {
|
|
1581
1652
|
chartSubtitle: k.chartSubtitle,
|
|
@@ -1586,7 +1657,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1586
1657
|
case 'grid': {
|
|
1587
1658
|
const gridChrome = '--nile-data-grid-radius:0;' +
|
|
1588
1659
|
'--nile-data-grid-border-color:transparent;' +
|
|
1589
|
-
'--nile-data-grid-shadow:none;'
|
|
1660
|
+
'--nile-data-grid-shadow:none;' +
|
|
1661
|
+
(config.height ? `height:${config.height};` : '');
|
|
1590
1662
|
return html `<nile-data-grid
|
|
1591
1663
|
class="nile-chart-grid"
|
|
1592
1664
|
.data=${config.data}
|
|
@@ -1627,11 +1699,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1627
1699
|
render() {
|
|
1628
1700
|
const isLoading = this.loading || (this.activeConfig?.loading ?? false);
|
|
1629
1701
|
const isGrid = this.activeConfig?.type === 'grid';
|
|
1630
|
-
const cardStyle = isGrid && this.activeConfig?.height
|
|
1631
|
-
? `height:${this.activeConfig.height}`
|
|
1632
|
-
: '';
|
|
1633
1702
|
return html `
|
|
1634
|
-
<div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''}"
|
|
1703
|
+
<div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''}">
|
|
1635
1704
|
${this.renderHeader()}
|
|
1636
1705
|
<div class="nile-chart-wrapper">
|
|
1637
1706
|
<div class="nile-chart-inner ${this.activeConfig?.type === 'kpi' ? 'nile-chart-inner--kpi' : ''}">
|
|
@@ -1640,9 +1709,10 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1640
1709
|
: this.activeConfig
|
|
1641
1710
|
? this.renderChartContent()
|
|
1642
1711
|
: html `<slot></slot>`}
|
|
1643
|
-
${this.renderAiPanel()}
|
|
1712
|
+
${isGrid ? nothing : this.renderAiPanel()}
|
|
1644
1713
|
</div>
|
|
1645
1714
|
</div>
|
|
1715
|
+
${isGrid ? this.renderAiPanel() : nothing}
|
|
1646
1716
|
<slot name="footer"></slot>
|
|
1647
1717
|
</div>
|
|
1648
1718
|
`;
|
|
@@ -25,6 +25,8 @@ export declare class NileClusterChart extends NileElement {
|
|
|
25
25
|
height: string;
|
|
26
26
|
yAxisTitle: string;
|
|
27
27
|
showLegend: boolean;
|
|
28
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
+
legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
|
|
28
30
|
groupPadding: number;
|
|
29
31
|
pointPadding: number;
|
|
30
32
|
chartBg: string;
|
|
@@ -23,6 +23,8 @@ let NileClusterChart = class NileClusterChart extends NileElement {
|
|
|
23
23
|
this.height = '400px';
|
|
24
24
|
this.yAxisTitle = '';
|
|
25
25
|
this.showLegend = true;
|
|
26
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
27
|
+
this.legend = null;
|
|
26
28
|
this.groupPadding = 0.14;
|
|
27
29
|
this.pointPadding = 0.08;
|
|
28
30
|
// ── Container styling ──
|
|
@@ -131,7 +133,7 @@ let NileClusterChart = class NileClusterChart extends NileElement {
|
|
|
131
133
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
132
134
|
xAxis: { categories: this.categories },
|
|
133
135
|
yAxis: { min: 0, title: { text: this.yAxisTitle || undefined } },
|
|
134
|
-
legend: { enabled: this.showLegend },
|
|
136
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
135
137
|
tooltip: { shared: true },
|
|
136
138
|
plotOptions: {
|
|
137
139
|
column: {
|
|
@@ -222,6 +224,9 @@ __decorate([
|
|
|
222
224
|
__decorate([
|
|
223
225
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
224
226
|
], NileClusterChart.prototype, "showLegend", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
property({ type: Object })
|
|
229
|
+
], NileClusterChart.prototype, "legend", void 0);
|
|
225
230
|
__decorate([
|
|
226
231
|
property({ type: Number, attribute: 'group-padding' })
|
|
227
232
|
], NileClusterChart.prototype, "groupPadding", void 0);
|
|
@@ -24,6 +24,8 @@ export declare class NileColumnChart extends NileElement {
|
|
|
24
24
|
height: string;
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
showLegend: boolean;
|
|
27
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
28
|
+
legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
|
|
27
29
|
chartBg: string;
|
|
28
30
|
chartBorderRadius: string | number;
|
|
29
31
|
chartBorder: string;
|
|
@@ -22,6 +22,8 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
22
22
|
this.height = '400px';
|
|
23
23
|
this.yAxisTitle = '';
|
|
24
24
|
this.showLegend = true;
|
|
25
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
26
|
+
this.legend = null;
|
|
25
27
|
// ── Container styling ──
|
|
26
28
|
this.chartBg = '';
|
|
27
29
|
this.chartBorderRadius = '';
|
|
@@ -165,7 +167,7 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
165
167
|
series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, category: this.category, value: this.y, seriesName: this.series.name }); } } } },
|
|
166
168
|
},
|
|
167
169
|
series: this.data.map(s => ({ type: 'column', name: s.name, data: s.data, color: s.color })),
|
|
168
|
-
legend: { enabled: this.showLegend },
|
|
170
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
169
171
|
credits: { enabled: false },
|
|
170
172
|
}, this.options);
|
|
171
173
|
}
|
|
@@ -221,6 +223,9 @@ __decorate([
|
|
|
221
223
|
__decorate([
|
|
222
224
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
223
225
|
], NileColumnChart.prototype, "showLegend", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property({ type: Object })
|
|
228
|
+
], NileColumnChart.prototype, "legend", void 0);
|
|
224
229
|
__decorate([
|
|
225
230
|
property({ type: String, attribute: 'chart-bg' })
|
|
226
231
|
], NileColumnChart.prototype, "chartBg", void 0);
|
|
@@ -2,6 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
3
|
import NileElement from '../internal/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
|
+
import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
|
|
5
6
|
export interface ColumnDrilldownParentPoint {
|
|
6
7
|
name: string;
|
|
7
8
|
y: number;
|
|
@@ -42,6 +43,9 @@ export declare class NileColumnDrilldownChart extends NileElement {
|
|
|
42
43
|
loadingFontSize: string | number;
|
|
43
44
|
loadingFontFamily: string;
|
|
44
45
|
loadingBg: string;
|
|
46
|
+
showLegend: boolean;
|
|
47
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
48
|
+
legend: LegendConfig | null;
|
|
45
49
|
private _syncCssVars;
|
|
46
50
|
private applyConfig;
|
|
47
51
|
connectedCallback(): void;
|
|
@@ -35,6 +35,9 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
|
|
|
35
35
|
this.loadingFontSize = '';
|
|
36
36
|
this.loadingFontFamily = '';
|
|
37
37
|
this.loadingBg = '';
|
|
38
|
+
this.showLegend = false;
|
|
39
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
40
|
+
this.legend = null;
|
|
38
41
|
}
|
|
39
42
|
_syncCssVars() {
|
|
40
43
|
const set = (prop, val) => {
|
|
@@ -95,6 +98,8 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
|
|
|
95
98
|
'height',
|
|
96
99
|
'yAxisTitle',
|
|
97
100
|
'loading',
|
|
101
|
+
'showLegend',
|
|
102
|
+
'legend',
|
|
98
103
|
];
|
|
99
104
|
if (!props.some(p => changedProperties.has(p)))
|
|
100
105
|
return;
|
|
@@ -131,7 +136,7 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
|
|
|
131
136
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
132
137
|
xAxis: { type: 'category' },
|
|
133
138
|
yAxis: { title: { text: this.yAxisTitle || undefined }, allowDecimals: false },
|
|
134
|
-
legend: { enabled:
|
|
139
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
135
140
|
plotOptions: {
|
|
136
141
|
series: {
|
|
137
142
|
cursor: 'pointer',
|
|
@@ -251,6 +256,12 @@ __decorate([
|
|
|
251
256
|
__decorate([
|
|
252
257
|
property({ type: String, attribute: 'loading-bg' })
|
|
253
258
|
], NileColumnDrilldownChart.prototype, "loadingBg", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
261
|
+
], NileColumnDrilldownChart.prototype, "showLegend", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
property({ type: Object })
|
|
264
|
+
], NileColumnDrilldownChart.prototype, "legend", void 0);
|
|
254
265
|
NileColumnDrilldownChart = __decorate([
|
|
255
266
|
customElement('nile-column-drilldown-chart')
|
|
256
267
|
], NileColumnDrilldownChart);
|
|
@@ -2,6 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
3
|
import NileElement from '../internal/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
|
+
import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
|
|
5
6
|
export interface ColumnPyramidSeriesData {
|
|
6
7
|
name: string;
|
|
7
8
|
data: number[];
|
|
@@ -32,6 +33,9 @@ export declare class NileColumnPyramidChart extends NileElement {
|
|
|
32
33
|
loadingFontSize: string | number;
|
|
33
34
|
loadingFontFamily: string;
|
|
34
35
|
loadingBg: string;
|
|
36
|
+
showLegend: boolean;
|
|
37
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
38
|
+
legend: LegendConfig | null;
|
|
35
39
|
private _syncCssVars;
|
|
36
40
|
private applyConfig;
|
|
37
41
|
connectedCallback(): void;
|