@aquera/nile-visualization 1.7.0 → 1.9.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.
Files changed (111) hide show
  1. package/dist/src/index.d.ts +1 -1
  2. package/dist/src/internal/dashboard-adapters.d.ts +1 -0
  3. package/dist/src/internal/dashboard-adapters.js +11 -1
  4. package/dist/src/internal/highcharts-provider.d.ts +6 -0
  5. package/dist/src/internal/highcharts-provider.js +32 -0
  6. package/dist/src/internal/types/aq-config.type.d.ts +5 -0
  7. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.css.js +2 -0
  8. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +1 -1
  9. package/dist/src/nile-area-chart/nile-area-chart.css.js +2 -0
  10. package/dist/src/nile-area-chart/nile-area-chart.js +1 -1
  11. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.css.js +2 -0
  12. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +1 -1
  13. package/dist/src/nile-area-range-chart/nile-area-range-chart.css.js +2 -0
  14. package/dist/src/nile-area-range-chart/nile-area-range-chart.js +1 -1
  15. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.css.js +2 -0
  16. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +1 -1
  17. package/dist/src/nile-bar-chart/nile-bar-chart.css.js +2 -0
  18. package/dist/src/nile-bar-chart/nile-bar-chart.js +1 -1
  19. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.css.js +2 -0
  20. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +1 -1
  21. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.css.js +2 -0
  22. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +1 -1
  23. package/dist/src/nile-bubble-chart/nile-bubble-chart.css.js +2 -0
  24. package/dist/src/nile-bubble-chart/nile-bubble-chart.js +1 -1
  25. package/dist/src/nile-chart/index.d.ts +1 -1
  26. package/dist/src/nile-chart/nile-chart-config.d.ts +69 -1
  27. package/dist/src/nile-chart/nile-chart.css.d.ts +1 -0
  28. package/dist/src/nile-chart/nile-chart.css.js +194 -82
  29. package/dist/src/nile-chart/nile-chart.d.ts +25 -6
  30. package/dist/src/nile-chart/nile-chart.js +241 -100
  31. package/dist/src/nile-cluster-chart/nile-cluster-chart.css.js +2 -0
  32. package/dist/src/nile-cluster-chart/nile-cluster-chart.js +1 -1
  33. package/dist/src/nile-column-chart/nile-column-chart.css.js +2 -0
  34. package/dist/src/nile-column-chart/nile-column-chart.js +1 -1
  35. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.css.js +2 -0
  36. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +1 -1
  37. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.css.js +2 -0
  38. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +1 -1
  39. package/dist/src/nile-column-range-chart/nile-column-range-chart.css.js +2 -0
  40. package/dist/src/nile-column-range-chart/nile-column-range-chart.js +1 -1
  41. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.css.js +10 -0
  42. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.d.ts +15 -6
  43. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.js +47 -6
  44. package/dist/src/nile-donut-chart/nile-donut-chart.css.js +2 -0
  45. package/dist/src/nile-donut-chart/nile-donut-chart.js +1 -1
  46. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.css.js +2 -0
  47. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +1 -1
  48. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.css.js +2 -0
  49. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +1 -1
  50. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.css.js +2 -0
  51. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +1 -1
  52. package/dist/src/nile-euler-chart/nile-euler-chart.css.js +2 -0
  53. package/dist/src/nile-euler-chart/nile-euler-chart.js +1 -1
  54. package/dist/src/nile-fan-chart/nile-fan-chart.css.js +2 -0
  55. package/dist/src/nile-fan-chart/nile-fan-chart.js +1 -1
  56. package/dist/src/nile-flame-chart/nile-flame-chart.css.js +2 -0
  57. package/dist/src/nile-flame-chart/nile-flame-chart.js +1 -1
  58. package/dist/src/nile-funnel-chart/nile-funnel-chart.css.js +2 -0
  59. package/dist/src/nile-funnel-chart/nile-funnel-chart.js +1 -1
  60. package/dist/src/nile-gauge-chart/nile-gauge-chart.css.js +2 -0
  61. package/dist/src/nile-gauge-chart/nile-gauge-chart.js +1 -1
  62. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.css.js +2 -0
  63. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +1 -1
  64. package/dist/src/nile-histogram-chart/nile-histogram-chart.css.js +2 -0
  65. package/dist/src/nile-histogram-chart/nile-histogram-chart.js +1 -1
  66. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.css.js +2 -0
  67. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +1 -1
  68. package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +54 -3
  69. package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +29 -1
  70. package/dist/src/nile-kpi-chart/nile-kpi-chart.js +164 -9
  71. package/dist/src/nile-line-chart/nile-line-chart.css.js +2 -0
  72. package/dist/src/nile-line-chart/nile-line-chart.js +1 -1
  73. package/dist/src/nile-line-column-chart/nile-line-column-chart.css.js +2 -0
  74. package/dist/src/nile-line-column-chart/nile-line-column-chart.js +1 -1
  75. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.css.js +2 -0
  76. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +1 -1
  77. package/dist/src/nile-map-chart/nile-map-chart.css.js +2 -0
  78. package/dist/src/nile-map-chart/nile-map-chart.js +1 -1
  79. package/dist/src/nile-organization-chart/nile-organization-chart.css.js +2 -0
  80. package/dist/src/nile-organization-chart/nile-organization-chart.js +1 -1
  81. package/dist/src/nile-pie-chart/nile-pie-chart.css.js +2 -0
  82. package/dist/src/nile-pie-chart/nile-pie-chart.js +1 -1
  83. package/dist/src/nile-polygon-chart/nile-polygon-chart.css.js +2 -0
  84. package/dist/src/nile-polygon-chart/nile-polygon-chart.js +1 -1
  85. package/dist/src/nile-radar-chart/nile-radar-chart.css.js +2 -0
  86. package/dist/src/nile-radar-chart/nile-radar-chart.js +1 -1
  87. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.css.js +2 -0
  88. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +1 -1
  89. package/dist/src/nile-scatter-chart/nile-scatter-chart.css.js +2 -0
  90. package/dist/src/nile-scatter-chart/nile-scatter-chart.js +1 -1
  91. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.css.js +2 -0
  92. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +1 -1
  93. package/dist/src/nile-spline-chart/nile-spline-chart.css.js +2 -0
  94. package/dist/src/nile-spline-chart/nile-spline-chart.js +1 -1
  95. package/dist/src/nile-stacked-chart/nile-stacked-chart.css.js +2 -0
  96. package/dist/src/nile-stacked-chart/nile-stacked-chart.js +1 -1
  97. package/dist/src/nile-timeline-chart/nile-timeline-chart.css.js +2 -0
  98. package/dist/src/nile-timeline-chart/nile-timeline-chart.js +1 -1
  99. package/dist/src/nile-trendline-chart/nile-trendline-chart.css.js +2 -0
  100. package/dist/src/nile-trendline-chart/nile-trendline-chart.js +1 -1
  101. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.css.js +2 -0
  102. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +1 -1
  103. package/dist/src/nile-vector-chart/nile-vector-chart.css.js +2 -0
  104. package/dist/src/nile-vector-chart/nile-vector-chart.js +1 -1
  105. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.css.js +2 -0
  106. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +1 -1
  107. package/dist/src/nile-widget-viewer/nile-widget-viewer.d.ts +4 -0
  108. package/dist/src/nile-widget-viewer/nile-widget-viewer.js +18 -2
  109. package/dist/src/nile-xrange-chart/nile-xrange-chart.css.js +2 -0
  110. package/dist/src/nile-xrange-chart/nile-xrange-chart.js +1 -1
  111. package/package.json +1 -1
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -126,7 +126,7 @@ let NileClusterChart = class NileClusterChart extends NileElement {
126
126
  buildOptions() {
127
127
  const self = this;
128
128
  return deepMerge({
129
- chart: { type: 'column', height: this.height },
129
+ chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
130
130
  title: { text: this.chartTitle || undefined },
131
131
  subtitle: { text: this.chartSubtitle || undefined },
132
132
  xAxis: { categories: this.categories },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -154,7 +154,7 @@ let NileColumnChart = class NileColumnChart extends NileElement {
154
154
  buildOptions() {
155
155
  const self = this;
156
156
  return deepMerge({
157
- chart: { type: 'column', height: this.height },
157
+ chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
158
158
  title: { text: this.chartTitle || undefined },
159
159
  subtitle: { text: this.chartSubtitle || undefined },
160
160
  xAxis: { categories: this.categories },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -126,7 +126,7 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
126
126
  })),
127
127
  };
128
128
  return deepMerge({
129
- chart: { type: 'column', height: this.height },
129
+ chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
130
130
  title: { text: this.chartTitle || undefined },
131
131
  subtitle: { text: this.chartSubtitle || undefined },
132
132
  xAxis: { type: 'category' },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -106,7 +106,7 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
106
106
  buildOptions() {
107
107
  const self = this;
108
108
  return deepMerge({
109
- chart: { type: 'columnpyramid', height: this.height },
109
+ chart: { type: 'columnpyramid', ...(this.height ? { height: this.height } : {}) },
110
110
  title: { text: this.chartTitle || undefined },
111
111
  subtitle: { text: this.chartSubtitle || undefined },
112
112
  xAxis: { categories: this.categories },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -116,7 +116,7 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
116
116
  buildOptions() {
117
117
  const self = this;
118
118
  return deepMerge({
119
- chart: { height: this.height },
119
+ chart: { ...(this.height ? { height: this.height } : {}) },
120
120
  title: { text: this.chartTitle || undefined },
121
121
  subtitle: { text: this.chartSubtitle || undefined },
122
122
  xAxis: { categories: this.categories },
@@ -20,6 +20,11 @@ export const styles = css `
20
20
  width: 100%;
21
21
  }
22
22
 
23
+ .dashboard-absolute {
24
+ position: relative;
25
+ width: 100%;
26
+ }
27
+
23
28
  .dashboard-cell {
24
29
  min-height: 0;
25
30
  min-width: 0;
@@ -29,6 +34,11 @@ export const styles = css `
29
34
  box-sizing: border-box;
30
35
  }
31
36
 
37
+ .dashboard-cell--absolute {
38
+ position: absolute;
39
+ box-sizing: border-box;
40
+ }
41
+
32
42
  nile-widget-viewer {
33
43
  display: block;
34
44
  width: 100%;
@@ -4,26 +4,35 @@ import NileElement from '../internal/nile-element.js';
4
4
  import type { NileDashboardConfig } from '../internal/types/dashboard-config.type.js';
5
5
  import '../nile-widget-viewer/index.js';
6
6
  /**
7
- * Renders a full dashboard of widgets. Supports two layout variants:
7
+ * Renders a full dashboard of widgets. Supports three layout variants:
8
8
  *
9
9
  * - `grid` (default): positions each widget using CSS Grid with `layout: { x, y, w, h }`.
10
10
  * - `x` / `w` → `grid-column: (x+1) / span w`
11
11
  * - `y` / `h` → `grid-row: (y+1) / span h`
12
12
  * - `fluid`: positions widgets with Flexbox. `x` / `y` are ignored; widgets flow in
13
- * declaration order and wrap as needed. `w` sets the proportional width (as a fraction
14
- * of `columns`) and `h` sets the height (in multiples of `cellHeight`).
13
+ * declaration order and wrap as needed.
14
+ * - `absolute`: pixel-faithful replacement for angular-gridster2's output. Each
15
+ * widget is `position: absolute` with computed `left`/`top`/`width`/`height`.
16
+ * Horizontal values are `calc()` of `100%` so the layout reflows with the
17
+ * container (no JS measurement required). Spacing between cells matches CSS
18
+ * `gap` (no outer margin), so the layout is pixel-identical to the `grid` variant.
15
19
  *
16
20
  * @example
17
21
  * ```html
18
- * <nile-dashboard-viewer variant="fluid" columns="12" cell-height="80" gap="8"></nile-dashboard-viewer>
22
+ * <nile-dashboard-viewer variant="absolute" columns="12" cell-height="80" gap="8"></nile-dashboard-viewer>
19
23
  * ```
20
24
  */
21
25
  export declare class NileDashboardViewer extends NileElement {
22
26
  static styles: CSSResultGroup;
23
27
  /** Dashboard configuration containing all widget configs. */
24
28
  config: NileDashboardConfig | null;
25
- /** Layout variant. `grid` uses x/y/w/h positioning; `fluid` flows widgets with Flexbox. Default: `grid`. */
26
- variant: 'grid' | 'fluid';
29
+ /**
30
+ * Layout variant.
31
+ * - `grid` uses CSS Grid with x/y/w/h positioning (default).
32
+ * - `fluid` flows widgets with Flexbox.
33
+ * - `absolute` mirrors angular-gridster2 (position:absolute with calc widths).
34
+ */
35
+ variant: 'grid' | 'fluid' | 'absolute';
27
36
  /** Total number of grid columns. Default: 12. */
28
37
  columns: number;
29
38
  /** Height of a single grid row in pixels. Default: 80. */
@@ -5,18 +5,22 @@ import NileElement from '../internal/nile-element.js';
5
5
  import { styles } from './nile-dashboard-viewer.css.js';
6
6
  import '../nile-widget-viewer/index.js';
7
7
  /**
8
- * Renders a full dashboard of widgets. Supports two layout variants:
8
+ * Renders a full dashboard of widgets. Supports three layout variants:
9
9
  *
10
10
  * - `grid` (default): positions each widget using CSS Grid with `layout: { x, y, w, h }`.
11
11
  * - `x` / `w` → `grid-column: (x+1) / span w`
12
12
  * - `y` / `h` → `grid-row: (y+1) / span h`
13
13
  * - `fluid`: positions widgets with Flexbox. `x` / `y` are ignored; widgets flow in
14
- * declaration order and wrap as needed. `w` sets the proportional width (as a fraction
15
- * of `columns`) and `h` sets the height (in multiples of `cellHeight`).
14
+ * declaration order and wrap as needed.
15
+ * - `absolute`: pixel-faithful replacement for angular-gridster2's output. Each
16
+ * widget is `position: absolute` with computed `left`/`top`/`width`/`height`.
17
+ * Horizontal values are `calc()` of `100%` so the layout reflows with the
18
+ * container (no JS measurement required). Spacing between cells matches CSS
19
+ * `gap` (no outer margin), so the layout is pixel-identical to the `grid` variant.
16
20
  *
17
21
  * @example
18
22
  * ```html
19
- * <nile-dashboard-viewer variant="fluid" columns="12" cell-height="80" gap="8"></nile-dashboard-viewer>
23
+ * <nile-dashboard-viewer variant="absolute" columns="12" cell-height="80" gap="8"></nile-dashboard-viewer>
20
24
  * ```
21
25
  */
22
26
  let NileDashboardViewer = class NileDashboardViewer extends NileElement {
@@ -24,7 +28,12 @@ let NileDashboardViewer = class NileDashboardViewer extends NileElement {
24
28
  super(...arguments);
25
29
  /** Dashboard configuration containing all widget configs. */
26
30
  this.config = null;
27
- /** Layout variant. `grid` uses x/y/w/h positioning; `fluid` flows widgets with Flexbox. Default: `grid`. */
31
+ /**
32
+ * Layout variant.
33
+ * - `grid` uses CSS Grid with x/y/w/h positioning (default).
34
+ * - `fluid` flows widgets with Flexbox.
35
+ * - `absolute` mirrors angular-gridster2 (position:absolute with calc widths).
36
+ */
28
37
  this.variant = 'grid';
29
38
  /** Total number of grid columns. Default: 12. */
30
39
  this.columns = 12;
@@ -49,7 +58,39 @@ let NileDashboardViewer = class NileDashboardViewer extends NileElement {
49
58
  style="
50
59
  flex: 1 1 ${basis};
51
60
  max-width: ${widthPct}%;
52
- min-height: ${h * this.cellHeight}px;
61
+ height: ${h * this.cellHeight}px;
62
+ "
63
+ >
64
+ <nile-widget-viewer .config=${widget}></nile-widget-viewer>
65
+ </div>
66
+ `;
67
+ })}
68
+ </div>
69
+ `;
70
+ }
71
+ if (this.variant === 'absolute') {
72
+ const C = this.columns;
73
+ const rH = this.cellHeight;
74
+ const m = this.gap;
75
+ const maxRow = this.config.widgets.reduce((acc, widget) => Math.max(acc, widget.layout.y + widget.layout.h), 0);
76
+ const containerH = maxRow > 0 ? maxRow * rH + (maxRow - 1) * m : 0;
77
+ const colExpr = `(100% - ${(C - 1) * m}px) / ${C}`;
78
+ return html `
79
+ <div class="dashboard-absolute" style="height: ${containerH}px;">
80
+ ${this.config.widgets.map((widget) => {
81
+ const { x, y, w, h } = widget.layout;
82
+ const leftStyle = `calc(${colExpr} * ${x} + ${x * m}px)`;
83
+ const widthStyle = `calc(${colExpr} * ${w} + ${(w - 1) * m}px)`;
84
+ const topPx = y * (rH + m);
85
+ const heightPx = h * rH + (h - 1) * m;
86
+ return html `
87
+ <div
88
+ class="dashboard-cell dashboard-cell--absolute"
89
+ style="
90
+ left: ${leftStyle};
91
+ top: ${topPx}px;
92
+ width: ${widthStyle};
93
+ height: ${heightPx}px;
53
94
  "
54
95
  >
55
96
  <nile-widget-viewer .config=${widget}></nile-widget-viewer>
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -161,7 +161,7 @@ let NileDonutChart = class NileDonutChart extends NileElement {
161
161
  buildOptions() {
162
162
  const self = this;
163
163
  return deepMerge({
164
- chart: { type: 'pie', height: this.height },
164
+ chart: { type: 'pie', ...(this.height ? { height: this.height } : {}) },
165
165
  title: { text: this.chartTitle || undefined },
166
166
  subtitle: { text: this.chartSubtitle || undefined },
167
167
  tooltip: { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -130,7 +130,7 @@ let NileDumbbellChart = class NileDumbbellChart extends NileElement {
130
130
  return deepMerge({
131
131
  chart: {
132
132
  type: 'dumbbell',
133
- height: this.height,
133
+ ...(this.height ? { height: this.height } : {}),
134
134
  inverted: this.horizontal,
135
135
  },
136
136
  title: { text: this.chartTitle || undefined },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -126,7 +126,7 @@ let NileDumbbellLowerChart = class NileDumbbellLowerChart extends NileElement {
126
126
  return deepMerge({
127
127
  chart: {
128
128
  type: 'dumbbell',
129
- height: this.height,
129
+ ...(this.height ? { height: this.height } : {}),
130
130
  inverted: this.horizontal,
131
131
  },
132
132
  title: { text: this.chartTitle || undefined },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -126,7 +126,7 @@ let NileDumbbellUpperChart = class NileDumbbellUpperChart extends NileElement {
126
126
  return deepMerge({
127
127
  chart: {
128
128
  type: 'dumbbell',
129
- height: this.height,
129
+ ...(this.height ? { height: this.height } : {}),
130
130
  inverted: this.horizontal,
131
131
  },
132
132
  title: { text: this.chartTitle || undefined },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -105,7 +105,7 @@ let NileEulerChart = class NileEulerChart extends NileElement {
105
105
  buildOptions() {
106
106
  const self = this;
107
107
  return deepMerge({
108
- chart: { height: this.height },
108
+ chart: { ...(this.height ? { height: this.height } : {}) },
109
109
  title: { text: this.chartTitle || undefined },
110
110
  subtitle: { text: this.chartSubtitle || undefined },
111
111
  tooltip: { headerFormat: '', pointFormat: '{point.name}: <b>{point.value}</b>' },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -174,7 +174,7 @@ let NileFanChart = class NileFanChart extends NileElement {
174
174
  }));
175
175
  return deepMerge({
176
176
  chart: {
177
- height: this.height,
177
+ ...(this.height ? { height: this.height } : {}),
178
178
  zoomType: 'x',
179
179
  },
180
180
  title: { text: this.chartTitle || undefined },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -186,7 +186,7 @@ let NileFlameChart = class NileFlameChart extends NileElement {
186
186
  const titleText = this.chartTitle ||
187
187
  (isSunburst ? 'Sunburst' : this.layout === 'icicle' ? 'Icicle chart' : 'Flame chart');
188
188
  return deepMerge({
189
- chart: { inverted: !isSunburst, height: this.height },
189
+ chart: { inverted: !isSunburst, ...(this.height ? { height: this.height } : {}) },
190
190
  title: { text: titleText, align: 'left' },
191
191
  subtitle: { text: this.chartSubtitle || undefined, align: 'left' },
192
192
  legend: { enabled: false },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -120,7 +120,7 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
120
120
  buildOptions() {
121
121
  const self = this;
122
122
  return deepMerge({
123
- chart: { type: 'funnel', height: this.height },
123
+ chart: { type: 'funnel', ...(this.height ? { height: this.height } : {}) },
124
124
  title: { text: this.chartTitle || undefined },
125
125
  subtitle: { text: this.chartSubtitle || undefined },
126
126
  tooltip: {
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -152,7 +152,7 @@ let NileGaugeChart = class NileGaugeChart extends NileElement {
152
152
  }
153
153
  buildOptions() {
154
154
  return deepMerge({
155
- chart: { type: 'gauge', height: this.height },
155
+ chart: { type: 'gauge', ...(this.height ? { height: this.height } : {}) },
156
156
  title: { text: this.chartTitle || undefined },
157
157
  subtitle: { text: this.chartSubtitle || undefined },
158
158
  pane: {
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -153,7 +153,7 @@ let NileHeatmapChart = class NileHeatmapChart extends NileElement {
153
153
  const cMax = this.colorMax ?? ext.max;
154
154
  const seriesData = this.data.map(c => [c.x, c.y, c.value]);
155
155
  return deepMerge({
156
- chart: { type: 'heatmap', height: this.height },
156
+ chart: { type: 'heatmap', ...(this.height ? { height: this.height } : {}) },
157
157
  title: { text: this.chartTitle || undefined },
158
158
  subtitle: { text: this.chartSubtitle || undefined },
159
159
  xAxis: { categories: this.xCategories, title: { text: undefined } },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -155,7 +155,7 @@ let NileHistogramChart = class NileHistogramChart extends NileElement {
155
155
  const sorted = [...this.data].sort((a, b) => a - b);
156
156
  const scatterData = sorted.map(x => [x, 0]);
157
157
  return deepMerge({
158
- chart: { height: this.height },
158
+ chart: { ...(this.height ? { height: this.height } : {}) },
159
159
  title: { text: this.chartTitle || undefined },
160
160
  subtitle: { text: this.chartSubtitle || undefined },
161
161
  legend: { enabled: this.showLegend },
@@ -13,6 +13,7 @@ export const styles = css `
13
13
  --nile-chart-loading-bg: transparent;
14
14
  display: block;
15
15
  width: 100%;
16
+ height: 100%;
16
17
  position: relative;
17
18
  }
18
19
 
@@ -22,6 +23,7 @@ export const styles = css `
22
23
 
23
24
  .chart-container {
24
25
  width: 100%;
26
+ height: 100%;
25
27
  min-height: var(--nile-chart-min-height);
26
28
  background: var(--nile-chart-bg);
27
29
  border-radius: var(--nile-chart-border-radius);
@@ -117,7 +117,7 @@ let NileInvertedAreaChart = class NileInvertedAreaChart extends NileElement {
117
117
  buildOptions() {
118
118
  const self = this;
119
119
  return deepMerge({
120
- chart: { type: 'area', inverted: true, height: this.height },
120
+ chart: { type: 'area', inverted: true, ...(this.height ? { height: this.height } : {}) },
121
121
  title: { text: this.chartTitle || undefined },
122
122
  subtitle: { text: this.chartSubtitle || undefined },
123
123
  xAxis: { categories: this.categories },