@aquera/nile-visualization 2.9.28 → 2.9.30
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 +8 -0
- package/dist/src/index.d.ts +6 -1
- package/dist/src/index.js +3 -0
- package/dist/src/internal/chart-events.d.ts +92 -0
- package/dist/src/internal/chart-events.js +291 -0
- package/dist/src/internal/chart-runtime.d.ts +41 -0
- package/dist/src/internal/chart-runtime.js +30 -0
- package/dist/src/internal/highcharts-provider.js +2 -0
- package/dist/src/internal/nile-chart-base.d.ts +43 -0
- package/dist/src/internal/nile-chart-base.js +67 -0
- package/dist/src/internal/resolve-widget-kind.d.ts +10 -0
- package/dist/src/internal/resolve-widget-kind.js +16 -0
- package/dist/src/internal/responsive-defaults.d.ts +32 -0
- package/dist/src/internal/responsive-defaults.js +255 -0
- package/dist/src/internal/types/chart-forecast-config.type.d.ts +35 -0
- package/dist/src/internal/types/chart-forecast-config.type.js +2 -0
- package/dist/src/internal/types/highcharts-passthrough.type.d.ts +80 -0
- package/dist/src/internal/types/highcharts-passthrough.type.js +24 -0
- package/dist/src/internal/types/index.d.ts +3 -0
- package/dist/src/internal/types/index.js +1 -1
- package/dist/src/internal/types/primitive-chart-config.type.d.ts +2 -1
- package/dist/src/internal/types/widget-config.type.d.ts +14 -3
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +2 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +8 -1
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +1 -0
- package/dist/src/nile-area-chart/nile-area-chart.js +7 -1
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +7 -1
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.js +7 -1
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +1 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +7 -1
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +2 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.js +8 -1
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +1 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +7 -1
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +1 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +7 -1
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +1 -0
- package/dist/src/nile-bubble-chart/nile-bubble-chart.js +7 -1
- package/dist/src/nile-chart/index.d.ts +1 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +22 -83
- package/dist/src/nile-chart/nile-chart-skeleton.js +1 -1
- package/dist/src/nile-chart/nile-chart.css.js +3 -1
- package/dist/src/nile-chart/nile-chart.d.ts +68 -0
- package/dist/src/nile-chart/nile-chart.js +244 -7
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +1 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.js +7 -1
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +1 -0
- package/dist/src/nile-column-chart/nile-column-chart.js +7 -1
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +1 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +8 -1
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +7 -1
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.js +7 -1
- package/dist/src/nile-dashboard-builder/nile-dashboard-builder.css.js +24 -8
- package/dist/src/nile-dashboard-builder/nile-dashboard-builder.d.ts +111 -0
- package/dist/src/nile-dashboard-builder/nile-dashboard-builder.js +188 -6
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +1 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.js +7 -1
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +7 -1
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +7 -1
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +7 -1
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.js +7 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.js +7 -1
- package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +2 -0
- package/dist/src/nile-filter-chart/nile-filter-chart.js +14 -0
- 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 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.js +7 -1
- package/dist/src/nile-forecast-chart/index.d.ts +2 -0
- package/dist/src/nile-forecast-chart/index.js +2 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.css.d.ts +1 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.css.js +46 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.d.ts +90 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.js +551 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.js +7 -1
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +20 -0
- package/dist/src/nile-gauge-chart/nile-gauge-chart.js +80 -4
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +1 -0
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +7 -1
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +1 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.js +7 -1
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +7 -1
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +1 -0
- package/dist/src/nile-line-chart/nile-line-chart.js +7 -1
- package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -0
- package/dist/src/nile-line-column-chart/nile-line-column-chart.js +7 -1
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +7 -1
- package/dist/src/nile-map-chart/nile-map-chart.d.ts +23 -3
- package/dist/src/nile-map-chart/nile-map-chart.js +52 -12
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.css.js +13 -1
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -0
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.js +48 -4
- package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -0
- package/dist/src/nile-organization-chart/nile-organization-chart.js +7 -1
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +2 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.js +8 -1
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.js +7 -1
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +1 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.js +7 -1
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +1 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +7 -1
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +1 -0
- package/dist/src/nile-scatter-chart/nile-scatter-chart.js +7 -1
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +1 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +7 -1
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +1 -0
- package/dist/src/nile-spline-chart/nile-spline-chart.js +7 -1
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +1 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.js +7 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.js +7 -1
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +2 -0
- package/dist/src/nile-trendline-chart/nile-trendline-chart.js +8 -1
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +1 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +7 -1
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.js +7 -1
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +1 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +7 -1
- package/dist/src/nile-widget-viewer/nile-widget-viewer.js +6 -6
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +1 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.js +7 -1
- package/package.json +2 -1
|
@@ -4,6 +4,7 @@ import { html } from 'lit';
|
|
|
4
4
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
5
|
import NileElement from '../internal/nile-element.js';
|
|
6
6
|
import { deepMerge } from '../internal/utils.js';
|
|
7
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
7
8
|
import { styles } from './nile-trendline-chart.css.js';
|
|
8
9
|
let NileTrendlineChart = class NileTrendlineChart extends NileElement {
|
|
9
10
|
constructor() {
|
|
@@ -25,6 +26,8 @@ let NileTrendlineChart = class NileTrendlineChart extends NileElement {
|
|
|
25
26
|
this.forecast = null;
|
|
26
27
|
/** Deep-merge override object for full Highcharts options. */
|
|
27
28
|
this.options = {};
|
|
29
|
+
/** Opts out of the built-in responsive rules — the chart still reflows, it just keeps its full legend/axis chrome at every size. */
|
|
30
|
+
this.noResponsive = false;
|
|
28
31
|
/** Whether to show a loading indicator instead of the chart. */
|
|
29
32
|
this.loading = false;
|
|
30
33
|
/** CSS height for the chart container. */
|
|
@@ -290,7 +293,8 @@ let NileTrendlineChart = class NileTrendlineChart extends NileElement {
|
|
|
290
293
|
enabled: false,
|
|
291
294
|
},
|
|
292
295
|
};
|
|
293
|
-
|
|
296
|
+
const merged = deepMerge(defaults, this.options);
|
|
297
|
+
return withResponsiveDefaults(merged, 'trendline', this.noResponsive);
|
|
294
298
|
}
|
|
295
299
|
async initChart() {
|
|
296
300
|
if (this.loading || !this.chartContainer)
|
|
@@ -338,6 +342,9 @@ __decorate([
|
|
|
338
342
|
__decorate([
|
|
339
343
|
property({ type: Object })
|
|
340
344
|
], NileTrendlineChart.prototype, "options", void 0);
|
|
345
|
+
__decorate([
|
|
346
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
347
|
+
], NileTrendlineChart.prototype, "noResponsive", void 0);
|
|
341
348
|
__decorate([
|
|
342
349
|
property({ type: Boolean, reflect: true })
|
|
343
350
|
], NileTrendlineChart.prototype, "loading", void 0);
|
|
@@ -24,6 +24,7 @@ export declare class NileVariablePieChart extends NileElement {
|
|
|
24
24
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
25
25
|
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
26
26
|
options: Highcharts.Options;
|
|
27
|
+
noResponsive: boolean;
|
|
27
28
|
loading: boolean;
|
|
28
29
|
height: string;
|
|
29
30
|
chartBg: string;
|
|
@@ -5,6 +5,7 @@ import NileElement from '../internal/nile-element.js';
|
|
|
5
5
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
6
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-variable-pie-chart.css.js';
|
|
9
10
|
let NileVariablePieChart = class NileVariablePieChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -22,6 +23,7 @@ let NileVariablePieChart = class NileVariablePieChart extends NileElement {
|
|
|
22
23
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
23
24
|
this.legend = null;
|
|
24
25
|
this.options = {};
|
|
26
|
+
this.noResponsive = false;
|
|
25
27
|
this.loading = false;
|
|
26
28
|
this.height = '400px';
|
|
27
29
|
// ── Container styling ──
|
|
@@ -119,7 +121,7 @@ let NileVariablePieChart = class NileVariablePieChart extends NileElement {
|
|
|
119
121
|
}
|
|
120
122
|
buildOptions() {
|
|
121
123
|
const self = this;
|
|
122
|
-
|
|
124
|
+
const merged = deepMerge({
|
|
123
125
|
chart: { ...(this.height ? { height: this.height } : {}) },
|
|
124
126
|
title: { text: this.chartTitle || undefined },
|
|
125
127
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -158,6 +160,7 @@ let NileVariablePieChart = class NileVariablePieChart extends NileElement {
|
|
|
158
160
|
],
|
|
159
161
|
credits: { enabled: false },
|
|
160
162
|
}, this.options);
|
|
163
|
+
return withResponsiveDefaults(merged, 'variablePie', this.noResponsive);
|
|
161
164
|
}
|
|
162
165
|
async initChart() {
|
|
163
166
|
if (this.loading || !this.chartContainer)
|
|
@@ -211,6 +214,9 @@ __decorate([
|
|
|
211
214
|
__decorate([
|
|
212
215
|
property({ type: Object })
|
|
213
216
|
], NileVariablePieChart.prototype, "options", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
219
|
+
], NileVariablePieChart.prototype, "noResponsive", void 0);
|
|
214
220
|
__decorate([
|
|
215
221
|
property({ type: Boolean, reflect: true })
|
|
216
222
|
], NileVariablePieChart.prototype, "loading", void 0);
|
|
@@ -5,6 +5,7 @@ import NileElement from '../internal/nile-element.js';
|
|
|
5
5
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
6
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-vector-chart.css.js';
|
|
9
10
|
let NileVectorChart = class NileVectorChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -20,6 +21,7 @@ let NileVectorChart = class NileVectorChart extends NileElement {
|
|
|
20
21
|
this.xAxisTitle = '';
|
|
21
22
|
this.yAxisTitle = '';
|
|
22
23
|
this.options = {};
|
|
24
|
+
this.noResponsive = false;
|
|
23
25
|
this.loading = false;
|
|
24
26
|
this.height = '400px';
|
|
25
27
|
// ── Container styling ──
|
|
@@ -122,7 +124,7 @@ let NileVectorChart = class NileVectorChart extends NileElement {
|
|
|
122
124
|
}
|
|
123
125
|
buildOptions() {
|
|
124
126
|
const self = this;
|
|
125
|
-
|
|
127
|
+
const merged = deepMerge({
|
|
126
128
|
chart: { ...(this.height ? { height: this.height } : {}) },
|
|
127
129
|
title: { text: this.chartTitle || undefined },
|
|
128
130
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -163,6 +165,7 @@ let NileVectorChart = class NileVectorChart extends NileElement {
|
|
|
163
165
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
164
166
|
credits: { enabled: false },
|
|
165
167
|
}, this.options);
|
|
168
|
+
return withResponsiveDefaults(merged, 'vector', this.noResponsive);
|
|
166
169
|
}
|
|
167
170
|
async initChart() {
|
|
168
171
|
if (this.loading || !this.chartContainer)
|
|
@@ -213,6 +216,9 @@ __decorate([
|
|
|
213
216
|
__decorate([
|
|
214
217
|
property({ type: Object })
|
|
215
218
|
], NileVectorChart.prototype, "options", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
221
|
+
], NileVectorChart.prototype, "noResponsive", void 0);
|
|
216
222
|
__decorate([
|
|
217
223
|
property({ type: Boolean, reflect: true })
|
|
218
224
|
], NileVectorChart.prototype, "loading", void 0);
|
|
@@ -4,6 +4,7 @@ import { html } from 'lit';
|
|
|
4
4
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
5
5
|
import NileElement from '../internal/nile-element.js';
|
|
6
6
|
import { deepMerge } from '../internal/utils.js';
|
|
7
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
7
8
|
import { styles } from './nile-waterfall-chart.css.js';
|
|
8
9
|
let NileWaterfallChart = class NileWaterfallChart extends NileElement {
|
|
9
10
|
constructor() {
|
|
@@ -17,6 +18,7 @@ let NileWaterfallChart = class NileWaterfallChart extends NileElement {
|
|
|
17
18
|
this.chartSubtitle = '';
|
|
18
19
|
this.data = [];
|
|
19
20
|
this.options = {};
|
|
21
|
+
this.noResponsive = false;
|
|
20
22
|
this.loading = false;
|
|
21
23
|
this.height = '400px';
|
|
22
24
|
this.yAxisTitle = '';
|
|
@@ -148,7 +150,7 @@ let NileWaterfallChart = class NileWaterfallChart extends NileElement {
|
|
|
148
150
|
}
|
|
149
151
|
buildOptions() {
|
|
150
152
|
const self = this;
|
|
151
|
-
|
|
153
|
+
const merged = deepMerge({
|
|
152
154
|
chart: { type: 'waterfall', ...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}) },
|
|
153
155
|
title: { text: this.chartTitle || undefined },
|
|
154
156
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -185,6 +187,7 @@ let NileWaterfallChart = class NileWaterfallChart extends NileElement {
|
|
|
185
187
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
186
188
|
credits: { enabled: false },
|
|
187
189
|
}, this.options);
|
|
190
|
+
return withResponsiveDefaults(merged, 'waterfall', this.noResponsive);
|
|
188
191
|
}
|
|
189
192
|
async initChart() {
|
|
190
193
|
if (this.loading || !this.chartContainer)
|
|
@@ -223,6 +226,9 @@ __decorate([
|
|
|
223
226
|
__decorate([
|
|
224
227
|
property({ type: Object })
|
|
225
228
|
], NileWaterfallChart.prototype, "options", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
231
|
+
], NileWaterfallChart.prototype, "noResponsive", void 0);
|
|
226
232
|
__decorate([
|
|
227
233
|
property({ type: Boolean, reflect: true })
|
|
228
234
|
], NileWaterfallChart.prototype, "loading", void 0);
|
|
@@ -3,6 +3,7 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
3
3
|
import { html, nothing } from 'lit';
|
|
4
4
|
import NileElement from '../internal/nile-element.js';
|
|
5
5
|
import { styles } from './nile-widget-viewer.css.js';
|
|
6
|
+
import { resolveWidgetKind } from '../internal/resolve-widget-kind.js';
|
|
6
7
|
import '../nile-chart/index.js';
|
|
7
8
|
import '../nile-kpi-chart/index.js';
|
|
8
9
|
/**
|
|
@@ -34,14 +35,13 @@ let NileWidgetViewer = class NileWidgetViewer extends NileElement {
|
|
|
34
35
|
render() {
|
|
35
36
|
if (!this.config)
|
|
36
37
|
return nothing;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
if (this.config.type === 'kpi') {
|
|
38
|
+
// Kind comes from the explicit `type` when set, else inferred from the
|
|
39
|
+
// chart config — so hosts can omit the redundant top-level `type`.
|
|
40
|
+
if (resolveWidgetKind(this.config) === 'kpi') {
|
|
42
41
|
return html `<nile-kpi-chart fit .config=${this.config.nileConfig}></nile-kpi-chart>`;
|
|
43
42
|
}
|
|
44
|
-
|
|
43
|
+
const fitted = stripChartHeight(this.config.nileConfig);
|
|
44
|
+
return html `<nile-chart fit .config=${fitted}></nile-chart>`;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
NileWidgetViewer.styles = styles;
|
|
@@ -5,6 +5,7 @@ import NileElement from '../internal/nile-element.js';
|
|
|
5
5
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
6
6
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-xrange-chart.css.js';
|
|
9
10
|
let NileXrangeChart = class NileXrangeChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -20,6 +21,7 @@ let NileXrangeChart = class NileXrangeChart extends NileElement {
|
|
|
20
21
|
this.seriesName = '';
|
|
21
22
|
this.datetimeAxis = true;
|
|
22
23
|
this.options = {};
|
|
24
|
+
this.noResponsive = false;
|
|
23
25
|
this.loading = false;
|
|
24
26
|
this.height = '400px';
|
|
25
27
|
this.showLegend = true;
|
|
@@ -121,7 +123,7 @@ let NileXrangeChart = class NileXrangeChart extends NileElement {
|
|
|
121
123
|
}
|
|
122
124
|
buildOptions() {
|
|
123
125
|
const self = this;
|
|
124
|
-
|
|
126
|
+
const merged = deepMerge({
|
|
125
127
|
chart: { type: 'xrange', ...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}) },
|
|
126
128
|
title: { text: this.chartTitle || undefined },
|
|
127
129
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -174,6 +176,7 @@ let NileXrangeChart = class NileXrangeChart extends NileElement {
|
|
|
174
176
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
175
177
|
credits: { enabled: false },
|
|
176
178
|
}, this.options);
|
|
179
|
+
return withResponsiveDefaults(merged, 'xrange', this.noResponsive);
|
|
177
180
|
}
|
|
178
181
|
async initChart() {
|
|
179
182
|
if (this.loading || !this.chartContainer)
|
|
@@ -224,6 +227,9 @@ __decorate([
|
|
|
224
227
|
__decorate([
|
|
225
228
|
property({ type: Object })
|
|
226
229
|
], NileXrangeChart.prototype, "options", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
232
|
+
], NileXrangeChart.prototype, "noResponsive", void 0);
|
|
227
233
|
__decorate([
|
|
228
234
|
property({ type: Boolean, reflect: true })
|
|
229
235
|
], NileXrangeChart.prototype, "loading", void 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aquera/nile-visualization",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.30",
|
|
4
4
|
"description": "A visualization Library for the Nile Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aquera Inc",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"./nile-master-detail-chart": "./dist/src/nile-master-detail-chart/index.js",
|
|
24
24
|
"./nile-dumbbell-chart": "./dist/src/nile-dumbbell-chart/index.js",
|
|
25
25
|
"./nile-fan-chart": "./dist/src/nile-fan-chart/index.js",
|
|
26
|
+
"./nile-forecast-chart": "./dist/src/nile-forecast-chart/index.js",
|
|
26
27
|
"./nile-spline-chart": "./dist/src/nile-spline-chart/index.js",
|
|
27
28
|
"./nile-donut-chart": "./dist/src/nile-donut-chart/index.js",
|
|
28
29
|
"./nile-scatter-chart": "./dist/src/nile-scatter-chart/index.js",
|