@aquera/nile-visualization 1.7.0 → 1.8.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 (101) hide show
  1. package/dist/src/internal/dashboard-adapters.d.ts +1 -0
  2. package/dist/src/internal/dashboard-adapters.js +11 -1
  3. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.css.js +2 -0
  4. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +1 -1
  5. package/dist/src/nile-area-chart/nile-area-chart.css.js +2 -0
  6. package/dist/src/nile-area-chart/nile-area-chart.js +1 -1
  7. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.css.js +2 -0
  8. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +1 -1
  9. package/dist/src/nile-area-range-chart/nile-area-range-chart.css.js +2 -0
  10. package/dist/src/nile-area-range-chart/nile-area-range-chart.js +1 -1
  11. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.css.js +2 -0
  12. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +1 -1
  13. package/dist/src/nile-bar-chart/nile-bar-chart.css.js +2 -0
  14. package/dist/src/nile-bar-chart/nile-bar-chart.js +1 -1
  15. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.css.js +2 -0
  16. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +1 -1
  17. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.css.js +2 -0
  18. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +1 -1
  19. package/dist/src/nile-bubble-chart/nile-bubble-chart.css.js +2 -0
  20. package/dist/src/nile-bubble-chart/nile-bubble-chart.js +1 -1
  21. package/dist/src/nile-chart/nile-chart.css.js +22 -0
  22. package/dist/src/nile-chart/nile-chart.js +45 -45
  23. package/dist/src/nile-cluster-chart/nile-cluster-chart.css.js +2 -0
  24. package/dist/src/nile-cluster-chart/nile-cluster-chart.js +1 -1
  25. package/dist/src/nile-column-chart/nile-column-chart.css.js +2 -0
  26. package/dist/src/nile-column-chart/nile-column-chart.js +1 -1
  27. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.css.js +2 -0
  28. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +1 -1
  29. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.css.js +2 -0
  30. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +1 -1
  31. package/dist/src/nile-column-range-chart/nile-column-range-chart.css.js +2 -0
  32. package/dist/src/nile-column-range-chart/nile-column-range-chart.js +1 -1
  33. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.css.js +10 -0
  34. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.d.ts +15 -6
  35. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.js +47 -6
  36. package/dist/src/nile-donut-chart/nile-donut-chart.css.js +2 -0
  37. package/dist/src/nile-donut-chart/nile-donut-chart.js +1 -1
  38. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.css.js +2 -0
  39. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +1 -1
  40. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.css.js +2 -0
  41. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +1 -1
  42. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.css.js +2 -0
  43. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +1 -1
  44. package/dist/src/nile-euler-chart/nile-euler-chart.css.js +2 -0
  45. package/dist/src/nile-euler-chart/nile-euler-chart.js +1 -1
  46. package/dist/src/nile-fan-chart/nile-fan-chart.css.js +2 -0
  47. package/dist/src/nile-fan-chart/nile-fan-chart.js +1 -1
  48. package/dist/src/nile-flame-chart/nile-flame-chart.css.js +2 -0
  49. package/dist/src/nile-flame-chart/nile-flame-chart.js +1 -1
  50. package/dist/src/nile-funnel-chart/nile-funnel-chart.css.js +2 -0
  51. package/dist/src/nile-funnel-chart/nile-funnel-chart.js +1 -1
  52. package/dist/src/nile-gauge-chart/nile-gauge-chart.css.js +2 -0
  53. package/dist/src/nile-gauge-chart/nile-gauge-chart.js +1 -1
  54. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.css.js +2 -0
  55. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +1 -1
  56. package/dist/src/nile-histogram-chart/nile-histogram-chart.css.js +2 -0
  57. package/dist/src/nile-histogram-chart/nile-histogram-chart.js +1 -1
  58. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.css.js +2 -0
  59. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +1 -1
  60. package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +7 -0
  61. package/dist/src/nile-line-chart/nile-line-chart.css.js +2 -0
  62. package/dist/src/nile-line-chart/nile-line-chart.js +1 -1
  63. package/dist/src/nile-line-column-chart/nile-line-column-chart.css.js +2 -0
  64. package/dist/src/nile-line-column-chart/nile-line-column-chart.js +1 -1
  65. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.css.js +2 -0
  66. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +1 -1
  67. package/dist/src/nile-map-chart/nile-map-chart.css.js +2 -0
  68. package/dist/src/nile-map-chart/nile-map-chart.js +1 -1
  69. package/dist/src/nile-organization-chart/nile-organization-chart.css.js +2 -0
  70. package/dist/src/nile-organization-chart/nile-organization-chart.js +1 -1
  71. package/dist/src/nile-pie-chart/nile-pie-chart.css.js +2 -0
  72. package/dist/src/nile-pie-chart/nile-pie-chart.js +1 -1
  73. package/dist/src/nile-polygon-chart/nile-polygon-chart.css.js +2 -0
  74. package/dist/src/nile-polygon-chart/nile-polygon-chart.js +1 -1
  75. package/dist/src/nile-radar-chart/nile-radar-chart.css.js +2 -0
  76. package/dist/src/nile-radar-chart/nile-radar-chart.js +1 -1
  77. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.css.js +2 -0
  78. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +1 -1
  79. package/dist/src/nile-scatter-chart/nile-scatter-chart.css.js +2 -0
  80. package/dist/src/nile-scatter-chart/nile-scatter-chart.js +1 -1
  81. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.css.js +2 -0
  82. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +1 -1
  83. package/dist/src/nile-spline-chart/nile-spline-chart.css.js +2 -0
  84. package/dist/src/nile-spline-chart/nile-spline-chart.js +1 -1
  85. package/dist/src/nile-stacked-chart/nile-stacked-chart.css.js +2 -0
  86. package/dist/src/nile-stacked-chart/nile-stacked-chart.js +1 -1
  87. package/dist/src/nile-timeline-chart/nile-timeline-chart.css.js +2 -0
  88. package/dist/src/nile-timeline-chart/nile-timeline-chart.js +1 -1
  89. package/dist/src/nile-trendline-chart/nile-trendline-chart.css.js +2 -0
  90. package/dist/src/nile-trendline-chart/nile-trendline-chart.js +1 -1
  91. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.css.js +2 -0
  92. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +1 -1
  93. package/dist/src/nile-vector-chart/nile-vector-chart.css.js +2 -0
  94. package/dist/src/nile-vector-chart/nile-vector-chart.js +1 -1
  95. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.css.js +2 -0
  96. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +1 -1
  97. package/dist/src/nile-widget-viewer/nile-widget-viewer.d.ts +4 -0
  98. package/dist/src/nile-widget-viewer/nile-widget-viewer.js +18 -2
  99. package/dist/src/nile-xrange-chart/nile-xrange-chart.css.js +2 -0
  100. package/dist/src/nile-xrange-chart/nile-xrange-chart.js +1 -1
  101. package/package.json +1 -1
@@ -122,7 +122,7 @@ let NileRadialBarChart = class NileRadialBarChart extends NileElement {
122
122
  buildOptions() {
123
123
  const self = this;
124
124
  return deepMerge({
125
- chart: { polar: true, type: 'column', height: this.height },
125
+ chart: { polar: true, type: 'column', ...(this.height ? { height: this.height } : {}) },
126
126
  title: { text: this.chartTitle || undefined },
127
127
  subtitle: { text: this.chartSubtitle || undefined },
128
128
  pane: { size: this.paneSize, innerSize: this.innerSize },
@@ -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);
@@ -150,7 +150,7 @@ let NileScatterChart = class NileScatterChart extends NileElement {
150
150
  buildOptions() {
151
151
  const self = this;
152
152
  return deepMerge({
153
- chart: { type: 'scatter', height: this.height, zoomType: 'xy' },
153
+ chart: { type: 'scatter', ...(this.height ? { height: this.height } : {}), zoomType: 'xy' },
154
154
  title: { text: this.chartTitle || undefined },
155
155
  subtitle: { text: this.chartSubtitle || undefined },
156
156
  xAxis: { title: { text: this.xAxisTitle || 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);
@@ -127,7 +127,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
127
127
  const self = this;
128
128
  const seriesType = this.showArea ? 'area' : 'line';
129
129
  return deepMerge({
130
- chart: { polar: true, type: seriesType, height: this.height },
130
+ chart: { polar: true, type: seriesType, ...(this.height ? { height: this.height } : {}) },
131
131
  title: { text: this.chartTitle || undefined },
132
132
  subtitle: { text: this.chartSubtitle || undefined },
133
133
  pane: { size: '80%' },
@@ -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);
@@ -150,7 +150,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
150
150
  buildOptions() {
151
151
  const self = this;
152
152
  return deepMerge({
153
- chart: { type: 'spline', height: this.height },
153
+ chart: { type: 'spline', ...(this.height ? { height: this.height } : {}) },
154
154
  title: { text: this.chartTitle || undefined },
155
155
  subtitle: { text: this.chartSubtitle || undefined },
156
156
  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);
@@ -142,7 +142,7 @@ let NileStackedChart = class NileStackedChart extends NileElement {
142
142
  title: { text: this.yAxisTitle || undefined },
143
143
  };
144
144
  return deepMerge({
145
- chart: { type: 'column', height: this.height },
145
+ chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
146
146
  title: { text: this.chartTitle || undefined },
147
147
  subtitle: { text: this.chartSubtitle || undefined },
148
148
  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);
@@ -151,7 +151,7 @@ let NileTimelineChart = class NileTimelineChart extends NileElement {
151
151
  return deepMerge({
152
152
  chart: {
153
153
  type: 'timeline',
154
- height: this.height,
154
+ ...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}),
155
155
  inverted: this.inverted,
156
156
  },
157
157
  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);
@@ -241,7 +241,7 @@ let NileTrendlineChart = class NileTrendlineChart extends NileElement {
241
241
  const defaults = {
242
242
  chart: {
243
243
  type: 'line',
244
- height: this.height,
244
+ ...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}),
245
245
  },
246
246
  title: {
247
247
  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);
@@ -118,7 +118,7 @@ let NileVariablePieChart = class NileVariablePieChart extends NileElement {
118
118
  buildOptions() {
119
119
  const self = this;
120
120
  return deepMerge({
121
- chart: { height: this.height },
121
+ chart: { ...(this.height ? { height: this.height } : {}) },
122
122
  title: { text: this.chartTitle || undefined },
123
123
  subtitle: { text: this.chartSubtitle || undefined },
124
124
  tooltip: { pointFormat: '{series.name}: <b>{point.y}</b> ({point.z})' },
@@ -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);
@@ -118,7 +118,7 @@ let NileVectorChart = class NileVectorChart extends NileElement {
118
118
  buildOptions() {
119
119
  const self = this;
120
120
  return deepMerge({
121
- chart: { height: this.height },
121
+ chart: { ...(this.height ? { height: this.height } : {}) },
122
122
  title: { text: this.chartTitle || undefined },
123
123
  subtitle: { text: this.chartSubtitle || undefined },
124
124
  xAxis: { title: { text: this.xAxisTitle || 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);
@@ -147,7 +147,7 @@ let NileWaterfallChart = class NileWaterfallChart extends NileElement {
147
147
  buildOptions() {
148
148
  const self = this;
149
149
  return deepMerge({
150
- chart: { type: 'waterfall', height: this.height },
150
+ chart: { type: 'waterfall', ...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}) },
151
151
  title: { text: this.chartTitle || undefined },
152
152
  subtitle: { text: this.chartSubtitle || undefined },
153
153
  xAxis: {
@@ -8,6 +8,10 @@ import '../nile-kpi-chart/index.js';
8
8
  * Renders a single dashboard widget — either a `<nile-chart>` or a `<nile-kpi-chart>` —
9
9
  * based on the discriminated `type` field of the config.
10
10
  *
11
+ * The child chart is rendered in `fit` mode (filling the widget's allotted cell)
12
+ * and any hardcoded pixel `height` in the chart config is stripped so Highcharts
13
+ * reflows to the container rather than overflowing into neighboring cells.
14
+ *
11
15
  * @example
12
16
  * ```html
13
17
  * <nile-widget-viewer></nile-widget-viewer>
@@ -9,6 +9,10 @@ import '../nile-kpi-chart/index.js';
9
9
  * Renders a single dashboard widget — either a `<nile-chart>` or a `<nile-kpi-chart>` —
10
10
  * based on the discriminated `type` field of the config.
11
11
  *
12
+ * The child chart is rendered in `fit` mode (filling the widget's allotted cell)
13
+ * and any hardcoded pixel `height` in the chart config is stripped so Highcharts
14
+ * reflows to the container rather than overflowing into neighboring cells.
15
+ *
12
16
  * @example
13
17
  * ```html
14
18
  * <nile-widget-viewer></nile-widget-viewer>
@@ -31,10 +35,11 @@ let NileWidgetViewer = class NileWidgetViewer extends NileElement {
31
35
  if (!this.config)
32
36
  return nothing;
33
37
  if (this.config.type === 'chart') {
34
- return html `<nile-chart .config=${this.config.nileConfig}></nile-chart>`;
38
+ const fitted = stripChartHeight(this.config.nileConfig);
39
+ return html `<nile-chart fit .config=${fitted}></nile-chart>`;
35
40
  }
36
41
  if (this.config.type === 'kpi') {
37
- return html `<nile-kpi-chart .config=${this.config.nileConfig}></nile-kpi-chart>`;
42
+ return html `<nile-kpi-chart fit .config=${this.config.nileConfig}></nile-kpi-chart>`;
38
43
  }
39
44
  return nothing;
40
45
  }
@@ -47,4 +52,15 @@ NileWidgetViewer = __decorate([
47
52
  customElement('nile-widget-viewer')
48
53
  ], NileWidgetViewer);
49
54
  export { NileWidgetViewer };
55
+ /**
56
+ * Returns a clone of the chart config with any hardcoded `chart.height` removed,
57
+ * so Highcharts sizes to its container instead of a fixed pixel value.
58
+ */
59
+ function stripChartHeight(cfg) {
60
+ const c = cfg;
61
+ if (!c || !c.chart || !('height' in c.chart))
62
+ return cfg;
63
+ const { height: _ignored, ...restChart } = c.chart;
64
+ return { ...c, chart: restChart };
65
+ }
50
66
  //# sourceMappingURL=nile-widget-viewer.js.map
@@ -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 NileXrangeChart = class NileXrangeChart extends NileElement {
120
120
  buildOptions() {
121
121
  const self = this;
122
122
  return deepMerge({
123
- chart: { type: 'xrange', height: this.height },
123
+ chart: { type: 'xrange', ...(this.height ? { ...(this.height ? { height: this.height } : {}) } : {}) },
124
124
  title: { text: this.chartTitle || undefined },
125
125
  subtitle: { text: this.chartSubtitle || undefined },
126
126
  xAxis: this.datetimeAxis
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",