@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
|
@@ -19,6 +19,40 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
19
19
|
this.options = {};
|
|
20
20
|
this.loading = false;
|
|
21
21
|
this.height = '400px';
|
|
22
|
+
// ── Container styling ──
|
|
23
|
+
this.chartBg = '';
|
|
24
|
+
this.chartBorderRadius = '';
|
|
25
|
+
this.chartBorder = '';
|
|
26
|
+
this.chartShadow = '';
|
|
27
|
+
this.chartPadding = '';
|
|
28
|
+
this.chartMinHeight = '';
|
|
29
|
+
// ── Loading ──
|
|
30
|
+
this.loadingText = 'Loading...';
|
|
31
|
+
this.loadingColor = '';
|
|
32
|
+
this.loadingFontSize = '';
|
|
33
|
+
this.loadingFontFamily = '';
|
|
34
|
+
this.loadingBg = '';
|
|
35
|
+
}
|
|
36
|
+
_syncCssVars() {
|
|
37
|
+
const set = (prop, val) => {
|
|
38
|
+
const s = typeof val === 'number'
|
|
39
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
40
|
+
: String(val ?? '').trim();
|
|
41
|
+
if (s)
|
|
42
|
+
this.style.setProperty(prop, s);
|
|
43
|
+
else
|
|
44
|
+
this.style.removeProperty(prop);
|
|
45
|
+
};
|
|
46
|
+
set('--nile-chart-bg', this.chartBg);
|
|
47
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
48
|
+
set('--nile-chart-border', this.chartBorder);
|
|
49
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
50
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
51
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
52
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
53
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
54
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
55
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
22
56
|
}
|
|
23
57
|
applyConfig(cfg) {
|
|
24
58
|
applySeparatedChartConfig(this, cfg);
|
|
@@ -35,6 +69,7 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
35
69
|
this.resizeObserver = null;
|
|
36
70
|
}
|
|
37
71
|
firstUpdated() {
|
|
72
|
+
this._syncCssVars();
|
|
38
73
|
this.initChart();
|
|
39
74
|
this.setupResizeObserver();
|
|
40
75
|
}
|
|
@@ -44,6 +79,10 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
44
79
|
return;
|
|
45
80
|
}
|
|
46
81
|
const props = ['data', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading'];
|
|
82
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
83
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
84
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
85
|
+
this._syncCssVars();
|
|
47
86
|
if (!props.some(p => changedProperties.has(p)))
|
|
48
87
|
return;
|
|
49
88
|
if (this.loading) {
|
|
@@ -112,7 +151,7 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
112
151
|
}
|
|
113
152
|
render() {
|
|
114
153
|
if (this.loading) {
|
|
115
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
154
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
116
155
|
}
|
|
117
156
|
return html `<div class="chart-container"></div>`;
|
|
118
157
|
}
|
|
@@ -142,6 +181,39 @@ __decorate([
|
|
|
142
181
|
__decorate([
|
|
143
182
|
property({ type: String })
|
|
144
183
|
], NileEulerChart.prototype, "height", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
186
|
+
], NileEulerChart.prototype, "chartBg", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
189
|
+
], NileEulerChart.prototype, "chartBorderRadius", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
property({ type: String, attribute: 'chart-border' })
|
|
192
|
+
], NileEulerChart.prototype, "chartBorder", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
195
|
+
], NileEulerChart.prototype, "chartShadow", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
198
|
+
], NileEulerChart.prototype, "chartPadding", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
201
|
+
], NileEulerChart.prototype, "chartMinHeight", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
property({ type: String, attribute: 'loading-text' })
|
|
204
|
+
], NileEulerChart.prototype, "loadingText", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
property({ type: String, attribute: 'loading-color' })
|
|
207
|
+
], NileEulerChart.prototype, "loadingColor", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
210
|
+
], NileEulerChart.prototype, "loadingFontSize", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
213
|
+
], NileEulerChart.prototype, "loadingFontFamily", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
216
|
+
], NileEulerChart.prototype, "loadingBg", void 0);
|
|
145
217
|
NileEulerChart = __decorate([
|
|
146
218
|
customElement('nile-euler-chart')
|
|
147
219
|
], NileEulerChart);
|
|
@@ -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-fan-chart.css.js.map
|
|
@@ -46,6 +46,18 @@ export declare class NileFanChart extends NileElement {
|
|
|
46
46
|
*/
|
|
47
47
|
forecastStartIndex: number;
|
|
48
48
|
forecastBandLabel: string;
|
|
49
|
+
chartBg: string;
|
|
50
|
+
chartBorderRadius: string | number;
|
|
51
|
+
chartBorder: string;
|
|
52
|
+
chartShadow: string;
|
|
53
|
+
chartPadding: string | number;
|
|
54
|
+
chartMinHeight: string | number;
|
|
55
|
+
loadingText: string;
|
|
56
|
+
loadingColor: string;
|
|
57
|
+
loadingFontSize: string | number;
|
|
58
|
+
loadingFontFamily: string;
|
|
59
|
+
loadingBg: string;
|
|
60
|
+
private _syncCssVars;
|
|
49
61
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
50
62
|
private applyConfig;
|
|
51
63
|
connectedCallback(): void;
|
|
@@ -32,6 +32,40 @@ let NileFanChart = class NileFanChart extends NileElement {
|
|
|
32
32
|
*/
|
|
33
33
|
this.forecastStartIndex = -1;
|
|
34
34
|
this.forecastBandLabel = '';
|
|
35
|
+
// ── Container styling ──
|
|
36
|
+
this.chartBg = '';
|
|
37
|
+
this.chartBorderRadius = '';
|
|
38
|
+
this.chartBorder = '';
|
|
39
|
+
this.chartShadow = '';
|
|
40
|
+
this.chartPadding = '';
|
|
41
|
+
this.chartMinHeight = '';
|
|
42
|
+
// ── Loading ──
|
|
43
|
+
this.loadingText = 'Loading...';
|
|
44
|
+
this.loadingColor = '';
|
|
45
|
+
this.loadingFontSize = '';
|
|
46
|
+
this.loadingFontFamily = '';
|
|
47
|
+
this.loadingBg = '';
|
|
48
|
+
}
|
|
49
|
+
_syncCssVars() {
|
|
50
|
+
const set = (prop, val) => {
|
|
51
|
+
const s = typeof val === 'number'
|
|
52
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
53
|
+
: String(val ?? '').trim();
|
|
54
|
+
if (s)
|
|
55
|
+
this.style.setProperty(prop, s);
|
|
56
|
+
else
|
|
57
|
+
this.style.removeProperty(prop);
|
|
58
|
+
};
|
|
59
|
+
set('--nile-chart-bg', this.chartBg);
|
|
60
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
61
|
+
set('--nile-chart-border', this.chartBorder);
|
|
62
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
63
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
64
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
65
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
66
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
67
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
68
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
35
69
|
}
|
|
36
70
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
37
71
|
applyConfig(cfg) {
|
|
@@ -49,6 +83,7 @@ let NileFanChart = class NileFanChart extends NileElement {
|
|
|
49
83
|
this.resizeObserver = null;
|
|
50
84
|
}
|
|
51
85
|
firstUpdated() {
|
|
86
|
+
this._syncCssVars();
|
|
52
87
|
this.initChart();
|
|
53
88
|
this.setupResizeObserver();
|
|
54
89
|
}
|
|
@@ -72,6 +107,10 @@ let NileFanChart = class NileFanChart extends NileElement {
|
|
|
72
107
|
'forecastBandLabel',
|
|
73
108
|
'loading',
|
|
74
109
|
];
|
|
110
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
111
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
112
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
113
|
+
this._syncCssVars();
|
|
75
114
|
if (!props.some(p => changedProperties.has(p)))
|
|
76
115
|
return;
|
|
77
116
|
if (this.loading) {
|
|
@@ -199,7 +238,7 @@ let NileFanChart = class NileFanChart extends NileElement {
|
|
|
199
238
|
}
|
|
200
239
|
render() {
|
|
201
240
|
if (this.loading) {
|
|
202
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
241
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
203
242
|
}
|
|
204
243
|
return html `<div class="chart-container"></div>`;
|
|
205
244
|
}
|
|
@@ -250,6 +289,39 @@ __decorate([
|
|
|
250
289
|
__decorate([
|
|
251
290
|
property({ type: String, attribute: 'forecast-band-label' })
|
|
252
291
|
], NileFanChart.prototype, "forecastBandLabel", void 0);
|
|
292
|
+
__decorate([
|
|
293
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
294
|
+
], NileFanChart.prototype, "chartBg", void 0);
|
|
295
|
+
__decorate([
|
|
296
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
297
|
+
], NileFanChart.prototype, "chartBorderRadius", void 0);
|
|
298
|
+
__decorate([
|
|
299
|
+
property({ type: String, attribute: 'chart-border' })
|
|
300
|
+
], NileFanChart.prototype, "chartBorder", void 0);
|
|
301
|
+
__decorate([
|
|
302
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
303
|
+
], NileFanChart.prototype, "chartShadow", void 0);
|
|
304
|
+
__decorate([
|
|
305
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
306
|
+
], NileFanChart.prototype, "chartPadding", void 0);
|
|
307
|
+
__decorate([
|
|
308
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
309
|
+
], NileFanChart.prototype, "chartMinHeight", void 0);
|
|
310
|
+
__decorate([
|
|
311
|
+
property({ type: String, attribute: 'loading-text' })
|
|
312
|
+
], NileFanChart.prototype, "loadingText", void 0);
|
|
313
|
+
__decorate([
|
|
314
|
+
property({ type: String, attribute: 'loading-color' })
|
|
315
|
+
], NileFanChart.prototype, "loadingColor", void 0);
|
|
316
|
+
__decorate([
|
|
317
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
318
|
+
], NileFanChart.prototype, "loadingFontSize", void 0);
|
|
319
|
+
__decorate([
|
|
320
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
321
|
+
], NileFanChart.prototype, "loadingFontFamily", void 0);
|
|
322
|
+
__decorate([
|
|
323
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
324
|
+
], NileFanChart.prototype, "loadingBg", void 0);
|
|
253
325
|
NileFanChart = __decorate([
|
|
254
326
|
customElement('nile-fan-chart')
|
|
255
327
|
], NileFanChart);
|
|
@@ -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-flame-chart.css.js.map
|
|
@@ -39,6 +39,18 @@ export declare class NileFlameChart extends NileElement {
|
|
|
39
39
|
options: Highcharts.Options;
|
|
40
40
|
loading: boolean;
|
|
41
41
|
height: string;
|
|
42
|
+
chartBg: string;
|
|
43
|
+
chartBorderRadius: string | number;
|
|
44
|
+
chartBorder: string;
|
|
45
|
+
chartShadow: string;
|
|
46
|
+
chartPadding: string | number;
|
|
47
|
+
chartMinHeight: string | number;
|
|
48
|
+
loadingText: string;
|
|
49
|
+
loadingColor: string;
|
|
50
|
+
loadingFontSize: string | number;
|
|
51
|
+
loadingFontFamily: string;
|
|
52
|
+
loadingBg: string;
|
|
53
|
+
private _syncCssVars;
|
|
42
54
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
43
55
|
private applyConfig;
|
|
44
56
|
connectedCallback(): void;
|
|
@@ -46,6 +46,40 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
46
46
|
this.options = {};
|
|
47
47
|
this.loading = false;
|
|
48
48
|
this.height = '480px';
|
|
49
|
+
// ── Container styling ──
|
|
50
|
+
this.chartBg = '';
|
|
51
|
+
this.chartBorderRadius = '';
|
|
52
|
+
this.chartBorder = '';
|
|
53
|
+
this.chartShadow = '';
|
|
54
|
+
this.chartPadding = '';
|
|
55
|
+
this.chartMinHeight = '';
|
|
56
|
+
// ── Loading ──
|
|
57
|
+
this.loadingText = 'Loading...';
|
|
58
|
+
this.loadingColor = '';
|
|
59
|
+
this.loadingFontSize = '';
|
|
60
|
+
this.loadingFontFamily = '';
|
|
61
|
+
this.loadingBg = '';
|
|
62
|
+
}
|
|
63
|
+
_syncCssVars() {
|
|
64
|
+
const set = (prop, val) => {
|
|
65
|
+
const s = typeof val === 'number'
|
|
66
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
67
|
+
: String(val ?? '').trim();
|
|
68
|
+
if (s)
|
|
69
|
+
this.style.setProperty(prop, s);
|
|
70
|
+
else
|
|
71
|
+
this.style.removeProperty(prop);
|
|
72
|
+
};
|
|
73
|
+
set('--nile-chart-bg', this.chartBg);
|
|
74
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
75
|
+
set('--nile-chart-border', this.chartBorder);
|
|
76
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
77
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
78
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
79
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
80
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
81
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
82
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
49
83
|
}
|
|
50
84
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
51
85
|
applyConfig(cfg) {
|
|
@@ -63,6 +97,7 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
63
97
|
this.resizeObserver = null;
|
|
64
98
|
}
|
|
65
99
|
firstUpdated() {
|
|
100
|
+
this._syncCssVars();
|
|
66
101
|
this.initChart();
|
|
67
102
|
this.setupResizeObserver();
|
|
68
103
|
}
|
|
@@ -81,6 +116,10 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
81
116
|
'height',
|
|
82
117
|
'loading',
|
|
83
118
|
];
|
|
119
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
120
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
121
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
122
|
+
this._syncCssVars();
|
|
84
123
|
if (!props.some(p => changedProperties.has(p)))
|
|
85
124
|
return;
|
|
86
125
|
if (this.loading) {
|
|
@@ -268,7 +307,7 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
268
307
|
}
|
|
269
308
|
render() {
|
|
270
309
|
if (this.loading) {
|
|
271
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
310
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
272
311
|
}
|
|
273
312
|
return html `<div class="chart-container"></div>`;
|
|
274
313
|
}
|
|
@@ -304,6 +343,39 @@ __decorate([
|
|
|
304
343
|
__decorate([
|
|
305
344
|
property({ type: String })
|
|
306
345
|
], NileFlameChart.prototype, "height", void 0);
|
|
346
|
+
__decorate([
|
|
347
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
348
|
+
], NileFlameChart.prototype, "chartBg", void 0);
|
|
349
|
+
__decorate([
|
|
350
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
351
|
+
], NileFlameChart.prototype, "chartBorderRadius", void 0);
|
|
352
|
+
__decorate([
|
|
353
|
+
property({ type: String, attribute: 'chart-border' })
|
|
354
|
+
], NileFlameChart.prototype, "chartBorder", void 0);
|
|
355
|
+
__decorate([
|
|
356
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
357
|
+
], NileFlameChart.prototype, "chartShadow", void 0);
|
|
358
|
+
__decorate([
|
|
359
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
360
|
+
], NileFlameChart.prototype, "chartPadding", void 0);
|
|
361
|
+
__decorate([
|
|
362
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
363
|
+
], NileFlameChart.prototype, "chartMinHeight", void 0);
|
|
364
|
+
__decorate([
|
|
365
|
+
property({ type: String, attribute: 'loading-text' })
|
|
366
|
+
], NileFlameChart.prototype, "loadingText", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
property({ type: String, attribute: 'loading-color' })
|
|
369
|
+
], NileFlameChart.prototype, "loadingColor", void 0);
|
|
370
|
+
__decorate([
|
|
371
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
372
|
+
], NileFlameChart.prototype, "loadingFontSize", void 0);
|
|
373
|
+
__decorate([
|
|
374
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
375
|
+
], NileFlameChart.prototype, "loadingFontFamily", void 0);
|
|
376
|
+
__decorate([
|
|
377
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
378
|
+
], NileFlameChart.prototype, "loadingBg", void 0);
|
|
307
379
|
NileFlameChart = __decorate([
|
|
308
380
|
customElement('nile-flame-chart')
|
|
309
381
|
], NileFlameChart);
|
|
@@ -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-funnel-chart.css.js.map
|
|
@@ -23,6 +23,18 @@ export declare class NileFunnelChart extends NileElement {
|
|
|
23
23
|
height: string;
|
|
24
24
|
seriesName: string;
|
|
25
25
|
showDataLabels: boolean;
|
|
26
|
+
chartBg: string;
|
|
27
|
+
chartBorderRadius: string | number;
|
|
28
|
+
chartBorder: string;
|
|
29
|
+
chartShadow: string;
|
|
30
|
+
chartPadding: string | number;
|
|
31
|
+
chartMinHeight: string | number;
|
|
32
|
+
loadingText: string;
|
|
33
|
+
loadingColor: string;
|
|
34
|
+
loadingFontSize: string | number;
|
|
35
|
+
loadingFontFamily: string;
|
|
36
|
+
loadingBg: string;
|
|
37
|
+
private _syncCssVars;
|
|
26
38
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
27
39
|
private applyConfig;
|
|
28
40
|
connectedCallback(): void;
|
|
@@ -22,6 +22,40 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
22
22
|
this.height = '400px';
|
|
23
23
|
this.seriesName = '';
|
|
24
24
|
this.showDataLabels = 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);
|
|
25
59
|
}
|
|
26
60
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
27
61
|
applyConfig(cfg) {
|
|
@@ -39,6 +73,7 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
39
73
|
this.resizeObserver = null;
|
|
40
74
|
}
|
|
41
75
|
firstUpdated() {
|
|
76
|
+
this._syncCssVars();
|
|
42
77
|
this.initChart();
|
|
43
78
|
this.setupResizeObserver();
|
|
44
79
|
}
|
|
@@ -57,6 +92,10 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
57
92
|
'showDataLabels',
|
|
58
93
|
'loading',
|
|
59
94
|
];
|
|
95
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
96
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
97
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
98
|
+
this._syncCssVars();
|
|
60
99
|
if (!props.some(p => changedProperties.has(p)))
|
|
61
100
|
return;
|
|
62
101
|
if (this.loading) {
|
|
@@ -146,7 +185,7 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
146
185
|
}
|
|
147
186
|
render() {
|
|
148
187
|
if (this.loading) {
|
|
149
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
188
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
150
189
|
}
|
|
151
190
|
return html `<div class="chart-container"></div>`;
|
|
152
191
|
}
|
|
@@ -182,6 +221,39 @@ __decorate([
|
|
|
182
221
|
__decorate([
|
|
183
222
|
property({ type: Boolean, attribute: 'show-data-labels' })
|
|
184
223
|
], NileFunnelChart.prototype, "showDataLabels", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
226
|
+
], NileFunnelChart.prototype, "chartBg", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
229
|
+
], NileFunnelChart.prototype, "chartBorderRadius", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
property({ type: String, attribute: 'chart-border' })
|
|
232
|
+
], NileFunnelChart.prototype, "chartBorder", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
235
|
+
], NileFunnelChart.prototype, "chartShadow", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
238
|
+
], NileFunnelChart.prototype, "chartPadding", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
241
|
+
], NileFunnelChart.prototype, "chartMinHeight", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
property({ type: String, attribute: 'loading-text' })
|
|
244
|
+
], NileFunnelChart.prototype, "loadingText", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
property({ type: String, attribute: 'loading-color' })
|
|
247
|
+
], NileFunnelChart.prototype, "loadingColor", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
250
|
+
], NileFunnelChart.prototype, "loadingFontSize", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
253
|
+
], NileFunnelChart.prototype, "loadingFontFamily", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
256
|
+
], NileFunnelChart.prototype, "loadingBg", void 0);
|
|
185
257
|
NileFunnelChart = __decorate([
|
|
186
258
|
customElement('nile-funnel-chart')
|
|
187
259
|
], NileFunnelChart);
|
|
@@ -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-gauge-chart.css.js.map
|