@aquera/nile-visualization 2.9.29 → 2.9.31
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/README.md +15 -0
- package/dist/src/index.d.ts +6 -5
- package/dist/src/index.js +2 -2
- package/dist/src/internal/base/forecastable-chart.d.ts +59 -0
- package/dist/src/internal/base/forecastable-chart.js +149 -0
- package/dist/src/internal/{nile-chart-base.d.ts → base/nile-chart-base.d.ts} +1 -1
- package/dist/src/internal/{nile-chart-base.js → base/nile-chart-base.js} +1 -1
- package/dist/src/internal/types/chart-area-config.type.d.ts +4 -2
- package/dist/src/internal/types/chart-area-spline-config.type.d.ts +4 -2
- package/dist/src/internal/types/chart-column-config.type.d.ts +3 -2
- package/dist/src/internal/types/chart-line-config.type.d.ts +3 -2
- package/dist/src/internal/types/chart-spline-config.type.d.ts +3 -2
- package/dist/src/internal/{chart-adapters.d.ts → utils/chart-adapters.d.ts} +1 -1
- package/dist/src/internal/{chart-adapters.js → utils/chart-adapters.js} +15 -3
- package/dist/src/internal/utils/chart-forecast.d.ts +126 -0
- package/dist/src/internal/utils/chart-forecast.js +297 -0
- package/dist/src/internal/{dashboard-adapters.d.ts → utils/dashboard-adapters.d.ts} +1 -1
- package/dist/src/internal/{utils.js → utils/deep-merge.js} +1 -1
- package/dist/src/internal/{resolve-widget-kind.d.ts → utils/resolve-widget-kind.d.ts} +1 -1
- package/dist/src/internal/utils/separated-chart-config.d.ts +13 -0
- package/dist/src/internal/utils/separated-chart-config.js +30 -0
- package/dist/src/nile-ai-panel/nile-ai-panel.d.ts +1 -1
- package/dist/src/nile-ai-panel/nile-ai-panel.js +1 -1
- package/dist/src/nile-ai-sender/nile-ai-sender.d.ts +1 -1
- package/dist/src/nile-ai-sender/nile-ai-sender.js +1 -1
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +1 -1
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +4 -4
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +7 -6
- package/dist/src/nile-area-chart/nile-area-chart.js +37 -24
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -1
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +5 -5
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -1
- package/dist/src/nile-area-range-chart/nile-area-range-chart.js +5 -5
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +10 -4
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +38 -27
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +3 -3
- package/dist/src/nile-bar-chart/nile-bar-chart.js +4 -4
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +3 -2
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +5 -5
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +3 -2
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +5 -5
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +3 -3
- package/dist/src/nile-bubble-chart/nile-bubble-chart.js +4 -4
- package/dist/src/nile-chart/index.d.ts +1 -1
- package/dist/src/nile-chart/index.js +1 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +20 -92
- package/dist/src/nile-chart/nile-chart-skeleton.js +1 -1
- package/dist/src/nile-chart/nile-chart.css.js +0 -1
- package/dist/src/nile-chart/nile-chart.d.ts +5 -2
- package/dist/src/nile-chart/nile-chart.js +66 -9
- package/dist/src/nile-chart-list/nile-chart-list.d.ts +1 -1
- package/dist/src/nile-chart-list/nile-chart-list.js +1 -1
- package/dist/src/nile-chart-message/nile-chart-message.d.ts +1 -1
- package/dist/src/nile-chart-message/nile-chart-message.js +1 -1
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +3 -2
- package/dist/src/nile-cluster-chart/nile-cluster-chart.js +5 -5
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +13 -6
- package/dist/src/nile-column-chart/nile-column-chart.js +43 -24
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +1 -1
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +5 -5
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -1
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +5 -5
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -1
- package/dist/src/nile-column-range-chart/nile-column-range-chart.js +5 -5
- package/dist/src/nile-dashboard-builder/nile-dashboard-builder.d.ts +1 -1
- package/dist/src/nile-dashboard-builder/nile-dashboard-builder.js +2 -2
- package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.d.ts +1 -1
- package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.js +1 -1
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +3 -3
- package/dist/src/nile-donut-chart/nile-donut-chart.js +4 -4
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -1
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +5 -5
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -1
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +5 -5
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -1
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +5 -5
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -1
- package/dist/src/nile-euler-chart/nile-euler-chart.js +5 -5
- package/dist/src/nile-executive-summary/nile-executive-summary.d.ts +1 -1
- package/dist/src/nile-executive-summary/nile-executive-summary.js +1 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.js +5 -5
- package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +3 -1
- package/dist/src/nile-filter-chart/nile-filter-chart.js +15 -1
- package/dist/src/nile-filter-chart/utils/prompt.js +31 -6
- package/dist/src/nile-filter-chart/utils/types.d.ts +2 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +1 -1
- package/dist/src/nile-flame-chart/nile-flame-chart.js +5 -5
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -1
- package/dist/src/nile-funnel-chart/nile-funnel-chart.js +5 -5
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +1 -1
- package/dist/src/nile-gauge-chart/nile-gauge-chart.js +4 -4
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +3 -2
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +5 -5
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +3 -2
- package/dist/src/nile-histogram-chart/nile-histogram-chart.js +5 -5
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -1
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +5 -5
- package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +41 -0
- package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +31 -1
- package/dist/src/nile-kpi-chart/nile-kpi-chart.js +73 -3
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +12 -6
- package/dist/src/nile-line-chart/nile-line-chart.js +44 -24
- package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -1
- package/dist/src/nile-line-column-chart/nile-line-column-chart.js +5 -5
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -1
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +5 -5
- package/dist/src/nile-map-chart/nile-map-chart.d.ts +2 -2
- package/dist/src/nile-map-chart/nile-map-chart.js +4 -4
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -1
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.js +5 -5
- package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -1
- package/dist/src/nile-organization-chart/nile-organization-chart.js +5 -5
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +1 -1
- package/dist/src/nile-pie-chart/nile-pie-chart.js +4 -4
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -1
- package/dist/src/nile-polygon-chart/nile-polygon-chart.js +5 -5
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +3 -3
- package/dist/src/nile-radar-chart/nile-radar-chart.js +4 -4
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +3 -2
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +5 -5
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +3 -3
- package/dist/src/nile-scatter-chart/nile-scatter-chart.js +4 -4
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +3 -2
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +5 -5
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +8 -6
- package/dist/src/nile-spline-chart/nile-spline-chart.js +36 -24
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +3 -2
- package/dist/src/nile-stacked-chart/nile-stacked-chart.js +5 -5
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.js +5 -5
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +1 -1
- package/dist/src/nile-trendline-chart/nile-trendline-chart.js +4 -4
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +3 -2
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +5 -5
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -1
- package/dist/src/nile-vector-chart/nile-vector-chart.js +5 -5
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +3 -3
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +4 -4
- package/dist/src/nile-widget-viewer/nile-widget-viewer.css.js +6 -2
- package/dist/src/nile-widget-viewer/nile-widget-viewer.d.ts +1 -1
- package/dist/src/nile-widget-viewer/nile-widget-viewer.js +2 -2
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +3 -2
- package/dist/src/nile-xrange-chart/nile-xrange-chart.js +5 -5
- package/package.json +1 -1
- package/dist/src/internal/separated-chart-config.d.ts +0 -5
- package/dist/src/internal/separated-chart-config.js +0 -16
- /package/dist/src/internal/{nile-element.d.ts → base/nile-element.d.ts} +0 -0
- /package/dist/src/internal/{nile-element.js → base/nile-element.js} +0 -0
- /package/dist/src/internal/{chart-events.d.ts → utils/chart-events.d.ts} +0 -0
- /package/dist/src/internal/{chart-events.js → utils/chart-events.js} +0 -0
- /package/dist/src/internal/{chart-runtime.d.ts → utils/chart-runtime.d.ts} +0 -0
- /package/dist/src/internal/{chart-runtime.js → utils/chart-runtime.js} +0 -0
- /package/dist/src/internal/{dashboard-adapters.js → utils/dashboard-adapters.js} +0 -0
- /package/dist/src/internal/{utils.d.ts → utils/deep-merge.d.ts} +0 -0
- /package/dist/src/internal/{highcharts-provider.d.ts → utils/highcharts-provider.d.ts} +0 -0
- /package/dist/src/internal/{highcharts-provider.js → utils/highcharts-provider.js} +0 -0
- /package/dist/src/internal/{resolve-widget-kind.js → utils/resolve-widget-kind.js} +0 -0
- /package/dist/src/internal/{responsive-defaults.d.ts → utils/responsive-defaults.d.ts} +0 -0
- /package/dist/src/internal/{responsive-defaults.js → utils/responsive-defaults.js} +0 -0
|
@@ -2,15 +2,15 @@ var NileChart_1;
|
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
4
|
import { html, nothing } from 'lit';
|
|
5
|
-
import NileElement from '../internal/nile-element.js';
|
|
5
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
6
6
|
import { styles, tooltipCss, injectGlobalChartMenuOverrides } from './nile-chart.css.js';
|
|
7
7
|
import { HIGHCHARTS_PASSTHROUGH_KEYS } from '../internal/types/index.js';
|
|
8
8
|
import { nileChartConfig } from './nile-chart-config-builder.js';
|
|
9
9
|
import { renderChartSkeleton } from './nile-chart-skeleton.js';
|
|
10
|
-
import { convertConfig } from '../internal/chart-adapters.js';
|
|
11
|
-
import { deepMerge } from '../internal/utils.js';
|
|
12
|
-
import { initNileChartExporting, getHighcharts } from '../internal/highcharts-provider.js';
|
|
13
|
-
import { getAxisExtremes, setAxisExtremes, } from '../internal/chart-runtime.js';
|
|
10
|
+
import { convertConfig } from '../internal/utils/chart-adapters.js';
|
|
11
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
12
|
+
import { initNileChartExporting, getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
13
|
+
import { getAxisExtremes, setAxisExtremes, } from '../internal/utils/chart-runtime.js';
|
|
14
14
|
import { resolveColorPaletteColors } from '../internal/color-palettes/index.js';
|
|
15
15
|
initNileChartExporting();
|
|
16
16
|
import '../nile-bar-chart/index.js';
|
|
@@ -287,6 +287,16 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
287
287
|
onMasterZoom(e) {
|
|
288
288
|
this.masterZoomed = !!e.detail?.zoomed;
|
|
289
289
|
}
|
|
290
|
+
/** Reset-zoom lives in the header for every chart type that supports zoom. */
|
|
291
|
+
get showResetZoom() {
|
|
292
|
+
const type = this.activeType ?? this.resolvedConfig?.type;
|
|
293
|
+
return this.masterZoomed && type === 'master-detail';
|
|
294
|
+
}
|
|
295
|
+
resetActiveZoom() {
|
|
296
|
+
const type = this.activeType ?? this.resolvedConfig?.type;
|
|
297
|
+
if (type === 'master-detail')
|
|
298
|
+
this.masterDetailChart?.resetZoom();
|
|
299
|
+
}
|
|
290
300
|
get effectiveSummary() {
|
|
291
301
|
return this.resolvedConfig?.summary ?? this.summary;
|
|
292
302
|
}
|
|
@@ -495,7 +505,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
495
505
|
const converted = convertConfig(this.resolvedConfig, toType);
|
|
496
506
|
this.activeType = toType;
|
|
497
507
|
this.activeConfig = converted;
|
|
498
|
-
// Leaving master-detail drops any active zoom
|
|
508
|
+
// Leaving master-detail drops any active zoom, and with it the header
|
|
509
|
+
// reset button.
|
|
499
510
|
this.masterZoomed = false;
|
|
500
511
|
this.closeMenu();
|
|
501
512
|
this.emit('nile-chart-type-change', {
|
|
@@ -590,7 +601,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
590
601
|
this.lightDomHasSlot('header') ||
|
|
591
602
|
this.lightDomHasSlot('header-actions') ||
|
|
592
603
|
hasBuiltinActions ||
|
|
593
|
-
this.
|
|
604
|
+
this.showResetZoom);
|
|
594
605
|
}
|
|
595
606
|
buildExportingOptions() {
|
|
596
607
|
return { exporting: { enabled: true, buttons: { contextButton: { enabled: false } } } };
|
|
@@ -784,14 +795,14 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
784
795
|
</div>
|
|
785
796
|
<div class="nile-chart-header-actions" part="header-actions">
|
|
786
797
|
<slot name="header-actions" @slotchange=${this.onHeaderActionsSlotChange}></slot>
|
|
787
|
-
${this.
|
|
798
|
+
${this.showResetZoom
|
|
788
799
|
? html `<nile-tooltip content="Reset zoom" placement="top" part="reset-zoom-tooltip">
|
|
789
800
|
<button
|
|
790
801
|
type="button"
|
|
791
802
|
class="nile-chart-menu-trigger nile-chart-reset-zoom"
|
|
792
803
|
part="reset-zoom"
|
|
793
804
|
aria-label="Reset zoom"
|
|
794
|
-
@click=${() => this.
|
|
805
|
+
@click=${() => this.resetActiveZoom()}
|
|
795
806
|
>
|
|
796
807
|
<nile-glyph name="refresh" size="16" part="reset-zoom-glyph"></nile-glyph>
|
|
797
808
|
</button>
|
|
@@ -973,6 +984,14 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
973
984
|
.categories=${config.categories ?? []}
|
|
974
985
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
975
986
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
987
|
+
.secondaryAxisTitle=${config.secondaryAxisTitle ?? ''}
|
|
988
|
+
.secondaryAxisMin=${config.secondaryAxisMin ?? null}
|
|
989
|
+
.enableForecasting=${config.enableForecasting ?? false}
|
|
990
|
+
.projection=${config.projection ?? null}
|
|
991
|
+
.lineWidth=${config.lineWidth ?? null}
|
|
992
|
+
.showMarkers=${config.showMarkers ?? false}
|
|
993
|
+
.valueSuffix=${config.valueSuffix ?? ''}
|
|
994
|
+
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
976
995
|
.showLegend=${config.legend?.show ?? true}
|
|
977
996
|
.legend=${config.legend ?? null}
|
|
978
997
|
.options=${mergedOptions}
|
|
@@ -995,6 +1014,15 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
995
1014
|
.categories=${config.categories ?? []}
|
|
996
1015
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
997
1016
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1017
|
+
.secondaryAxisTitle=${config.secondaryAxisTitle ?? ''}
|
|
1018
|
+
.secondaryAxisMin=${config.secondaryAxisMin ?? null}
|
|
1019
|
+
.enableForecasting=${config.enableForecasting ?? false}
|
|
1020
|
+
.projection=${config.projection ?? null}
|
|
1021
|
+
.lineWidth=${config.lineWidth ?? null}
|
|
1022
|
+
.showMarkers=${config.showMarkers ?? false}
|
|
1023
|
+
.valueSuffix=${config.valueSuffix ?? ''}
|
|
1024
|
+
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1025
|
+
.fillOpacity=${config.fillOpacity ?? null}
|
|
998
1026
|
.stacked=${config.stacked ?? false}
|
|
999
1027
|
.showLegend=${config.legend?.show ?? true}
|
|
1000
1028
|
.legend=${config.legend ?? null}
|
|
@@ -1018,6 +1046,14 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1018
1046
|
.categories=${config.categories ?? []}
|
|
1019
1047
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1020
1048
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1049
|
+
.secondaryAxisTitle=${config.secondaryAxisTitle ?? ''}
|
|
1050
|
+
.secondaryAxisMin=${config.secondaryAxisMin ?? null}
|
|
1051
|
+
.enableForecasting=${config.enableForecasting ?? false}
|
|
1052
|
+
.projection=${config.projection ?? null}
|
|
1053
|
+
.lineWidth=${config.lineWidth ?? null}
|
|
1054
|
+
.showMarkers=${config.showMarkers ?? false}
|
|
1055
|
+
.valueSuffix=${config.valueSuffix ?? ''}
|
|
1056
|
+
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1021
1057
|
.showLegend=${config.legend?.show ?? true}
|
|
1022
1058
|
.legend=${config.legend ?? null}
|
|
1023
1059
|
.options=${mergedOptions}
|
|
@@ -1108,6 +1144,14 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1108
1144
|
.categories=${config.categories ?? []}
|
|
1109
1145
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1110
1146
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1147
|
+
.secondaryAxisTitle=${config.secondaryAxisTitle ?? ''}
|
|
1148
|
+
.secondaryAxisMin=${config.secondaryAxisMin ?? null}
|
|
1149
|
+
.enableForecasting=${config.enableForecasting ?? false}
|
|
1150
|
+
.projection=${config.projection ?? null}
|
|
1151
|
+
.lineWidth=${config.lineWidth ?? null}
|
|
1152
|
+
.showMarkers=${config.showMarkers ?? false}
|
|
1153
|
+
.valueSuffix=${config.valueSuffix ?? ''}
|
|
1154
|
+
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1111
1155
|
.showLegend=${config.legend?.show ?? true}
|
|
1112
1156
|
.legend=${config.legend ?? null}
|
|
1113
1157
|
.options=${mergedOptions}
|
|
@@ -1719,6 +1763,15 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1719
1763
|
.categories=${config.categories ?? []}
|
|
1720
1764
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1721
1765
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1766
|
+
.secondaryAxisTitle=${config.secondaryAxisTitle ?? ''}
|
|
1767
|
+
.secondaryAxisMin=${config.secondaryAxisMin ?? null}
|
|
1768
|
+
.enableForecasting=${config.enableForecasting ?? false}
|
|
1769
|
+
.projection=${config.projection ?? null}
|
|
1770
|
+
.lineWidth=${config.lineWidth ?? null}
|
|
1771
|
+
.showMarkers=${config.showMarkers ?? false}
|
|
1772
|
+
.valueSuffix=${config.valueSuffix ?? ''}
|
|
1773
|
+
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1774
|
+
.fillOpacity=${config.fillOpacity ?? null}
|
|
1722
1775
|
.stacked=${config.stacked ?? false}
|
|
1723
1776
|
.showLegend=${config.legend?.show ?? true}
|
|
1724
1777
|
.legend=${config.legend ?? null}
|
|
@@ -1977,6 +2030,10 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1977
2030
|
trendValue: k.trendValue,
|
|
1978
2031
|
trendDirection: k.trendDirection,
|
|
1979
2032
|
trendLabel: k.trendLabel,
|
|
2033
|
+
forecastValue: k.forecastValue,
|
|
2034
|
+
forecastLabel: k.forecastLabel,
|
|
2035
|
+
forecastApprox: k.forecastApprox,
|
|
2036
|
+
forecastColor: k.forecastColor,
|
|
1980
2037
|
trendUpColor: k.trendUpColor,
|
|
1981
2038
|
trendDownColor: k.trendDownColor,
|
|
1982
2039
|
trendNeutralColor: k.trendNeutralColor,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import { CSSResultArray, TemplateResult } from 'lit';
|
|
8
|
-
import NileElement from '../internal/nile-element.js';
|
|
8
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
9
9
|
export type ChartListVariant = 'plain' | 'bullet' | 'number' | 'icon' | 'checkbox';
|
|
10
10
|
export interface ChartListItem {
|
|
11
11
|
label: string;
|
|
@@ -9,7 +9,7 @@ import { html, nothing, } from 'lit';
|
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
|
10
10
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
11
11
|
import { styles } from './nile-chart-list.css';
|
|
12
|
-
import NileElement from '../internal/nile-element.js';
|
|
12
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
13
13
|
let NileChartList = class NileChartList extends NileElement {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSResultArray, TemplateResult } from 'lit';
|
|
2
|
-
import NileElement from '../internal/nile-element.js';
|
|
2
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
3
3
|
export type StatusLightVariant = 'positive' | 'negative' | 'notice' | 'informative' | 'neutral';
|
|
4
4
|
export interface StatusLightConfig {
|
|
5
5
|
pulse?: boolean;
|
|
@@ -3,7 +3,7 @@ import { html, } from 'lit';
|
|
|
3
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { styles } from './nile-chart-message.css.js';
|
|
6
|
-
import NileElement from '../internal/nile-element.js';
|
|
6
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
7
7
|
let NileChartMessage = class NileChartMessage extends NileElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
5
6
|
/** One series in a grouped (clustered) column chart — same shape as column chart data. */
|
|
6
7
|
export interface ClusterChartSeriesData {
|
|
7
8
|
name: string;
|
|
@@ -27,7 +28,7 @@ export declare class NileClusterChart extends NileElement {
|
|
|
27
28
|
yAxisTitle: string;
|
|
28
29
|
showLegend: boolean;
|
|
29
30
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
30
|
-
legend:
|
|
31
|
+
legend: LegendConfig | null;
|
|
31
32
|
groupPadding: number;
|
|
32
33
|
pointPadding: number;
|
|
33
34
|
chartBg: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
|
-
import NileElement from '../internal/nile-element.js';
|
|
6
|
-
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
|
-
import { deepMerge } from '../internal/utils.js';
|
|
8
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
5
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
6
|
+
import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
9
9
|
import { styles } from './nile-cluster-chart.css.js';
|
|
10
10
|
let NileClusterChart = class NileClusterChart extends NileElement {
|
|
11
11
|
constructor() {
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import
|
|
4
|
-
import type {
|
|
3
|
+
import NileForecastableChart from '../internal/base/forecastable-chart.js';
|
|
4
|
+
import type { ForecastSeriesInput } from '../internal/utils/chart-forecast.js';
|
|
5
|
+
import type { LegendConfig, NileChartConfigInputType } from '../internal/types/index.js';
|
|
5
6
|
export interface ColumnChartSeriesData {
|
|
6
7
|
name: string;
|
|
7
8
|
data: number[];
|
|
8
9
|
color?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare class NileColumnChart extends
|
|
11
|
+
export declare class NileColumnChart extends NileForecastableChart {
|
|
12
|
+
/** The series type every entry in `data` defaults to. */
|
|
13
|
+
protected chartSeriesType: "column";
|
|
11
14
|
static styles: CSSResultGroup;
|
|
12
15
|
private _hc;
|
|
13
|
-
private chart;
|
|
14
16
|
private resizeObserver;
|
|
15
17
|
private chartContainer;
|
|
16
18
|
/** Full chart configuration. Accepts separated { chart, aq } input. */
|
|
17
19
|
config: NileChartConfigInputType | null;
|
|
18
20
|
chartTitle: string;
|
|
19
21
|
chartSubtitle: string;
|
|
20
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Series. Plain `{ name, data }` entries, or — with `enableForecasting` —
|
|
24
|
+
* forecast entries carrying `actual` / `projected`. Columns get no confidence
|
|
25
|
+
* band; a projected column is distinguished by `projection.color` instead.
|
|
26
|
+
*/
|
|
27
|
+
data: Array<ColumnChartSeriesData | ForecastSeriesInput>;
|
|
21
28
|
categories: string[];
|
|
22
29
|
options: Highcharts.Options;
|
|
23
30
|
noResponsive: boolean;
|
|
@@ -26,7 +33,7 @@ export declare class NileColumnChart extends NileElement {
|
|
|
26
33
|
yAxisTitle: string;
|
|
27
34
|
showLegend: boolean;
|
|
28
35
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
-
legend:
|
|
36
|
+
legend: LegendConfig | null;
|
|
30
37
|
chartBg: string;
|
|
31
38
|
chartBorderRadius: string | number;
|
|
32
39
|
chartBorder: string;
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
|
-
import
|
|
6
|
-
import { deepMerge } from '../internal/utils.js';
|
|
7
|
-
import {
|
|
4
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
5
|
+
import NileForecastableChart from '../internal/base/forecastable-chart.js';
|
|
6
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
7
|
+
import { normalizeChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-column-chart.css.js';
|
|
9
|
-
let NileColumnChart = class NileColumnChart extends
|
|
10
|
+
let NileColumnChart = class NileColumnChart extends NileForecastableChart {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
13
|
+
/** The series type every entry in `data` defaults to. */
|
|
14
|
+
this.chartSeriesType = 'column';
|
|
12
15
|
this._hc = null;
|
|
13
|
-
this.chart = null;
|
|
14
16
|
this.resizeObserver = null;
|
|
15
17
|
/** Full chart configuration. Accepts separated { chart, aq } input. */
|
|
16
18
|
this.config = null;
|
|
17
19
|
this.chartTitle = '';
|
|
18
20
|
this.chartSubtitle = '';
|
|
21
|
+
/**
|
|
22
|
+
* Series. Plain `{ name, data }` entries, or — with `enableForecasting` —
|
|
23
|
+
* forecast entries carrying `actual` / `projected`. Columns get no confidence
|
|
24
|
+
* band; a projected column is distinguished by `projection.color` instead.
|
|
25
|
+
*/
|
|
19
26
|
this.data = [];
|
|
20
27
|
this.categories = [];
|
|
21
28
|
this.options = {};
|
|
@@ -63,7 +70,9 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
63
70
|
}
|
|
64
71
|
/** Apply { chart, aq } config to individual properties. */
|
|
65
72
|
applyConfig(cfg) {
|
|
66
|
-
|
|
73
|
+
// Accepts the flat `<nile-chart>` shape as well as `{ chart, aq }` —
|
|
74
|
+
// the flat form used to render nothing at all, silently.
|
|
75
|
+
const { chart: c, aq } = normalizeChartConfig(cfg);
|
|
67
76
|
if (c) {
|
|
68
77
|
const col = c;
|
|
69
78
|
if (col.data)
|
|
@@ -72,6 +81,7 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
72
81
|
this.categories = col.categories;
|
|
73
82
|
if (col.yAxisTitle)
|
|
74
83
|
this.yAxisTitle = col.yAxisTitle;
|
|
84
|
+
this.applyForecastableConfig(col);
|
|
75
85
|
if (col.height)
|
|
76
86
|
this.height = col.height;
|
|
77
87
|
if (col.loading !== undefined)
|
|
@@ -135,19 +145,18 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
135
145
|
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
136
146
|
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
137
147
|
this._syncCssVars();
|
|
138
|
-
const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'yAxisTitle', 'loading', 'showLegend'];
|
|
148
|
+
const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'yAxisTitle', 'loading', 'showLegend', ...NileForecastableChart.FORECASTABLE_PROPS];
|
|
139
149
|
if (!props.some(p => changedProperties.has(p)))
|
|
140
150
|
return;
|
|
141
151
|
if (this.loading) {
|
|
142
152
|
this.destroyChart();
|
|
143
153
|
return;
|
|
144
154
|
}
|
|
145
|
-
if (this.chart) {
|
|
146
|
-
this.chart.update(this.buildOptions(), true, true);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
155
|
+
if (!this.chart) {
|
|
149
156
|
this.initChart();
|
|
157
|
+
return;
|
|
150
158
|
}
|
|
159
|
+
this.updateChart(this.chart, changedProperties, r => this.buildOptions(r));
|
|
151
160
|
}
|
|
152
161
|
setupResizeObserver() {
|
|
153
162
|
if (!this.chartContainer)
|
|
@@ -155,20 +164,29 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
155
164
|
this.resizeObserver = new ResizeObserver(() => { this.chart?.reflow(); });
|
|
156
165
|
this.resizeObserver.observe(this.chartContainer);
|
|
157
166
|
}
|
|
158
|
-
buildOptions() {
|
|
167
|
+
buildOptions(retract = false) {
|
|
159
168
|
const self = this;
|
|
169
|
+
const overlay = this.forecastOverlay(retract);
|
|
160
170
|
const merged = deepMerge({
|
|
161
|
-
chart: {
|
|
171
|
+
chart: {
|
|
172
|
+
type: this.chartSeriesType,
|
|
173
|
+
...(this.height ? { height: this.height } : {}),
|
|
174
|
+
},
|
|
162
175
|
title: { text: this.chartTitle || undefined },
|
|
163
176
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
164
|
-
xAxis: {
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
xAxis: {
|
|
178
|
+
categories: this.categories,
|
|
179
|
+
title: { text: this.xAxisTitle || undefined },
|
|
180
|
+
plotLines: overlay.plotLines,
|
|
181
|
+
plotBands: overlay.plotBands,
|
|
182
|
+
},
|
|
183
|
+
yAxis: this.forecastYAxis({ min: 0, title: { text: this.yAxisTitle || undefined } }, overlay.hasSecondaryAxis),
|
|
184
|
+
tooltip: { valueSuffix: '', ...overlay.tooltip },
|
|
167
185
|
plotOptions: {
|
|
168
186
|
column: { dataLabels: { enabled: false } },
|
|
169
|
-
series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, category: this.category, value: this.y, seriesName: this.series.name }); } } } },
|
|
187
|
+
series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, category: this.category, value: this.y, seriesName: this.series.name, forecast: self.isForecastPoint(this.x, overlay.boundary) }); } } } },
|
|
170
188
|
},
|
|
171
|
-
series: this.
|
|
189
|
+
series: this.forecastSeries(overlay),
|
|
172
190
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
173
191
|
credits: { enabled: false },
|
|
174
192
|
}, this.options);
|
|
@@ -179,12 +197,13 @@ let NileColumnChart = class NileColumnChart extends NileElement {
|
|
|
179
197
|
return;
|
|
180
198
|
if (!this._hc)
|
|
181
199
|
this._hc = await getHighcharts();
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
200
|
+
this._chart = this._hc.chart(this.chartContainer, this.buildOptions());
|
|
201
|
+
this._notifyChartReady();
|
|
202
|
+
this.emit('nile-chart-ready', { chart: this._chart });
|
|
184
203
|
}
|
|
185
|
-
destroyChart() { if (this.
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
204
|
+
destroyChart() { if (this._chart) {
|
|
205
|
+
this._chart.destroy();
|
|
206
|
+
this._clearChart();
|
|
188
207
|
} }
|
|
189
208
|
render() {
|
|
190
209
|
if (this.loading)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
5
|
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface ColumnDrilldownParentPoint {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import NileElement from '../internal/nile-element.js';
|
|
5
|
-
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
|
-
import { deepMerge } from '../internal/utils.js';
|
|
8
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
5
|
+
import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
6
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
9
9
|
import { styles } from './nile-column-drilldown-chart.css.js';
|
|
10
10
|
import { tooltipCss } from '../nile-chart/nile-chart.css.js';
|
|
11
11
|
let _bcTooltipStylesInjected = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
5
|
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface ColumnPyramidSeriesData {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import NileElement from '../internal/nile-element.js';
|
|
5
|
-
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
|
-
import { deepMerge } from '../internal/utils.js';
|
|
8
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
5
|
+
import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
6
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
9
9
|
import { styles } from './nile-column-pyramid-chart.css.js';
|
|
10
10
|
let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
|
|
11
11
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
5
|
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface ColumnRangeSeriesData {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import NileElement from '../internal/nile-element.js';
|
|
5
|
-
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
|
-
import { deepMerge } from '../internal/utils.js';
|
|
8
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
5
|
+
import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
6
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
9
9
|
import { styles } from './nile-column-range-chart.css.js';
|
|
10
10
|
let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
|
|
11
11
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type { Responsive } from 'gridstack';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { NileDashboardConfig } from '../internal/types/dashboard-config.type.js';
|
|
5
5
|
import '../nile-widget-viewer/index.js';
|
|
6
6
|
/** When the per-widget remove control (✕) is shown. */
|
|
@@ -2,10 +2,10 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
4
|
import { GridStack } from 'gridstack';
|
|
5
|
-
import NileElement from '../internal/nile-element.js';
|
|
5
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
6
6
|
import { styles } from './nile-dashboard-builder.css.js';
|
|
7
7
|
import { gridstackCss } from './gridstack-css.js';
|
|
8
|
-
import { resolveWidgetKind } from '../internal/resolve-widget-kind.js';
|
|
8
|
+
import { resolveWidgetKind } from '../internal/utils/resolve-widget-kind.js';
|
|
9
9
|
import '../nile-widget-viewer/index.js';
|
|
10
10
|
let NileDashboardBuilder = class NileDashboardBuilder extends NileElement {
|
|
11
11
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nothing } from 'lit';
|
|
2
2
|
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { NileDashboardConfig } from '../internal/types/dashboard-config.type.js';
|
|
5
5
|
import '../nile-widget-viewer/index.js';
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import { html, nothing } from 'lit';
|
|
4
|
-
import NileElement from '../internal/nile-element.js';
|
|
4
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
5
5
|
import { styles } from './nile-dashboard-viewer.css.js';
|
|
6
6
|
import '../nile-widget-viewer/index.js';
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
4
|
-
import type { NileChartConfigInputType } from '../internal/types/index.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
|
+
import type { LegendConfig, NileChartConfigInputType } from '../internal/types/index.js';
|
|
5
5
|
export interface DonutChartSeriesData {
|
|
6
6
|
name: string;
|
|
7
7
|
y: number;
|
|
@@ -31,7 +31,7 @@ export declare class NileDonutChart extends NileElement {
|
|
|
31
31
|
showDataLabels: boolean;
|
|
32
32
|
showLegend: boolean;
|
|
33
33
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
34
|
-
legend:
|
|
34
|
+
legend: LegendConfig | null;
|
|
35
35
|
chartBg: string;
|
|
36
36
|
chartBorderRadius: string | number;
|
|
37
37
|
chartBorder: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
|
-
import NileElement from '../internal/nile-element.js';
|
|
6
|
-
import { deepMerge } from '../internal/utils.js';
|
|
7
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
5
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
6
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
7
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
8
8
|
import { styles } from './nile-donut-chart.css.js';
|
|
9
9
|
let NileDonutChart = class NileDonutChart extends NileElement {
|
|
10
10
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
5
|
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface DumbbellPoint {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
|
-
import NileElement from '../internal/nile-element.js';
|
|
6
|
-
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
|
-
import { deepMerge } from '../internal/utils.js';
|
|
8
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
5
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
6
|
+
import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
9
9
|
import { styles } from './nile-dumbbell-chart.css.js';
|
|
10
10
|
let NileDumbbellChart = class NileDumbbellChart extends NileElement {
|
|
11
11
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import NileElement from '../internal/nile-element.js';
|
|
3
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
4
4
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
5
|
import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
|
|
6
6
|
import type { LegendConfig } from '../internal/types/index.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
|
-
import NileElement from '../internal/nile-element.js';
|
|
6
|
-
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
|
-
import { deepMerge } from '../internal/utils.js';
|
|
8
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.js';
|
|
5
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
6
|
+
import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
|
|
7
|
+
import { deepMerge } from '../internal/utils/deep-merge.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
|
|
9
9
|
import { styles } from './nile-dumbbell-lower-chart.css.js';
|
|
10
10
|
let NileDumbbellLowerChart = class NileDumbbellLowerChart extends NileElement {
|
|
11
11
|
constructor() {
|