@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
|
@@ -10,4 +10,15 @@ export interface ChartVectorConfigType {
|
|
|
10
10
|
height?: string;
|
|
11
11
|
loading?: boolean;
|
|
12
12
|
options?: Options;
|
|
13
|
+
chartBg?: string;
|
|
14
|
+
chartBorderRadius?: string | number;
|
|
15
|
+
chartBorder?: string;
|
|
16
|
+
chartShadow?: string;
|
|
17
|
+
chartPadding?: string | number;
|
|
18
|
+
chartMinHeight?: string | number;
|
|
19
|
+
loadingText?: string;
|
|
20
|
+
loadingColor?: string;
|
|
21
|
+
loadingFontSize?: string | number;
|
|
22
|
+
loadingFontFamily?: string;
|
|
23
|
+
loadingBg?: string;
|
|
13
24
|
}
|
|
@@ -8,4 +8,16 @@ export interface ChartWaterfallConfigType {
|
|
|
8
8
|
height?: string;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
options?: Options;
|
|
11
|
+
chartBg?: string;
|
|
12
|
+
chartBorderRadius?: string | number;
|
|
13
|
+
chartBorder?: string;
|
|
14
|
+
chartShadow?: string;
|
|
15
|
+
chartPadding?: string | number;
|
|
16
|
+
chartMinHeight?: string | number;
|
|
17
|
+
loadingText?: string;
|
|
18
|
+
loadingColor?: string;
|
|
19
|
+
loadingFontSize?: string | number;
|
|
20
|
+
loadingFontFamily?: string;
|
|
21
|
+
loadingBg?: string;
|
|
22
|
+
showLegend?: boolean;
|
|
11
23
|
}
|
|
@@ -10,4 +10,16 @@ export interface ChartXrangeConfigType {
|
|
|
10
10
|
height?: string;
|
|
11
11
|
loading?: boolean;
|
|
12
12
|
options?: Options;
|
|
13
|
+
chartBg?: string;
|
|
14
|
+
chartBorderRadius?: string | number;
|
|
15
|
+
chartBorder?: string;
|
|
16
|
+
chartShadow?: string;
|
|
17
|
+
chartPadding?: string | number;
|
|
18
|
+
chartMinHeight?: string | number;
|
|
19
|
+
loadingText?: string;
|
|
20
|
+
loadingColor?: string;
|
|
21
|
+
loadingFontSize?: string | number;
|
|
22
|
+
loadingFontFamily?: string;
|
|
23
|
+
loadingBg?: string;
|
|
24
|
+
showLegend?: boolean;
|
|
13
25
|
}
|
|
@@ -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-anomaly-chart.css.js.map
|
|
@@ -41,6 +41,18 @@ export declare class NileAnomalyChart extends NileElement {
|
|
|
41
41
|
height: string;
|
|
42
42
|
/** Y-axis title text. */
|
|
43
43
|
yAxisTitle: string;
|
|
44
|
+
chartBg: string;
|
|
45
|
+
chartBorderRadius: string | number;
|
|
46
|
+
chartBorder: string;
|
|
47
|
+
chartShadow: string;
|
|
48
|
+
chartPadding: string | number;
|
|
49
|
+
chartMinHeight: string | number;
|
|
50
|
+
loadingText: string;
|
|
51
|
+
loadingColor: string;
|
|
52
|
+
loadingFontSize: string | number;
|
|
53
|
+
loadingFontFamily: string;
|
|
54
|
+
loadingBg: string;
|
|
55
|
+
private _syncCssVars;
|
|
44
56
|
/** Apply { chart, aq } config to individual properties. */
|
|
45
57
|
private applyConfig;
|
|
46
58
|
connectedCallback(): void;
|
|
@@ -31,6 +31,40 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
31
31
|
this.height = '400px';
|
|
32
32
|
/** Y-axis title text. */
|
|
33
33
|
this.yAxisTitle = '';
|
|
34
|
+
// ── Container styling ──
|
|
35
|
+
this.chartBg = '';
|
|
36
|
+
this.chartBorderRadius = '';
|
|
37
|
+
this.chartBorder = '';
|
|
38
|
+
this.chartShadow = '';
|
|
39
|
+
this.chartPadding = '';
|
|
40
|
+
this.chartMinHeight = '';
|
|
41
|
+
// ── Loading ──
|
|
42
|
+
this.loadingText = 'Loading...';
|
|
43
|
+
this.loadingColor = '';
|
|
44
|
+
this.loadingFontSize = '';
|
|
45
|
+
this.loadingFontFamily = '';
|
|
46
|
+
this.loadingBg = '';
|
|
47
|
+
}
|
|
48
|
+
_syncCssVars() {
|
|
49
|
+
const set = (prop, val) => {
|
|
50
|
+
const s = typeof val === 'number'
|
|
51
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
52
|
+
: String(val ?? '').trim();
|
|
53
|
+
if (s)
|
|
54
|
+
this.style.setProperty(prop, s);
|
|
55
|
+
else
|
|
56
|
+
this.style.removeProperty(prop);
|
|
57
|
+
};
|
|
58
|
+
set('--nile-chart-bg', this.chartBg);
|
|
59
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
60
|
+
set('--nile-chart-border', this.chartBorder);
|
|
61
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
62
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
63
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
64
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
65
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
66
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
67
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
34
68
|
}
|
|
35
69
|
/** Apply { chart, aq } config to individual properties. */
|
|
36
70
|
applyConfig(cfg) {
|
|
@@ -51,6 +85,28 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
51
85
|
this.options = anom.options;
|
|
52
86
|
if (anom.anomaly)
|
|
53
87
|
this.anomaly = anom.anomaly;
|
|
88
|
+
if (anom.chartBg !== undefined)
|
|
89
|
+
this.chartBg = anom.chartBg;
|
|
90
|
+
if (anom.chartBorderRadius !== undefined)
|
|
91
|
+
this.chartBorderRadius = anom.chartBorderRadius;
|
|
92
|
+
if (anom.chartBorder !== undefined)
|
|
93
|
+
this.chartBorder = anom.chartBorder;
|
|
94
|
+
if (anom.chartShadow !== undefined)
|
|
95
|
+
this.chartShadow = anom.chartShadow;
|
|
96
|
+
if (anom.chartPadding !== undefined)
|
|
97
|
+
this.chartPadding = anom.chartPadding;
|
|
98
|
+
if (anom.chartMinHeight !== undefined)
|
|
99
|
+
this.chartMinHeight = anom.chartMinHeight;
|
|
100
|
+
if (anom.loadingText !== undefined)
|
|
101
|
+
this.loadingText = anom.loadingText;
|
|
102
|
+
if (anom.loadingColor !== undefined)
|
|
103
|
+
this.loadingColor = anom.loadingColor;
|
|
104
|
+
if (anom.loadingFontSize !== undefined)
|
|
105
|
+
this.loadingFontSize = anom.loadingFontSize;
|
|
106
|
+
if (anom.loadingFontFamily !== undefined)
|
|
107
|
+
this.loadingFontFamily = anom.loadingFontFamily;
|
|
108
|
+
if (anom.loadingBg !== undefined)
|
|
109
|
+
this.loadingBg = anom.loadingBg;
|
|
54
110
|
}
|
|
55
111
|
if (aq) {
|
|
56
112
|
if (aq.chartTitle)
|
|
@@ -71,6 +127,7 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
71
127
|
this.resizeObserver = null;
|
|
72
128
|
}
|
|
73
129
|
firstUpdated() {
|
|
130
|
+
this._syncCssVars();
|
|
74
131
|
this.initChart();
|
|
75
132
|
this.setupResizeObserver();
|
|
76
133
|
}
|
|
@@ -79,6 +136,10 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
79
136
|
this.applyConfig(this.config);
|
|
80
137
|
return;
|
|
81
138
|
}
|
|
139
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
140
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
141
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
142
|
+
this._syncCssVars();
|
|
82
143
|
const chartProps = [
|
|
83
144
|
'data',
|
|
84
145
|
'categories',
|
|
@@ -263,7 +324,7 @@ let NileAnomalyChart = class NileAnomalyChart extends NileElement {
|
|
|
263
324
|
}
|
|
264
325
|
render() {
|
|
265
326
|
if (this.loading) {
|
|
266
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
327
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
267
328
|
}
|
|
268
329
|
return html `<div class="chart-container"></div>`;
|
|
269
330
|
}
|
|
@@ -302,6 +363,39 @@ __decorate([
|
|
|
302
363
|
__decorate([
|
|
303
364
|
property({ type: String, attribute: 'y-axis-title' })
|
|
304
365
|
], NileAnomalyChart.prototype, "yAxisTitle", void 0);
|
|
366
|
+
__decorate([
|
|
367
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
368
|
+
], NileAnomalyChart.prototype, "chartBg", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
371
|
+
], NileAnomalyChart.prototype, "chartBorderRadius", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
property({ type: String, attribute: 'chart-border' })
|
|
374
|
+
], NileAnomalyChart.prototype, "chartBorder", void 0);
|
|
375
|
+
__decorate([
|
|
376
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
377
|
+
], NileAnomalyChart.prototype, "chartShadow", void 0);
|
|
378
|
+
__decorate([
|
|
379
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
380
|
+
], NileAnomalyChart.prototype, "chartPadding", void 0);
|
|
381
|
+
__decorate([
|
|
382
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
383
|
+
], NileAnomalyChart.prototype, "chartMinHeight", void 0);
|
|
384
|
+
__decorate([
|
|
385
|
+
property({ type: String, attribute: 'loading-text' })
|
|
386
|
+
], NileAnomalyChart.prototype, "loadingText", void 0);
|
|
387
|
+
__decorate([
|
|
388
|
+
property({ type: String, attribute: 'loading-color' })
|
|
389
|
+
], NileAnomalyChart.prototype, "loadingColor", void 0);
|
|
390
|
+
__decorate([
|
|
391
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
392
|
+
], NileAnomalyChart.prototype, "loadingFontSize", void 0);
|
|
393
|
+
__decorate([
|
|
394
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
395
|
+
], NileAnomalyChart.prototype, "loadingFontFamily", void 0);
|
|
396
|
+
__decorate([
|
|
397
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
398
|
+
], NileAnomalyChart.prototype, "loadingBg", void 0);
|
|
305
399
|
NileAnomalyChart = __decorate([
|
|
306
400
|
customElement('nile-anomaly-chart')
|
|
307
401
|
], NileAnomalyChart);
|
|
@@ -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-area-chart.css.js.map
|
|
@@ -24,6 +24,19 @@ export declare class NileAreaChart extends NileElement {
|
|
|
24
24
|
height: string;
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
stacked: boolean;
|
|
27
|
+
showLegend: boolean;
|
|
28
|
+
chartBg: string;
|
|
29
|
+
chartBorderRadius: string | number;
|
|
30
|
+
chartBorder: string;
|
|
31
|
+
chartShadow: string;
|
|
32
|
+
chartPadding: string | number;
|
|
33
|
+
chartMinHeight: string | number;
|
|
34
|
+
loadingText: string;
|
|
35
|
+
loadingColor: string;
|
|
36
|
+
loadingFontSize: string | number;
|
|
37
|
+
loadingFontFamily: string;
|
|
38
|
+
loadingBg: string;
|
|
39
|
+
private _syncCssVars;
|
|
27
40
|
/** Apply { chart, aq } config to individual properties. */
|
|
28
41
|
private applyConfig;
|
|
29
42
|
connectedCallback(): void;
|
|
@@ -22,6 +22,41 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
22
22
|
this.height = '400px';
|
|
23
23
|
this.yAxisTitle = '';
|
|
24
24
|
this.stacked = false;
|
|
25
|
+
this.showLegend = true;
|
|
26
|
+
// ── Container styling ──
|
|
27
|
+
this.chartBg = '';
|
|
28
|
+
this.chartBorderRadius = '';
|
|
29
|
+
this.chartBorder = '';
|
|
30
|
+
this.chartShadow = '';
|
|
31
|
+
this.chartPadding = '';
|
|
32
|
+
this.chartMinHeight = '';
|
|
33
|
+
// ── Loading ──
|
|
34
|
+
this.loadingText = 'Loading...';
|
|
35
|
+
this.loadingColor = '';
|
|
36
|
+
this.loadingFontSize = '';
|
|
37
|
+
this.loadingFontFamily = '';
|
|
38
|
+
this.loadingBg = '';
|
|
39
|
+
}
|
|
40
|
+
_syncCssVars() {
|
|
41
|
+
const set = (prop, val) => {
|
|
42
|
+
const s = typeof val === 'number'
|
|
43
|
+
? (Number.isFinite(val) ? `${val}px` : '')
|
|
44
|
+
: String(val ?? '').trim();
|
|
45
|
+
if (s)
|
|
46
|
+
this.style.setProperty(prop, s);
|
|
47
|
+
else
|
|
48
|
+
this.style.removeProperty(prop);
|
|
49
|
+
};
|
|
50
|
+
set('--nile-chart-bg', this.chartBg);
|
|
51
|
+
set('--nile-chart-border-radius', this.chartBorderRadius);
|
|
52
|
+
set('--nile-chart-border', this.chartBorder);
|
|
53
|
+
set('--nile-chart-shadow', this.chartShadow);
|
|
54
|
+
set('--nile-chart-padding', this.chartPadding);
|
|
55
|
+
set('--nile-chart-min-height', this.chartMinHeight);
|
|
56
|
+
set('--nile-chart-loading-color', this.loadingColor);
|
|
57
|
+
set('--nile-chart-loading-font-size', this.loadingFontSize);
|
|
58
|
+
set('--nile-chart-loading-font-family', this.loadingFontFamily);
|
|
59
|
+
set('--nile-chart-loading-bg', this.loadingBg);
|
|
25
60
|
}
|
|
26
61
|
/** Apply { chart, aq } config to individual properties. */
|
|
27
62
|
applyConfig(cfg) {
|
|
@@ -42,6 +77,30 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
42
77
|
this.options = area.options;
|
|
43
78
|
if (area.stacked !== undefined)
|
|
44
79
|
this.stacked = area.stacked;
|
|
80
|
+
if (area.chartBg !== undefined)
|
|
81
|
+
this.chartBg = area.chartBg;
|
|
82
|
+
if (area.chartBorderRadius !== undefined)
|
|
83
|
+
this.chartBorderRadius = area.chartBorderRadius;
|
|
84
|
+
if (area.chartBorder !== undefined)
|
|
85
|
+
this.chartBorder = area.chartBorder;
|
|
86
|
+
if (area.chartShadow !== undefined)
|
|
87
|
+
this.chartShadow = area.chartShadow;
|
|
88
|
+
if (area.chartPadding !== undefined)
|
|
89
|
+
this.chartPadding = area.chartPadding;
|
|
90
|
+
if (area.chartMinHeight !== undefined)
|
|
91
|
+
this.chartMinHeight = area.chartMinHeight;
|
|
92
|
+
if (area.loadingText !== undefined)
|
|
93
|
+
this.loadingText = area.loadingText;
|
|
94
|
+
if (area.loadingColor !== undefined)
|
|
95
|
+
this.loadingColor = area.loadingColor;
|
|
96
|
+
if (area.loadingFontSize !== undefined)
|
|
97
|
+
this.loadingFontSize = area.loadingFontSize;
|
|
98
|
+
if (area.loadingFontFamily !== undefined)
|
|
99
|
+
this.loadingFontFamily = area.loadingFontFamily;
|
|
100
|
+
if (area.loadingBg !== undefined)
|
|
101
|
+
this.loadingBg = area.loadingBg;
|
|
102
|
+
if (area.showLegend !== undefined)
|
|
103
|
+
this.showLegend = area.showLegend;
|
|
45
104
|
}
|
|
46
105
|
if (aq) {
|
|
47
106
|
if (aq.chartTitle)
|
|
@@ -61,13 +120,21 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
61
120
|
this.resizeObserver?.disconnect();
|
|
62
121
|
this.resizeObserver = null;
|
|
63
122
|
}
|
|
64
|
-
firstUpdated() {
|
|
123
|
+
firstUpdated() {
|
|
124
|
+
this._syncCssVars();
|
|
125
|
+
this.initChart();
|
|
126
|
+
this.setupResizeObserver();
|
|
127
|
+
}
|
|
65
128
|
updated(changedProperties) {
|
|
66
129
|
if (changedProperties.has('config') && this.config) {
|
|
67
130
|
this.applyConfig(this.config);
|
|
68
131
|
return;
|
|
69
132
|
}
|
|
70
|
-
const
|
|
133
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
134
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
135
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
136
|
+
this._syncCssVars();
|
|
137
|
+
const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'yAxisTitle', 'stacked', 'loading', 'showLegend'];
|
|
71
138
|
if (!props.some(p => changedProperties.has(p)))
|
|
72
139
|
return;
|
|
73
140
|
if (this.loading) {
|
|
@@ -101,6 +168,7 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
101
168
|
series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, category: this.category, value: this.y, seriesName: this.series.name }); } } } },
|
|
102
169
|
},
|
|
103
170
|
series: this.data.map(s => ({ type: 'area', name: s.name, data: s.data, color: s.color })),
|
|
171
|
+
legend: { enabled: this.showLegend },
|
|
104
172
|
credits: { enabled: false },
|
|
105
173
|
}, this.options);
|
|
106
174
|
}
|
|
@@ -118,7 +186,7 @@ let NileAreaChart = class NileAreaChart extends NileElement {
|
|
|
118
186
|
} }
|
|
119
187
|
render() {
|
|
120
188
|
if (this.loading)
|
|
121
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
189
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
122
190
|
return html `<div class="chart-container"></div>`;
|
|
123
191
|
}
|
|
124
192
|
};
|
|
@@ -156,6 +224,42 @@ __decorate([
|
|
|
156
224
|
__decorate([
|
|
157
225
|
property({ type: Boolean })
|
|
158
226
|
], NileAreaChart.prototype, "stacked", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
229
|
+
], NileAreaChart.prototype, "showLegend", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
232
|
+
], NileAreaChart.prototype, "chartBg", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
235
|
+
], NileAreaChart.prototype, "chartBorderRadius", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
property({ type: String, attribute: 'chart-border' })
|
|
238
|
+
], NileAreaChart.prototype, "chartBorder", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
241
|
+
], NileAreaChart.prototype, "chartShadow", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
244
|
+
], NileAreaChart.prototype, "chartPadding", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
247
|
+
], NileAreaChart.prototype, "chartMinHeight", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
property({ type: String, attribute: 'loading-text' })
|
|
250
|
+
], NileAreaChart.prototype, "loadingText", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: String, attribute: 'loading-color' })
|
|
253
|
+
], NileAreaChart.prototype, "loadingColor", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
256
|
+
], NileAreaChart.prototype, "loadingFontSize", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
259
|
+
], NileAreaChart.prototype, "loadingFontFamily", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
262
|
+
], NileAreaChart.prototype, "loadingBg", void 0);
|
|
159
263
|
NileAreaChart = __decorate([
|
|
160
264
|
customElement('nile-area-chart')
|
|
161
265
|
], NileAreaChart);
|
|
@@ -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-area-negative-chart.css.js.map
|
|
@@ -24,6 +24,18 @@ export declare class NileAreaNegativeChart extends NileElement {
|
|
|
24
24
|
height: string;
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
threshold: number;
|
|
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;
|
|
27
39
|
private applyConfig;
|
|
28
40
|
connectedCallback(): void;
|
|
29
41
|
disconnectedCallback(): void;
|
|
@@ -22,6 +22,40 @@ let NileAreaNegativeChart = class NileAreaNegativeChart extends NileElement {
|
|
|
22
22
|
this.height = '400px';
|
|
23
23
|
this.yAxisTitle = '';
|
|
24
24
|
this.threshold = 0;
|
|
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
|
applyConfig(cfg) {
|
|
27
61
|
applySeparatedChartConfig(this, cfg);
|
|
@@ -38,6 +72,7 @@ let NileAreaNegativeChart = class NileAreaNegativeChart extends NileElement {
|
|
|
38
72
|
this.resizeObserver = null;
|
|
39
73
|
}
|
|
40
74
|
firstUpdated() {
|
|
75
|
+
this._syncCssVars();
|
|
41
76
|
this.initChart();
|
|
42
77
|
this.setupResizeObserver();
|
|
43
78
|
}
|
|
@@ -46,6 +81,10 @@ let NileAreaNegativeChart = class NileAreaNegativeChart extends NileElement {
|
|
|
46
81
|
this.applyConfig(this.config);
|
|
47
82
|
return;
|
|
48
83
|
}
|
|
84
|
+
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
85
|
+
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
86
|
+
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
87
|
+
this._syncCssVars();
|
|
49
88
|
const props = [
|
|
50
89
|
'data',
|
|
51
90
|
'categories',
|
|
@@ -132,7 +171,7 @@ let NileAreaNegativeChart = class NileAreaNegativeChart extends NileElement {
|
|
|
132
171
|
}
|
|
133
172
|
render() {
|
|
134
173
|
if (this.loading) {
|
|
135
|
-
return html `<div class="chart-loading" style="height:${this.height}"
|
|
174
|
+
return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
|
|
136
175
|
}
|
|
137
176
|
return html `<div class="chart-container"></div>`;
|
|
138
177
|
}
|
|
@@ -171,6 +210,39 @@ __decorate([
|
|
|
171
210
|
__decorate([
|
|
172
211
|
property({ type: Number })
|
|
173
212
|
], NileAreaNegativeChart.prototype, "threshold", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: String, attribute: 'chart-bg' })
|
|
215
|
+
], NileAreaNegativeChart.prototype, "chartBg", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
property({ type: String, attribute: 'chart-border-radius' })
|
|
218
|
+
], NileAreaNegativeChart.prototype, "chartBorderRadius", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
property({ type: String, attribute: 'chart-border' })
|
|
221
|
+
], NileAreaNegativeChart.prototype, "chartBorder", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
property({ type: String, attribute: 'chart-shadow' })
|
|
224
|
+
], NileAreaNegativeChart.prototype, "chartShadow", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ type: String, attribute: 'chart-padding' })
|
|
227
|
+
], NileAreaNegativeChart.prototype, "chartPadding", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
property({ type: String, attribute: 'chart-min-height' })
|
|
230
|
+
], NileAreaNegativeChart.prototype, "chartMinHeight", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ type: String, attribute: 'loading-text' })
|
|
233
|
+
], NileAreaNegativeChart.prototype, "loadingText", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
property({ type: String, attribute: 'loading-color' })
|
|
236
|
+
], NileAreaNegativeChart.prototype, "loadingColor", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
property({ type: String, attribute: 'loading-font-size' })
|
|
239
|
+
], NileAreaNegativeChart.prototype, "loadingFontSize", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
property({ type: String, attribute: 'loading-font-family' })
|
|
242
|
+
], NileAreaNegativeChart.prototype, "loadingFontFamily", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
property({ type: String, attribute: 'loading-bg' })
|
|
245
|
+
], NileAreaNegativeChart.prototype, "loadingBg", void 0);
|
|
174
246
|
NileAreaNegativeChart = __decorate([
|
|
175
247
|
customElement('nile-area-negative-chart')
|
|
176
248
|
], NileAreaNegativeChart);
|