@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.
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +4 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +12 -0
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +2 -0
- package/dist/src/nile-area-chart/nile-area-chart.js +6 -1
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +4 -0
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +12 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +4 -0
- package/dist/src/nile-area-range-chart/nile-area-range-chart.js +12 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +4 -0
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +12 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +2 -0
- package/dist/src/nile-bar-chart/nile-bar-chart.js +9 -1
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +2 -0
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +6 -1
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +2 -0
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +6 -1
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +2 -0
- package/dist/src/nile-bubble-chart/nile-bubble-chart.js +6 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +8 -4
- package/dist/src/nile-chart/nile-chart.css.js +13 -15
- package/dist/src/nile-chart/nile-chart.js +103 -33
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +2 -0
- package/dist/src/nile-cluster-chart/nile-cluster-chart.js +6 -1
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +2 -0
- package/dist/src/nile-column-chart/nile-column-chart.js +6 -1
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +4 -0
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +12 -1
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +4 -0
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +13 -1
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +4 -0
- package/dist/src/nile-column-range-chart/nile-column-range-chart.js +12 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +2 -0
- package/dist/src/nile-donut-chart/nile-donut-chart.js +6 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +3 -0
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +6 -1
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +3 -0
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +6 -1
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +3 -0
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +6 -1
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +4 -0
- package/dist/src/nile-euler-chart/nile-euler-chart.js +13 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +3 -0
- package/dist/src/nile-fan-chart/nile-fan-chart.js +6 -1
- package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +4 -0
- package/dist/src/nile-flame-chart/nile-flame-chart.js +12 -1
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +4 -0
- package/dist/src/nile-funnel-chart/nile-funnel-chart.js +12 -1
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +4 -0
- package/dist/src/nile-gauge-chart/nile-gauge-chart.js +13 -1
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +2 -0
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +6 -1
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +2 -0
- package/dist/src/nile-histogram-chart/nile-histogram-chart.js +6 -1
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +4 -0
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +12 -0
- package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +10 -0
- package/dist/src/nile-kpi-chart/nile-kpi-chart.js +36 -5
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +2 -0
- package/dist/src/nile-line-chart/nile-line-chart.js +6 -1
- package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +4 -0
- package/dist/src/nile-line-column-chart/nile-line-column-chart.js +12 -1
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +4 -0
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +13 -2
- package/dist/src/nile-map-chart/nile-map-chart.d.ts +4 -0
- package/dist/src/nile-map-chart/nile-map-chart.js +12 -3
- package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +4 -0
- package/dist/src/nile-organization-chart/nile-organization-chart.js +12 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +53 -0
- package/dist/src/nile-pie-chart/nile-pie-chart.js +9 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +4 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.js +12 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +2 -0
- package/dist/src/nile-radar-chart/nile-radar-chart.js +6 -1
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +2 -0
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +6 -1
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +2 -0
- package/dist/src/nile-scatter-chart/nile-scatter-chart.js +6 -1
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +2 -0
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +6 -1
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +2 -0
- package/dist/src/nile-spline-chart/nile-spline-chart.js +6 -1
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +2 -0
- package/dist/src/nile-stacked-chart/nile-stacked-chart.js +6 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +3 -0
- package/dist/src/nile-timeline-chart/nile-timeline-chart.js +6 -1
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +4 -0
- package/dist/src/nile-trendline-chart/nile-trendline-chart.js +12 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +2 -0
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +6 -1
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +4 -0
- package/dist/src/nile-vector-chart/nile-vector-chart.js +12 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +2 -0
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +6 -1
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +2 -0
- package/dist/src/nile-xrange-chart/nile-xrange-chart.js +6 -1
- package/package.json +1 -1
|
@@ -33,6 +33,9 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
|
|
|
33
33
|
this.loadingFontSize = '';
|
|
34
34
|
this.loadingFontFamily = '';
|
|
35
35
|
this.loadingBg = '';
|
|
36
|
+
this.showLegend = true;
|
|
37
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
38
|
+
this.legend = null;
|
|
36
39
|
}
|
|
37
40
|
_syncCssVars() {
|
|
38
41
|
const set = (prop, val) => {
|
|
@@ -83,7 +86,9 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
|
|
|
83
86
|
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
84
87
|
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
85
88
|
this._syncCssVars();
|
|
86
|
-
const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading'
|
|
89
|
+
const props = ['data', 'categories', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading',
|
|
90
|
+
'showLegend',
|
|
91
|
+
'legend'];
|
|
87
92
|
if (!props.some(p => changedProperties.has(p)))
|
|
88
93
|
return;
|
|
89
94
|
if (this.loading) {
|
|
@@ -135,6 +140,7 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
|
|
|
135
140
|
data: s.data,
|
|
136
141
|
color: s.color,
|
|
137
142
|
})),
|
|
143
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
138
144
|
credits: { enabled: false },
|
|
139
145
|
}, this.options);
|
|
140
146
|
}
|
|
@@ -220,6 +226,12 @@ __decorate([
|
|
|
220
226
|
__decorate([
|
|
221
227
|
property({ type: String, attribute: 'loading-bg' })
|
|
222
228
|
], NileColumnPyramidChart.prototype, "loadingBg", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
231
|
+
], NileColumnPyramidChart.prototype, "showLegend", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
property({ type: Object })
|
|
234
|
+
], NileColumnPyramidChart.prototype, "legend", void 0);
|
|
223
235
|
NileColumnPyramidChart = __decorate([
|
|
224
236
|
customElement('nile-column-pyramid-chart')
|
|
225
237
|
], NileColumnPyramidChart);
|
|
@@ -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 ColumnRangeSeriesData {
|
|
6
7
|
name: string;
|
|
7
8
|
data: [number, number][];
|
|
@@ -33,6 +34,9 @@ export declare class NileColumnRangeChart extends NileElement {
|
|
|
33
34
|
loadingFontSize: string | number;
|
|
34
35
|
loadingFontFamily: string;
|
|
35
36
|
loadingBg: string;
|
|
37
|
+
showLegend: boolean;
|
|
38
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
39
|
+
legend: LegendConfig | null;
|
|
36
40
|
private _syncCssVars;
|
|
37
41
|
private applyConfig;
|
|
38
42
|
connectedCallback(): void;
|
|
@@ -34,6 +34,9 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
|
|
|
34
34
|
this.loadingFontSize = '';
|
|
35
35
|
this.loadingFontFamily = '';
|
|
36
36
|
this.loadingBg = '';
|
|
37
|
+
this.showLegend = true;
|
|
38
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
39
|
+
this.legend = null;
|
|
37
40
|
}
|
|
38
41
|
_syncCssVars() {
|
|
39
42
|
const set = (prop, val) => {
|
|
@@ -93,6 +96,8 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
|
|
|
93
96
|
'height',
|
|
94
97
|
'yAxisTitle',
|
|
95
98
|
'loading',
|
|
99
|
+
'showLegend',
|
|
100
|
+
'legend',
|
|
96
101
|
];
|
|
97
102
|
if (!props.some(p => changedProperties.has(p)))
|
|
98
103
|
return;
|
|
@@ -146,6 +151,7 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
|
|
|
146
151
|
data: s.data,
|
|
147
152
|
color: s.color,
|
|
148
153
|
})),
|
|
154
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
149
155
|
credits: { enabled: false },
|
|
150
156
|
}, this.options);
|
|
151
157
|
}
|
|
@@ -234,6 +240,12 @@ __decorate([
|
|
|
234
240
|
__decorate([
|
|
235
241
|
property({ type: String, attribute: 'loading-bg' })
|
|
236
242
|
], NileColumnRangeChart.prototype, "loadingBg", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
245
|
+
], NileColumnRangeChart.prototype, "showLegend", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
property({ type: Object })
|
|
248
|
+
], NileColumnRangeChart.prototype, "legend", void 0);
|
|
237
249
|
NileColumnRangeChart = __decorate([
|
|
238
250
|
customElement('nile-column-range-chart')
|
|
239
251
|
], NileColumnRangeChart);
|
|
@@ -29,6 +29,8 @@ export declare class NileDonutChart extends NileElement {
|
|
|
29
29
|
height: string;
|
|
30
30
|
showDataLabels: boolean;
|
|
31
31
|
showLegend: boolean;
|
|
32
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
33
|
+
legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
|
|
32
34
|
chartBg: string;
|
|
33
35
|
chartBorderRadius: string | number;
|
|
34
36
|
chartBorder: string;
|
|
@@ -25,6 +25,8 @@ let NileDonutChart = class NileDonutChart extends NileElement {
|
|
|
25
25
|
this.height = '400px';
|
|
26
26
|
this.showDataLabels = true;
|
|
27
27
|
this.showLegend = true;
|
|
28
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
+
this.legend = null;
|
|
28
30
|
// ── Container styling ──
|
|
29
31
|
this.chartBg = '';
|
|
30
32
|
this.chartBorderRadius = '';
|
|
@@ -185,6 +187,7 @@ let NileDonutChart = class NileDonutChart extends NileElement {
|
|
|
185
187
|
},
|
|
186
188
|
},
|
|
187
189
|
series: [{ type: 'pie', name: this.seriesName, data: this.data.map(d => ({ name: d.name, y: d.y, color: d.color, sliced: d.sliced, selected: d.selected })) }],
|
|
190
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
188
191
|
credits: { enabled: false },
|
|
189
192
|
}, this.options);
|
|
190
193
|
}
|
|
@@ -246,6 +249,9 @@ __decorate([
|
|
|
246
249
|
__decorate([
|
|
247
250
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
248
251
|
], NileDonutChart.prototype, "showLegend", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
property({ type: Object })
|
|
254
|
+
], NileDonutChart.prototype, "legend", void 0);
|
|
249
255
|
__decorate([
|
|
250
256
|
property({ type: String, attribute: 'chart-bg' })
|
|
251
257
|
], NileDonutChart.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 { 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 DumbbellPoint {
|
|
6
7
|
name: string;
|
|
7
8
|
low: number;
|
|
@@ -31,6 +32,8 @@ export declare class NileDumbbellChart extends NileElement {
|
|
|
31
32
|
connectorColor: string;
|
|
32
33
|
showLegend: boolean;
|
|
33
34
|
horizontal: boolean;
|
|
35
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
36
|
+
legend: LegendConfig | null;
|
|
34
37
|
chartBg: string;
|
|
35
38
|
chartBorderRadius: string | number;
|
|
36
39
|
chartBorder: string;
|
|
@@ -26,6 +26,8 @@ let NileDumbbellChart = class NileDumbbellChart extends NileElement {
|
|
|
26
26
|
this.connectorColor = '#94a3b8';
|
|
27
27
|
this.showLegend = false;
|
|
28
28
|
this.horizontal = false;
|
|
29
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
30
|
+
this.legend = null;
|
|
29
31
|
// ── Container styling ──
|
|
30
32
|
this.chartBg = '';
|
|
31
33
|
this.chartBorderRadius = '';
|
|
@@ -135,7 +137,7 @@ let NileDumbbellChart = class NileDumbbellChart extends NileElement {
|
|
|
135
137
|
},
|
|
136
138
|
title: { text: this.chartTitle || undefined },
|
|
137
139
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
138
|
-
legend: { enabled: this.showLegend },
|
|
140
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
139
141
|
xAxis: { type: 'category' },
|
|
140
142
|
yAxis: { title: { text: this.yAxisTitle || undefined } },
|
|
141
143
|
tooltip: {
|
|
@@ -249,6 +251,9 @@ __decorate([
|
|
|
249
251
|
__decorate([
|
|
250
252
|
property({ type: Boolean, reflect: true, attribute: 'horizontal' })
|
|
251
253
|
], NileDumbbellChart.prototype, "horizontal", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
property({ type: Object })
|
|
256
|
+
], NileDumbbellChart.prototype, "legend", void 0);
|
|
252
257
|
__decorate([
|
|
253
258
|
property({ type: String, attribute: 'chart-bg' })
|
|
254
259
|
], NileDumbbellChart.prototype, "chartBg", void 0);
|
|
@@ -3,6 +3,7 @@ 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
5
|
import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
|
|
6
|
+
import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
|
|
6
7
|
export declare class NileDumbbellLowerChart extends NileElement {
|
|
7
8
|
static styles: CSSResultGroup;
|
|
8
9
|
private _hc;
|
|
@@ -22,6 +23,8 @@ export declare class NileDumbbellLowerChart extends NileElement {
|
|
|
22
23
|
connectorColor: string;
|
|
23
24
|
showLegend: boolean;
|
|
24
25
|
horizontal: boolean;
|
|
26
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
27
|
+
legend: LegendConfig | null;
|
|
25
28
|
chartBg: string;
|
|
26
29
|
chartBorderRadius: string | number;
|
|
27
30
|
chartBorder: string;
|
|
@@ -25,6 +25,8 @@ let NileDumbbellLowerChart = class NileDumbbellLowerChart extends NileElement {
|
|
|
25
25
|
this.connectorColor = '#94a3b8';
|
|
26
26
|
this.showLegend = false;
|
|
27
27
|
this.horizontal = false;
|
|
28
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
+
this.legend = null;
|
|
28
30
|
// ── Container styling ──
|
|
29
31
|
this.chartBg = '';
|
|
30
32
|
this.chartBorderRadius = '';
|
|
@@ -131,7 +133,7 @@ let NileDumbbellLowerChart = class NileDumbbellLowerChart extends NileElement {
|
|
|
131
133
|
},
|
|
132
134
|
title: { text: this.chartTitle || undefined },
|
|
133
135
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
134
|
-
legend: { enabled: this.showLegend },
|
|
136
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
135
137
|
xAxis: { type: 'category' },
|
|
136
138
|
yAxis: { title: { text: this.yAxisTitle || undefined } },
|
|
137
139
|
tooltip: {
|
|
@@ -246,6 +248,9 @@ __decorate([
|
|
|
246
248
|
__decorate([
|
|
247
249
|
property({ type: Boolean, reflect: true, attribute: 'horizontal' })
|
|
248
250
|
], NileDumbbellLowerChart.prototype, "horizontal", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: Object })
|
|
253
|
+
], NileDumbbellLowerChart.prototype, "legend", void 0);
|
|
249
254
|
__decorate([
|
|
250
255
|
property({ type: String, attribute: 'chart-bg' })
|
|
251
256
|
], NileDumbbellLowerChart.prototype, "chartBg", void 0);
|
|
@@ -3,6 +3,7 @@ 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
5
|
import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
|
|
6
|
+
import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
|
|
6
7
|
export declare class NileDumbbellUpperChart extends NileElement {
|
|
7
8
|
static styles: CSSResultGroup;
|
|
8
9
|
private _hc;
|
|
@@ -22,6 +23,8 @@ export declare class NileDumbbellUpperChart extends NileElement {
|
|
|
22
23
|
connectorColor: string;
|
|
23
24
|
showLegend: boolean;
|
|
24
25
|
horizontal: boolean;
|
|
26
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
27
|
+
legend: LegendConfig | null;
|
|
25
28
|
chartBg: string;
|
|
26
29
|
chartBorderRadius: string | number;
|
|
27
30
|
chartBorder: string;
|
|
@@ -25,6 +25,8 @@ let NileDumbbellUpperChart = class NileDumbbellUpperChart extends NileElement {
|
|
|
25
25
|
this.connectorColor = '#94a3b8';
|
|
26
26
|
this.showLegend = false;
|
|
27
27
|
this.horizontal = false;
|
|
28
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
+
this.legend = null;
|
|
28
30
|
// ── Container styling ──
|
|
29
31
|
this.chartBg = '';
|
|
30
32
|
this.chartBorderRadius = '';
|
|
@@ -131,7 +133,7 @@ let NileDumbbellUpperChart = class NileDumbbellUpperChart extends NileElement {
|
|
|
131
133
|
},
|
|
132
134
|
title: { text: this.chartTitle || undefined },
|
|
133
135
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
134
|
-
legend: { enabled: this.showLegend },
|
|
136
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
135
137
|
xAxis: { type: 'category' },
|
|
136
138
|
yAxis: { title: { text: this.yAxisTitle || undefined } },
|
|
137
139
|
tooltip: {
|
|
@@ -246,6 +248,9 @@ __decorate([
|
|
|
246
248
|
__decorate([
|
|
247
249
|
property({ type: Boolean, reflect: true, attribute: 'horizontal' })
|
|
248
250
|
], NileDumbbellUpperChart.prototype, "horizontal", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: Object })
|
|
253
|
+
], NileDumbbellUpperChart.prototype, "legend", void 0);
|
|
249
254
|
__decorate([
|
|
250
255
|
property({ type: String, attribute: 'chart-bg' })
|
|
251
256
|
], NileDumbbellUpperChart.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 { 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 EulerVennDataPoint {
|
|
6
7
|
sets: string[];
|
|
7
8
|
value: number;
|
|
@@ -31,6 +32,9 @@ export declare class NileEulerChart extends NileElement {
|
|
|
31
32
|
loadingFontSize: string | number;
|
|
32
33
|
loadingFontFamily: string;
|
|
33
34
|
loadingBg: string;
|
|
35
|
+
showLegend: boolean;
|
|
36
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
37
|
+
legend: LegendConfig | null;
|
|
34
38
|
private _syncCssVars;
|
|
35
39
|
private applyConfig;
|
|
36
40
|
connectedCallback(): void;
|
|
@@ -32,6 +32,9 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
32
32
|
this.loadingFontSize = '';
|
|
33
33
|
this.loadingFontFamily = '';
|
|
34
34
|
this.loadingBg = '';
|
|
35
|
+
this.showLegend = true;
|
|
36
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
37
|
+
this.legend = null;
|
|
35
38
|
}
|
|
36
39
|
_syncCssVars() {
|
|
37
40
|
const set = (prop, val) => {
|
|
@@ -78,7 +81,9 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
78
81
|
this.applyConfig(this.config);
|
|
79
82
|
return;
|
|
80
83
|
}
|
|
81
|
-
const props = ['data', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading'
|
|
84
|
+
const props = ['data', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading',
|
|
85
|
+
'showLegend',
|
|
86
|
+
'legend'];
|
|
82
87
|
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
83
88
|
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
84
89
|
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
@@ -132,6 +137,7 @@ let NileEulerChart = class NileEulerChart extends NileElement {
|
|
|
132
137
|
data: this.data,
|
|
133
138
|
},
|
|
134
139
|
],
|
|
140
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
135
141
|
credits: { enabled: false },
|
|
136
142
|
}, this.options);
|
|
137
143
|
}
|
|
@@ -214,6 +220,12 @@ __decorate([
|
|
|
214
220
|
__decorate([
|
|
215
221
|
property({ type: String, attribute: 'loading-bg' })
|
|
216
222
|
], NileEulerChart.prototype, "loadingBg", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
225
|
+
], NileEulerChart.prototype, "showLegend", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property({ type: Object })
|
|
228
|
+
], NileEulerChart.prototype, "legend", void 0);
|
|
217
229
|
NileEulerChart = __decorate([
|
|
218
230
|
customElement('nile-euler-chart')
|
|
219
231
|
], NileEulerChart);
|
|
@@ -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
|
/** Central path (history + median / point forecast). */
|
|
6
7
|
export interface FanLinePoint {
|
|
7
8
|
category: string;
|
|
@@ -40,6 +41,8 @@ export declare class NileFanChart extends NileElement {
|
|
|
40
41
|
lineSeriesName: string;
|
|
41
42
|
lineColor: string;
|
|
42
43
|
showLegend: boolean;
|
|
44
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
45
|
+
legend: LegendConfig | null;
|
|
43
46
|
/**
|
|
44
47
|
* Index (0-based) of the first **forecast** category on the x-axis.
|
|
45
48
|
* When ≥ 0, draws a dashed separator and optional plot band.
|
|
@@ -26,6 +26,8 @@ let NileFanChart = class NileFanChart extends NileElement {
|
|
|
26
26
|
this.lineSeriesName = '';
|
|
27
27
|
this.lineColor = '#1d4ed8';
|
|
28
28
|
this.showLegend = false;
|
|
29
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
30
|
+
this.legend = null;
|
|
29
31
|
/**
|
|
30
32
|
* Index (0-based) of the first **forecast** category on the x-axis.
|
|
31
33
|
* When ≥ 0, draws a dashed separator and optional plot band.
|
|
@@ -179,7 +181,7 @@ let NileFanChart = class NileFanChart extends NileElement {
|
|
|
179
181
|
},
|
|
180
182
|
title: { text: this.chartTitle || undefined },
|
|
181
183
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
182
|
-
legend: { enabled: this.showLegend },
|
|
184
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
183
185
|
tooltip: { shared: true, crosshairs: true },
|
|
184
186
|
xAxis: xAxisExtra,
|
|
185
187
|
yAxis: {
|
|
@@ -283,6 +285,9 @@ __decorate([
|
|
|
283
285
|
__decorate([
|
|
284
286
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
285
287
|
], NileFanChart.prototype, "showLegend", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property({ type: Object })
|
|
290
|
+
], NileFanChart.prototype, "legend", void 0);
|
|
286
291
|
__decorate([
|
|
287
292
|
property({ type: Number, attribute: 'forecast-start-index' })
|
|
288
293
|
], NileFanChart.prototype, "forecastStartIndex", 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
|
/** Segment row for the flame / icicle layout (`columnrange`-based). */
|
|
6
7
|
export interface FlameChartPoint {
|
|
7
8
|
name: string;
|
|
@@ -50,6 +51,9 @@ export declare class NileFlameChart extends NileElement {
|
|
|
50
51
|
loadingFontSize: string | number;
|
|
51
52
|
loadingFontFamily: string;
|
|
52
53
|
loadingBg: string;
|
|
54
|
+
showLegend: boolean;
|
|
55
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
56
|
+
legend: LegendConfig | null;
|
|
53
57
|
private _syncCssVars;
|
|
54
58
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
55
59
|
private applyConfig;
|
|
@@ -59,6 +59,9 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
59
59
|
this.loadingFontSize = '';
|
|
60
60
|
this.loadingFontFamily = '';
|
|
61
61
|
this.loadingBg = '';
|
|
62
|
+
this.showLegend = false;
|
|
63
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
64
|
+
this.legend = null;
|
|
62
65
|
}
|
|
63
66
|
_syncCssVars() {
|
|
64
67
|
const set = (prop, val) => {
|
|
@@ -115,6 +118,8 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
115
118
|
'options',
|
|
116
119
|
'height',
|
|
117
120
|
'loading',
|
|
121
|
+
'showLegend',
|
|
122
|
+
'legend',
|
|
118
123
|
];
|
|
119
124
|
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
120
125
|
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
@@ -189,7 +194,7 @@ let NileFlameChart = class NileFlameChart extends NileElement {
|
|
|
189
194
|
chart: { inverted: !isSunburst, ...(this.height ? { height: this.height } : {}) },
|
|
190
195
|
title: { text: titleText, align: 'left' },
|
|
191
196
|
subtitle: { text: this.chartSubtitle || undefined, align: 'left' },
|
|
192
|
-
legend: { enabled:
|
|
197
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
193
198
|
xAxis: [{ visible: false }, xAxisSecond],
|
|
194
199
|
yAxis: [
|
|
195
200
|
{ visible: false },
|
|
@@ -376,6 +381,12 @@ __decorate([
|
|
|
376
381
|
__decorate([
|
|
377
382
|
property({ type: String, attribute: 'loading-bg' })
|
|
378
383
|
], NileFlameChart.prototype, "loadingBg", void 0);
|
|
384
|
+
__decorate([
|
|
385
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
386
|
+
], NileFlameChart.prototype, "showLegend", void 0);
|
|
387
|
+
__decorate([
|
|
388
|
+
property({ type: Object })
|
|
389
|
+
], NileFlameChart.prototype, "legend", void 0);
|
|
379
390
|
NileFlameChart = __decorate([
|
|
380
391
|
customElement('nile-flame-chart')
|
|
381
392
|
], NileFlameChart);
|
|
@@ -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 FunnelDataPoint {
|
|
6
7
|
name: string;
|
|
7
8
|
y: number;
|
|
@@ -34,6 +35,9 @@ export declare class NileFunnelChart extends NileElement {
|
|
|
34
35
|
loadingFontSize: string | number;
|
|
35
36
|
loadingFontFamily: string;
|
|
36
37
|
loadingBg: string;
|
|
38
|
+
showLegend: boolean;
|
|
39
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
40
|
+
legend: LegendConfig | null;
|
|
37
41
|
private _syncCssVars;
|
|
38
42
|
/** Apply `{ chart, aq }` config to individual properties. */
|
|
39
43
|
private applyConfig;
|
|
@@ -35,6 +35,9 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
35
35
|
this.loadingFontSize = '';
|
|
36
36
|
this.loadingFontFamily = '';
|
|
37
37
|
this.loadingBg = '';
|
|
38
|
+
this.showLegend = false;
|
|
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 NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
91
94
|
'seriesName',
|
|
92
95
|
'showDataLabels',
|
|
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'];
|
|
@@ -165,7 +170,7 @@ let NileFunnelChart = class NileFunnelChart extends NileElement {
|
|
|
165
170
|
})),
|
|
166
171
|
},
|
|
167
172
|
],
|
|
168
|
-
legend: { enabled:
|
|
173
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
169
174
|
credits: { enabled: false },
|
|
170
175
|
}, this.options);
|
|
171
176
|
}
|
|
@@ -254,6 +259,12 @@ __decorate([
|
|
|
254
259
|
__decorate([
|
|
255
260
|
property({ type: String, attribute: 'loading-bg' })
|
|
256
261
|
], NileFunnelChart.prototype, "loadingBg", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
264
|
+
], NileFunnelChart.prototype, "showLegend", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
property({ type: Object })
|
|
267
|
+
], NileFunnelChart.prototype, "legend", void 0);
|
|
257
268
|
NileFunnelChart = __decorate([
|
|
258
269
|
customElement('nile-funnel-chart')
|
|
259
270
|
], NileFunnelChart);
|
|
@@ -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 GaugeBand {
|
|
6
7
|
from: number;
|
|
7
8
|
to: number;
|
|
@@ -36,6 +37,9 @@ export declare class NileGaugeChart extends NileElement {
|
|
|
36
37
|
loadingFontSize: string | number;
|
|
37
38
|
loadingFontFamily: string;
|
|
38
39
|
loadingBg: string;
|
|
40
|
+
showLegend: boolean;
|
|
41
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
42
|
+
legend: LegendConfig | null;
|
|
39
43
|
private _syncCssVars;
|
|
40
44
|
/** Apply { chart, aq } config to individual properties. */
|
|
41
45
|
private applyConfig;
|
|
@@ -36,6 +36,9 @@ let NileGaugeChart = class NileGaugeChart extends NileElement {
|
|
|
36
36
|
this.loadingFontSize = '';
|
|
37
37
|
this.loadingFontFamily = '';
|
|
38
38
|
this.loadingBg = '';
|
|
39
|
+
this.showLegend = false;
|
|
40
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
41
|
+
this.legend = null;
|
|
39
42
|
}
|
|
40
43
|
_syncCssVars() {
|
|
41
44
|
const set = (prop, val) => {
|
|
@@ -126,7 +129,9 @@ let NileGaugeChart = class NileGaugeChart extends NileElement {
|
|
|
126
129
|
this.applyConfig(this.config);
|
|
127
130
|
return;
|
|
128
131
|
}
|
|
129
|
-
const props = ['value', 'min', 'max', 'suffix', 'bands', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading'
|
|
132
|
+
const props = ['value', 'min', 'max', 'suffix', 'bands', 'chartTitle', 'chartSubtitle', 'options', 'height', 'loading',
|
|
133
|
+
'showLegend',
|
|
134
|
+
'legend'];
|
|
130
135
|
const cssVarProps = ['chartBg', 'chartBorderRadius', 'chartBorder', 'chartShadow', 'chartPadding', 'chartMinHeight',
|
|
131
136
|
'loadingText', 'loadingColor', 'loadingFontSize', 'loadingFontFamily', 'loadingBg'];
|
|
132
137
|
if (cssVarProps.some(p => changedProperties.has(p)))
|
|
@@ -187,6 +192,7 @@ let NileGaugeChart = class NileGaugeChart extends NileElement {
|
|
|
187
192
|
style: { fontSize: '20px' },
|
|
188
193
|
},
|
|
189
194
|
}],
|
|
195
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
190
196
|
credits: { enabled: false },
|
|
191
197
|
}, this.options);
|
|
192
198
|
}
|
|
@@ -278,6 +284,12 @@ __decorate([
|
|
|
278
284
|
__decorate([
|
|
279
285
|
property({ type: String, attribute: 'loading-bg' })
|
|
280
286
|
], NileGaugeChart.prototype, "loadingBg", void 0);
|
|
287
|
+
__decorate([
|
|
288
|
+
property({ type: Boolean, attribute: 'show-legend' })
|
|
289
|
+
], NileGaugeChart.prototype, "showLegend", void 0);
|
|
290
|
+
__decorate([
|
|
291
|
+
property({ type: Object })
|
|
292
|
+
], NileGaugeChart.prototype, "legend", void 0);
|
|
281
293
|
NileGaugeChart = __decorate([
|
|
282
294
|
customElement('nile-gauge-chart')
|
|
283
295
|
], NileGaugeChart);
|
|
@@ -31,6 +31,8 @@ export declare class NileHeatmapChart extends NileElement {
|
|
|
31
31
|
height: string;
|
|
32
32
|
showDataLabels: boolean;
|
|
33
33
|
showLegend: boolean;
|
|
34
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
35
|
+
legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
|
|
34
36
|
chartBg: string;
|
|
35
37
|
chartBorderRadius: string | number;
|
|
36
38
|
chartBorder: string;
|
|
@@ -29,6 +29,8 @@ let NileHeatmapChart = class NileHeatmapChart extends NileElement {
|
|
|
29
29
|
this.height = '400px';
|
|
30
30
|
this.showDataLabels = true;
|
|
31
31
|
this.showLegend = true;
|
|
32
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
33
|
+
this.legend = null;
|
|
32
34
|
// ── Container styling ──
|
|
33
35
|
this.chartBg = '';
|
|
34
36
|
this.chartBorderRadius = '';
|
|
@@ -169,7 +171,7 @@ let NileHeatmapChart = class NileHeatmapChart extends NileElement {
|
|
|
169
171
|
maxColor: this.maxColor,
|
|
170
172
|
title: { text: this.colorAxisTitle || undefined },
|
|
171
173
|
},
|
|
172
|
-
legend: { enabled: this.showLegend, align: 'right', layout: 'vertical', verticalAlign: 'top' },
|
|
174
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, align: 'right', layout: 'vertical', verticalAlign: 'top', ...rest }; })(),
|
|
173
175
|
tooltip: {
|
|
174
176
|
formatter() {
|
|
175
177
|
const p = this.point;
|
|
@@ -296,6 +298,9 @@ __decorate([
|
|
|
296
298
|
__decorate([
|
|
297
299
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
298
300
|
], NileHeatmapChart.prototype, "showLegend", void 0);
|
|
301
|
+
__decorate([
|
|
302
|
+
property({ type: Object })
|
|
303
|
+
], NileHeatmapChart.prototype, "legend", void 0);
|
|
299
304
|
__decorate([
|
|
300
305
|
property({ type: String, attribute: 'chart-bg' })
|
|
301
306
|
], NileHeatmapChart.prototype, "chartBg", void 0);
|
|
@@ -33,6 +33,8 @@ export declare class NileHistogramChart extends NileElement {
|
|
|
33
33
|
/** Fixed bin width; when > 0, overrides `binsNumber`. */
|
|
34
34
|
binWidth: number;
|
|
35
35
|
showLegend: boolean;
|
|
36
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
37
|
+
legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
|
|
36
38
|
chartBg: string;
|
|
37
39
|
chartBorderRadius: string | number;
|
|
38
40
|
chartBorder: string;
|
|
@@ -37,6 +37,8 @@ let NileHistogramChart = class NileHistogramChart extends NileElement {
|
|
|
37
37
|
/** Fixed bin width; when > 0, overrides `binsNumber`. */
|
|
38
38
|
this.binWidth = 0;
|
|
39
39
|
this.showLegend = true;
|
|
40
|
+
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
41
|
+
this.legend = null;
|
|
40
42
|
// ── Container styling ──
|
|
41
43
|
this.chartBg = '';
|
|
42
44
|
this.chartBorderRadius = '';
|
|
@@ -158,7 +160,7 @@ let NileHistogramChart = class NileHistogramChart extends NileElement {
|
|
|
158
160
|
chart: { ...(this.height ? { height: this.height } : {}) },
|
|
159
161
|
title: { text: this.chartTitle || undefined },
|
|
160
162
|
subtitle: { text: this.chartSubtitle || undefined },
|
|
161
|
-
legend: { enabled: this.showLegend },
|
|
163
|
+
legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
|
|
162
164
|
xAxis: [
|
|
163
165
|
{
|
|
164
166
|
title: { text: this.xAxisTitle || undefined },
|
|
@@ -297,6 +299,9 @@ __decorate([
|
|
|
297
299
|
__decorate([
|
|
298
300
|
property({ type: Boolean, attribute: 'show-legend' })
|
|
299
301
|
], NileHistogramChart.prototype, "showLegend", void 0);
|
|
302
|
+
__decorate([
|
|
303
|
+
property({ type: Object })
|
|
304
|
+
], NileHistogramChart.prototype, "legend", void 0);
|
|
300
305
|
__decorate([
|
|
301
306
|
property({ type: String, attribute: 'chart-bg' })
|
|
302
307
|
], NileHistogramChart.prototype, "chartBg", void 0);
|