@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import type Highcharts from 'highcharts';
|
|
3
|
-
import
|
|
3
|
+
import NileForecastableChart from '../internal/base/forecastable-chart.js';
|
|
4
|
+
import type { ForecastSeriesInput } from '../internal/utils/chart-forecast.js';
|
|
4
5
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
5
6
|
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
7
|
export interface AreaSplineSeriesData {
|
|
@@ -8,16 +9,21 @@ export interface AreaSplineSeriesData {
|
|
|
8
9
|
data: number[];
|
|
9
10
|
color?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare class NileAreaSplineChart extends
|
|
12
|
+
export declare class NileAreaSplineChart extends NileForecastableChart {
|
|
13
|
+
/** The series type every entry in `data` defaults to. */
|
|
14
|
+
protected chartSeriesType: "areaspline";
|
|
12
15
|
static styles: CSSResultGroup;
|
|
13
16
|
private _hc;
|
|
14
|
-
private chart;
|
|
15
17
|
private resizeObserver;
|
|
16
18
|
private chartContainer;
|
|
17
19
|
config: SeparatedChartConfigInputType | 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` / `interval`.
|
|
25
|
+
*/
|
|
26
|
+
data: Array<AreaSplineSeriesData | ForecastSeriesInput>;
|
|
21
27
|
categories: string[];
|
|
22
28
|
options: Highcharts.Options;
|
|
23
29
|
noResponsive: boolean;
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
|
-
import
|
|
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 NileForecastableChart from '../internal/base/forecastable-chart.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-area-spline-chart.css.js';
|
|
10
|
-
let NileAreaSplineChart = class NileAreaSplineChart extends
|
|
10
|
+
let NileAreaSplineChart = class NileAreaSplineChart extends NileForecastableChart {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
|
+
/** The series type every entry in `data` defaults to. */
|
|
14
|
+
this.chartSeriesType = 'areaspline';
|
|
13
15
|
this._hc = null;
|
|
14
|
-
this.chart = null;
|
|
15
16
|
this.resizeObserver = null;
|
|
16
17
|
this.config = null;
|
|
17
18
|
this.chartTitle = '';
|
|
18
19
|
this.chartSubtitle = '';
|
|
20
|
+
/**
|
|
21
|
+
* Series. Plain `{ name, data }` entries, or — with `enableForecasting` —
|
|
22
|
+
* forecast entries carrying `actual` / `projected` / `interval`.
|
|
23
|
+
*/
|
|
19
24
|
this.data = [];
|
|
20
25
|
this.categories = [];
|
|
21
26
|
this.options = {};
|
|
@@ -102,6 +107,7 @@ let NileAreaSplineChart = class NileAreaSplineChart extends NileElement {
|
|
|
102
107
|
'loading',
|
|
103
108
|
'showLegend',
|
|
104
109
|
'legend',
|
|
110
|
+
...NileForecastableChart.FORECASTABLE_PROPS,
|
|
105
111
|
];
|
|
106
112
|
if (!props.some(p => changedProperties.has(p)))
|
|
107
113
|
return;
|
|
@@ -109,12 +115,11 @@ let NileAreaSplineChart = class NileAreaSplineChart extends NileElement {
|
|
|
109
115
|
this.destroyChart();
|
|
110
116
|
return;
|
|
111
117
|
}
|
|
112
|
-
if (this.chart) {
|
|
113
|
-
this.chart.update(this.buildOptions(), true, true);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
118
|
+
if (!this.chart) {
|
|
116
119
|
this.initChart();
|
|
120
|
+
return;
|
|
117
121
|
}
|
|
122
|
+
this.updateChart(this.chart, changedProperties, r => this.buildOptions(r));
|
|
118
123
|
}
|
|
119
124
|
setupResizeObserver() {
|
|
120
125
|
if (!this.chartContainer)
|
|
@@ -122,15 +127,24 @@ let NileAreaSplineChart = class NileAreaSplineChart extends NileElement {
|
|
|
122
127
|
this.resizeObserver = new ResizeObserver(() => this.chart?.reflow());
|
|
123
128
|
this.resizeObserver.observe(this.chartContainer);
|
|
124
129
|
}
|
|
125
|
-
buildOptions() {
|
|
130
|
+
buildOptions(retract = false) {
|
|
126
131
|
const self = this;
|
|
132
|
+
const overlay = this.forecastOverlay(retract);
|
|
127
133
|
const merged = deepMerge({
|
|
128
|
-
chart: {
|
|
134
|
+
chart: {
|
|
135
|
+
type: this.chartSeriesType,
|
|
136
|
+
...(this.height ? { height: this.height } : {}),
|
|
137
|
+
},
|
|
129
138
|
title: { text: this.chartTitle || undefined },
|
|
130
139
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
131
|
-
xAxis: {
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
xAxis: {
|
|
141
|
+
categories: this.categories,
|
|
142
|
+
title: { text: this.xAxisTitle || undefined },
|
|
143
|
+
plotLines: overlay.plotLines,
|
|
144
|
+
plotBands: overlay.plotBands,
|
|
145
|
+
},
|
|
146
|
+
yAxis: this.forecastYAxis({ title: { text: this.yAxisTitle || undefined } }, overlay.hasSecondaryAxis),
|
|
147
|
+
tooltip: { shared: true, ...overlay.tooltip },
|
|
134
148
|
plotOptions: {
|
|
135
149
|
areaspline: { stacking: this.stacked ? 'normal' : undefined, fillOpacity: 0.25 },
|
|
136
150
|
series: {
|
|
@@ -143,18 +157,14 @@ let NileAreaSplineChart = class NileAreaSplineChart extends NileElement {
|
|
|
143
157
|
category: this.category,
|
|
144
158
|
value: this.y,
|
|
145
159
|
seriesName: this.series.name,
|
|
160
|
+
forecast: self.isForecastPoint(this.x, overlay.boundary),
|
|
146
161
|
});
|
|
147
162
|
},
|
|
148
163
|
},
|
|
149
164
|
},
|
|
150
165
|
},
|
|
151
166
|
},
|
|
152
|
-
series: this.
|
|
153
|
-
type: 'areaspline',
|
|
154
|
-
name: s.name,
|
|
155
|
-
data: s.data,
|
|
156
|
-
color: s.color,
|
|
157
|
-
})),
|
|
167
|
+
series: this.forecastSeries(overlay),
|
|
158
168
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
159
169
|
credits: { enabled: false },
|
|
160
170
|
}, this.options);
|
|
@@ -165,13 +175,14 @@ let NileAreaSplineChart = class NileAreaSplineChart extends NileElement {
|
|
|
165
175
|
return;
|
|
166
176
|
if (!this._hc)
|
|
167
177
|
this._hc = await getHighcharts();
|
|
168
|
-
this.
|
|
169
|
-
this.
|
|
178
|
+
this._chart = this._hc.chart(this.chartContainer, this.buildOptions());
|
|
179
|
+
this._notifyChartReady();
|
|
180
|
+
this.emit('nile-chart-ready', { chart: this._chart });
|
|
170
181
|
}
|
|
171
182
|
destroyChart() {
|
|
172
|
-
if (this.
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
183
|
+
if (this._chart) {
|
|
184
|
+
this._chart.destroy();
|
|
185
|
+
this._clearChart();
|
|
175
186
|
}
|
|
176
187
|
}
|
|
177
188
|
render() {
|
|
@@ -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 BarChartSeriesData {
|
|
6
6
|
name: string;
|
|
7
7
|
data: number[];
|
|
@@ -36,7 +36,7 @@ export declare class NileBarChart extends NileElement {
|
|
|
36
36
|
/** Whether to enable the legend. */
|
|
37
37
|
showLegend: boolean;
|
|
38
38
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
39
|
-
legend:
|
|
39
|
+
legend: LegendConfig | null;
|
|
40
40
|
chartBg: string;
|
|
41
41
|
chartBorderRadius: string | number;
|
|
42
42
|
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 NileElement from '../internal/nile-element.js';
|
|
5
|
-
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
6
|
-
import { deepMerge } from '../internal/utils.js';
|
|
7
|
-
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
4
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
5
|
+
import { getHighcharts } from '../internal/utils/highcharts-provider.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-bar-chart.css.js';
|
|
9
9
|
let NileBarChart = class NileBarChart extends NileElement {
|
|
10
10
|
constructor() {
|
|
@@ -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 raw measurement per entry; used to derive the curve’s mean and spread. */
|
|
6
7
|
export type BellcurveSamples = number[];
|
|
7
8
|
export declare class NileBellcurveChart extends NileElement {
|
|
@@ -32,7 +33,7 @@ export declare class NileBellcurveChart extends NileElement {
|
|
|
32
33
|
pointsInInterval: number;
|
|
33
34
|
showLegend: boolean;
|
|
34
35
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
35
|
-
legend:
|
|
36
|
+
legend: LegendConfig | null;
|
|
36
37
|
chartBg: string;
|
|
37
38
|
chartBorderRadius: string | number;
|
|
38
39
|
chartBorder: 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-bellcurve-chart.css.js';
|
|
10
10
|
const BELLCURVE_BASE_ID = 'nile-bellcurve-base';
|
|
11
11
|
let NileBellcurveChart = class NileBellcurveChart extends NileElement {
|
|
@@ -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
|
/** Five-number summary for one box (whiskers + quartiles + median). */
|
|
6
7
|
export interface BoxplotBox {
|
|
7
8
|
low: number;
|
|
@@ -38,7 +39,7 @@ export declare class NileBoxplotChart extends NileElement {
|
|
|
38
39
|
yAxisTitle: string;
|
|
39
40
|
showLegend: boolean;
|
|
40
41
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
41
|
-
legend:
|
|
42
|
+
legend: LegendConfig | null;
|
|
42
43
|
/** When true, draws horizontal boxes (categories on the y-axis). */
|
|
43
44
|
horizontal: boolean;
|
|
44
45
|
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-boxplot-chart.css.js';
|
|
10
10
|
let NileBoxplotChart = class NileBoxplotChart extends NileElement {
|
|
11
11
|
constructor() {
|
|
@@ -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 BubbleChartSeriesData {
|
|
6
6
|
name: string;
|
|
7
7
|
data: [number, number, number][];
|
|
@@ -26,7 +26,7 @@ export declare class NileBubbleChart extends NileElement {
|
|
|
26
26
|
yAxisTitle: string;
|
|
27
27
|
showLegend: boolean;
|
|
28
28
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
-
legend:
|
|
29
|
+
legend: LegendConfig | null;
|
|
30
30
|
chartBg: string;
|
|
31
31
|
chartBorderRadius: string | number;
|
|
32
32
|
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-bubble-chart.css.js';
|
|
9
9
|
let NileBubbleChart = class NileBubbleChart extends NileElement {
|
|
10
10
|
constructor() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { NileChart } from './nile-chart.js';
|
|
2
2
|
export type { NileChartConfig, NileBarChartConfig, NilePieChartConfig, NileTrendlineChartConfig, NileAnomalyChartConfig, NileLineChartConfig, NileAreaChartConfig, NileColumnChartConfig, NileDonutChartConfig, NileScatterChartConfig, NileBubbleChartConfig, NileSplineChartConfig, NileRadarChartConfig, NileGaugeChartConfig, NileWaterfallChartConfig, NileMasterDetailChartConfig, NileKpiChartConfig, NileMapChartConfig, NileListChartConfig, NileMessageChartConfig, ChartType, SwitchAggregation, NileAiConfig, NileChartMenuConfig, NileChartMenuItem, } from './nile-chart-config.js';
|
|
3
|
-
export { convertConfig, registerAdapter } from '../internal/chart-adapters.js';
|
|
3
|
+
export { convertConfig, registerAdapter } from '../internal/utils/chart-adapters.js';
|
|
4
4
|
export { nileChartConfig } from './nile-chart-config-builder.js';
|
|
5
5
|
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { NileChart } from './nile-chart.js';
|
|
2
|
-
export { convertConfig, registerAdapter } from '../internal/chart-adapters.js';
|
|
2
|
+
export { convertConfig, registerAdapter } from '../internal/utils/chart-adapters.js';
|
|
3
3
|
export { nileChartConfig } from './nile-chart-config-builder.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ChartConfigType } from '../internal/types/chart-config.type.js';
|
|
2
|
-
/** Every supported `chart.type` value for `<nile-chart>`. */
|
|
3
2
|
export type ChartType = ChartConfigType['type'];
|
|
4
3
|
import type { BarChartSeriesData } from '../nile-bar-chart/nile-bar-chart.js';
|
|
5
4
|
import type { PieChartSeriesData } from '../nile-pie-chart/nile-pie-chart.js';
|
|
@@ -16,6 +15,7 @@ import type { SplineChartSeriesData } from '../nile-spline-chart/nile-spline-cha
|
|
|
16
15
|
import type { RadarChartSeriesData } from '../nile-radar-chart/nile-radar-chart.js';
|
|
17
16
|
import type { GaugeBand } from '../nile-gauge-chart/nile-gauge-chart.js';
|
|
18
17
|
import type { WaterfallDataPoint } from '../nile-waterfall-chart/nile-waterfall-chart.js';
|
|
18
|
+
import type { ForecastConfigFields, ForecastSeriesInput } from '../internal/utils/chart-forecast.js';
|
|
19
19
|
import type { KpiVariant, KpiValueFormat, KpiNumberSystem, SparklineType, TrendDirection } from '../nile-kpi-chart/nile-kpi-chart.js';
|
|
20
20
|
import type { MapChartDataPoint } from '../nile-map-chart/nile-map-chart.js';
|
|
21
21
|
import type { StatusLightConfig } from '../nile-chart-message/nile-chart-message.js';
|
|
@@ -52,23 +52,12 @@ import type { XrangeDataPoint } from '../nile-xrange-chart/nile-xrange-chart.js'
|
|
|
52
52
|
import type { LineColumnSeriesPart } from '../nile-line-column-chart/nile-line-column-chart.js';
|
|
53
53
|
import type { ChartColorPaletteConfig } from '../internal/types/chart-color-palette.type.js';
|
|
54
54
|
export type SwitchAggregation = 'by-category' | 'by-series' | 'flatten';
|
|
55
|
-
/**
|
|
56
|
-
* A built-in menu action (fullscreen, print, or a download).
|
|
57
|
-
* Set the matching flag to `true`; optionally override the displayed `label`.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* { type: 'default', downloadPng: true }
|
|
61
|
-
* { type: 'default', downloadCsv: true, label: 'Export CSV', divider: true }
|
|
62
|
-
*/
|
|
63
55
|
export interface NileChartMenuItemDefault {
|
|
64
56
|
type: 'default';
|
|
65
|
-
/** Override the default label (e.g. "Download PNG"). */
|
|
66
57
|
label?: string;
|
|
67
|
-
/** Optional nile-glyph icon name shown as a leading prefix (e.g. `'download'`). */
|
|
68
58
|
glyph?: string;
|
|
69
59
|
method?: string;
|
|
70
60
|
color?: string;
|
|
71
|
-
/** Show a divider line above this item. */
|
|
72
61
|
divider?: boolean;
|
|
73
62
|
fullscreen?: true;
|
|
74
63
|
print?: true;
|
|
@@ -76,70 +65,24 @@ export interface NileChartMenuItemDefault {
|
|
|
76
65
|
downloadSvg?: true;
|
|
77
66
|
downloadCsv?: true;
|
|
78
67
|
}
|
|
79
|
-
/**
|
|
80
|
-
* A custom menu item. Clicking it fires a `nile-menu-change` event with `{ id }`.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* { type: 'custom', label: 'Send to Slack', id: 'send-slack' }
|
|
84
|
-
*/
|
|
85
68
|
export interface NileChartMenuItemCustom {
|
|
86
69
|
type: 'custom';
|
|
87
|
-
/** Label shown in the menu. */
|
|
88
70
|
label: string;
|
|
89
|
-
/** Identifier emitted in the `nile-menu-change` event when clicked. */
|
|
90
71
|
id: string;
|
|
91
|
-
/** Optional nile-glyph icon name shown as a leading prefix (e.g. `'share-07'`). */
|
|
92
72
|
glyph?: string;
|
|
93
|
-
/** Render method for the leading glyph (passed to nile-glyph `method`, e.g. `'fill'`, `'stroke'`). */
|
|
94
73
|
method?: string;
|
|
95
|
-
/** Color for the leading glyph (passed to nile-glyph `color`, e.g. a hex value or CSS var). */
|
|
96
74
|
color?: string;
|
|
97
|
-
/** Show a divider line above this item. */
|
|
98
75
|
divider?: boolean;
|
|
99
76
|
}
|
|
100
|
-
/**
|
|
101
|
-
* A group that renders a section header followed by its child items.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* {
|
|
105
|
-
* type: 'group',
|
|
106
|
-
* label: 'Export',
|
|
107
|
-
* items: [
|
|
108
|
-
* { type: 'default', downloadPng: true },
|
|
109
|
-
* { type: 'default', downloadCsv: true },
|
|
110
|
-
* ]
|
|
111
|
-
* }
|
|
112
|
-
*/
|
|
113
77
|
export interface NileChartMenuItemGroup {
|
|
114
78
|
type: 'group';
|
|
115
|
-
/** Text shown as the section header. */
|
|
116
79
|
label: string;
|
|
117
|
-
/** Items rendered under this group header. */
|
|
118
80
|
items: Array<NileChartMenuItemDefault | NileChartMenuItemCustom>;
|
|
119
|
-
/** Show a divider line above the group header. */
|
|
120
81
|
divider?: boolean;
|
|
121
82
|
}
|
|
122
83
|
export type NileChartMenuItem = NileChartMenuItemDefault | NileChartMenuItemCustom | NileChartMenuItemGroup;
|
|
123
|
-
/**
|
|
124
|
-
* Controls the chart's actions menu.
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* menu: {
|
|
128
|
-
* enabled: true,
|
|
129
|
-
* items: [
|
|
130
|
-
* { type: 'default', downloadPng: true },
|
|
131
|
-
* { type: 'default', downloadCsv: true },
|
|
132
|
-
* { type: 'custom', label: 'Share report', id: 'share-report', divider: true },
|
|
133
|
-
* ]
|
|
134
|
-
* }
|
|
135
|
-
*/
|
|
136
84
|
export interface NileChartMenuConfig {
|
|
137
|
-
/** Show the menu trigger button. Must be `true` to enable the menu. */
|
|
138
85
|
enabled?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Ordered list of menu items. Each item is either a built-in action
|
|
141
|
-
* (`type: 'default'`) or a custom event-driven item (`type: 'custom'`).
|
|
142
|
-
*/
|
|
143
86
|
items?: NileChartMenuItem[];
|
|
144
87
|
}
|
|
145
88
|
export interface NileAiConfig {
|
|
@@ -150,15 +93,13 @@ export interface NileAiConfig {
|
|
|
150
93
|
export interface NileChartConfigBase extends HighchartsPassthroughConfig {
|
|
151
94
|
chartTitle?: string;
|
|
152
95
|
chartSubtitle?: string;
|
|
153
|
-
/** Font size for the header title (number → px, or any CSS length string). */
|
|
154
96
|
titleFontSize?: string | number;
|
|
155
|
-
/** Font size for the header subtitle (number → px, or any CSS length string). */
|
|
156
97
|
subtitleFontSize?: string | number;
|
|
157
98
|
noHeader?: boolean;
|
|
158
99
|
noPadding?: boolean;
|
|
159
100
|
height?: string;
|
|
160
101
|
loading?: boolean;
|
|
161
|
-
options?:
|
|
102
|
+
options?: HighchartsOptions;
|
|
162
103
|
summary?: string;
|
|
163
104
|
toggleLabel?: string;
|
|
164
105
|
switchableTypes?: ChartType[];
|
|
@@ -167,13 +108,7 @@ export interface NileChartConfigBase extends HighchartsPassthroughConfig {
|
|
|
167
108
|
menu?: NileChartMenuConfig;
|
|
168
109
|
menuItems?: NileChartMenuItem[];
|
|
169
110
|
legend?: LegendConfig;
|
|
170
|
-
/** Color palette applied to the chart's series. */
|
|
171
111
|
colorPalette?: ChartColorPaletteConfig;
|
|
172
|
-
/**
|
|
173
|
-
* Space (px) between the chart's outer edge and its plot area — maps to
|
|
174
|
-
* Highcharts `chart.spacingTop/Right/Bottom/Left`. Applies to every chart
|
|
175
|
-
* type. e.g. `{ right: 40 }` gives a right-aligned legend room to breathe.
|
|
176
|
-
*/
|
|
177
112
|
chartSpacing?: ChartSpacingConfig;
|
|
178
113
|
chartBg?: string;
|
|
179
114
|
chartBorderRadius?: string | number;
|
|
@@ -199,22 +134,23 @@ export interface NilePieChartConfig extends NileChartConfigBase {
|
|
|
199
134
|
seriesName?: string;
|
|
200
135
|
showDataLabels?: boolean;
|
|
201
136
|
}
|
|
202
|
-
export interface NileLineChartConfig extends NileChartConfigBase {
|
|
137
|
+
export interface NileLineChartConfig extends NileChartConfigBase, ForecastConfigFields {
|
|
203
138
|
type: 'line';
|
|
204
|
-
data: LineChartSeriesData
|
|
139
|
+
data: Array<LineChartSeriesData | ForecastSeriesInput>;
|
|
205
140
|
categories?: string[];
|
|
206
141
|
yAxisTitle?: string;
|
|
207
142
|
}
|
|
208
|
-
export interface NileAreaChartConfig extends NileChartConfigBase {
|
|
143
|
+
export interface NileAreaChartConfig extends NileChartConfigBase, ForecastConfigFields {
|
|
209
144
|
type: 'area';
|
|
210
|
-
data: AreaChartSeriesData
|
|
145
|
+
data: Array<AreaChartSeriesData | ForecastSeriesInput>;
|
|
211
146
|
categories?: string[];
|
|
212
147
|
yAxisTitle?: string;
|
|
213
148
|
stacked?: boolean;
|
|
149
|
+
fillOpacity?: number;
|
|
214
150
|
}
|
|
215
|
-
export interface NileColumnChartConfig extends NileChartConfigBase {
|
|
151
|
+
export interface NileColumnChartConfig extends NileChartConfigBase, ForecastConfigFields {
|
|
216
152
|
type: 'column';
|
|
217
|
-
data: ColumnChartSeriesData
|
|
153
|
+
data: Array<ColumnChartSeriesData | ForecastSeriesInput>;
|
|
218
154
|
categories?: string[];
|
|
219
155
|
yAxisTitle?: string;
|
|
220
156
|
}
|
|
@@ -238,9 +174,9 @@ export interface NileBubbleChartConfig extends NileChartConfigBase {
|
|
|
238
174
|
xAxisTitle?: string;
|
|
239
175
|
yAxisTitle?: string;
|
|
240
176
|
}
|
|
241
|
-
export interface NileSplineChartConfig extends NileChartConfigBase {
|
|
177
|
+
export interface NileSplineChartConfig extends NileChartConfigBase, ForecastConfigFields {
|
|
242
178
|
type: 'spline';
|
|
243
|
-
data: SplineChartSeriesData
|
|
179
|
+
data: Array<SplineChartSeriesData | ForecastSeriesInput>;
|
|
244
180
|
categories?: string[];
|
|
245
181
|
yAxisTitle?: string;
|
|
246
182
|
}
|
|
@@ -271,12 +207,6 @@ export interface NileMapChartConfig extends NileChartConfigBase {
|
|
|
271
207
|
seriesType?: 'map' | 'mapline' | 'mappoint' | 'mapbubble' | 'tiledwebmap';
|
|
272
208
|
zoom?: boolean;
|
|
273
209
|
}
|
|
274
|
-
/**
|
|
275
|
-
* Tabular grid variant of `<nile-chart>` — renders a `<nile-data-grid>` and
|
|
276
|
-
* exposes its full public property surface.
|
|
277
|
-
*
|
|
278
|
-
* Use `type: 'grid'`.
|
|
279
|
-
*/
|
|
280
210
|
export interface NileGridChartConfig extends NileChartConfigBase {
|
|
281
211
|
type: 'grid';
|
|
282
212
|
data: unknown[];
|
|
@@ -404,12 +334,13 @@ export interface NileInvertedAreaChartConfig extends NileChartConfigBase {
|
|
|
404
334
|
yAxisTitle?: string;
|
|
405
335
|
stacked?: boolean;
|
|
406
336
|
}
|
|
407
|
-
export interface NileAreaSplineChartConfig extends NileChartConfigBase {
|
|
337
|
+
export interface NileAreaSplineChartConfig extends NileChartConfigBase, ForecastConfigFields {
|
|
408
338
|
type: 'areaSpline';
|
|
409
|
-
data: AreaSplineSeriesData
|
|
339
|
+
data: Array<AreaSplineSeriesData | ForecastSeriesInput>;
|
|
410
340
|
categories?: string[];
|
|
411
341
|
yAxisTitle?: string;
|
|
412
342
|
stacked?: boolean;
|
|
343
|
+
fillOpacity?: number;
|
|
413
344
|
}
|
|
414
345
|
export interface NileAreaNegativeChartConfig extends NileChartConfigBase {
|
|
415
346
|
type: 'areaNegative';
|
|
@@ -468,7 +399,6 @@ export interface NileMasterDetailChartConfig extends NileChartConfigBase {
|
|
|
468
399
|
seriesColor?: string;
|
|
469
400
|
detailType?: string;
|
|
470
401
|
masterType?: string;
|
|
471
|
-
/** Render only the master (overview) pane — no detail chart. */
|
|
472
402
|
masterOnly?: boolean;
|
|
473
403
|
masterCollapsible?: boolean;
|
|
474
404
|
xAxisType?: 'datetime' | 'linear' | 'logarithmic' | 'category';
|
|
@@ -482,7 +412,7 @@ export interface NileMasterDetailChartConfig extends NileChartConfigBase {
|
|
|
482
412
|
detailTitle?: string;
|
|
483
413
|
masterTitle?: string;
|
|
484
414
|
maskFill?: string;
|
|
485
|
-
masterOptions?:
|
|
415
|
+
masterOptions?: HighchartsOptions;
|
|
486
416
|
}
|
|
487
417
|
export interface NileFanChartConfig extends NileChartConfigBase {
|
|
488
418
|
type: 'fan';
|
|
@@ -566,7 +496,6 @@ export interface NileLineColumnChartConfig extends NileChartConfigBase {
|
|
|
566
496
|
}
|
|
567
497
|
export interface NileKpiChartConfig extends NileChartConfigBase {
|
|
568
498
|
type: 'kpi';
|
|
569
|
-
/** Display variant. Default: 'default'. */
|
|
570
499
|
variant?: KpiVariant;
|
|
571
500
|
label?: string;
|
|
572
501
|
value?: number | string;
|
|
@@ -576,6 +505,10 @@ export interface NileKpiChartConfig extends NileChartConfigBase {
|
|
|
576
505
|
trendValue?: number | null;
|
|
577
506
|
trendDirection?: TrendDirection;
|
|
578
507
|
trendLabel?: string;
|
|
508
|
+
forecastValue?: number | null;
|
|
509
|
+
forecastLabel?: string;
|
|
510
|
+
forecastApprox?: boolean;
|
|
511
|
+
forecastColor?: string;
|
|
579
512
|
trendUpColor?: string;
|
|
580
513
|
trendDownColor?: string;
|
|
581
514
|
trendNeutralColor?: string;
|
|
@@ -619,20 +552,16 @@ export interface NileKpiChartConfig extends NileChartConfigBase {
|
|
|
619
552
|
cardPaddingVertical?: string | number;
|
|
620
553
|
cardPaddingHorizontal?: string | number;
|
|
621
554
|
contentGap?: string | number;
|
|
622
|
-
/** Abbreviation scale. Default 'auto'. */
|
|
623
555
|
valueFormat?: KpiValueFormat;
|
|
624
|
-
/** Decimal places on the abbreviated value. */
|
|
625
556
|
precision?: number | null;
|
|
626
|
-
/** Base unit (e.g. 'L', 'g', 'm') combined with the magnitude prefix: "1.5KL", "2.5Kg". */
|
|
627
557
|
unit?: string;
|
|
628
|
-
/** BCP 47 locale for number formatting, e.g. 'en-IN'. Defaults to browser locale. */
|
|
629
558
|
locale?: string;
|
|
630
|
-
/** Number system: 'indian' (1,00,000 / L / Cr) or 'international' (100,000 / K / M / B / T). */
|
|
631
559
|
numberSystem?: KpiNumberSystem;
|
|
632
560
|
tooltipEnabled?: boolean;
|
|
633
561
|
}
|
|
634
562
|
export type { FilterOption, FilterControl } from '../nile-filter-chart/nile-filter-chart.js';
|
|
635
563
|
import type { FilterControl } from '../nile-filter-chart/nile-filter-chart.js';
|
|
564
|
+
import type { Options as HighchartsOptions } from 'highcharts';
|
|
636
565
|
export interface NileFilterChartConfig extends NileChartConfigBase {
|
|
637
566
|
type: 'filter';
|
|
638
567
|
controls: FilterControl[];
|
|
@@ -656,5 +585,4 @@ export interface NileListChartConfig extends NileChartConfigBase {
|
|
|
656
585
|
markerColor?: string;
|
|
657
586
|
allowHtml?: boolean;
|
|
658
587
|
}
|
|
659
|
-
/** Discriminated union of every named chart config — use for typed `<nile-chart>` configs. */
|
|
660
588
|
export type NileChartConfig = NileBarChartConfig | NilePieChartConfig | NileLineChartConfig | NileAreaChartConfig | NileColumnChartConfig | NileDonutChartConfig | NileScatterChartConfig | NileBubbleChartConfig | NileSplineChartConfig | NileRadarChartConfig | NileGaugeChartConfig | NileWaterfallChartConfig | NileMapChartConfig | NileGridChartConfig | NileTrendlineChartConfig | NileAnomalyChartConfig | NileHistogramChartConfig | NileBellcurveChartConfig | NileBoxplotChartConfig | NileStackedChartConfig | NileClusterChartConfig | NileColumnPyramidChartConfig | NileColumnRangeChartConfig | NileColumnDrilldownChartConfig | NileLollipopChartConfig | NileInvertedAreaChartConfig | NileAreaSplineChartConfig | NileAreaNegativeChartConfig | NileAreaRangeChartConfig | NileDumbbellChartConfig | NileDumbbellLowerChartConfig | NileDumbbellUpperChartConfig | NileRadialBarChartConfig | NileSpiderwebChartConfig | NileTimelineChartConfig | NileMasterDetailChartConfig | NileFanChartConfig | NileFunnelChartConfig | NileOrganizationChartConfig | NileHeatmapChartConfig | NileFlameChartConfig | NileVariablePieChartConfig | NileEulerChartConfig | NilePolygonChartConfig | NileVectorChartConfig | NileXrangeChartConfig | NileLineColumnChartConfig | NileKpiChartConfig | NileFilterChartConfig | NileMessageChartConfig | NileListChartConfig;
|
|
@@ -5,7 +5,7 @@ const SKELETON_TYPE_MAP = {
|
|
|
5
5
|
columnRange: 'columns', columnDrilldown: 'columns', lollipop: 'columns',
|
|
6
6
|
line: 'line', area: 'line', spline: 'line', areaSpline: 'line',
|
|
7
7
|
invertedArea: 'line', areaNegative: 'line', areaRange: 'line',
|
|
8
|
-
fan: 'line', bellcurve: 'line', 'master-detail': 'line',
|
|
8
|
+
fan: 'line', forecast: 'line', bellcurve: 'line', 'master-detail': 'line',
|
|
9
9
|
trendline: 'trendline', anomaly: 'anomaly',
|
|
10
10
|
pie: 'pie', donut: 'pie', variablePie: 'pie', radialBar: 'pie', gauge: 'pie', euler: 'pie',
|
|
11
11
|
scatter: 'scatter', bubble: 'scatter', dumbbell: 'scatter', boxplot: 'scatter',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
-
import NileElement from '../internal/nile-element.js';
|
|
2
|
+
import NileElement from '../internal/base/nile-element.js';
|
|
3
3
|
import type { NileChartConfig, NileChartMenuConfig } from './nile-chart-config.js';
|
|
4
4
|
import type { NileChartConfigInputType } from '../internal/types/index.js';
|
|
5
|
-
import { type ChartExtremes, type SetExtremesOptions } from '../internal/chart-runtime.js';
|
|
5
|
+
import { type ChartExtremes, type SetExtremesOptions } from '../internal/utils/chart-runtime.js';
|
|
6
6
|
import '../nile-bar-chart/index.js';
|
|
7
7
|
import '../nile-pie-chart/index.js';
|
|
8
8
|
import '../nile-trendline-chart/index.js';
|
|
@@ -148,6 +148,9 @@ export declare class NileChart extends NileElement {
|
|
|
148
148
|
* "Reset zoom" button. Reflected from the chart's `nile-master-detail-zoom`. */
|
|
149
149
|
private masterZoomed;
|
|
150
150
|
private onMasterZoom;
|
|
151
|
+
/** Reset-zoom lives in the header for every chart type that supports zoom. */
|
|
152
|
+
private get showResetZoom();
|
|
153
|
+
private resetActiveZoom;
|
|
151
154
|
private get effectiveSummary();
|
|
152
155
|
/** AI panel shows when ai.enabled is true OR when a summary is provided. */
|
|
153
156
|
private get aiEnabled();
|