@aquera/nile-visualization 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/internal/types/chart-anomaly-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-area-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-area-negative-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-area-range-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-area-spline-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-bar-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-bellcurve-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-boxplot-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-bubble-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-cluster-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-column-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-column-drilldown-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-column-pyramid-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-column-range-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-donut-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-dumbbell-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-euler-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-fan-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-flame-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-funnel-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-gauge-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-heatmap-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-histogram-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-line-column-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-line-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-lollipop-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-map-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-organization-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-pie-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-polygon-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-radar-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-radial-bar-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-scatter-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-spiderweb-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-spline-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-stacked-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-timeline-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-trendline-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-variable-pie-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-vector-config.type.d.ts +11 -0
- package/dist/src/internal/types/chart-waterfall-config.type.d.ts +12 -0
- package/dist/src/internal/types/chart-xrange-config.type.d.ts +12 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.css.js +20 -4
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +12 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +95 -1
- package/dist/src/nile-area-chart/nile-area-chart.css.js +20 -4
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +13 -0
- package/dist/src/nile-area-chart/nile-area-chart.js +107 -3
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.css.js +20 -4
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +12 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +73 -1
- package/dist/src/nile-area-range-chart/nile-area-range-chart.css.js +20 -4
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +12 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.js +73 -1
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.css.js +20 -4
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +12 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +73 -1
- package/dist/src/nile-bar-chart/nile-bar-chart.css.js +20 -4
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +14 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.js +104 -1
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.css.js +20 -4
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +12 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +73 -1
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.css.js +20 -4
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +12 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +73 -1
- package/dist/src/nile-bubble-chart/nile-bubble-chart.css.js +20 -4
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +13 -0
- package/dist/src/nile-bubble-chart/nile-bubble-chart.js +107 -3
- package/dist/src/nile-chart/nile-chart-config.d.ts +331 -38
- package/dist/src/nile-chart/nile-chart.css.js +1 -1
- package/dist/src/nile-chart/nile-chart.d.ts +0 -3
- package/dist/src/nile-chart/nile-chart.js +546 -2
- package/dist/src/nile-cluster-chart/nile-cluster-chart.css.js +20 -4
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +12 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.js +73 -1
- package/dist/src/nile-column-chart/nile-column-chart.css.js +20 -4
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +13 -0
- package/dist/src/nile-column-chart/nile-column-chart.js +107 -3
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.css.js +20 -4
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +12 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +73 -1
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.css.js +20 -4
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +12 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +73 -1
- package/dist/src/nile-column-range-chart/nile-column-range-chart.css.js +20 -4
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +12 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.js +73 -1
- package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.css.js +10 -0
- package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.d.ts +10 -14
- package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.js +36 -14
- package/dist/src/nile-donut-chart/nile-donut-chart.css.js +20 -4
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +12 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.js +99 -2
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.css.js +20 -4
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +12 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +73 -1
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.css.js +20 -4
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +12 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +73 -1
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.css.js +20 -4
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +12 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +73 -1
- package/dist/src/nile-euler-chart/nile-euler-chart.css.js +20 -4
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +12 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.js +73 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.css.js +20 -4
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +12 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.js +73 -1
- package/dist/src/nile-flame-chart/nile-flame-chart.css.js +20 -4
- package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +12 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.js +73 -1
- package/dist/src/nile-funnel-chart/nile-funnel-chart.css.js +20 -4
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +12 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.js +73 -1
- package/dist/src/nile-gauge-chart/nile-gauge-chart.css.js +20 -4
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +12 -0
- package/dist/src/nile-gauge-chart/nile-gauge-chart.js +95 -2
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.css.js +20 -4
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +13 -0
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +79 -2
- package/dist/src/nile-histogram-chart/nile-histogram-chart.css.js +20 -4
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +12 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.js +73 -1
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.css.js +20 -4
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +12 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +73 -1
- package/dist/src/nile-kpi-chart/nile-kpi-chart.css.d.ts +1 -1
- package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +54 -33
- package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +121 -1
- package/dist/src/nile-kpi-chart/nile-kpi-chart.js +366 -52
- package/dist/src/nile-line-chart/nile-line-chart.css.js +20 -4
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +13 -0
- package/dist/src/nile-line-chart/nile-line-chart.js +103 -3
- package/dist/src/nile-line-column-chart/nile-line-column-chart.css.js +20 -4
- package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +12 -0
- package/dist/src/nile-line-column-chart/nile-line-column-chart.js +73 -1
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.css.js +20 -4
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +12 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +73 -1
- package/dist/src/nile-map-chart/nile-map-chart.css.js +20 -4
- package/dist/src/nile-map-chart/nile-map-chart.d.ts +12 -0
- package/dist/src/nile-map-chart/nile-map-chart.js +95 -1
- package/dist/src/nile-organization-chart/nile-organization-chart.css.js +20 -4
- package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +12 -0
- package/dist/src/nile-organization-chart/nile-organization-chart.js +73 -1
- package/dist/src/nile-pie-chart/nile-pie-chart.css.js +20 -4
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +12 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.js +95 -1
- package/dist/src/nile-polygon-chart/nile-polygon-chart.css.js +20 -4
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +12 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.js +73 -1
- package/dist/src/nile-radar-chart/nile-radar-chart.css.js +20 -4
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +13 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.js +103 -3
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.css.js +20 -4
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +13 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +79 -1
- package/dist/src/nile-scatter-chart/nile-scatter-chart.css.js +20 -4
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +13 -0
- package/dist/src/nile-scatter-chart/nile-scatter-chart.js +103 -3
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.css.js +20 -4
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +13 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +79 -1
- package/dist/src/nile-spline-chart/nile-spline-chart.css.js +20 -4
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +13 -0
- package/dist/src/nile-spline-chart/nile-spline-chart.js +103 -3
- package/dist/src/nile-stacked-chart/nile-stacked-chart.css.js +20 -4
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +12 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.js +73 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.css.js +20 -4
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +13 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.js +73 -1
- package/dist/src/nile-trendline-chart/nile-trendline-chart.css.js +20 -4
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +12 -0
- package/dist/src/nile-trendline-chart/nile-trendline-chart.js +95 -1
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.css.js +20 -4
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +12 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +73 -1
- package/dist/src/nile-vector-chart/nile-vector-chart.css.js +20 -4
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +12 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.js +73 -1
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.css.js +20 -4
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +13 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +103 -4
- package/dist/src/nile-xrange-chart/nile-xrange-chart.css.js +20 -4
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +13 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.js +79 -1
- package/package.json +1 -1
|
@@ -33,6 +33,40 @@ let NileBellcurveChart = class NileBellcurveChart extends NileElement {
|
|
|
33
33
|
/** Samples per interval; higher values yield a smoother curve. */
|
|
34
34
|
this.pointsInInterval = 40;
|
|
35
35
|
this.showLegend = true;
|
|
36
|
+
// ── Container styling ──
|
|
37
|
+
this.chartBg = '';
|
|
38
|
+
this.chartBorderRadius = '';
|
|
39
|
+
this.chartBorder = '';
|
|
40
|
+
this.chartShadow = '';
|
|
41
|
+
this.chartPadding = '';
|
|
42
|
+
this.chartMinHeight = '';
|
|
43
|
+
// ── Loading ──
|
|
44
|
+
this.loadingText = 'Loading...';
|
|
45
|
+
this.loadingColor = '';
|
|
46
|
+
this.loadingFontSize = '';
|
|
47
|
+
this.loadingFontFamily = '';
|
|
48
|
+
this.loadingBg = '';
|
|
49
|
+
}
|
|
50
|
+
_syncCssVars() {
|
|
51
|
+
const set = (prop, val) => {
|
|
52
|
+
const s = typeof val === 'number'
|
|
53
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
54
|
+
: String(val ?? '').trim();
|
|
55
|
+
if (s)
|
|
56
|
+
this.style.setProperty(prop, s);
|
|
57
|
+
else
|
|
58
|
+
this.style.removeProperty(prop);
|
|
59
|
+
};
|
|
60
|
+
set('--nile-chart-bg', this.chartBg);
|
|
61
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
62
|
+
set('--nile-chart-border', this.chartBorder);
|
|
63
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
64
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
65
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
66
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
67
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
68
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
69
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
36
70
|
}
|
|
37
71
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
38
72
|
applyConfig(cfg) {
|
|
@@ -50,6 +84,7 @@ let NileBellcurveChart = class NileBellcurveChart extends NileElement {
|
|
|
50
84
|
this.resizeObserver = null;
|
|
51
85
|
}
|
|
52
86
|
firstUpdated() {
|
|
87
|
+
this._syncCssVars();
|
|
53
88
|
this.initChart();
|
|
54
89
|
this.setupResizeObserver();
|
|
55
90
|
}
|
|
@@ -58,6 +93,10 @@ let NileBellcurveChart = class NileBellcurveChart extends NileElement {
|
|
|
58
93
|
this.applyConfig(this.config);
|
|
59
94
|
return;
|
|
60
95
|
}
|
|
96
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
97
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
98
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
99
|
+
this._syncCssVars();
|
|
61
100
|
const props = [
|
|
62
101
|
'data',
|
|
63
102
|
'chartTitle',
|
|
@@ -196,7 +235,7 @@ let NileBellcurveChart = class NileBellcurveChart extends NileElement {
|
|
|
196
235
|
}
|
|
197
236
|
render() {
|
|
198
237
|
if (this.loading) {
|
|
199
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
238
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
200
239
|
}
|
|
201
240
|
return html `<div class="chart-container"></div>`;
|
|
202
241
|
}
|
|
@@ -253,6 +292,39 @@ __decorate([
|
|
|
253
292
|
__decorate([
|
|
254
293
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
255
294
|
], NileBellcurveChart.prototype, "showLegend", void 0);
|
|
295
|
+
__decorate([
|
|
296
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
297
|
+
], NileBellcurveChart.prototype, "chartBg", void 0);
|
|
298
|
+
__decorate([
|
|
299
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
300
|
+
], NileBellcurveChart.prototype, "chartBorderRadius", void 0);
|
|
301
|
+
__decorate([
|
|
302
|
+
property({ type: String, attribute: 'chart-border' })
|
|
303
|
+
], NileBellcurveChart.prototype, "chartBorder", void 0);
|
|
304
|
+
__decorate([
|
|
305
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
306
|
+
], NileBellcurveChart.prototype, "chartShadow", void 0);
|
|
307
|
+
__decorate([
|
|
308
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
309
|
+
], NileBellcurveChart.prototype, "chartPadding", void 0);
|
|
310
|
+
__decorate([
|
|
311
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
312
|
+
], NileBellcurveChart.prototype, "chartMinHeight", void 0);
|
|
313
|
+
__decorate([
|
|
314
|
+
property({ type: String, attribute: 'loading-text' })
|
|
315
|
+
], NileBellcurveChart.prototype, "loadingText", void 0);
|
|
316
|
+
__decorate([
|
|
317
|
+
property({ type: String, attribute: 'loading-color' })
|
|
318
|
+
], NileBellcurveChart.prototype, "loadingColor", void 0);
|
|
319
|
+
__decorate([
|
|
320
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
321
|
+
], NileBellcurveChart.prototype, "loadingFontSize", void 0);
|
|
322
|
+
__decorate([
|
|
323
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
324
|
+
], NileBellcurveChart.prototype, "loadingFontFamily", void 0);
|
|
325
|
+
__decorate([
|
|
326
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
327
|
+
], NileBellcurveChart.prototype, "loadingBg", void 0);
|
|
256
328
|
NileBellcurveChart = __decorate([
|
|
257
329
|
customElement('nile-bellcurve-chart')
|
|
258
330
|
], NileBellcurveChart);
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
export const styles = css `
|
|
3
3
|
:host {
|
|
4
|
+
--nile-chart-min-height: var(--nile-height-200px, var(--ng-height-200px));
|
|
5
|
+
--nile-chart-bg: transparent;
|
|
6
|
+
--nile-chart-border-radius: 0;
|
|
7
|
+
--nile-chart-border: none;
|
|
8
|
+
--nile-chart-shadow: none;
|
|
9
|
+
--nile-chart-padding: 0;
|
|
10
|
+
--nile-chart-loading-color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
|
|
11
|
+
--nile-chart-loading-font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
12
|
+
--nile-chart-loading-font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
13
|
+
--nile-chart-loading-bg: transparent;
|
|
4
14
|
display: block;
|
|
5
15
|
width: 100%;
|
|
6
16
|
position: relative;
|
|
@@ -12,7 +22,12 @@ export const styles = css `
|
|
|
12
22
|
|
|
13
23
|
.chart-container {
|
|
14
24
|
width: 100%;
|
|
15
|
-
min-height: var(--nile-
|
|
25
|
+
min-height: var(--nile-chart-min-height);
|
|
26
|
+
background: var(--nile-chart-bg);
|
|
27
|
+
border-radius: var(--nile-chart-border-radius);
|
|
28
|
+
border: var(--nile-chart-border);
|
|
29
|
+
box-shadow: var(--nile-chart-shadow);
|
|
30
|
+
padding: var(--nile-chart-padding);
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
.chart-loading {
|
|
@@ -20,9 +35,10 @@ export const styles = css `
|
|
|
20
35
|
align-items: center;
|
|
21
36
|
justify-content: center;
|
|
22
37
|
min-height: inherit;
|
|
23
|
-
color: var(--nile-
|
|
24
|
-
font-family: var(--nile-
|
|
25
|
-
font-size: var(--nile-
|
|
38
|
+
color: var(--nile-chart-loading-color);
|
|
39
|
+
font-family: var(--nile-chart-loading-font-family);
|
|
40
|
+
font-size: var(--nile-chart-loading-font-size);
|
|
41
|
+
background: var(--nile-chart-loading-bg);
|
|
26
42
|
}
|
|
27
43
|
`;
|
|
28
44
|
//# sourceMappingURL=nile-boxplot-chart.css.js.map
|
|
@@ -38,6 +38,18 @@ export declare class NileBoxplotChart extends NileElement {
|
|
|
38
38
|
showLegend: boolean;
|
|
39
39
|
/** When true, draws horizontal boxes (categories on the y-axis). */
|
|
40
40
|
horizontal: boolean;
|
|
41
|
+
chartBg: string;
|
|
42
|
+
chartBorderRadius: string | number;
|
|
43
|
+
chartBorder: string;
|
|
44
|
+
chartShadow: string;
|
|
45
|
+
chartPadding: string | number;
|
|
46
|
+
chartMinHeight: string | number;
|
|
47
|
+
loadingText: string;
|
|
48
|
+
loadingColor: string;
|
|
49
|
+
loadingFontSize: string | number;
|
|
50
|
+
loadingFontFamily: string;
|
|
51
|
+
loadingBg: string;
|
|
52
|
+
private _syncCssVars;
|
|
41
53
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
42
54
|
private applyConfig;
|
|
43
55
|
connectedCallback(): void;
|
|
@@ -26,6 +26,40 @@ let NileBoxplotChart = class NileBoxplotChart extends NileElement {
|
|
|
26
26
|
this.showLegend = true;
|
|
27
27
|
/** When true, draws horizontal boxes (categories on the y-axis). */
|
|
28
28
|
this.horizontal = false;
|
|
29
|
+
// ── Container styling ──
|
|
30
|
+
this.chartBg = '';
|
|
31
|
+
this.chartBorderRadius = '';
|
|
32
|
+
this.chartBorder = '';
|
|
33
|
+
this.chartShadow = '';
|
|
34
|
+
this.chartPadding = '';
|
|
35
|
+
this.chartMinHeight = '';
|
|
36
|
+
// ── Loading ──
|
|
37
|
+
this.loadingText = 'Loading...';
|
|
38
|
+
this.loadingColor = '';
|
|
39
|
+
this.loadingFontSize = '';
|
|
40
|
+
this.loadingFontFamily = '';
|
|
41
|
+
this.loadingBg = '';
|
|
42
|
+
}
|
|
43
|
+
_syncCssVars() {
|
|
44
|
+
const set = (prop, val) => {
|
|
45
|
+
const s = typeof val === 'number'
|
|
46
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
47
|
+
: String(val ?? '').trim();
|
|
48
|
+
if (s)
|
|
49
|
+
this.style.setProperty(prop, s);
|
|
50
|
+
else
|
|
51
|
+
this.style.removeProperty(prop);
|
|
52
|
+
};
|
|
53
|
+
set('--nile-chart-bg', this.chartBg);
|
|
54
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
55
|
+
set('--nile-chart-border', this.chartBorder);
|
|
56
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
57
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
58
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
59
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
60
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
61
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
62
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
29
63
|
}
|
|
30
64
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
31
65
|
applyConfig(cfg) {
|
|
@@ -43,6 +77,7 @@ let NileBoxplotChart = class NileBoxplotChart extends NileElement {
|
|
|
43
77
|
this.resizeObserver = null;
|
|
44
78
|
}
|
|
45
79
|
firstUpdated() {
|
|
80
|
+
this._syncCssVars();
|
|
46
81
|
this.initChart();
|
|
47
82
|
this.setupResizeObserver();
|
|
48
83
|
}
|
|
@@ -51,6 +86,10 @@ let NileBoxplotChart = class NileBoxplotChart extends NileElement {
|
|
|
51
86
|
this.applyConfig(this.config);
|
|
52
87
|
return;
|
|
53
88
|
}
|
|
89
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
90
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
91
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
92
|
+
this._syncCssVars();
|
|
54
93
|
const props = [
|
|
55
94
|
'data',
|
|
56
95
|
'categories',
|
|
@@ -183,7 +222,7 @@ let NileBoxplotChart = class NileBoxplotChart extends NileElement {
|
|
|
183
222
|
}
|
|
184
223
|
render() {
|
|
185
224
|
if (this.loading) {
|
|
186
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
225
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
187
226
|
}
|
|
188
227
|
return html `<div class="chart-container"></div>`;
|
|
189
228
|
}
|
|
@@ -228,6 +267,39 @@ __decorate([
|
|
|
228
267
|
__decorate([
|
|
229
268
|
property({ type: Boolean, reflect: true, attribute: 'horizontal' })
|
|
230
269
|
], NileBoxplotChart.prototype, "horizontal", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
272
|
+
], NileBoxplotChart.prototype, "chartBg", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
275
|
+
], NileBoxplotChart.prototype, "chartBorderRadius", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
property({ type: String, attribute: 'chart-border' })
|
|
278
|
+
], NileBoxplotChart.prototype, "chartBorder", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
281
|
+
], NileBoxplotChart.prototype, "chartShadow", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
284
|
+
], NileBoxplotChart.prototype, "chartPadding", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
287
|
+
], NileBoxplotChart.prototype, "chartMinHeight", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property({ type: String, attribute: 'loading-text' })
|
|
290
|
+
], NileBoxplotChart.prototype, "loadingText", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
property({ type: String, attribute: 'loading-color' })
|
|
293
|
+
], NileBoxplotChart.prototype, "loadingColor", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
296
|
+
], NileBoxplotChart.prototype, "loadingFontSize", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
299
|
+
], NileBoxplotChart.prototype, "loadingFontFamily", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
302
|
+
], NileBoxplotChart.prototype, "loadingBg", void 0);
|
|
231
303
|
NileBoxplotChart = __decorate([
|
|
232
304
|
customElement('nile-boxplot-chart')
|
|
233
305
|
], NileBoxplotChart);
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
export const styles = css `
|
|
3
3
|
:host {
|
|
4
|
+
--nile-chart-min-height: var(--nile-height-200px, var(--ng-height-200px));
|
|
5
|
+
--nile-chart-bg: transparent;
|
|
6
|
+
--nile-chart-border-radius: 0;
|
|
7
|
+
--nile-chart-border: none;
|
|
8
|
+
--nile-chart-shadow: none;
|
|
9
|
+
--nile-chart-padding: 0;
|
|
10
|
+
--nile-chart-loading-color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
|
|
11
|
+
--nile-chart-loading-font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
12
|
+
--nile-chart-loading-font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
13
|
+
--nile-chart-loading-bg: transparent;
|
|
4
14
|
display: block;
|
|
5
15
|
width: 100%;
|
|
6
16
|
position: relative;
|
|
@@ -12,7 +22,12 @@ export const styles = css `
|
|
|
12
22
|
|
|
13
23
|
.chart-container {
|
|
14
24
|
width: 100%;
|
|
15
|
-
min-height: var(--nile-
|
|
25
|
+
min-height: var(--nile-chart-min-height);
|
|
26
|
+
background: var(--nile-chart-bg);
|
|
27
|
+
border-radius: var(--nile-chart-border-radius);
|
|
28
|
+
border: var(--nile-chart-border);
|
|
29
|
+
box-shadow: var(--nile-chart-shadow);
|
|
30
|
+
padding: var(--nile-chart-padding);
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
.chart-loading {
|
|
@@ -20,9 +35,10 @@ export const styles = css `
|
|
|
20
35
|
align-items: center;
|
|
21
36
|
justify-content: center;
|
|
22
37
|
min-height: inherit;
|
|
23
|
-
color: var(--nile-
|
|
24
|
-
font-family: var(--nile-
|
|
25
|
-
font-size: var(--nile-
|
|
38
|
+
color: var(--nile-chart-loading-color);
|
|
39
|
+
font-family: var(--nile-chart-loading-font-family);
|
|
40
|
+
font-size: var(--nile-chart-loading-font-size);
|
|
41
|
+
background: var(--nile-chart-loading-bg);
|
|
26
42
|
}
|
|
27
43
|
`;
|
|
28
44
|
//# sourceMappingURL=nile-bubble-chart.css.js.map
|
|
@@ -23,6 +23,19 @@ export declare class NileBubbleChart extends NileElement {
|
|
|
23
23
|
height: string;
|
|
24
24
|
xAxisTitle: string;
|
|
25
25
|
yAxisTitle: string;
|
|
26
|
+
showLegend: boolean;
|
|
27
|
+
chartBg: string;
|
|
28
|
+
chartBorderRadius: string | number;
|
|
29
|
+
chartBorder: string;
|
|
30
|
+
chartShadow: string;
|
|
31
|
+
chartPadding: string | number;
|
|
32
|
+
chartMinHeight: string | number;
|
|
33
|
+
loadingText: string;
|
|
34
|
+
loadingColor: string;
|
|
35
|
+
loadingFontSize: string | number;
|
|
36
|
+
loadingFontFamily: string;
|
|
37
|
+
loadingBg: string;
|
|
38
|
+
private _syncCssVars;
|
|
26
39
|
/** Apply { chart, aq } config to individual properties. */
|
|
27
40
|
private applyConfig;
|
|
28
41
|
connectedCallback(): void;
|
|
@@ -21,6 +21,41 @@ let NileBubbleChart = class NileBubbleChart extends NileElement {
|
|
|
21
21
|
this.height = '400px';
|
|
22
22
|
this.xAxisTitle = '';
|
|
23
23
|
this.yAxisTitle = '';
|
|
24
|
+
this.showLegend = true;
|
|
25
|
+
// ── Container styling ──
|
|
26
|
+
this.chartBg = '';
|
|
27
|
+
this.chartBorderRadius = '';
|
|
28
|
+
this.chartBorder = '';
|
|
29
|
+
this.chartShadow = '';
|
|
30
|
+
this.chartPadding = '';
|
|
31
|
+
this.chartMinHeight = '';
|
|
32
|
+
// ── Loading ──
|
|
33
|
+
this.loadingText = 'Loading...';
|
|
34
|
+
this.loadingColor = '';
|
|
35
|
+
this.loadingFontSize = '';
|
|
36
|
+
this.loadingFontFamily = '';
|
|
37
|
+
this.loadingBg = '';
|
|
38
|
+
}
|
|
39
|
+
_syncCssVars() {
|
|
40
|
+
const set = (prop, val) => {
|
|
41
|
+
const s = typeof val === 'number'
|
|
42
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
43
|
+
: String(val ?? '').trim();
|
|
44
|
+
if (s)
|
|
45
|
+
this.style.setProperty(prop, s);
|
|
46
|
+
else
|
|
47
|
+
this.style.removeProperty(prop);
|
|
48
|
+
};
|
|
49
|
+
set('--nile-chart-bg', this.chartBg);
|
|
50
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
51
|
+
set('--nile-chart-border', this.chartBorder);
|
|
52
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
53
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
54
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
55
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
56
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
57
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
58
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
24
59
|
}
|
|
25
60
|
/** Apply { chart, aq } config to individual properties. */
|
|
26
61
|
applyConfig(cfg) {
|
|
@@ -39,6 +74,30 @@ let NileBubbleChart = class NileBubbleChart extends NileElement {
|
|
|
39
74
|
this.loading = bubble.loading;
|
|
40
75
|
if (bubble.options)
|
|
41
76
|
this.options = bubble.options;
|
|
77
|
+
if (bubble.chartBg !== undefined)
|
|
78
|
+
this.chartBg = bubble.chartBg;
|
|
79
|
+
if (bubble.chartBorderRadius !== undefined)
|
|
80
|
+
this.chartBorderRadius = bubble.chartBorderRadius;
|
|
81
|
+
if (bubble.chartBorder !== undefined)
|
|
82
|
+
this.chartBorder = bubble.chartBorder;
|
|
83
|
+
if (bubble.chartShadow !== undefined)
|
|
84
|
+
this.chartShadow = bubble.chartShadow;
|
|
85
|
+
if (bubble.chartPadding !== undefined)
|
|
86
|
+
this.chartPadding = bubble.chartPadding;
|
|
87
|
+
if (bubble.chartMinHeight !== undefined)
|
|
88
|
+
this.chartMinHeight = bubble.chartMinHeight;
|
|
89
|
+
if (bubble.loadingText !== undefined)
|
|
90
|
+
this.loadingText = bubble.loadingText;
|
|
91
|
+
if (bubble.loadingColor !== undefined)
|
|
92
|
+
this.loadingColor = bubble.loadingColor;
|
|
93
|
+
if (bubble.loadingFontSize !== undefined)
|
|
94
|
+
this.loadingFontSize = bubble.loadingFontSize;
|
|
95
|
+
if (bubble.loadingFontFamily !== undefined)
|
|
96
|
+
this.loadingFontFamily = bubble.loadingFontFamily;
|
|
97
|
+
if (bubble.loadingBg !== undefined)
|
|
98
|
+
this.loadingBg = bubble.loadingBg;
|
|
99
|
+
if (bubble.showLegend !== undefined)
|
|
100
|
+
this.showLegend = bubble.showLegend;
|
|
42
101
|
}
|
|
43
102
|
if (aq) {
|
|
44
103
|
if (aq.chartTitle)
|
|
@@ -58,13 +117,21 @@ let NileBubbleChart = class NileBubbleChart extends NileElement {
|
|
|
58
117
|
this.resizeObserver?.disconnect();
|
|
59
118
|
this.resizeObserver = null;
|
|
60
119
|
}
|
|
61
|
-
firstUpdated() {
|
|
120
|
+
firstUpdated() {
|
|
121
|
+
this._syncCssVars();
|
|
122
|
+
this.initChart();
|
|
123
|
+
this.setupResizeObserver();
|
|
124
|
+
}
|
|
62
125
|
updated(changedProperties) {
|
|
63
126
|
if (changedProperties.has('config') && this.config) {
|
|
64
127
|
this.applyConfig(this.config);
|
|
65
128
|
return;
|
|
66
129
|
}
|
|
67
|
-
const
|
|
130
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
131
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
132
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
133
|
+
this._syncCssVars();
|
|
134
|
+
const props = ['data', 'chartTitle', 'chartSubtitle', 'options', 'height', 'xAxisTitle', 'yAxisTitle', 'loading', 'showLegend'];
|
|
68
135
|
if (!props.some(p => changedProperties.has(p)))
|
|
69
136
|
return;
|
|
70
137
|
if (this.loading) {
|
|
@@ -103,6 +170,7 @@ let NileBubbleChart = class NileBubbleChart extends NileElement {
|
|
|
103
170
|
series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, x: this.x, y: this.y, z: this.z, seriesName: this.series.name }); } } } },
|
|
104
171
|
},
|
|
105
172
|
series: this.data.map(s => ({ type: 'bubble', name: s.name, data: s.data, color: s.color })),
|
|
173
|
+
legend: { enabled: this.showLegend },
|
|
106
174
|
credits: { enabled: false },
|
|
107
175
|
}, this.options);
|
|
108
176
|
}
|
|
@@ -120,7 +188,7 @@ let NileBubbleChart = class NileBubbleChart extends NileElement {
|
|
|
120
188
|
} }
|
|
121
189
|
render() {
|
|
122
190
|
if (this.loading)
|
|
123
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
191
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
124
192
|
return html `<div class="chart-container"></div>`;
|
|
125
193
|
}
|
|
126
194
|
};
|
|
@@ -155,6 +223,42 @@ __decorate([
|
|
|
155
223
|
__decorate([
|
|
156
224
|
property({ type: String, attribute: 'y-axis-title' })
|
|
157
225
|
], NileBubbleChart.prototype, "yAxisTitle", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
228
|
+
], NileBubbleChart.prototype, "showLegend", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
231
|
+
], NileBubbleChart.prototype, "chartBg", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
234
|
+
], NileBubbleChart.prototype, "chartBorderRadius", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
property({ type: String, attribute: 'chart-border' })
|
|
237
|
+
], NileBubbleChart.prototype, "chartBorder", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
240
|
+
], NileBubbleChart.prototype, "chartShadow", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
243
|
+
], NileBubbleChart.prototype, "chartPadding", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
246
|
+
], NileBubbleChart.prototype, "chartMinHeight", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
property({ type: String, attribute: 'loading-text' })
|
|
249
|
+
], NileBubbleChart.prototype, "loadingText", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
property({ type: String, attribute: 'loading-color' })
|
|
252
|
+
], NileBubbleChart.prototype, "loadingColor", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
255
|
+
], NileBubbleChart.prototype, "loadingFontSize", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
258
|
+
], NileBubbleChart.prototype, "loadingFontFamily", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
261
|
+
], NileBubbleChart.prototype, "loadingBg", void 0);
|
|
158
262
|
NileBubbleChart = __decorate([
|
|
159
263
|
customElement('nile-bubble-chart')
|
|
160
264
|
], NileBubbleChart);
|