@aquera/nile-visualization 2.0.0 → 2.2.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 (96) hide show
  1. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +4 -0
  2. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +12 -0
  3. package/dist/src/nile-area-chart/nile-area-chart.d.ts +2 -0
  4. package/dist/src/nile-area-chart/nile-area-chart.js +6 -1
  5. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +4 -0
  6. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +12 -0
  7. package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +4 -0
  8. package/dist/src/nile-area-range-chart/nile-area-range-chart.js +12 -0
  9. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +4 -0
  10. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +12 -0
  11. package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +2 -0
  12. package/dist/src/nile-bar-chart/nile-bar-chart.js +9 -1
  13. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +2 -0
  14. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +6 -1
  15. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +2 -0
  16. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +6 -1
  17. package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +2 -0
  18. package/dist/src/nile-bubble-chart/nile-bubble-chart.js +6 -1
  19. package/dist/src/nile-chart/nile-chart-config.d.ts +8 -4
  20. package/dist/src/nile-chart/nile-chart.css.js +13 -15
  21. package/dist/src/nile-chart/nile-chart.js +103 -33
  22. package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +2 -0
  23. package/dist/src/nile-cluster-chart/nile-cluster-chart.js +6 -1
  24. package/dist/src/nile-column-chart/nile-column-chart.d.ts +2 -0
  25. package/dist/src/nile-column-chart/nile-column-chart.js +6 -1
  26. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +4 -0
  27. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +12 -1
  28. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +4 -0
  29. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +13 -1
  30. package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +4 -0
  31. package/dist/src/nile-column-range-chart/nile-column-range-chart.js +12 -0
  32. package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +2 -0
  33. package/dist/src/nile-donut-chart/nile-donut-chart.js +6 -0
  34. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +3 -0
  35. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +6 -1
  36. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +3 -0
  37. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +6 -1
  38. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +3 -0
  39. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +6 -1
  40. package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +4 -0
  41. package/dist/src/nile-euler-chart/nile-euler-chart.js +13 -1
  42. package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +3 -0
  43. package/dist/src/nile-fan-chart/nile-fan-chart.js +6 -1
  44. package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +4 -0
  45. package/dist/src/nile-flame-chart/nile-flame-chart.js +12 -1
  46. package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +4 -0
  47. package/dist/src/nile-funnel-chart/nile-funnel-chart.js +12 -1
  48. package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +4 -0
  49. package/dist/src/nile-gauge-chart/nile-gauge-chart.js +13 -1
  50. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +2 -0
  51. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +6 -1
  52. package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +2 -0
  53. package/dist/src/nile-histogram-chart/nile-histogram-chart.js +6 -1
  54. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +4 -0
  55. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +12 -0
  56. package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +10 -0
  57. package/dist/src/nile-kpi-chart/nile-kpi-chart.js +36 -5
  58. package/dist/src/nile-line-chart/nile-line-chart.d.ts +2 -0
  59. package/dist/src/nile-line-chart/nile-line-chart.js +6 -1
  60. package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +4 -0
  61. package/dist/src/nile-line-column-chart/nile-line-column-chart.js +12 -1
  62. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +4 -0
  63. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +13 -2
  64. package/dist/src/nile-map-chart/nile-map-chart.d.ts +4 -0
  65. package/dist/src/nile-map-chart/nile-map-chart.js +12 -3
  66. package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +4 -0
  67. package/dist/src/nile-organization-chart/nile-organization-chart.js +12 -0
  68. package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +53 -0
  69. package/dist/src/nile-pie-chart/nile-pie-chart.js +9 -0
  70. package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +4 -0
  71. package/dist/src/nile-polygon-chart/nile-polygon-chart.js +12 -0
  72. package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +2 -0
  73. package/dist/src/nile-radar-chart/nile-radar-chart.js +6 -1
  74. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +2 -0
  75. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +6 -1
  76. package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +2 -0
  77. package/dist/src/nile-scatter-chart/nile-scatter-chart.js +6 -1
  78. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +2 -0
  79. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +6 -1
  80. package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +2 -0
  81. package/dist/src/nile-spline-chart/nile-spline-chart.js +6 -1
  82. package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +2 -0
  83. package/dist/src/nile-stacked-chart/nile-stacked-chart.js +6 -1
  84. package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +3 -0
  85. package/dist/src/nile-timeline-chart/nile-timeline-chart.js +6 -1
  86. package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +4 -0
  87. package/dist/src/nile-trendline-chart/nile-trendline-chart.js +12 -0
  88. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +2 -0
  89. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +6 -1
  90. package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +4 -0
  91. package/dist/src/nile-vector-chart/nile-vector-chart.js +12 -0
  92. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +2 -0
  93. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +6 -1
  94. package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +2 -0
  95. package/dist/src/nile-xrange-chart/nile-xrange-chart.js +6 -1
  96. package/package.json +1 -1
@@ -25,6 +25,8 @@ export declare class NileRadialBarChart extends NileElement {
25
25
  innerSize: string;
26
26
  paneSize: string;
27
27
  showLegend: boolean;
28
+ /** Full legend configuration — all Highcharts legend options in one object. */
29
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
30
  chartBg: string;
29
31
  chartBorderRadius: string | number;
30
32
  chartBorder: string;
@@ -24,6 +24,8 @@ let NileRadialBarChart = class NileRadialBarChart extends NileElement {
24
24
  this.innerSize = '28%';
25
25
  this.paneSize = '82%';
26
26
  this.showLegend = true;
27
+ /** Full legend configuration — all Highcharts legend options in one object. */
28
+ this.legend = null;
27
29
  // ── Container styling ──
28
30
  this.chartBg = '';
29
31
  this.chartBorderRadius = '';
@@ -164,7 +166,7 @@ let NileRadialBarChart = class NileRadialBarChart extends NileElement {
164
166
  data: s.data,
165
167
  color: s.color,
166
168
  })),
167
- legend: { enabled: this.showLegend },
169
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
168
170
  credits: { enabled: false },
169
171
  }, this.options);
170
172
  }
@@ -229,6 +231,9 @@ __decorate([
229
231
  __decorate([
230
232
  property({ type: Boolean, attribute: 'show-legend' })
231
233
  ], NileRadialBarChart.prototype, "showLegend", void 0);
234
+ __decorate([
235
+ property({ type: Object })
236
+ ], NileRadialBarChart.prototype, "legend", void 0);
232
237
  __decorate([
233
238
  property({ type: String, attribute: 'chart-bg' })
234
239
  ], NileRadialBarChart.prototype, "chartBg", void 0);
@@ -24,6 +24,8 @@ export declare class NileScatterChart extends NileElement {
24
24
  xAxisTitle: string;
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
+ /** Full legend configuration — all Highcharts legend options in one object. */
28
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
27
29
  chartBg: string;
28
30
  chartBorderRadius: string | number;
29
31
  chartBorder: string;
@@ -22,6 +22,8 @@ let NileScatterChart = class NileScatterChart extends NileElement {
22
22
  this.xAxisTitle = '';
23
23
  this.yAxisTitle = '';
24
24
  this.showLegend = true;
25
+ /** Full legend configuration — all Highcharts legend options in one object. */
26
+ this.legend = null;
25
27
  // ── Container styling ──
26
28
  this.chartBg = '';
27
29
  this.chartBorderRadius = '';
@@ -167,7 +169,7 @@ let NileScatterChart = class NileScatterChart extends NileElement {
167
169
  series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, x: this.x, y: this.y, seriesName: this.series.name }); } } } },
168
170
  },
169
171
  series: this.data.map(s => ({ type: 'scatter', name: s.name, data: s.data, color: s.color })),
170
- legend: { enabled: this.showLegend },
172
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
171
173
  credits: { enabled: false },
172
174
  }, this.options);
173
175
  }
@@ -223,6 +225,9 @@ __decorate([
223
225
  __decorate([
224
226
  property({ type: Boolean, attribute: 'show-legend' })
225
227
  ], NileScatterChart.prototype, "showLegend", void 0);
228
+ __decorate([
229
+ property({ type: Object })
230
+ ], NileScatterChart.prototype, "legend", void 0);
226
231
  __decorate([
227
232
  property({ type: String, attribute: 'chart-bg' })
228
233
  ], NileScatterChart.prototype, "chartBg", void 0);
@@ -28,6 +28,8 @@ export declare class NileSpiderwebChart extends NileElement {
28
28
  height: string;
29
29
  showArea: boolean;
30
30
  showLegend: boolean;
31
+ /** Full legend configuration — all Highcharts legend options in one object. */
32
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
31
33
  chartBg: string;
32
34
  chartBorderRadius: string | number;
33
35
  chartBorder: string;
@@ -27,6 +27,8 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
27
27
  this.height = '400px';
28
28
  this.showArea = false;
29
29
  this.showLegend = true;
30
+ /** Full legend configuration — all Highcharts legend options in one object. */
31
+ this.legend = null;
30
32
  // ── Container styling ──
31
33
  this.chartBg = '';
32
34
  this.chartBorderRadius = '';
@@ -170,7 +172,7 @@ let NileSpiderwebChart = class NileSpiderwebChart extends NileElement {
170
172
  color: s.color,
171
173
  pointPlacement: 'on',
172
174
  })),
173
- legend: { enabled: this.showLegend },
175
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
174
176
  credits: { enabled: false },
175
177
  }, this.options);
176
178
  }
@@ -229,6 +231,9 @@ __decorate([
229
231
  __decorate([
230
232
  property({ type: Boolean, attribute: 'show-legend' })
231
233
  ], NileSpiderwebChart.prototype, "showLegend", void 0);
234
+ __decorate([
235
+ property({ type: Object })
236
+ ], NileSpiderwebChart.prototype, "legend", void 0);
232
237
  __decorate([
233
238
  property({ type: String, attribute: 'chart-bg' })
234
239
  ], NileSpiderwebChart.prototype, "chartBg", void 0);
@@ -24,6 +24,8 @@ export declare class NileSplineChart extends NileElement {
24
24
  height: string;
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
+ /** Full legend configuration — all Highcharts legend options in one object. */
28
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
27
29
  chartBg: string;
28
30
  chartBorderRadius: string | number;
29
31
  chartBorder: string;
@@ -22,6 +22,8 @@ let NileSplineChart = class NileSplineChart extends NileElement {
22
22
  this.height = '400px';
23
23
  this.yAxisTitle = '';
24
24
  this.showLegend = true;
25
+ /** Full legend configuration — all Highcharts legend options in one object. */
26
+ this.legend = null;
25
27
  // ── Container styling ──
26
28
  this.chartBg = '';
27
29
  this.chartBorderRadius = '';
@@ -161,7 +163,7 @@ let NileSplineChart = class NileSplineChart extends NileElement {
161
163
  series: { cursor: 'pointer', point: { events: { click() { self.emit('nile-chart-click', { point: this, category: this.category, value: this.y, seriesName: this.series.name }); } } } },
162
164
  },
163
165
  series: this.data.map(s => ({ type: 'spline', name: s.name, data: s.data, color: s.color })),
164
- legend: { enabled: this.showLegend },
166
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
165
167
  credits: { enabled: false },
166
168
  }, this.options);
167
169
  }
@@ -217,6 +219,9 @@ __decorate([
217
219
  __decorate([
218
220
  property({ type: Boolean, attribute: 'show-legend' })
219
221
  ], NileSplineChart.prototype, "showLegend", void 0);
222
+ __decorate([
223
+ property({ type: Object })
224
+ ], NileSplineChart.prototype, "legend", void 0);
220
225
  __decorate([
221
226
  property({ type: String, attribute: 'chart-bg' })
222
227
  ], NileSplineChart.prototype, "chartBg", void 0);
@@ -24,6 +24,8 @@ export declare class NileStackedChart extends NileElement {
24
24
  height: string;
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
+ /** Full legend configuration — all Highcharts legend options in one object. */
28
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
27
29
  /** `normal` = stacked values; `percent` = 100% proportional stacks. */
28
30
  stackMode: 'normal' | 'percent';
29
31
  pointPadding: number;
@@ -23,6 +23,8 @@ let NileStackedChart = class NileStackedChart extends NileElement {
23
23
  this.height = '400px';
24
24
  this.yAxisTitle = '';
25
25
  this.showLegend = true;
26
+ /** Full legend configuration — all Highcharts legend options in one object. */
27
+ this.legend = null;
26
28
  /** `normal` = stacked values; `percent` = 100% proportional stacks. */
27
29
  this.stackMode = 'normal';
28
30
  this.pointPadding = 0.05;
@@ -147,7 +149,7 @@ let NileStackedChart = class NileStackedChart extends NileElement {
147
149
  subtitle: { text: this.chartSubtitle || undefined },
148
150
  xAxis: { categories: this.categories },
149
151
  yAxis: percentAxis,
150
- legend: { enabled: this.showLegend },
152
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
151
153
  tooltip: {
152
154
  shared: true,
153
155
  headerFormat: '<b>{point.key}</b><br/>',
@@ -242,6 +244,9 @@ __decorate([
242
244
  __decorate([
243
245
  property({ type: Boolean, attribute: 'show-legend' })
244
246
  ], NileStackedChart.prototype, "showLegend", void 0);
247
+ __decorate([
248
+ property({ type: Object })
249
+ ], NileStackedChart.prototype, "legend", void 0);
245
250
  __decorate([
246
251
  property({ type: String, attribute: 'stack-mode' })
247
252
  ], NileStackedChart.prototype, "stackMode", void 0);
@@ -2,6 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
+ import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
6
  export interface TimelineEvent {
6
7
  /** Shown on axis / tooltip header (e.g. date string). */
7
8
  name: string;
@@ -38,6 +39,8 @@ export declare class NileTimelineChart extends NileElement {
38
39
  /** Alternate data-label sides along the line. */
39
40
  alternateLabels: boolean;
40
41
  showLegend: boolean;
42
+ /** Full legend configuration — all Highcharts legend options in one object. */
43
+ legend: LegendConfig | null;
41
44
  chartBg: string;
42
45
  chartBorderRadius: string | number;
43
46
  chartBorder: string;
@@ -31,6 +31,8 @@ let NileTimelineChart = class NileTimelineChart extends NileElement {
31
31
  /** Alternate data-label sides along the line. */
32
32
  this.alternateLabels = true;
33
33
  this.showLegend = false;
34
+ /** Full legend configuration — all Highcharts legend options in one object. */
35
+ this.legend = null;
34
36
  // ── Container styling ──
35
37
  this.chartBg = '';
36
38
  this.chartBorderRadius = '';
@@ -156,7 +158,7 @@ let NileTimelineChart = class NileTimelineChart extends NileElement {
156
158
  },
157
159
  title: { text: this.chartTitle || undefined },
158
160
  subtitle: { text: this.chartSubtitle || undefined },
159
- legend: { enabled: this.showLegend },
161
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
160
162
  tooltip: {
161
163
  headerFormat: '',
162
164
  pointFormat: '<span style="color:{point.color}">●</span> <b>{point.label}</b><br/>{point.description}',
@@ -271,6 +273,9 @@ __decorate([
271
273
  __decorate([
272
274
  property({ type: Boolean, attribute: 'show-legend' })
273
275
  ], NileTimelineChart.prototype, "showLegend", void 0);
276
+ __decorate([
277
+ property({ type: Object })
278
+ ], NileTimelineChart.prototype, "legend", void 0);
274
279
  __decorate([
275
280
  property({ type: String, attribute: 'chart-bg' })
276
281
  ], NileTimelineChart.prototype, "chartBg", void 0);
@@ -2,6 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
+ import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
6
  export interface TrendlineSeriesData {
6
7
  name: string;
7
8
  data: number[];
@@ -52,6 +53,9 @@ export declare class NileTrendlineChart extends NileElement {
52
53
  loadingFontSize: string | number;
53
54
  loadingFontFamily: string;
54
55
  loadingBg: string;
56
+ showLegend: boolean;
57
+ /** Full legend configuration — all Highcharts legend options in one object. */
58
+ legend: LegendConfig | null;
55
59
  private _syncCssVars;
56
60
  /** Apply { chart, aq } config to individual properties. */
57
61
  private applyConfig;
@@ -44,6 +44,9 @@ let NileTrendlineChart = class NileTrendlineChart extends NileElement {
44
44
  this.loadingFontSize = '';
45
45
  this.loadingFontFamily = '';
46
46
  this.loadingBg = '';
47
+ this.showLegend = true;
48
+ /** Full legend configuration — all Highcharts legend options in one object. */
49
+ this.legend = null;
47
50
  }
48
51
  _syncCssVars() {
49
52
  const set = (prop, val) => {
@@ -149,6 +152,8 @@ let NileTrendlineChart = class NileTrendlineChart extends NileElement {
149
152
  'height',
150
153
  'yAxisTitle',
151
154
  'forecast',
155
+ 'showLegend',
156
+ 'legend',
152
157
  'loading',
153
158
  ];
154
159
  const needsUpdate = chartProps.some(p => changedProperties.has(p));
@@ -280,6 +285,7 @@ let NileTrendlineChart = class NileTrendlineChart extends NileElement {
280
285
  },
281
286
  },
282
287
  series,
288
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
283
289
  credits: {
284
290
  enabled: false,
285
291
  },
@@ -374,6 +380,12 @@ __decorate([
374
380
  __decorate([
375
381
  property({ type: String, attribute: 'loading-bg' })
376
382
  ], NileTrendlineChart.prototype, "loadingBg", void 0);
383
+ __decorate([
384
+ property({ type: Boolean, attribute: 'show-legend' })
385
+ ], NileTrendlineChart.prototype, "showLegend", void 0);
386
+ __decorate([
387
+ property({ type: Object })
388
+ ], NileTrendlineChart.prototype, "legend", void 0);
377
389
  NileTrendlineChart = __decorate([
378
390
  customElement('nile-trendline-chart')
379
391
  ], NileTrendlineChart);
@@ -21,6 +21,8 @@ export declare class NileVariablePieChart extends NileElement {
21
21
  seriesName: string;
22
22
  showDataLabels: boolean;
23
23
  showLegend: boolean;
24
+ /** Full legend configuration — all Highcharts legend options in one object. */
25
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
24
26
  options: Highcharts.Options;
25
27
  loading: boolean;
26
28
  height: string;
@@ -19,6 +19,8 @@ let NileVariablePieChart = class NileVariablePieChart extends NileElement {
19
19
  this.seriesName = '';
20
20
  this.showDataLabels = true;
21
21
  this.showLegend = true;
22
+ /** Full legend configuration — all Highcharts legend options in one object. */
23
+ this.legend = null;
22
24
  this.options = {};
23
25
  this.loading = false;
24
26
  this.height = '400px';
@@ -122,7 +124,7 @@ let NileVariablePieChart = class NileVariablePieChart extends NileElement {
122
124
  title: { text: this.chartTitle || undefined },
123
125
  subtitle: { text: this.chartSubtitle || undefined },
124
126
  tooltip: { pointFormat: '{series.name}: <b>{point.y}</b> ({point.z})' },
125
- legend: { enabled: this.showLegend },
127
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
126
128
  plotOptions: {
127
129
  variablepie: {
128
130
  dataLabels: { enabled: this.showDataLabels },
@@ -203,6 +205,9 @@ __decorate([
203
205
  __decorate([
204
206
  property({ type: Boolean, attribute: 'show-legend' })
205
207
  ], NileVariablePieChart.prototype, "showLegend", void 0);
208
+ __decorate([
209
+ property({ type: Object })
210
+ ], NileVariablePieChart.prototype, "legend", void 0);
206
211
  __decorate([
207
212
  property({ type: Object })
208
213
  ], NileVariablePieChart.prototype, "options", void 0);
@@ -2,6 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
+ import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
6
  export interface VectorDataPoint {
6
7
  x: number;
7
8
  y: number;
@@ -37,6 +38,9 @@ export declare class NileVectorChart extends NileElement {
37
38
  loadingFontSize: string | number;
38
39
  loadingFontFamily: string;
39
40
  loadingBg: string;
41
+ showLegend: boolean;
42
+ /** Full legend configuration — all Highcharts legend options in one object. */
43
+ legend: LegendConfig | null;
40
44
  private _syncCssVars;
41
45
  private applyConfig;
42
46
  connectedCallback(): void;
@@ -35,6 +35,9 @@ let NileVectorChart = class NileVectorChart extends NileElement {
35
35
  this.loadingFontSize = '';
36
36
  this.loadingFontFamily = '';
37
37
  this.loadingBg = '';
38
+ this.showLegend = true;
39
+ /** Full legend configuration — all Highcharts legend options in one object. */
40
+ this.legend = null;
38
41
  }
39
42
  _syncCssVars() {
40
43
  const set = (prop, val) => {
@@ -91,6 +94,8 @@ let NileVectorChart = class NileVectorChart extends NileElement {
91
94
  'options',
92
95
  'height',
93
96
  'loading',
97
+ 'showLegend',
98
+ 'legend',
94
99
  ];
95
100
  const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
96
101
  'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
@@ -155,6 +160,7 @@ let NileVectorChart = class NileVectorChart extends NileElement {
155
160
  })),
156
161
  },
157
162
  ],
163
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
158
164
  credits: { enabled: false },
159
165
  }, this.options);
160
166
  }
@@ -246,6 +252,12 @@ __decorate([
246
252
  __decorate([
247
253
  property({ type: String, attribute: 'loading-bg' })
248
254
  ], NileVectorChart.prototype, "loadingBg", void 0);
255
+ __decorate([
256
+ property({ type: Boolean, attribute: 'show-legend' })
257
+ ], NileVectorChart.prototype, "showLegend", void 0);
258
+ __decorate([
259
+ property({ type: Object })
260
+ ], NileVectorChart.prototype, "legend", void 0);
249
261
  NileVectorChart = __decorate([
250
262
  customElement('nile-vector-chart')
251
263
  ], NileVectorChart);
@@ -25,6 +25,8 @@ export declare class NileWaterfallChart extends NileElement {
25
25
  height: string;
26
26
  yAxisTitle: string;
27
27
  showLegend: boolean;
28
+ /** Full legend configuration — all Highcharts legend options in one object. */
29
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
30
  chartBg: string;
29
31
  chartBorderRadius: string | number;
30
32
  chartBorder: string;
@@ -21,6 +21,8 @@ let NileWaterfallChart = class NileWaterfallChart extends NileElement {
21
21
  this.height = '400px';
22
22
  this.yAxisTitle = '';
23
23
  this.showLegend = true;
24
+ /** Full legend configuration — all Highcharts legend options in one object. */
25
+ this.legend = null;
24
26
  // ── Container styling ──
25
27
  this.chartBg = '';
26
28
  this.chartBorderRadius = '';
@@ -180,7 +182,7 @@ let NileWaterfallChart = class NileWaterfallChart extends NileElement {
180
182
  color: '#3b82f6',
181
183
  negativeColor: '#ef4444',
182
184
  }],
183
- legend: { enabled: this.showLegend },
185
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
184
186
  credits: { enabled: false },
185
187
  }, this.options);
186
188
  }
@@ -233,6 +235,9 @@ __decorate([
233
235
  __decorate([
234
236
  property({ type: Boolean, attribute: 'show-legend' })
235
237
  ], NileWaterfallChart.prototype, "showLegend", void 0);
238
+ __decorate([
239
+ property({ type: Object })
240
+ ], NileWaterfallChart.prototype, "legend", void 0);
236
241
  __decorate([
237
242
  property({ type: String, attribute: 'chart-bg' })
238
243
  ], NileWaterfallChart.prototype, "chartBg", void 0);
@@ -27,6 +27,8 @@ export declare class NileXrangeChart extends NileElement {
27
27
  loading: boolean;
28
28
  height: string;
29
29
  showLegend: boolean;
30
+ /** Full legend configuration — all Highcharts legend options in one object. */
31
+ legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
30
32
  chartBg: string;
31
33
  chartBorderRadius: string | number;
32
34
  chartBorder: string;
@@ -23,6 +23,8 @@ let NileXrangeChart = class NileXrangeChart extends NileElement {
23
23
  this.loading = false;
24
24
  this.height = '400px';
25
25
  this.showLegend = true;
26
+ /** Full legend configuration — all Highcharts legend options in one object. */
27
+ this.legend = null;
26
28
  // ── Container styling ──
27
29
  this.chartBg = '';
28
30
  this.chartBorderRadius = '';
@@ -169,7 +171,7 @@ let NileXrangeChart = class NileXrangeChart extends NileElement {
169
171
  })),
170
172
  },
171
173
  ],
172
- legend: { enabled: this.showLegend },
174
+ legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
173
175
  credits: { enabled: false },
174
176
  }, this.options);
175
177
  }
@@ -231,6 +233,9 @@ __decorate([
231
233
  __decorate([
232
234
  property({ type: Boolean, attribute: 'show-legend' })
233
235
  ], NileXrangeChart.prototype, "showLegend", void 0);
236
+ __decorate([
237
+ property({ type: Object })
238
+ ], NileXrangeChart.prototype, "legend", void 0);
234
239
  __decorate([
235
240
  property({ type: String, attribute: 'chart-bg' })
236
241
  ], NileXrangeChart.prototype, "chartBg", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",