@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
|
@@ -5,6 +5,7 @@ import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
|
5
5
|
import NileElement from '../internal/nile-element.js';
|
|
6
6
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-master-detail-chart.css.js';
|
|
9
10
|
export const MASTER_DETAIL_SERIES_TYPES = [
|
|
10
11
|
'area',
|
|
@@ -48,6 +49,7 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
48
49
|
this.maskFill = 'rgba(0,0,0,0.2)';
|
|
49
50
|
this.options = {};
|
|
50
51
|
this.masterOptions = {};
|
|
52
|
+
this.noResponsive = false;
|
|
51
53
|
this.loading = false;
|
|
52
54
|
this.legend = null;
|
|
53
55
|
this.chartBg = '';
|
|
@@ -277,7 +279,7 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
277
279
|
const x = p.x;
|
|
278
280
|
return x >= min && x <= max;
|
|
279
281
|
});
|
|
280
|
-
|
|
282
|
+
const merged = deepMerge({
|
|
281
283
|
chart: { type: this.detailType, reflow: true },
|
|
282
284
|
title: { text: this.detailTitle || undefined },
|
|
283
285
|
xAxis: {
|
|
@@ -311,15 +313,32 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
311
313
|
],
|
|
312
314
|
credits: { enabled: false },
|
|
313
315
|
}, this.options);
|
|
316
|
+
// Only the detail pane takes the built-in rules. The master is a fixed short
|
|
317
|
+
// strip (see the `min(…, 40%)` height in the stylesheet), so the cartesian
|
|
318
|
+
// `maxHeight` rules would strip its date axis at every size — it has its own
|
|
319
|
+
// height-aware rule in buildMasterOptions instead.
|
|
320
|
+
return withResponsiveDefaults(merged, 'master-detail', this.noResponsive);
|
|
314
321
|
}
|
|
315
322
|
buildMasterOptions() {
|
|
316
323
|
const self = this;
|
|
317
324
|
const mo = this.masterOnly;
|
|
318
|
-
|
|
325
|
+
const merged = deepMerge({
|
|
319
326
|
chart: {
|
|
320
327
|
type: this.masterType,
|
|
321
|
-
height:
|
|
322
|
-
|
|
328
|
+
// No fixed pixel height: the master container's height IS `masterHeight`
|
|
329
|
+
// (via `--nile-master-detail-master-height`), capped at a share of the
|
|
330
|
+
// stack so a short card can't let the master starve the detail pane. A
|
|
331
|
+
// hard `chart.height` here would keep rendering the old, taller SVG
|
|
332
|
+
// inside that capped box and get clipped by its `overflow: hidden`.
|
|
333
|
+
// Letting Highcharts size to the container keeps the two in step.
|
|
334
|
+
reflow: true,
|
|
335
|
+
// The master/overview pane is a short, fixed-height chart. On a short
|
|
336
|
+
// card Highcharts can't always fit its x-axis date labels ("Jan 2024")
|
|
337
|
+
// and they get clipped by the container's `overflow: hidden`. Reserve a
|
|
338
|
+
// fixed bottom band so the label row is always drawn inside the SVG.
|
|
339
|
+
// masterOnly fills the container, so its auto margins already reserve
|
|
340
|
+
// room — leave that mode untouched.
|
|
341
|
+
marginBottom: mo ? undefined : 30,
|
|
323
342
|
zoomType: 'x',
|
|
324
343
|
events: {
|
|
325
344
|
selection(event) {
|
|
@@ -344,6 +363,21 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
344
363
|
},
|
|
345
364
|
},
|
|
346
365
|
title: { text: this.masterTitle || undefined },
|
|
366
|
+
// A capped master (see the `min(…, 40%)` height in the stylesheet) can get
|
|
367
|
+
// short enough that the 30px label band above leaves almost no plot. Below
|
|
368
|
+
// that point drop the date labels and give the space back to the overview
|
|
369
|
+
// sparkline — the detail pane's own x-axis still shows the range.
|
|
370
|
+
...(mo ? {} : {
|
|
371
|
+
responsive: {
|
|
372
|
+
rules: [{
|
|
373
|
+
condition: { maxHeight: 64 },
|
|
374
|
+
chartOptions: {
|
|
375
|
+
chart: { marginBottom: 4 },
|
|
376
|
+
xAxis: { labels: { enabled: false } },
|
|
377
|
+
},
|
|
378
|
+
}],
|
|
379
|
+
},
|
|
380
|
+
}),
|
|
347
381
|
xAxis: {
|
|
348
382
|
type: this.xAxisType,
|
|
349
383
|
min: this.xAxisMin ?? undefined,
|
|
@@ -379,6 +413,13 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
379
413
|
},
|
|
380
414
|
],
|
|
381
415
|
}, this.masterOptions);
|
|
416
|
+
// The master keeps its own height-aware rule rather than the shared cartesian
|
|
417
|
+
// set, but it honors the same opt-out: `no-responsive` means no built-in
|
|
418
|
+
// adaptation anywhere on the element.
|
|
419
|
+
if (this.noResponsive || this.masterOptions['responsive'] === false) {
|
|
420
|
+
delete merged['responsive'];
|
|
421
|
+
}
|
|
422
|
+
return merged;
|
|
382
423
|
}
|
|
383
424
|
resetZoom() {
|
|
384
425
|
if (!this.masterChart)
|
|
@@ -566,6 +607,9 @@ __decorate([
|
|
|
566
607
|
__decorate([
|
|
567
608
|
property({ type: Object })
|
|
568
609
|
], NileMasterDetailChart.prototype, "masterOptions", void 0);
|
|
610
|
+
__decorate([
|
|
611
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
612
|
+
], NileMasterDetailChart.prototype, "noResponsive", void 0);
|
|
569
613
|
__decorate([
|
|
570
614
|
property({ type: Boolean, reflect: true })
|
|
571
615
|
], NileMasterDetailChart.prototype, "loading", void 0);
|
|
@@ -5,6 +5,7 @@ import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
|
5
5
|
import NileElement from '../internal/nile-element.js';
|
|
6
6
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-organization-chart.css.js';
|
|
9
10
|
let NileOrganizationChart = class NileOrganizationChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -19,6 +20,7 @@ let NileOrganizationChart = class NileOrganizationChart extends NileElement {
|
|
|
19
20
|
this.nodes = [];
|
|
20
21
|
this.links = [];
|
|
21
22
|
this.options = {};
|
|
23
|
+
this.noResponsive = false;
|
|
22
24
|
this.loading = false;
|
|
23
25
|
this.height = '480px';
|
|
24
26
|
this.seriesName = '';
|
|
@@ -142,7 +144,7 @@ let NileOrganizationChart = class NileOrganizationChart extends NileElement {
|
|
|
142
144
|
...(layout ? { layout } : {}),
|
|
143
145
|
};
|
|
144
146
|
});
|
|
145
|
-
|
|
147
|
+
const merged = deepMerge({
|
|
146
148
|
chart: {
|
|
147
149
|
...(this.height ? { height: this.height } : {}),
|
|
148
150
|
inverted: this.inverted,
|
|
@@ -188,6 +190,7 @@ let NileOrganizationChart = class NileOrganizationChart extends NileElement {
|
|
|
188
190
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
189
191
|
credits: { enabled: false },
|
|
190
192
|
}, this.options);
|
|
193
|
+
return withResponsiveDefaults(merged, 'organization', this.noResponsive);
|
|
191
194
|
}
|
|
192
195
|
async initChart() {
|
|
193
196
|
if (this.loading || !this.chartContainer)
|
|
@@ -232,6 +235,9 @@ __decorate([
|
|
|
232
235
|
__decorate([
|
|
233
236
|
property({ type: Object })
|
|
234
237
|
], NileOrganizationChart.prototype, "options", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
240
|
+
], NileOrganizationChart.prototype, "noResponsive", void 0);
|
|
235
241
|
__decorate([
|
|
236
242
|
property({ type: Boolean, reflect: true })
|
|
237
243
|
], NileOrganizationChart.prototype, "loading", void 0);
|
|
@@ -29,6 +29,8 @@ export declare class NilePieChart extends NileElement {
|
|
|
29
29
|
seriesName: string;
|
|
30
30
|
/** Deep-merge override object for full Highcharts options. */
|
|
31
31
|
options: Highcharts.Options;
|
|
32
|
+
/** Opts out of the built-in responsive rules — the chart still reflows, it just keeps its full legend/axis chrome at every size. */
|
|
33
|
+
noResponsive: boolean;
|
|
32
34
|
/** Whether to show a loading indicator instead of the chart. */
|
|
33
35
|
loading: boolean;
|
|
34
36
|
/** CSS height for the chart container. */
|
|
@@ -4,6 +4,7 @@ import { html } from 'lit';
|
|
|
4
4
|
import NileElement from '../internal/nile-element.js';
|
|
5
5
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
6
6
|
import { deepMerge } from '../internal/utils.js';
|
|
7
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
7
8
|
import { styles } from './nile-pie-chart.css.js';
|
|
8
9
|
let NilePieChart = class NilePieChart extends NileElement {
|
|
9
10
|
constructor() {
|
|
@@ -23,6 +24,8 @@ let NilePieChart = class NilePieChart extends NileElement {
|
|
|
23
24
|
this.seriesName = '';
|
|
24
25
|
/** Deep-merge override object for full Highcharts options. */
|
|
25
26
|
this.options = {};
|
|
27
|
+
/** Opts out of the built-in responsive rules — the chart still reflows, it just keeps its full legend/axis chrome at every size. */
|
|
28
|
+
this.noResponsive = false;
|
|
26
29
|
/** Whether to show a loading indicator instead of the chart. */
|
|
27
30
|
this.loading = false;
|
|
28
31
|
/** CSS height for the chart container. */
|
|
@@ -244,7 +247,8 @@ let NilePieChart = class NilePieChart extends NileElement {
|
|
|
244
247
|
enabled: false,
|
|
245
248
|
},
|
|
246
249
|
};
|
|
247
|
-
|
|
250
|
+
const merged = deepMerge(defaults, this.options);
|
|
251
|
+
return withResponsiveDefaults(merged, 'pie', this.noResponsive);
|
|
248
252
|
}
|
|
249
253
|
async initChart() {
|
|
250
254
|
if (this.loading || !this.chartContainer)
|
|
@@ -289,6 +293,9 @@ __decorate([
|
|
|
289
293
|
__decorate([
|
|
290
294
|
property({ type: Object })
|
|
291
295
|
], NilePieChart.prototype, "options", void 0);
|
|
296
|
+
__decorate([
|
|
297
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
298
|
+
], NilePieChart.prototype, "noResponsive", void 0);
|
|
292
299
|
__decorate([
|
|
293
300
|
property({ type: Boolean, reflect: true })
|
|
294
301
|
], NilePieChart.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-polygon-chart.css.js';
|
|
9
10
|
let NilePolygonChart = class NilePolygonChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -19,6 +20,7 @@ let NilePolygonChart = class NilePolygonChart extends NileElement {
|
|
|
19
20
|
this.xAxisTitle = '';
|
|
20
21
|
this.yAxisTitle = '';
|
|
21
22
|
this.options = {};
|
|
23
|
+
this.noResponsive = false;
|
|
22
24
|
this.loading = false;
|
|
23
25
|
this.height = '400px';
|
|
24
26
|
// ── Container styling ──
|
|
@@ -120,7 +122,7 @@ let NilePolygonChart = class NilePolygonChart extends NileElement {
|
|
|
120
122
|
}
|
|
121
123
|
buildOptions() {
|
|
122
124
|
const self = this;
|
|
123
|
-
|
|
125
|
+
const merged = deepMerge({
|
|
124
126
|
chart: { ...(this.height ? { height: this.height } : {}) },
|
|
125
127
|
title: { text: this.chartTitle || undefined },
|
|
126
128
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -152,6 +154,7 @@ let NilePolygonChart = class NilePolygonChart extends NileElement {
|
|
|
152
154
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
153
155
|
credits: { enabled: false },
|
|
154
156
|
}, this.options);
|
|
157
|
+
return withResponsiveDefaults(merged, 'polygon', this.noResponsive);
|
|
155
158
|
}
|
|
156
159
|
async initChart() {
|
|
157
160
|
if (this.loading || !this.chartContainer)
|
|
@@ -199,6 +202,9 @@ __decorate([
|
|
|
199
202
|
__decorate([
|
|
200
203
|
property({ type: Object })
|
|
201
204
|
], NilePolygonChart.prototype, "options", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
207
|
+
], NilePolygonChart.prototype, "noResponsive", void 0);
|
|
202
208
|
__decorate([
|
|
203
209
|
property({ type: Boolean, reflect: true })
|
|
204
210
|
], NilePolygonChart.prototype, "loading", void 0);
|
|
@@ -4,6 +4,7 @@ import { html } from 'lit';
|
|
|
4
4
|
import NileElement from '../internal/nile-element.js';
|
|
5
5
|
import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
6
6
|
import { deepMerge } from '../internal/utils.js';
|
|
7
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
7
8
|
import { styles } from './nile-radar-chart.css.js';
|
|
8
9
|
let NileRadarChart = class NileRadarChart extends NileElement {
|
|
9
10
|
constructor() {
|
|
@@ -18,6 +19,7 @@ let NileRadarChart = class NileRadarChart extends NileElement {
|
|
|
18
19
|
this.data = [];
|
|
19
20
|
this.categories = [];
|
|
20
21
|
this.options = {};
|
|
22
|
+
this.noResponsive = false;
|
|
21
23
|
this.loading = false;
|
|
22
24
|
this.height = '400px';
|
|
23
25
|
this.showArea = false;
|
|
@@ -152,7 +154,7 @@ let NileRadarChart = class NileRadarChart extends NileElement {
|
|
|
152
154
|
buildOptions() {
|
|
153
155
|
const self = this;
|
|
154
156
|
const seriesType = this.showArea ? 'area' : 'line';
|
|
155
|
-
|
|
157
|
+
const merged = deepMerge({
|
|
156
158
|
chart: { polar: true, type: seriesType, ...(this.height ? { height: this.height } : {}) },
|
|
157
159
|
title: { text: this.chartTitle || undefined },
|
|
158
160
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -185,6 +187,7 @@ let NileRadarChart = class NileRadarChart 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, 'radar', this.noResponsive);
|
|
188
191
|
}
|
|
189
192
|
async initChart() {
|
|
190
193
|
if (this.loading || !this.chartContainer)
|
|
@@ -226,6 +229,9 @@ __decorate([
|
|
|
226
229
|
__decorate([
|
|
227
230
|
property({ type: Object })
|
|
228
231
|
], NileRadarChart.prototype, "options", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
234
|
+
], NileRadarChart.prototype, "noResponsive", void 0);
|
|
229
235
|
__decorate([
|
|
230
236
|
property({ type: Boolean, reflect: true })
|
|
231
237
|
], NileRadarChart.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-radial-bar-chart.css.js';
|
|
9
10
|
let NileRadialBarChart = class NileRadialBarChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -18,6 +19,7 @@ let NileRadialBarChart = class NileRadialBarChart extends NileElement {
|
|
|
18
19
|
this.data = [];
|
|
19
20
|
this.categories = [];
|
|
20
21
|
this.options = {};
|
|
22
|
+
this.noResponsive = false;
|
|
21
23
|
this.loading = false;
|
|
22
24
|
this.height = '400px';
|
|
23
25
|
this.yAxisTitle = '';
|
|
@@ -123,7 +125,7 @@ let NileRadialBarChart = class NileRadialBarChart extends NileElement {
|
|
|
123
125
|
}
|
|
124
126
|
buildOptions() {
|
|
125
127
|
const self = this;
|
|
126
|
-
|
|
128
|
+
const merged = deepMerge({
|
|
127
129
|
chart: { polar: true, type: 'column', ...(this.height ? { height: this.height } : {}) },
|
|
128
130
|
title: { text: this.chartTitle || undefined },
|
|
129
131
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -169,6 +171,7 @@ let NileRadialBarChart = class NileRadialBarChart extends NileElement {
|
|
|
169
171
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
170
172
|
credits: { enabled: false },
|
|
171
173
|
}, this.options);
|
|
174
|
+
return withResponsiveDefaults(merged, 'radialBar', this.noResponsive);
|
|
172
175
|
}
|
|
173
176
|
async initChart() {
|
|
174
177
|
if (this.loading || !this.chartContainer)
|
|
@@ -213,6 +216,9 @@ __decorate([
|
|
|
213
216
|
__decorate([
|
|
214
217
|
property({ type: Object })
|
|
215
218
|
], NileRadialBarChart.prototype, "options", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
221
|
+
], NileRadialBarChart.prototype, "noResponsive", void 0);
|
|
216
222
|
__decorate([
|
|
217
223
|
property({ type: Boolean, reflect: true })
|
|
218
224
|
], NileRadialBarChart.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-scatter-chart.css.js';
|
|
8
9
|
let NileScatterChart = class NileScatterChart extends NileElement {
|
|
9
10
|
constructor() {
|
|
@@ -17,6 +18,7 @@ let NileScatterChart = class NileScatterChart 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.xAxisTitle = '';
|
|
@@ -151,7 +153,7 @@ let NileScatterChart = class NileScatterChart extends NileElement {
|
|
|
151
153
|
}
|
|
152
154
|
buildOptions() {
|
|
153
155
|
const self = this;
|
|
154
|
-
|
|
156
|
+
const merged = deepMerge({
|
|
155
157
|
chart: { type: 'scatter', ...(this.height ? { height: this.height } : {}), zoomType: 'xy' },
|
|
156
158
|
title: { text: this.chartTitle || undefined },
|
|
157
159
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -172,6 +174,7 @@ let NileScatterChart = class NileScatterChart extends NileElement {
|
|
|
172
174
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
173
175
|
credits: { enabled: false },
|
|
174
176
|
}, this.options);
|
|
177
|
+
return withResponsiveDefaults(merged, 'scatter', this.noResponsive);
|
|
175
178
|
}
|
|
176
179
|
async initChart() {
|
|
177
180
|
if (this.loading || !this.chartContainer)
|
|
@@ -210,6 +213,9 @@ __decorate([
|
|
|
210
213
|
__decorate([
|
|
211
214
|
property({ type: Object })
|
|
212
215
|
], NileScatterChart.prototype, "options", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
218
|
+
], NileScatterChart.prototype, "noResponsive", void 0);
|
|
213
219
|
__decorate([
|
|
214
220
|
property({ type: Boolean, reflect: true })
|
|
215
221
|
], NileScatterChart.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-spiderweb-chart.css.js';
|
|
9
10
|
/**
|
|
10
11
|
* Polar “spider web” chart (polygon grid). Same data shape as {@link NileRadarChart};
|
|
@@ -23,6 +24,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
|
|
|
23
24
|
this.data = [];
|
|
24
25
|
this.categories = [];
|
|
25
26
|
this.options = {};
|
|
27
|
+
this.noResponsive = false;
|
|
26
28
|
this.loading = false;
|
|
27
29
|
this.height = '400px';
|
|
28
30
|
this.showArea = false;
|
|
@@ -128,7 +130,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
|
|
|
128
130
|
buildOptions() {
|
|
129
131
|
const self = this;
|
|
130
132
|
const seriesType = this.showArea ? 'area' : 'line';
|
|
131
|
-
|
|
133
|
+
const merged = deepMerge({
|
|
132
134
|
chart: { polar: true, type: seriesType, ...(this.height ? { height: this.height } : {}) },
|
|
133
135
|
title: { text: this.chartTitle || undefined },
|
|
134
136
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -175,6 +177,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
|
|
|
175
177
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
176
178
|
credits: { enabled: false },
|
|
177
179
|
}, this.options);
|
|
180
|
+
return withResponsiveDefaults(merged, 'spiderweb', this.noResponsive);
|
|
178
181
|
}
|
|
179
182
|
async initChart() {
|
|
180
183
|
if (this.loading || !this.chartContainer)
|
|
@@ -219,6 +222,9 @@ __decorate([
|
|
|
219
222
|
__decorate([
|
|
220
223
|
property({ type: Object })
|
|
221
224
|
], NileSpiderwebChart.prototype, "options", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
227
|
+
], NileSpiderwebChart.prototype, "noResponsive", void 0);
|
|
222
228
|
__decorate([
|
|
223
229
|
property({ type: Boolean, reflect: true })
|
|
224
230
|
], NileSpiderwebChart.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-spline-chart.css.js';
|
|
8
9
|
let NileSplineChart = class NileSplineChart extends NileElement {
|
|
9
10
|
constructor() {
|
|
@@ -18,6 +19,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
|
|
|
18
19
|
this.data = [];
|
|
19
20
|
this.categories = [];
|
|
20
21
|
this.options = {};
|
|
22
|
+
this.noResponsive = false;
|
|
21
23
|
this.loading = false;
|
|
22
24
|
this.height = '400px';
|
|
23
25
|
this.yAxisTitle = '';
|
|
@@ -151,7 +153,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
|
|
|
151
153
|
}
|
|
152
154
|
buildOptions() {
|
|
153
155
|
const self = this;
|
|
154
|
-
|
|
156
|
+
const merged = deepMerge({
|
|
155
157
|
chart: { type: 'spline', ...(this.height ? { height: this.height } : {}) },
|
|
156
158
|
title: { text: this.chartTitle || undefined },
|
|
157
159
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -166,6 +168,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
|
|
|
166
168
|
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
167
169
|
credits: { enabled: false },
|
|
168
170
|
}, this.options);
|
|
171
|
+
return withResponsiveDefaults(merged, 'spline', this.noResponsive);
|
|
169
172
|
}
|
|
170
173
|
async initChart() {
|
|
171
174
|
if (this.loading || !this.chartContainer)
|
|
@@ -207,6 +210,9 @@ __decorate([
|
|
|
207
210
|
__decorate([
|
|
208
211
|
property({ type: Object })
|
|
209
212
|
], NileSplineChart.prototype, "options", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
215
|
+
], NileSplineChart.prototype, "noResponsive", void 0);
|
|
210
216
|
__decorate([
|
|
211
217
|
property({ type: Boolean, reflect: true })
|
|
212
218
|
], NileSplineChart.prototype, "loading", void 0);
|
|
@@ -5,6 +5,7 @@ import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
|
5
5
|
import NileElement from '../internal/nile-element.js';
|
|
6
6
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-stacked-chart.css.js';
|
|
9
10
|
let NileStackedChart = class NileStackedChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -19,6 +20,7 @@ let NileStackedChart = class NileStackedChart extends NileElement {
|
|
|
19
20
|
this.data = [];
|
|
20
21
|
this.categories = [];
|
|
21
22
|
this.options = {};
|
|
23
|
+
this.noResponsive = false;
|
|
22
24
|
this.loading = false;
|
|
23
25
|
this.height = '400px';
|
|
24
26
|
this.yAxisTitle = '';
|
|
@@ -143,7 +145,7 @@ let NileStackedChart = class NileStackedChart extends NileElement {
|
|
|
143
145
|
min: 0,
|
|
144
146
|
title: { text: this.yAxisTitle || undefined },
|
|
145
147
|
};
|
|
146
|
-
|
|
148
|
+
const merged = deepMerge({
|
|
147
149
|
chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
|
|
148
150
|
title: { text: this.chartTitle || undefined },
|
|
149
151
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
@@ -188,6 +190,7 @@ let NileStackedChart = class NileStackedChart extends NileElement {
|
|
|
188
190
|
})),
|
|
189
191
|
credits: { enabled: false },
|
|
190
192
|
}, this.options);
|
|
193
|
+
return withResponsiveDefaults(merged, 'stacked', this.noResponsive);
|
|
191
194
|
}
|
|
192
195
|
async initChart() {
|
|
193
196
|
if (this.loading || !this.chartContainer)
|
|
@@ -232,6 +235,9 @@ __decorate([
|
|
|
232
235
|
__decorate([
|
|
233
236
|
property({ type: Object })
|
|
234
237
|
], NileStackedChart.prototype, "options", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
240
|
+
], NileStackedChart.prototype, "noResponsive", void 0);
|
|
235
241
|
__decorate([
|
|
236
242
|
property({ type: Boolean, reflect: true })
|
|
237
243
|
], NileStackedChart.prototype, "loading", void 0);
|
|
@@ -5,6 +5,7 @@ import { getHighcharts } from '../internal/highcharts-provider.js';
|
|
|
5
5
|
import NileElement from '../internal/nile-element.js';
|
|
6
6
|
import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
|
|
7
7
|
import { deepMerge } from '../internal/utils.js';
|
|
8
|
+
import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
|
|
8
9
|
import { styles } from './nile-timeline-chart.css.js';
|
|
9
10
|
let NileTimelineChart = class NileTimelineChart extends NileElement {
|
|
10
11
|
constructor() {
|
|
@@ -18,6 +19,7 @@ let NileTimelineChart = class NileTimelineChart extends NileElement {
|
|
|
18
19
|
this.chartSubtitle = '';
|
|
19
20
|
this.data = [];
|
|
20
21
|
this.options = {};
|
|
22
|
+
this.noResponsive = false;
|
|
21
23
|
this.loading = false;
|
|
22
24
|
this.height = '420px';
|
|
23
25
|
this.seriesName = '';
|
|
@@ -150,7 +152,7 @@ let NileTimelineChart = class NileTimelineChart extends NileElement {
|
|
|
150
152
|
const dlFormat = this.datetimeAxis
|
|
151
153
|
? '<span style="font-weight:600;color:#334155">{point.x:%e %b %Y}</span><br/>{point.label}'
|
|
152
154
|
: '<span style="font-weight:600;color:#334155">{point.name}</span><br/>{point.label}';
|
|
153
|
-
|
|
155
|
+
const merged = deepMerge({
|
|
154
156
|
chart: {
|
|
155
157
|
type: 'timeline',
|
|
156
158
|
...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}),
|
|
@@ -211,6 +213,7 @@ let NileTimelineChart = class NileTimelineChart extends NileElement {
|
|
|
211
213
|
],
|
|
212
214
|
credits: { enabled: false },
|
|
213
215
|
}, this.options);
|
|
216
|
+
return withResponsiveDefaults(merged, 'timeline', this.noResponsive);
|
|
214
217
|
}
|
|
215
218
|
async initChart() {
|
|
216
219
|
if (this.loading || !this.chartContainer)
|
|
@@ -252,6 +255,9 @@ __decorate([
|
|
|
252
255
|
__decorate([
|
|
253
256
|
property({ type: Object })
|
|
254
257
|
], NileTimelineChart.prototype, "options", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
property({ type: Boolean, attribute: 'no-responsive' })
|
|
260
|
+
], NileTimelineChart.prototype, "noResponsive", void 0);
|
|
255
261
|
__decorate([
|
|
256
262
|
property({ type: Boolean, reflect: true })
|
|
257
263
|
], NileTimelineChart.prototype, "loading", void 0);
|
|
@@ -36,6 +36,8 @@ export declare class NileTrendlineChart extends NileElement {
|
|
|
36
36
|
forecast: ForecastConfig | null;
|
|
37
37
|
/** Deep-merge override object for full Highcharts options. */
|
|
38
38
|
options: Highcharts.Options;
|
|
39
|
+
/** Opts out of the built-in responsive rules — the chart still reflows, it just keeps its full legend/axis chrome at every size. */
|
|
40
|
+
noResponsive: boolean;
|
|
39
41
|
/** Whether to show a loading indicator instead of the chart. */
|
|
40
42
|
loading: boolean;
|
|
41
43
|
/** CSS height for the chart container. */
|