@aquera/nile-visualization 1.4.0 → 1.6.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-grid-config.type.d.ts +1 -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.d.ts +0 -3
- package/dist/src/nile-chart/nile-chart.js +548 -4
- 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
|
@@ -48,6 +48,16 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
48
48
|
this.sparkline = [];
|
|
49
49
|
/** Color for the sparkline. */
|
|
50
50
|
this.sparklineColor = '';
|
|
51
|
+
/** Sparkline chart height in pixels. */
|
|
52
|
+
this.sparklineHeight = 48;
|
|
53
|
+
/** Sparkline stroke width. */
|
|
54
|
+
this.sparklineLineWidth = 2;
|
|
55
|
+
/** Sparkline series type: 'area' (filled) or 'line'. */
|
|
56
|
+
this.sparklineType = 'area';
|
|
57
|
+
/** Fill area opacity 0–1. Only applies when sparklineType is 'area'. */
|
|
58
|
+
this.sparklineFillOpacity = 0.2;
|
|
59
|
+
/** Show data-point markers on the sparkline. */
|
|
60
|
+
this.sparklineMarkers = false;
|
|
51
61
|
/** Gauge: the numeric value (0-100 by default). */
|
|
52
62
|
this.gaugeValue = 0;
|
|
53
63
|
/** Gauge: minimum value. */
|
|
@@ -56,6 +66,60 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
56
66
|
this.gaugeMax = 100;
|
|
57
67
|
/** Gauge: ring color. Falls back to brand color. */
|
|
58
68
|
this.gaugeColor = '';
|
|
69
|
+
/** Gauge: background track color. */
|
|
70
|
+
this.gaugeTrackColor = '';
|
|
71
|
+
/** Gauge: start angle in degrees (0 = full circle start). */
|
|
72
|
+
this.gaugeStartAngle = 0;
|
|
73
|
+
/** Gauge: end angle in degrees (360 = full circle). */
|
|
74
|
+
this.gaugeEndAngle = 360;
|
|
75
|
+
/** Gauge: inner radius as percentage string (controls ring thickness). */
|
|
76
|
+
this.gaugeInnerRadius = '80%';
|
|
77
|
+
/** Gauge: whether arc ends are rounded. */
|
|
78
|
+
this.gaugeRounded = true;
|
|
79
|
+
/** Gauge: font size for the center data label. */
|
|
80
|
+
this.gaugeLabelFontSize = 28;
|
|
81
|
+
/** Gauge: text color for the center data label. */
|
|
82
|
+
this.gaugeLabelColor = '';
|
|
83
|
+
/** Gauge: font weight for the center data label. */
|
|
84
|
+
this.gaugeLabelFontWeight = 600;
|
|
85
|
+
/** Gauge: vertical offset of the center data label in pixels. */
|
|
86
|
+
this.gaugeLabelYOffset = -25;
|
|
87
|
+
/** Gauge: chart height in pixels. */
|
|
88
|
+
this.gaugeHeight = 160;
|
|
89
|
+
/** Gauge: outer radius of the arc as a percentage string. */
|
|
90
|
+
this.gaugeOuterRadius = '100%';
|
|
91
|
+
/** Override the KPI value font size (e.g. '48px', '2rem'). */
|
|
92
|
+
this.valueFontSize = '';
|
|
93
|
+
/** Override the KPI value text color. */
|
|
94
|
+
this.valueColor = '';
|
|
95
|
+
/** Custom text shown in the loading state. */
|
|
96
|
+
this.loadingText = 'Loading...';
|
|
97
|
+
/** Whether the hover tooltip is shown on value / sparkline / gauge. */
|
|
98
|
+
this.tooltipEnabled = true;
|
|
99
|
+
// ── Card chrome ──
|
|
100
|
+
this.cardBackground = '';
|
|
101
|
+
this.cardBorderColor = '';
|
|
102
|
+
this.cardBorderWidth = '';
|
|
103
|
+
this.cardBorderRadius = '';
|
|
104
|
+
this.cardShadow = '';
|
|
105
|
+
this.cardShadowHover = '';
|
|
106
|
+
this.cardPaddingVertical = '';
|
|
107
|
+
this.cardPaddingHorizontal = '';
|
|
108
|
+
this.contentGap = '';
|
|
109
|
+
// ── Label ──
|
|
110
|
+
this.labelColor = '';
|
|
111
|
+
this.labelFontSize = '';
|
|
112
|
+
this.labelFontWeight = '';
|
|
113
|
+
// ── Description ──
|
|
114
|
+
this.descriptionColor = '';
|
|
115
|
+
this.descriptionFontSize = '';
|
|
116
|
+
// ── Prefix / suffix ──
|
|
117
|
+
this.prefixSuffixColor = '';
|
|
118
|
+
this.prefixSuffixFontSize = '';
|
|
119
|
+
// ── Trend colors ──
|
|
120
|
+
this.trendUpColor = '';
|
|
121
|
+
this.trendDownColor = '';
|
|
122
|
+
this.trendNeutralColor = '';
|
|
59
123
|
/** Whether the component is in a loading state. */
|
|
60
124
|
this.loading = false;
|
|
61
125
|
/** Highcharts options override for the sparkline or gauge. */
|
|
@@ -116,7 +180,7 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
116
180
|
this._tipEl = el;
|
|
117
181
|
}
|
|
118
182
|
_showTip(text, x, y) {
|
|
119
|
-
if (!this._tipEl)
|
|
183
|
+
if (!this._tipEl || !this.tooltipEnabled)
|
|
120
184
|
return;
|
|
121
185
|
this._tipEl.textContent = text;
|
|
122
186
|
this._tipEl.style.left = `${x}px`;
|
|
@@ -127,6 +191,40 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
127
191
|
if (this._tipEl)
|
|
128
192
|
this._tipEl.style.display = 'none';
|
|
129
193
|
}
|
|
194
|
+
// ── CSS custom property sync ─────────────────────────────────────────────
|
|
195
|
+
_syncCssVars() {
|
|
196
|
+
const set = (prop, val) => {
|
|
197
|
+
const s = typeof val === 'number'
|
|
198
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
199
|
+
: String(val ?? '').trim();
|
|
200
|
+
if (s)
|
|
201
|
+
this.style.setProperty(prop, s);
|
|
202
|
+
else
|
|
203
|
+
this.style.removeProperty(prop);
|
|
204
|
+
};
|
|
205
|
+
const len = (val) => this.formatCssLength(val) ?? '';
|
|
206
|
+
set('--nile-kpi-card-bg', this.cardBackground);
|
|
207
|
+
set('--nile-kpi-card-border-color', this.cardBorderColor);
|
|
208
|
+
set('--nile-kpi-card-border-width', len(this.cardBorderWidth));
|
|
209
|
+
set('--nile-kpi-card-border-radius', len(this.cardBorderRadius));
|
|
210
|
+
set('--nile-kpi-card-shadow', this.cardShadow);
|
|
211
|
+
set('--nile-kpi-card-shadow-hover', this.cardShadowHover);
|
|
212
|
+
set('--nile-kpi-padding-v', len(this.cardPaddingVertical));
|
|
213
|
+
set('--nile-kpi-padding-h', len(this.cardPaddingHorizontal));
|
|
214
|
+
set('--nile-kpi-content-gap', len(this.contentGap));
|
|
215
|
+
set('--nile-kpi-label-color', this.labelColor);
|
|
216
|
+
set('--nile-kpi-label-font-size', len(this.labelFontSize));
|
|
217
|
+
set('--nile-kpi-label-font-weight', String(this.labelFontWeight ?? ''));
|
|
218
|
+
set('--nile-kpi-description-color', this.descriptionColor);
|
|
219
|
+
set('--nile-kpi-description-font-size', len(this.descriptionFontSize));
|
|
220
|
+
set('--nile-kpi-prefix-suffix-color', this.prefixSuffixColor);
|
|
221
|
+
set('--nile-kpi-prefix-suffix-font-size', len(this.prefixSuffixFontSize));
|
|
222
|
+
set('--nile-kpi-trend-up-color', this.trendUpColor);
|
|
223
|
+
set('--nile-kpi-trend-down-color', this.trendDownColor);
|
|
224
|
+
set('--nile-kpi-trend-neutral-color', this.trendNeutralColor);
|
|
225
|
+
set('--nile-kpi-value-color', this.valueColor);
|
|
226
|
+
set('--nile-kpi-value-font-size', len(this.valueFontSize));
|
|
227
|
+
}
|
|
130
228
|
// ── Formatting helpers ───────────────────────────────────────────────────
|
|
131
229
|
formatCssLength(value) {
|
|
132
230
|
if (value == null)
|
|
@@ -212,6 +310,16 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
212
310
|
this.sparkline = c.sparkline;
|
|
213
311
|
if (c.sparklineColor !== undefined)
|
|
214
312
|
this.sparklineColor = c.sparklineColor;
|
|
313
|
+
if (c.sparklineHeight !== undefined)
|
|
314
|
+
this.sparklineHeight = c.sparklineHeight;
|
|
315
|
+
if (c.sparklineLineWidth !== undefined)
|
|
316
|
+
this.sparklineLineWidth = c.sparklineLineWidth;
|
|
317
|
+
if (c.sparklineType !== undefined)
|
|
318
|
+
this.sparklineType = c.sparklineType;
|
|
319
|
+
if (c.sparklineFillOpacity !== undefined)
|
|
320
|
+
this.sparklineFillOpacity = c.sparklineFillOpacity;
|
|
321
|
+
if (c.sparklineMarkers !== undefined)
|
|
322
|
+
this.sparklineMarkers = c.sparklineMarkers;
|
|
215
323
|
if (c.gaugeValue !== undefined)
|
|
216
324
|
this.gaugeValue = c.gaugeValue;
|
|
217
325
|
if (c.gaugeMin !== undefined)
|
|
@@ -220,6 +328,74 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
220
328
|
this.gaugeMax = c.gaugeMax;
|
|
221
329
|
if (c.gaugeColor !== undefined)
|
|
222
330
|
this.gaugeColor = c.gaugeColor;
|
|
331
|
+
if (c.gaugeTrackColor !== undefined)
|
|
332
|
+
this.gaugeTrackColor = c.gaugeTrackColor;
|
|
333
|
+
if (c.gaugeStartAngle !== undefined)
|
|
334
|
+
this.gaugeStartAngle = c.gaugeStartAngle;
|
|
335
|
+
if (c.gaugeEndAngle !== undefined)
|
|
336
|
+
this.gaugeEndAngle = c.gaugeEndAngle;
|
|
337
|
+
if (c.gaugeInnerRadius !== undefined)
|
|
338
|
+
this.gaugeInnerRadius = c.gaugeInnerRadius;
|
|
339
|
+
if (c.gaugeRounded !== undefined)
|
|
340
|
+
this.gaugeRounded = c.gaugeRounded;
|
|
341
|
+
if (c.gaugeLabelFontSize !== undefined)
|
|
342
|
+
this.gaugeLabelFontSize = c.gaugeLabelFontSize;
|
|
343
|
+
if (c.gaugeLabelColor !== undefined)
|
|
344
|
+
this.gaugeLabelColor = c.gaugeLabelColor;
|
|
345
|
+
if (c.gaugeLabelFontWeight !== undefined)
|
|
346
|
+
this.gaugeLabelFontWeight = c.gaugeLabelFontWeight;
|
|
347
|
+
if (c.gaugeLabelYOffset !== undefined)
|
|
348
|
+
this.gaugeLabelYOffset = c.gaugeLabelYOffset;
|
|
349
|
+
if (c.gaugeHeight !== undefined)
|
|
350
|
+
this.gaugeHeight = c.gaugeHeight;
|
|
351
|
+
if (c.gaugeOuterRadius !== undefined)
|
|
352
|
+
this.gaugeOuterRadius = c.gaugeOuterRadius;
|
|
353
|
+
if (c.valueFontSize !== undefined)
|
|
354
|
+
this.valueFontSize = c.valueFontSize;
|
|
355
|
+
if (c.valueColor !== undefined)
|
|
356
|
+
this.valueColor = c.valueColor;
|
|
357
|
+
if (c.loadingText !== undefined)
|
|
358
|
+
this.loadingText = c.loadingText;
|
|
359
|
+
if (c.tooltipEnabled !== undefined)
|
|
360
|
+
this.tooltipEnabled = c.tooltipEnabled;
|
|
361
|
+
if (c.cardBackground !== undefined)
|
|
362
|
+
this.cardBackground = c.cardBackground;
|
|
363
|
+
if (c.cardBorderColor !== undefined)
|
|
364
|
+
this.cardBorderColor = c.cardBorderColor;
|
|
365
|
+
if (c.cardBorderWidth !== undefined)
|
|
366
|
+
this.cardBorderWidth = c.cardBorderWidth;
|
|
367
|
+
if (c.cardBorderRadius !== undefined)
|
|
368
|
+
this.cardBorderRadius = c.cardBorderRadius;
|
|
369
|
+
if (c.cardShadow !== undefined)
|
|
370
|
+
this.cardShadow = c.cardShadow;
|
|
371
|
+
if (c.cardShadowHover !== undefined)
|
|
372
|
+
this.cardShadowHover = c.cardShadowHover;
|
|
373
|
+
if (c.cardPaddingVertical !== undefined)
|
|
374
|
+
this.cardPaddingVertical = c.cardPaddingVertical;
|
|
375
|
+
if (c.cardPaddingHorizontal !== undefined)
|
|
376
|
+
this.cardPaddingHorizontal = c.cardPaddingHorizontal;
|
|
377
|
+
if (c.contentGap !== undefined)
|
|
378
|
+
this.contentGap = c.contentGap;
|
|
379
|
+
if (c.labelColor !== undefined)
|
|
380
|
+
this.labelColor = c.labelColor;
|
|
381
|
+
if (c.labelFontSize !== undefined)
|
|
382
|
+
this.labelFontSize = c.labelFontSize;
|
|
383
|
+
if (c.labelFontWeight !== undefined)
|
|
384
|
+
this.labelFontWeight = c.labelFontWeight;
|
|
385
|
+
if (c.descriptionColor !== undefined)
|
|
386
|
+
this.descriptionColor = c.descriptionColor;
|
|
387
|
+
if (c.descriptionFontSize !== undefined)
|
|
388
|
+
this.descriptionFontSize = c.descriptionFontSize;
|
|
389
|
+
if (c.prefixSuffixColor !== undefined)
|
|
390
|
+
this.prefixSuffixColor = c.prefixSuffixColor;
|
|
391
|
+
if (c.prefixSuffixFontSize !== undefined)
|
|
392
|
+
this.prefixSuffixFontSize = c.prefixSuffixFontSize;
|
|
393
|
+
if (c.trendUpColor !== undefined)
|
|
394
|
+
this.trendUpColor = c.trendUpColor;
|
|
395
|
+
if (c.trendDownColor !== undefined)
|
|
396
|
+
this.trendDownColor = c.trendDownColor;
|
|
397
|
+
if (c.trendNeutralColor !== undefined)
|
|
398
|
+
this.trendNeutralColor = c.trendNeutralColor;
|
|
223
399
|
if (c.loading !== undefined)
|
|
224
400
|
this.loading = c.loading;
|
|
225
401
|
if (c.options !== undefined)
|
|
@@ -263,6 +439,7 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
263
439
|
this.resizeObserver = null;
|
|
264
440
|
}
|
|
265
441
|
firstUpdated() {
|
|
442
|
+
this._syncCssVars();
|
|
266
443
|
this.initSparkline();
|
|
267
444
|
this.initGauge();
|
|
268
445
|
this.setupResizeObserver();
|
|
@@ -272,7 +449,8 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
272
449
|
this.applyConfig(this.config);
|
|
273
450
|
return;
|
|
274
451
|
}
|
|
275
|
-
const sparklineProps = ['sparkline', 'sparklineColor', '
|
|
452
|
+
const sparklineProps = ['sparkline', 'sparklineColor', 'sparklineHeight', 'sparklineLineWidth',
|
|
453
|
+
'sparklineType', 'sparklineFillOpacity', 'sparklineMarkers', 'options'];
|
|
276
454
|
if (sparklineProps.some(p => changedProperties.has(p))) {
|
|
277
455
|
if (this.sparklineChart) {
|
|
278
456
|
this.sparklineChart.update(this.buildSparklineOptions(), true, true);
|
|
@@ -282,7 +460,18 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
282
460
|
this.initSparkline();
|
|
283
461
|
}
|
|
284
462
|
}
|
|
285
|
-
const
|
|
463
|
+
const cssVarProps = ['cardBackground', 'cardBorderColor', 'cardBorderWidth', 'cardBorderRadius',
|
|
464
|
+
'cardShadow', 'cardShadowHover', 'cardPaddingVertical', 'cardPaddingHorizontal', 'contentGap',
|
|
465
|
+
'labelColor', 'labelFontSize', 'labelFontWeight', 'descriptionColor', 'descriptionFontSize',
|
|
466
|
+
'prefixSuffixColor', 'prefixSuffixFontSize', 'trendUpColor', 'trendDownColor', 'trendNeutralColor',
|
|
467
|
+
'valueColor', 'valueFontSize'];
|
|
468
|
+
if (cssVarProps.some(p => changedProperties.has(p))) {
|
|
469
|
+
this._syncCssVars();
|
|
470
|
+
}
|
|
471
|
+
const gaugeProps = ['gaugeValue', 'gaugeMin', 'gaugeMax', 'gaugeColor', 'gaugeTrackColor',
|
|
472
|
+
'gaugeStartAngle', 'gaugeEndAngle', 'gaugeInnerRadius', 'gaugeOuterRadius', 'gaugeRounded',
|
|
473
|
+
'gaugeHeight', 'gaugeLabelFontSize', 'gaugeLabelColor', 'gaugeLabelFontWeight',
|
|
474
|
+
'gaugeLabelYOffset', 'options', 'variant'];
|
|
286
475
|
if (gaugeProps.some(p => changedProperties.has(p))) {
|
|
287
476
|
if (this.gaugeChart) {
|
|
288
477
|
this.gaugeChart.update(this.buildGaugeOptions(), true, true);
|
|
@@ -313,8 +502,23 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
313
502
|
// ── Chart options ────────────────────────────────────────────────────────
|
|
314
503
|
buildSparklineOptions() {
|
|
315
504
|
const brandColor = this.sparklineColor || '#005EA6';
|
|
505
|
+
const lineWidth = this.sparklineLineWidth;
|
|
506
|
+
const seriesType = this.sparklineType;
|
|
507
|
+
const topAlpha = Math.round(Math.min(1, Math.max(0, this.sparklineFillOpacity)) * 255).toString(16).padStart(2, '0');
|
|
508
|
+
const plotKey = seriesType;
|
|
509
|
+
const fillColor = seriesType === 'area'
|
|
510
|
+
? {
|
|
511
|
+
fillColor: {
|
|
512
|
+
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
513
|
+
stops: [
|
|
514
|
+
[0, brandColor + topAlpha],
|
|
515
|
+
[1, brandColor + '00'],
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
}
|
|
519
|
+
: {};
|
|
316
520
|
const defaults = {
|
|
317
|
-
chart: { type:
|
|
521
|
+
chart: { type: seriesType, height: this.sparklineHeight, margin: [2, 0, 2, 0], backgroundColor: 'transparent' },
|
|
318
522
|
title: { text: undefined },
|
|
319
523
|
subtitle: { text: undefined },
|
|
320
524
|
xAxis: { visible: false },
|
|
@@ -322,47 +526,46 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
322
526
|
legend: { enabled: false },
|
|
323
527
|
tooltip: { enabled: false },
|
|
324
528
|
plotOptions: {
|
|
325
|
-
|
|
326
|
-
marker: { enabled:
|
|
327
|
-
lineWidth
|
|
529
|
+
[plotKey]: {
|
|
530
|
+
marker: { enabled: this.sparklineMarkers },
|
|
531
|
+
lineWidth,
|
|
328
532
|
lineColor: brandColor,
|
|
329
|
-
fillColor
|
|
330
|
-
|
|
331
|
-
stops: [
|
|
332
|
-
[0, brandColor + '33'],
|
|
333
|
-
[1, brandColor + '00'],
|
|
334
|
-
],
|
|
335
|
-
},
|
|
336
|
-
states: { hover: { lineWidth: 2 } },
|
|
533
|
+
...fillColor,
|
|
534
|
+
states: { hover: { lineWidth } },
|
|
337
535
|
},
|
|
338
536
|
},
|
|
339
|
-
series: [{ type:
|
|
537
|
+
series: [{ type: seriesType, data: this.sparkline }],
|
|
340
538
|
credits: { enabled: false },
|
|
341
539
|
};
|
|
342
540
|
return { ...defaults, ...this.options };
|
|
343
541
|
}
|
|
344
542
|
buildGaugeOptions() {
|
|
345
543
|
const color = this.gaugeColor || '#005EA6';
|
|
346
|
-
const trackColor = '#E5E7EB';
|
|
544
|
+
const trackColor = this.gaugeTrackColor || '#E5E7EB';
|
|
545
|
+
const innerRadius = this.gaugeInnerRadius || '80%';
|
|
546
|
+
const outerRadius = this.gaugeOuterRadius || '100%';
|
|
547
|
+
const labelFontSize = this.formatCssLength(this.gaugeLabelFontSize) ?? '28px';
|
|
548
|
+
const labelColor = this.gaugeLabelColor || '#101828';
|
|
549
|
+
const labelFontWeight = this.gaugeLabelFontWeight ?? 600;
|
|
347
550
|
const displayValue = typeof this.value !== 'undefined' && this.value !== ''
|
|
348
551
|
? (typeof this.value === 'number' ? this.value : this.gaugeValue)
|
|
349
552
|
: this.gaugeValue;
|
|
350
553
|
return {
|
|
351
554
|
chart: {
|
|
352
555
|
type: 'solidgauge',
|
|
353
|
-
height:
|
|
556
|
+
height: this.gaugeHeight,
|
|
354
557
|
margin: [0, 0, 0, 0],
|
|
355
558
|
backgroundColor: 'transparent',
|
|
356
559
|
},
|
|
357
560
|
title: { text: undefined },
|
|
358
561
|
subtitle: { text: undefined },
|
|
359
562
|
pane: {
|
|
360
|
-
startAngle:
|
|
361
|
-
endAngle:
|
|
563
|
+
startAngle: this.gaugeStartAngle,
|
|
564
|
+
endAngle: this.gaugeEndAngle,
|
|
362
565
|
background: [{
|
|
363
566
|
backgroundColor: trackColor,
|
|
364
|
-
outerRadius
|
|
365
|
-
innerRadius
|
|
567
|
+
outerRadius,
|
|
568
|
+
innerRadius,
|
|
366
569
|
borderWidth: 0,
|
|
367
570
|
shape: 'arc',
|
|
368
571
|
}],
|
|
@@ -384,11 +587,11 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
384
587
|
dataLabels: {
|
|
385
588
|
enabled: true,
|
|
386
589
|
borderWidth: 0,
|
|
387
|
-
y:
|
|
590
|
+
y: this.gaugeLabelYOffset,
|
|
388
591
|
useHTML: true,
|
|
389
|
-
format: `<div style="text-align:center"><span style="font-size
|
|
592
|
+
format: `<div style="text-align:center"><span style="font-size:${labelFontSize};font-weight:${labelFontWeight};color:${labelColor}">${this.prefix}{y}${this.suffix}</span></div>`,
|
|
390
593
|
},
|
|
391
|
-
rounded:
|
|
594
|
+
rounded: this.gaugeRounded,
|
|
392
595
|
linecap: 'round',
|
|
393
596
|
},
|
|
394
597
|
},
|
|
@@ -398,8 +601,8 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
398
601
|
data: [{
|
|
399
602
|
y: displayValue,
|
|
400
603
|
color,
|
|
401
|
-
radius:
|
|
402
|
-
innerRadius
|
|
604
|
+
radius: outerRadius,
|
|
605
|
+
innerRadius,
|
|
403
606
|
}],
|
|
404
607
|
}],
|
|
405
608
|
credits: { enabled: false },
|
|
@@ -451,7 +654,7 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
451
654
|
// ── Render ───────────────────────────────────────────────────────────────
|
|
452
655
|
renderTrend() {
|
|
453
656
|
if (this.trendValue === null)
|
|
454
|
-
return
|
|
657
|
+
return undefined;
|
|
455
658
|
const dir = this.trendDirection;
|
|
456
659
|
const formatted = Math.abs(this.trendValue).toFixed(1) + '%';
|
|
457
660
|
return html `
|
|
@@ -469,35 +672,31 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
469
672
|
}
|
|
470
673
|
render() {
|
|
471
674
|
if (this.loading) {
|
|
472
|
-
return html `<div class="chart-loading"
|
|
675
|
+
return html `<div class="chart-loading">${this.loadingText}</div>`;
|
|
473
676
|
}
|
|
474
677
|
const isGauge = this.variant === 'gauge';
|
|
475
678
|
return html `
|
|
476
679
|
<div class="kpi ${isGauge ? 'kpi--gauge' : ''}">
|
|
477
680
|
${this.label ? html `<p class="kpi-label">${this.label}</p>` : nothing}
|
|
478
681
|
|
|
479
|
-
${isGauge
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
`
|
|
487
|
-
: nothing}
|
|
682
|
+
${isGauge ? html `
|
|
683
|
+
<div
|
|
684
|
+
class="kpi-gauge-container"
|
|
685
|
+
@mouseenter=${this._onGaugeEnter}
|
|
686
|
+
@mouseleave=${this._onTipLeave}
|
|
687
|
+
></div>
|
|
688
|
+
` : nothing}
|
|
488
689
|
|
|
489
690
|
<div class="kpi-value-row">
|
|
490
|
-
${!isGauge
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
`
|
|
500
|
-
: nothing}
|
|
691
|
+
${!isGauge ? html `
|
|
692
|
+
<h2
|
|
693
|
+
class="kpi-value"
|
|
694
|
+
@mouseenter=${this._onValueEnter}
|
|
695
|
+
@mouseleave=${this._onTipLeave}
|
|
696
|
+
>
|
|
697
|
+
${this.prefix ? html `<span class="kpi-prefix">${this.prefix}</span>` : nothing}${this.value}${this.suffix ? html `<span class="kpi-suffix">${this.suffix}</span>` : nothing}
|
|
698
|
+
</h2>
|
|
699
|
+
` : nothing}
|
|
501
700
|
${!isGauge ? this.renderTrend() : nothing}
|
|
502
701
|
</div>
|
|
503
702
|
|
|
@@ -505,9 +704,7 @@ let NileKpiChart = class NileKpiChart extends NileElement {
|
|
|
505
704
|
|
|
506
705
|
${this.description ? html `<p class="kpi-description">${this.description}</p>` : nothing}
|
|
507
706
|
|
|
508
|
-
${this.sparkline.length && !isGauge
|
|
509
|
-
? html `<div class="kpi-sparkline"></div>`
|
|
510
|
-
: nothing}
|
|
707
|
+
${this.sparkline.length && !isGauge ? html `<div class="kpi-sparkline"></div>` : nothing}
|
|
511
708
|
</div>
|
|
512
709
|
`;
|
|
513
710
|
}
|
|
@@ -555,6 +752,21 @@ __decorate([
|
|
|
555
752
|
__decorate([
|
|
556
753
|
property({ type: String, attribute: 'sparkline-color' })
|
|
557
754
|
], NileKpiChart.prototype, "sparklineColor", void 0);
|
|
755
|
+
__decorate([
|
|
756
|
+
property({ type: Number, attribute: 'sparkline-height' })
|
|
757
|
+
], NileKpiChart.prototype, "sparklineHeight", void 0);
|
|
758
|
+
__decorate([
|
|
759
|
+
property({ type: Number, attribute: 'sparkline-line-width' })
|
|
760
|
+
], NileKpiChart.prototype, "sparklineLineWidth", void 0);
|
|
761
|
+
__decorate([
|
|
762
|
+
property({ type: String, attribute: 'sparkline-type' })
|
|
763
|
+
], NileKpiChart.prototype, "sparklineType", void 0);
|
|
764
|
+
__decorate([
|
|
765
|
+
property({ type: Number, attribute: 'sparkline-fill-opacity' })
|
|
766
|
+
], NileKpiChart.prototype, "sparklineFillOpacity", void 0);
|
|
767
|
+
__decorate([
|
|
768
|
+
property({ type: Boolean, attribute: 'sparkline-markers' })
|
|
769
|
+
], NileKpiChart.prototype, "sparklineMarkers", void 0);
|
|
558
770
|
__decorate([
|
|
559
771
|
property({ type: Number, attribute: 'gauge-value' })
|
|
560
772
|
], NileKpiChart.prototype, "gaugeValue", void 0);
|
|
@@ -567,6 +779,108 @@ __decorate([
|
|
|
567
779
|
__decorate([
|
|
568
780
|
property({ type: String, attribute: 'gauge-color' })
|
|
569
781
|
], NileKpiChart.prototype, "gaugeColor", void 0);
|
|
782
|
+
__decorate([
|
|
783
|
+
property({ type: String, attribute: 'gauge-track-color' })
|
|
784
|
+
], NileKpiChart.prototype, "gaugeTrackColor", void 0);
|
|
785
|
+
__decorate([
|
|
786
|
+
property({ type: Number, attribute: 'gauge-start-angle' })
|
|
787
|
+
], NileKpiChart.prototype, "gaugeStartAngle", void 0);
|
|
788
|
+
__decorate([
|
|
789
|
+
property({ type: Number, attribute: 'gauge-end-angle' })
|
|
790
|
+
], NileKpiChart.prototype, "gaugeEndAngle", void 0);
|
|
791
|
+
__decorate([
|
|
792
|
+
property({ type: String, attribute: 'gauge-inner-radius' })
|
|
793
|
+
], NileKpiChart.prototype, "gaugeInnerRadius", void 0);
|
|
794
|
+
__decorate([
|
|
795
|
+
property({ type: Boolean, attribute: 'gauge-rounded' })
|
|
796
|
+
], NileKpiChart.prototype, "gaugeRounded", void 0);
|
|
797
|
+
__decorate([
|
|
798
|
+
property({ type: String, attribute: 'gauge-label-font-size' })
|
|
799
|
+
], NileKpiChart.prototype, "gaugeLabelFontSize", void 0);
|
|
800
|
+
__decorate([
|
|
801
|
+
property({ type: String, attribute: 'gauge-label-color' })
|
|
802
|
+
], NileKpiChart.prototype, "gaugeLabelColor", void 0);
|
|
803
|
+
__decorate([
|
|
804
|
+
property({ type: String, attribute: 'gauge-label-font-weight' })
|
|
805
|
+
], NileKpiChart.prototype, "gaugeLabelFontWeight", void 0);
|
|
806
|
+
__decorate([
|
|
807
|
+
property({ type: Number, attribute: 'gauge-label-y-offset' })
|
|
808
|
+
], NileKpiChart.prototype, "gaugeLabelYOffset", void 0);
|
|
809
|
+
__decorate([
|
|
810
|
+
property({ type: Number, attribute: 'gauge-height' })
|
|
811
|
+
], NileKpiChart.prototype, "gaugeHeight", void 0);
|
|
812
|
+
__decorate([
|
|
813
|
+
property({ type: String, attribute: 'gauge-outer-radius' })
|
|
814
|
+
], NileKpiChart.prototype, "gaugeOuterRadius", void 0);
|
|
815
|
+
__decorate([
|
|
816
|
+
property({ type: String, attribute: 'value-font-size' })
|
|
817
|
+
], NileKpiChart.prototype, "valueFontSize", void 0);
|
|
818
|
+
__decorate([
|
|
819
|
+
property({ type: String, attribute: 'value-color' })
|
|
820
|
+
], NileKpiChart.prototype, "valueColor", void 0);
|
|
821
|
+
__decorate([
|
|
822
|
+
property({ type: String, attribute: 'loading-text' })
|
|
823
|
+
], NileKpiChart.prototype, "loadingText", void 0);
|
|
824
|
+
__decorate([
|
|
825
|
+
property({ type: Boolean, attribute: 'tooltip-enabled' })
|
|
826
|
+
], NileKpiChart.prototype, "tooltipEnabled", void 0);
|
|
827
|
+
__decorate([
|
|
828
|
+
property({ type: String, attribute: 'card-background' })
|
|
829
|
+
], NileKpiChart.prototype, "cardBackground", void 0);
|
|
830
|
+
__decorate([
|
|
831
|
+
property({ type: String, attribute: 'card-border-color' })
|
|
832
|
+
], NileKpiChart.prototype, "cardBorderColor", void 0);
|
|
833
|
+
__decorate([
|
|
834
|
+
property({ type: String, attribute: 'card-border-width' })
|
|
835
|
+
], NileKpiChart.prototype, "cardBorderWidth", void 0);
|
|
836
|
+
__decorate([
|
|
837
|
+
property({ type: String, attribute: 'card-border-radius' })
|
|
838
|
+
], NileKpiChart.prototype, "cardBorderRadius", void 0);
|
|
839
|
+
__decorate([
|
|
840
|
+
property({ type: String, attribute: 'card-shadow' })
|
|
841
|
+
], NileKpiChart.prototype, "cardShadow", void 0);
|
|
842
|
+
__decorate([
|
|
843
|
+
property({ type: String, attribute: 'card-shadow-hover' })
|
|
844
|
+
], NileKpiChart.prototype, "cardShadowHover", void 0);
|
|
845
|
+
__decorate([
|
|
846
|
+
property({ type: String, attribute: 'card-padding-vertical' })
|
|
847
|
+
], NileKpiChart.prototype, "cardPaddingVertical", void 0);
|
|
848
|
+
__decorate([
|
|
849
|
+
property({ type: String, attribute: 'card-padding-horizontal' })
|
|
850
|
+
], NileKpiChart.prototype, "cardPaddingHorizontal", void 0);
|
|
851
|
+
__decorate([
|
|
852
|
+
property({ type: String, attribute: 'content-gap' })
|
|
853
|
+
], NileKpiChart.prototype, "contentGap", void 0);
|
|
854
|
+
__decorate([
|
|
855
|
+
property({ type: String, attribute: 'label-color' })
|
|
856
|
+
], NileKpiChart.prototype, "labelColor", void 0);
|
|
857
|
+
__decorate([
|
|
858
|
+
property({ type: String, attribute: 'label-font-size' })
|
|
859
|
+
], NileKpiChart.prototype, "labelFontSize", void 0);
|
|
860
|
+
__decorate([
|
|
861
|
+
property({ type: String, attribute: 'label-font-weight' })
|
|
862
|
+
], NileKpiChart.prototype, "labelFontWeight", void 0);
|
|
863
|
+
__decorate([
|
|
864
|
+
property({ type: String, attribute: 'description-color' })
|
|
865
|
+
], NileKpiChart.prototype, "descriptionColor", void 0);
|
|
866
|
+
__decorate([
|
|
867
|
+
property({ type: String, attribute: 'description-font-size' })
|
|
868
|
+
], NileKpiChart.prototype, "descriptionFontSize", void 0);
|
|
869
|
+
__decorate([
|
|
870
|
+
property({ type: String, attribute: 'prefix-suffix-color' })
|
|
871
|
+
], NileKpiChart.prototype, "prefixSuffixColor", void 0);
|
|
872
|
+
__decorate([
|
|
873
|
+
property({ type: String, attribute: 'prefix-suffix-font-size' })
|
|
874
|
+
], NileKpiChart.prototype, "prefixSuffixFontSize", void 0);
|
|
875
|
+
__decorate([
|
|
876
|
+
property({ type: String, attribute: 'trend-up-color' })
|
|
877
|
+
], NileKpiChart.prototype, "trendUpColor", void 0);
|
|
878
|
+
__decorate([
|
|
879
|
+
property({ type: String, attribute: 'trend-down-color' })
|
|
880
|
+
], NileKpiChart.prototype, "trendDownColor", void 0);
|
|
881
|
+
__decorate([
|
|
882
|
+
property({ type: String, attribute: 'trend-neutral-color' })
|
|
883
|
+
], NileKpiChart.prototype, "trendNeutralColor", void 0);
|
|
570
884
|
__decorate([
|
|
571
885
|
property({ type: Boolean, reflect: true })
|
|
572
886
|
], NileKpiChart.prototype, "loading", void 0);
|
|
@@ -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-line-chart.css.js.map
|
|
@@ -23,6 +23,19 @@ export declare class NileLineChart extends NileElement {
|
|
|
23
23
|
loading: boolean;
|
|
24
24
|
height: 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;
|