@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.
Files changed (189) hide show
  1. package/dist/src/internal/types/chart-anomaly-config.type.d.ts +11 -0
  2. package/dist/src/internal/types/chart-area-config.type.d.ts +12 -0
  3. package/dist/src/internal/types/chart-area-negative-config.type.d.ts +11 -0
  4. package/dist/src/internal/types/chart-area-range-config.type.d.ts +11 -0
  5. package/dist/src/internal/types/chart-area-spline-config.type.d.ts +11 -0
  6. package/dist/src/internal/types/chart-bar-config.type.d.ts +12 -0
  7. package/dist/src/internal/types/chart-bellcurve-config.type.d.ts +11 -0
  8. package/dist/src/internal/types/chart-boxplot-config.type.d.ts +11 -0
  9. package/dist/src/internal/types/chart-bubble-config.type.d.ts +12 -0
  10. package/dist/src/internal/types/chart-cluster-config.type.d.ts +11 -0
  11. package/dist/src/internal/types/chart-column-config.type.d.ts +12 -0
  12. package/dist/src/internal/types/chart-column-drilldown-config.type.d.ts +11 -0
  13. package/dist/src/internal/types/chart-column-pyramid-config.type.d.ts +11 -0
  14. package/dist/src/internal/types/chart-column-range-config.type.d.ts +11 -0
  15. package/dist/src/internal/types/chart-donut-config.type.d.ts +11 -0
  16. package/dist/src/internal/types/chart-dumbbell-config.type.d.ts +11 -0
  17. package/dist/src/internal/types/chart-euler-config.type.d.ts +11 -0
  18. package/dist/src/internal/types/chart-fan-config.type.d.ts +11 -0
  19. package/dist/src/internal/types/chart-flame-config.type.d.ts +11 -0
  20. package/dist/src/internal/types/chart-funnel-config.type.d.ts +11 -0
  21. package/dist/src/internal/types/chart-gauge-config.type.d.ts +11 -0
  22. package/dist/src/internal/types/chart-heatmap-config.type.d.ts +12 -0
  23. package/dist/src/internal/types/chart-histogram-config.type.d.ts +11 -0
  24. package/dist/src/internal/types/chart-line-column-config.type.d.ts +11 -0
  25. package/dist/src/internal/types/chart-line-config.type.d.ts +12 -0
  26. package/dist/src/internal/types/chart-lollipop-config.type.d.ts +11 -0
  27. package/dist/src/internal/types/chart-map-config.type.d.ts +11 -0
  28. package/dist/src/internal/types/chart-organization-config.type.d.ts +11 -0
  29. package/dist/src/internal/types/chart-pie-config.type.d.ts +11 -0
  30. package/dist/src/internal/types/chart-polygon-config.type.d.ts +11 -0
  31. package/dist/src/internal/types/chart-radar-config.type.d.ts +12 -0
  32. package/dist/src/internal/types/chart-radial-bar-config.type.d.ts +12 -0
  33. package/dist/src/internal/types/chart-scatter-config.type.d.ts +12 -0
  34. package/dist/src/internal/types/chart-spiderweb-config.type.d.ts +12 -0
  35. package/dist/src/internal/types/chart-spline-config.type.d.ts +12 -0
  36. package/dist/src/internal/types/chart-stacked-config.type.d.ts +11 -0
  37. package/dist/src/internal/types/chart-timeline-config.type.d.ts +11 -0
  38. package/dist/src/internal/types/chart-trendline-config.type.d.ts +11 -0
  39. package/dist/src/internal/types/chart-variable-pie-config.type.d.ts +11 -0
  40. package/dist/src/internal/types/chart-vector-config.type.d.ts +11 -0
  41. package/dist/src/internal/types/chart-waterfall-config.type.d.ts +12 -0
  42. package/dist/src/internal/types/chart-xrange-config.type.d.ts +12 -0
  43. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.css.js +20 -4
  44. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +12 -0
  45. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +95 -1
  46. package/dist/src/nile-area-chart/nile-area-chart.css.js +20 -4
  47. package/dist/src/nile-area-chart/nile-area-chart.d.ts +13 -0
  48. package/dist/src/nile-area-chart/nile-area-chart.js +107 -3
  49. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.css.js +20 -4
  50. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +12 -0
  51. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +73 -1
  52. package/dist/src/nile-area-range-chart/nile-area-range-chart.css.js +20 -4
  53. package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +12 -0
  54. package/dist/src/nile-area-range-chart/nile-area-range-chart.js +73 -1
  55. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.css.js +20 -4
  56. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +12 -0
  57. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +73 -1
  58. package/dist/src/nile-bar-chart/nile-bar-chart.css.js +20 -4
  59. package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +14 -0
  60. package/dist/src/nile-bar-chart/nile-bar-chart.js +104 -1
  61. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.css.js +20 -4
  62. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +12 -0
  63. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +73 -1
  64. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.css.js +20 -4
  65. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +12 -0
  66. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +73 -1
  67. package/dist/src/nile-bubble-chart/nile-bubble-chart.css.js +20 -4
  68. package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +13 -0
  69. package/dist/src/nile-bubble-chart/nile-bubble-chart.js +107 -3
  70. package/dist/src/nile-chart/nile-chart-config.d.ts +331 -38
  71. package/dist/src/nile-chart/nile-chart.css.js +1 -1
  72. package/dist/src/nile-chart/nile-chart.d.ts +0 -3
  73. package/dist/src/nile-chart/nile-chart.js +546 -2
  74. package/dist/src/nile-cluster-chart/nile-cluster-chart.css.js +20 -4
  75. package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +12 -0
  76. package/dist/src/nile-cluster-chart/nile-cluster-chart.js +73 -1
  77. package/dist/src/nile-column-chart/nile-column-chart.css.js +20 -4
  78. package/dist/src/nile-column-chart/nile-column-chart.d.ts +13 -0
  79. package/dist/src/nile-column-chart/nile-column-chart.js +107 -3
  80. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.css.js +20 -4
  81. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +12 -0
  82. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +73 -1
  83. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.css.js +20 -4
  84. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +12 -0
  85. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +73 -1
  86. package/dist/src/nile-column-range-chart/nile-column-range-chart.css.js +20 -4
  87. package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +12 -0
  88. package/dist/src/nile-column-range-chart/nile-column-range-chart.js +73 -1
  89. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.css.js +10 -0
  90. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.d.ts +10 -14
  91. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.js +36 -14
  92. package/dist/src/nile-donut-chart/nile-donut-chart.css.js +20 -4
  93. package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +12 -0
  94. package/dist/src/nile-donut-chart/nile-donut-chart.js +99 -2
  95. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.css.js +20 -4
  96. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +12 -0
  97. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +73 -1
  98. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.css.js +20 -4
  99. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +12 -0
  100. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +73 -1
  101. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.css.js +20 -4
  102. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +12 -0
  103. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +73 -1
  104. package/dist/src/nile-euler-chart/nile-euler-chart.css.js +20 -4
  105. package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +12 -0
  106. package/dist/src/nile-euler-chart/nile-euler-chart.js +73 -1
  107. package/dist/src/nile-fan-chart/nile-fan-chart.css.js +20 -4
  108. package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +12 -0
  109. package/dist/src/nile-fan-chart/nile-fan-chart.js +73 -1
  110. package/dist/src/nile-flame-chart/nile-flame-chart.css.js +20 -4
  111. package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +12 -0
  112. package/dist/src/nile-flame-chart/nile-flame-chart.js +73 -1
  113. package/dist/src/nile-funnel-chart/nile-funnel-chart.css.js +20 -4
  114. package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +12 -0
  115. package/dist/src/nile-funnel-chart/nile-funnel-chart.js +73 -1
  116. package/dist/src/nile-gauge-chart/nile-gauge-chart.css.js +20 -4
  117. package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +12 -0
  118. package/dist/src/nile-gauge-chart/nile-gauge-chart.js +95 -2
  119. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.css.js +20 -4
  120. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +13 -0
  121. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +79 -2
  122. package/dist/src/nile-histogram-chart/nile-histogram-chart.css.js +20 -4
  123. package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +12 -0
  124. package/dist/src/nile-histogram-chart/nile-histogram-chart.js +73 -1
  125. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.css.js +20 -4
  126. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +12 -0
  127. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +73 -1
  128. package/dist/src/nile-kpi-chart/nile-kpi-chart.css.d.ts +1 -1
  129. package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +54 -33
  130. package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +121 -1
  131. package/dist/src/nile-kpi-chart/nile-kpi-chart.js +366 -52
  132. package/dist/src/nile-line-chart/nile-line-chart.css.js +20 -4
  133. package/dist/src/nile-line-chart/nile-line-chart.d.ts +13 -0
  134. package/dist/src/nile-line-chart/nile-line-chart.js +103 -3
  135. package/dist/src/nile-line-column-chart/nile-line-column-chart.css.js +20 -4
  136. package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +12 -0
  137. package/dist/src/nile-line-column-chart/nile-line-column-chart.js +73 -1
  138. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.css.js +20 -4
  139. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +12 -0
  140. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +73 -1
  141. package/dist/src/nile-map-chart/nile-map-chart.css.js +20 -4
  142. package/dist/src/nile-map-chart/nile-map-chart.d.ts +12 -0
  143. package/dist/src/nile-map-chart/nile-map-chart.js +95 -1
  144. package/dist/src/nile-organization-chart/nile-organization-chart.css.js +20 -4
  145. package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +12 -0
  146. package/dist/src/nile-organization-chart/nile-organization-chart.js +73 -1
  147. package/dist/src/nile-pie-chart/nile-pie-chart.css.js +20 -4
  148. package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +12 -0
  149. package/dist/src/nile-pie-chart/nile-pie-chart.js +95 -1
  150. package/dist/src/nile-polygon-chart/nile-polygon-chart.css.js +20 -4
  151. package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +12 -0
  152. package/dist/src/nile-polygon-chart/nile-polygon-chart.js +73 -1
  153. package/dist/src/nile-radar-chart/nile-radar-chart.css.js +20 -4
  154. package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +13 -0
  155. package/dist/src/nile-radar-chart/nile-radar-chart.js +103 -3
  156. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.css.js +20 -4
  157. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +13 -0
  158. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +79 -1
  159. package/dist/src/nile-scatter-chart/nile-scatter-chart.css.js +20 -4
  160. package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +13 -0
  161. package/dist/src/nile-scatter-chart/nile-scatter-chart.js +103 -3
  162. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.css.js +20 -4
  163. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +13 -0
  164. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +79 -1
  165. package/dist/src/nile-spline-chart/nile-spline-chart.css.js +20 -4
  166. package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +13 -0
  167. package/dist/src/nile-spline-chart/nile-spline-chart.js +103 -3
  168. package/dist/src/nile-stacked-chart/nile-stacked-chart.css.js +20 -4
  169. package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +12 -0
  170. package/dist/src/nile-stacked-chart/nile-stacked-chart.js +73 -1
  171. package/dist/src/nile-timeline-chart/nile-timeline-chart.css.js +20 -4
  172. package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +13 -1
  173. package/dist/src/nile-timeline-chart/nile-timeline-chart.js +73 -1
  174. package/dist/src/nile-trendline-chart/nile-trendline-chart.css.js +20 -4
  175. package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +12 -0
  176. package/dist/src/nile-trendline-chart/nile-trendline-chart.js +95 -1
  177. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.css.js +20 -4
  178. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +12 -0
  179. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +73 -1
  180. package/dist/src/nile-vector-chart/nile-vector-chart.css.js +20 -4
  181. package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +12 -0
  182. package/dist/src/nile-vector-chart/nile-vector-chart.js +73 -1
  183. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.css.js +20 -4
  184. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +13 -0
  185. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +103 -4
  186. package/dist/src/nile-xrange-chart/nile-xrange-chart.css.js +20 -4
  187. package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +13 -0
  188. package/dist/src/nile-xrange-chart/nile-xrange-chart.js +79 -1
  189. package/package.json +1 -1
@@ -21,6 +21,41 @@ let NileScatterChart = class NileScatterChart extends NileElement {
21
21
  this.height = '400px';
22
22
  this.xAxisTitle = '';
23
23
  this.yAxisTitle = '';
24
+ this.showLegend = true;
25
+ // ── Container styling ──
26
+ this.chartBg = '';
27
+ this.chartBorderRadius = '';
28
+ this.chartBorder = '';
29
+ this.chartShadow = '';
30
+ this.chartPadding = '';
31
+ this.chartMinHeight = '';
32
+ // ── Loading ──
33
+ this.loadingText = 'Loading...';
34
+ this.loadingColor = '';
35
+ this.loadingFontSize = '';
36
+ this.loadingFontFamily = '';
37
+ this.loadingBg = '';
38
+ }
39
+ _syncCssVars() {
40
+ const set = (prop, val) => {
41
+ const s = typeof val === 'number'
42
+ ? (Number.isFinite(val) ? `${val}px` : '')
43
+ : String(val ?? '').trim();
44
+ if (s)
45
+ this.style.setProperty(prop, s);
46
+ else
47
+ this.style.removeProperty(prop);
48
+ };
49
+ set('--nile-chart-bg', this.chartBg);
50
+ set('--nile-chart-border-radius', this.chartBorderRadius);
51
+ set('--nile-chart-border', this.chartBorder);
52
+ set('--nile-chart-shadow', this.chartShadow);
53
+ set('--nile-chart-padding', this.chartPadding);
54
+ set('--nile-chart-min-height', this.chartMinHeight);
55
+ set('--nile-chart-loading-color', this.loadingColor);
56
+ set('--nile-chart-loading-font-size', this.loadingFontSize);
57
+ set('--nile-chart-loading-font-family', this.loadingFontFamily);
58
+ set('--nile-chart-loading-bg', this.loadingBg);
24
59
  }
25
60
  /** Apply { chart, aq } config to individual properties. */
26
61
  applyConfig(cfg) {
@@ -39,6 +74,30 @@ let NileScatterChart = class NileScatterChart extends NileElement {
39
74
  this.loading = scatter.loading;
40
75
  if (scatter.options)
41
76
  this.options = scatter.options;
77
+ if (scatter.chartBg !== undefined)
78
+ this.chartBg = scatter.chartBg;
79
+ if (scatter.chartBorderRadius !== undefined)
80
+ this.chartBorderRadius = scatter.chartBorderRadius;
81
+ if (scatter.chartBorder !== undefined)
82
+ this.chartBorder = scatter.chartBorder;
83
+ if (scatter.chartShadow !== undefined)
84
+ this.chartShadow = scatter.chartShadow;
85
+ if (scatter.chartPadding !== undefined)
86
+ this.chartPadding = scatter.chartPadding;
87
+ if (scatter.chartMinHeight !== undefined)
88
+ this.chartMinHeight = scatter.chartMinHeight;
89
+ if (scatter.loadingText !== undefined)
90
+ this.loadingText = scatter.loadingText;
91
+ if (scatter.loadingColor !== undefined)
92
+ this.loadingColor = scatter.loadingColor;
93
+ if (scatter.loadingFontSize !== undefined)
94
+ this.loadingFontSize = scatter.loadingFontSize;
95
+ if (scatter.loadingFontFamily !== undefined)
96
+ this.loadingFontFamily = scatter.loadingFontFamily;
97
+ if (scatter.loadingBg !== undefined)
98
+ this.loadingBg = scatter.loadingBg;
99
+ if (scatter.showLegend !== undefined)
100
+ this.showLegend = scatter.showLegend;
42
101
  }
43
102
  if (aq) {
44
103
  if (aq.chartTitle)
@@ -58,13 +117,17 @@ let NileScatterChart = class NileScatterChart extends NileElement {
58
117
  this.resizeObserver?.disconnect();
59
118
  this.resizeObserver = null;
60
119
  }
61
- firstUpdated() { this.initChart(); this.setupResizeObserver(); }
120
+ firstUpdated() { this._syncCssVars(); this.initChart(); this.setupResizeObserver(); }
62
121
  updated(changedProperties) {
63
122
  if (changedProperties.has('config') && this.config) {
64
123
  this.applyConfig(this.config);
65
124
  return;
66
125
  }
67
- const props = ['data', 'chartTitle', 'chartSubtitle', 'options', 'height', 'xAxisTitle', 'yAxisTitle', 'loading'];
126
+ const props = ['data', 'chartTitle', 'chartSubtitle', 'options', 'height', 'xAxisTitle', 'yAxisTitle', 'loading', 'showLegend'];
127
+ const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
128
+ 'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
129
+ if (cssVarProps.some(p => changedProperties.has(p)))
130
+ this._syncCssVars();
68
131
  if (!props.some(p => changedProperties.has(p)))
69
132
  return;
70
133
  if (this.loading) {
@@ -104,6 +167,7 @@ let NileScatterChart = class NileScatterChart extends NileElement {
104
167
  series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, x: this.x, y: this.y, seriesName: this.series.name }); } } } },
105
168
  },
106
169
  series: this.data.map(s => ({ type: 'scatter', name: s.name, data: s.data, color: s.color })),
170
+ legend: { enabled: this.showLegend },
107
171
  credits: { enabled: false },
108
172
  }, this.options);
109
173
  }
@@ -121,7 +185,7 @@ let NileScatterChart = class NileScatterChart extends NileElement {
121
185
  } }
122
186
  render() {
123
187
  if (this.loading)
124
- return html `<div class="chart-loading" style="height:${this.height}">Loading...</div>`;
188
+ return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
125
189
  return html `<div class="chart-container"></div>`;
126
190
  }
127
191
  };
@@ -156,6 +220,42 @@ __decorate([
156
220
  __decorate([
157
221
  property({ type: String, attribute: 'y-axis-title' })
158
222
  ], NileScatterChart.prototype, "yAxisTitle", void 0);
223
+ __decorate([
224
+ property({ type: Boolean, attribute: 'show-legend' })
225
+ ], NileScatterChart.prototype, "showLegend", void 0);
226
+ __decorate([
227
+ property({ type: String, attribute: 'chart-bg' })
228
+ ], NileScatterChart.prototype, "chartBg", void 0);
229
+ __decorate([
230
+ property({ type: String, attribute: 'chart-border-radius' })
231
+ ], NileScatterChart.prototype, "chartBorderRadius", void 0);
232
+ __decorate([
233
+ property({ type: String, attribute: 'chart-border' })
234
+ ], NileScatterChart.prototype, "chartBorder", void 0);
235
+ __decorate([
236
+ property({ type: String, attribute: 'chart-shadow' })
237
+ ], NileScatterChart.prototype, "chartShadow", void 0);
238
+ __decorate([
239
+ property({ type: String, attribute: 'chart-padding' })
240
+ ], NileScatterChart.prototype, "chartPadding", void 0);
241
+ __decorate([
242
+ property({ type: String, attribute: 'chart-min-height' })
243
+ ], NileScatterChart.prototype, "chartMinHeight", void 0);
244
+ __decorate([
245
+ property({ type: String, attribute: 'loading-text' })
246
+ ], NileScatterChart.prototype, "loadingText", void 0);
247
+ __decorate([
248
+ property({ type: String, attribute: 'loading-color' })
249
+ ], NileScatterChart.prototype, "loadingColor", void 0);
250
+ __decorate([
251
+ property({ type: String, attribute: 'loading-font-size' })
252
+ ], NileScatterChart.prototype, "loadingFontSize", void 0);
253
+ __decorate([
254
+ property({ type: String, attribute: 'loading-font-family' })
255
+ ], NileScatterChart.prototype, "loadingFontFamily", void 0);
256
+ __decorate([
257
+ property({ type: String, attribute: 'loading-bg' })
258
+ ], NileScatterChart.prototype, "loadingBg", void 0);
159
259
  NileScatterChart = __decorate([
160
260
  customElement('nile-scatter-chart')
161
261
  ], NileScatterChart);
@@ -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-height-200px, var(--ng-height-200px));
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-colors-neutral-700, var(--ng-colors-text-secondary-700));
24
- font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
25
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
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-spiderweb-chart.css.js.map
@@ -27,6 +27,19 @@ export declare class NileSpiderwebChart extends NileElement {
27
27
  loading: boolean;
28
28
  height: string;
29
29
  showArea: boolean;
30
+ showLegend: boolean;
31
+ chartBg: string;
32
+ chartBorderRadius: string | number;
33
+ chartBorder: string;
34
+ chartShadow: string;
35
+ chartPadding: string | number;
36
+ chartMinHeight: string | number;
37
+ loadingText: string;
38
+ loadingColor: string;
39
+ loadingFontSize: string | number;
40
+ loadingFontFamily: string;
41
+ loadingBg: string;
42
+ private _syncCssVars;
30
43
  /** Apply `{ chart, aq }` config to individual properties. */
31
44
  private applyConfig;
32
45
  connectedCallback(): void;
@@ -26,6 +26,41 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
26
26
  this.loading = false;
27
27
  this.height = '400px';
28
28
  this.showArea = false;
29
+ this.showLegend = true;
30
+ // ── Container styling ──
31
+ this.chartBg = '';
32
+ this.chartBorderRadius = '';
33
+ this.chartBorder = '';
34
+ this.chartShadow = '';
35
+ this.chartPadding = '';
36
+ this.chartMinHeight = '';
37
+ // ── Loading ──
38
+ this.loadingText = 'Loading...';
39
+ this.loadingColor = '';
40
+ this.loadingFontSize = '';
41
+ this.loadingFontFamily = '';
42
+ this.loadingBg = '';
43
+ }
44
+ _syncCssVars() {
45
+ const set = (prop, val) => {
46
+ const s = typeof val === 'number'
47
+ ? (Number.isFinite(val) ? `${val}px` : '')
48
+ : String(val ?? '').trim();
49
+ if (s)
50
+ this.style.setProperty(prop, s);
51
+ else
52
+ this.style.removeProperty(prop);
53
+ };
54
+ set('--nile-chart-bg', this.chartBg);
55
+ set('--nile-chart-border-radius', this.chartBorderRadius);
56
+ set('--nile-chart-border', this.chartBorder);
57
+ set('--nile-chart-shadow', this.chartShadow);
58
+ set('--nile-chart-padding', this.chartPadding);
59
+ set('--nile-chart-min-height', this.chartMinHeight);
60
+ set('--nile-chart-loading-color', this.loadingColor);
61
+ set('--nile-chart-loading-font-size', this.loadingFontSize);
62
+ set('--nile-chart-loading-font-family', this.loadingFontFamily);
63
+ set('--nile-chart-loading-bg', this.loadingBg);
29
64
  }
30
65
  /** Apply `{ chart, aq }` config to individual properties. */
31
66
  applyConfig(cfg) {
@@ -43,6 +78,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
43
78
  this.resizeObserver = null;
44
79
  }
45
80
  firstUpdated() {
81
+ this._syncCssVars();
46
82
  this.initChart();
47
83
  this.setupResizeObserver();
48
84
  }
@@ -60,7 +96,12 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
60
96
  'height',
61
97
  'showArea',
62
98
  'loading',
99
+ 'showLegend',
63
100
  ];
101
+ const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
102
+ 'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
103
+ if (cssVarProps.some(p => changedProperties.has(p)))
104
+ this._syncCssVars();
64
105
  if (!props.some(p => changedProperties.has(p)))
65
106
  return;
66
107
  if (this.loading) {
@@ -129,6 +170,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
129
170
  color: s.color,
130
171
  pointPlacement: 'on',
131
172
  })),
173
+ legend: { enabled: this.showLegend },
132
174
  credits: { enabled: false },
133
175
  }, this.options);
134
176
  }
@@ -148,7 +190,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
148
190
  }
149
191
  render() {
150
192
  if (this.loading) {
151
- return html `<div class="chart-loading" style="height:${this.height}">Loading...</div>`;
193
+ return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
152
194
  }
153
195
  return html `<div class="chart-container"></div>`;
154
196
  }
@@ -184,6 +226,42 @@ __decorate([
184
226
  __decorate([
185
227
  property({ type: Boolean, attribute: 'show-area' })
186
228
  ], NileSpiderwebChart.prototype, "showArea", void 0);
229
+ __decorate([
230
+ property({ type: Boolean, attribute: 'show-legend' })
231
+ ], NileSpiderwebChart.prototype, "showLegend", void 0);
232
+ __decorate([
233
+ property({ type: String, attribute: 'chart-bg' })
234
+ ], NileSpiderwebChart.prototype, "chartBg", void 0);
235
+ __decorate([
236
+ property({ type: String, attribute: 'chart-border-radius' })
237
+ ], NileSpiderwebChart.prototype, "chartBorderRadius", void 0);
238
+ __decorate([
239
+ property({ type: String, attribute: 'chart-border' })
240
+ ], NileSpiderwebChart.prototype, "chartBorder", void 0);
241
+ __decorate([
242
+ property({ type: String, attribute: 'chart-shadow' })
243
+ ], NileSpiderwebChart.prototype, "chartShadow", void 0);
244
+ __decorate([
245
+ property({ type: String, attribute: 'chart-padding' })
246
+ ], NileSpiderwebChart.prototype, "chartPadding", void 0);
247
+ __decorate([
248
+ property({ type: String, attribute: 'chart-min-height' })
249
+ ], NileSpiderwebChart.prototype, "chartMinHeight", void 0);
250
+ __decorate([
251
+ property({ type: String, attribute: 'loading-text' })
252
+ ], NileSpiderwebChart.prototype, "loadingText", void 0);
253
+ __decorate([
254
+ property({ type: String, attribute: 'loading-color' })
255
+ ], NileSpiderwebChart.prototype, "loadingColor", void 0);
256
+ __decorate([
257
+ property({ type: String, attribute: 'loading-font-size' })
258
+ ], NileSpiderwebChart.prototype, "loadingFontSize", void 0);
259
+ __decorate([
260
+ property({ type: String, attribute: 'loading-font-family' })
261
+ ], NileSpiderwebChart.prototype, "loadingFontFamily", void 0);
262
+ __decorate([
263
+ property({ type: String, attribute: 'loading-bg' })
264
+ ], NileSpiderwebChart.prototype, "loadingBg", void 0);
187
265
  NileSpiderwebChart = __decorate([
188
266
  customElement('nile-spiderweb-chart')
189
267
  ], NileSpiderwebChart);
@@ -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-height-200px, var(--ng-height-200px));
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-colors-neutral-700, var(--ng-colors-text-secondary-700));
24
- font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
25
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
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-spline-chart.css.js.map
@@ -23,6 +23,19 @@ export declare class NileSplineChart extends NileElement {
23
23
  loading: boolean;
24
24
  height: string;
25
25
  yAxisTitle: string;
26
+ showLegend: boolean;
27
+ chartBg: string;
28
+ chartBorderRadius: string | number;
29
+ chartBorder: string;
30
+ chartShadow: string;
31
+ chartPadding: string | number;
32
+ chartMinHeight: string | number;
33
+ loadingText: string;
34
+ loadingColor: string;
35
+ loadingFontSize: string | number;
36
+ loadingFontFamily: string;
37
+ loadingBg: string;
38
+ private _syncCssVars;
26
39
  /** Apply { chart, aq } config to individual properties. */
27
40
  private applyConfig;
28
41
  connectedCallback(): void;
@@ -21,6 +21,41 @@ let NileSplineChart = class NileSplineChart extends NileElement {
21
21
  this.loading = false;
22
22
  this.height = '400px';
23
23
  this.yAxisTitle = '';
24
+ this.showLegend = true;
25
+ // ── Container styling ──
26
+ this.chartBg = '';
27
+ this.chartBorderRadius = '';
28
+ this.chartBorder = '';
29
+ this.chartShadow = '';
30
+ this.chartPadding = '';
31
+ this.chartMinHeight = '';
32
+ // ── Loading ──
33
+ this.loadingText = 'Loading...';
34
+ this.loadingColor = '';
35
+ this.loadingFontSize = '';
36
+ this.loadingFontFamily = '';
37
+ this.loadingBg = '';
38
+ }
39
+ _syncCssVars() {
40
+ const set = (prop, val) => {
41
+ const s = typeof val === 'number'
42
+ ? (Number.isFinite(val) ? `${val}px` : '')
43
+ : String(val ?? '').trim();
44
+ if (s)
45
+ this.style.setProperty(prop, s);
46
+ else
47
+ this.style.removeProperty(prop);
48
+ };
49
+ set('--nile-chart-bg', this.chartBg);
50
+ set('--nile-chart-border-radius', this.chartBorderRadius);
51
+ set('--nile-chart-border', this.chartBorder);
52
+ set('--nile-chart-shadow', this.chartShadow);
53
+ set('--nile-chart-padding', this.chartPadding);
54
+ set('--nile-chart-min-height', this.chartMinHeight);
55
+ set('--nile-chart-loading-color', this.loadingColor);
56
+ set('--nile-chart-loading-font-size', this.loadingFontSize);
57
+ set('--nile-chart-loading-font-family', this.loadingFontFamily);
58
+ set('--nile-chart-loading-bg', this.loadingBg);
24
59
  }
25
60
  /** Apply { chart, aq } config to individual properties. */
26
61
  applyConfig(cfg) {
@@ -39,6 +74,30 @@ let NileSplineChart = class NileSplineChart extends NileElement {
39
74
  this.loading = spline.loading;
40
75
  if (spline.options)
41
76
  this.options = spline.options;
77
+ if (spline.chartBg !== undefined)
78
+ this.chartBg = spline.chartBg;
79
+ if (spline.chartBorderRadius !== undefined)
80
+ this.chartBorderRadius = spline.chartBorderRadius;
81
+ if (spline.chartBorder !== undefined)
82
+ this.chartBorder = spline.chartBorder;
83
+ if (spline.chartShadow !== undefined)
84
+ this.chartShadow = spline.chartShadow;
85
+ if (spline.chartPadding !== undefined)
86
+ this.chartPadding = spline.chartPadding;
87
+ if (spline.chartMinHeight !== undefined)
88
+ this.chartMinHeight = spline.chartMinHeight;
89
+ if (spline.loadingText !== undefined)
90
+ this.loadingText = spline.loadingText;
91
+ if (spline.loadingColor !== undefined)
92
+ this.loadingColor = spline.loadingColor;
93
+ if (spline.loadingFontSize !== undefined)
94
+ this.loadingFontSize = spline.loadingFontSize;
95
+ if (spline.loadingFontFamily !== undefined)
96
+ this.loadingFontFamily = spline.loadingFontFamily;
97
+ if (spline.loadingBg !== undefined)
98
+ this.loadingBg = spline.loadingBg;
99
+ if (spline.showLegend !== undefined)
100
+ this.showLegend = spline.showLegend;
42
101
  }
43
102
  if (aq) {
44
103
  if (aq.chartTitle)
@@ -58,13 +117,17 @@ let NileSplineChart = class NileSplineChart extends NileElement {
58
117
  this.resizeObserver?.disconnect();
59
118
  this.resizeObserver = null;
60
119
  }
61
- firstUpdated() { this.initChart(); this.setupResizeObserver(); }
120
+ firstUpdated() { this._syncCssVars(); this.initChart(); this.setupResizeObserver(); }
62
121
  updated(changedProperties) {
63
122
  if (changedProperties.has('config') && this.config) {
64
123
  this.applyConfig(this.config);
65
124
  return;
66
125
  }
67
- const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'yAxisTitle', 'loading'];
126
+ const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'yAxisTitle', 'loading', 'showLegend'];
127
+ const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
128
+ 'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
129
+ if (cssVarProps.some(p => changedProperties.has(p)))
130
+ this._syncCssVars();
68
131
  if (!props.some(p => changedProperties.has(p)))
69
132
  return;
70
133
  if (this.loading) {
@@ -98,6 +161,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
98
161
  series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, category: this.category, value: this.y, seriesName: this.series.name }); } } } },
99
162
  },
100
163
  series: this.data.map(s => ({ type: 'spline', name: s.name, data: s.data, color: s.color })),
164
+ legend: { enabled: this.showLegend },
101
165
  credits: { enabled: false },
102
166
  }, this.options);
103
167
  }
@@ -115,7 +179,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
115
179
  } }
116
180
  render() {
117
181
  if (this.loading)
118
- return html `<div class="chart-loading" style="height:${this.height}">Loading...</div>`;
182
+ return html `<div class="chart-loading" style="height:${this.height}">${this.loadingText}</div>`;
119
183
  return html `<div class="chart-container"></div>`;
120
184
  }
121
185
  };
@@ -150,6 +214,42 @@ __decorate([
150
214
  __decorate([
151
215
  property({ type: String, attribute: 'y-axis-title' })
152
216
  ], NileSplineChart.prototype, "yAxisTitle", void 0);
217
+ __decorate([
218
+ property({ type: Boolean, attribute: 'show-legend' })
219
+ ], NileSplineChart.prototype, "showLegend", void 0);
220
+ __decorate([
221
+ property({ type: String, attribute: 'chart-bg' })
222
+ ], NileSplineChart.prototype, "chartBg", void 0);
223
+ __decorate([
224
+ property({ type: String, attribute: 'chart-border-radius' })
225
+ ], NileSplineChart.prototype, "chartBorderRadius", void 0);
226
+ __decorate([
227
+ property({ type: String, attribute: 'chart-border' })
228
+ ], NileSplineChart.prototype, "chartBorder", void 0);
229
+ __decorate([
230
+ property({ type: String, attribute: 'chart-shadow' })
231
+ ], NileSplineChart.prototype, "chartShadow", void 0);
232
+ __decorate([
233
+ property({ type: String, attribute: 'chart-padding' })
234
+ ], NileSplineChart.prototype, "chartPadding", void 0);
235
+ __decorate([
236
+ property({ type: String, attribute: 'chart-min-height' })
237
+ ], NileSplineChart.prototype, "chartMinHeight", void 0);
238
+ __decorate([
239
+ property({ type: String, attribute: 'loading-text' })
240
+ ], NileSplineChart.prototype, "loadingText", void 0);
241
+ __decorate([
242
+ property({ type: String, attribute: 'loading-color' })
243
+ ], NileSplineChart.prototype, "loadingColor", void 0);
244
+ __decorate([
245
+ property({ type: String, attribute: 'loading-font-size' })
246
+ ], NileSplineChart.prototype, "loadingFontSize", void 0);
247
+ __decorate([
248
+ property({ type: String, attribute: 'loading-font-family' })
249
+ ], NileSplineChart.prototype, "loadingFontFamily", void 0);
250
+ __decorate([
251
+ property({ type: String, attribute: 'loading-bg' })
252
+ ], NileSplineChart.prototype, "loadingBg", void 0);
153
253
  NileSplineChart = __decorate([
154
254
  customElement('nile-spline-chart')
155
255
  ], NileSplineChart);
@@ -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-height-200px, var(--ng-height-200px));
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-colors-neutral-700, var(--ng-colors-text-secondary-700));
24
- font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
25
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
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-stacked-chart.css.js.map
@@ -27,6 +27,18 @@ export declare class NileStackedChart extends NileElement {
27
27
  /** `normal` = stacked values; `percent` = 100% proportional stacks. */
28
28
  stackMode: 'normal' | 'percent';
29
29
  pointPadding: number;
30
+ chartBg: string;
31
+ chartBorderRadius: string | number;
32
+ chartBorder: string;
33
+ chartShadow: string;
34
+ chartPadding: string | number;
35
+ chartMinHeight: string | number;
36
+ loadingText: string;
37
+ loadingColor: string;
38
+ loadingFontSize: string | number;
39
+ loadingFontFamily: string;
40
+ loadingBg: string;
41
+ private _syncCssVars;
30
42
  /** Apply `{ chart, aq }` config to individual properties. */
31
43
  private applyConfig;
32
44
  connectedCallback(): void;