@aquera/nile-visualization 2.9.23 → 2.9.25
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/README.md +7 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/internal/types/aq-config.type.d.ts +6 -0
- package/dist/src/internal/types/chart-column-drilldown-config.type.d.ts +2 -2
- package/dist/src/internal/types/index.d.ts +1 -0
- package/dist/src/internal/types/legend-config.type.d.ts +145 -0
- package/dist/src/internal/types/legend-config.type.js +9 -0
- package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +1 -1
- package/dist/src/nile-area-chart/nile-area-chart.d.ts +1 -1
- package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -1
- package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -1
- package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +1 -1
- package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +1 -1
- package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +1 -1
- package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +1 -1
- package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +1 -1
- package/dist/src/nile-chart/index.d.ts +1 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +14 -3
- package/dist/src/nile-chart/nile-chart.d.ts +7 -2
- package/dist/src/nile-chart/nile-chart.js +70 -25
- package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +1 -1
- package/dist/src/nile-column-chart/nile-column-chart.d.ts +1 -1
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +12 -6
- package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +27 -19
- package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -1
- package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -1
- package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +1 -1
- package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -1
- package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -1
- package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -1
- package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -1
- package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -1
- package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +1 -0
- package/dist/src/nile-filter-chart/nile-filter-chart.js +7 -2
- package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +1 -1
- package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -1
- package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +1 -1
- package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +1 -1
- package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +1 -1
- package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -1
- package/dist/src/nile-line-chart/nile-line-chart.d.ts +1 -1
- package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -1
- package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -1
- package/dist/src/nile-map-chart/nile-map-chart.d.ts +1 -1
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -1
- package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -1
- package/dist/src/nile-pie-chart/index.d.ts +1 -1
- package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +2 -51
- package/dist/src/nile-pie-chart/nile-pie-chart.js +3 -0
- package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -1
- package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +1 -1
- package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +1 -1
- package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +1 -1
- package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +1 -1
- package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +1 -1
- package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +1 -1
- package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -1
- package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +1 -1
- package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +1 -1
- package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -1
- package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +1 -1
- package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,19 +2,24 @@ 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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface ColumnDrilldownParentPoint {
|
|
7
7
|
name: string;
|
|
8
8
|
y: number;
|
|
9
9
|
drilldown: string;
|
|
10
10
|
}
|
|
11
|
+
export type ColumnDrilldownPoint = {
|
|
12
|
+
name: string;
|
|
13
|
+
y: number;
|
|
14
|
+
} | [string, number];
|
|
11
15
|
export interface ColumnDrilldownSeriesConfig {
|
|
12
16
|
id: string;
|
|
13
17
|
name: string;
|
|
14
|
-
data:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
data: ColumnDrilldownPoint[];
|
|
19
|
+
}
|
|
20
|
+
export interface ColumnDrilldownConfig {
|
|
21
|
+
series: ColumnDrilldownSeriesConfig[];
|
|
22
|
+
breadcrumbs?: Highcharts.DrilldownOptions['breadcrumbs'];
|
|
18
23
|
}
|
|
19
24
|
export declare class NileColumnDrilldownChart extends NileElement {
|
|
20
25
|
static styles: CSSResultGroup;
|
|
@@ -33,7 +38,8 @@ export declare class NileColumnDrilldownChart extends NileElement {
|
|
|
33
38
|
chartTitle: string;
|
|
34
39
|
chartSubtitle: string;
|
|
35
40
|
data: ColumnDrilldownParentPoint[];
|
|
36
|
-
|
|
41
|
+
/** Drilldown config: `{ series, breadcrumbs? }` (Highcharts-native shape). */
|
|
42
|
+
drilldown: ColumnDrilldownConfig | null;
|
|
37
43
|
seriesName: string;
|
|
38
44
|
yAxisTitle: string;
|
|
39
45
|
options: Highcharts.Options;
|
|
@@ -33,7 +33,8 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
|
|
|
33
33
|
this.chartTitle = '';
|
|
34
34
|
this.chartSubtitle = '';
|
|
35
35
|
this.data = [];
|
|
36
|
-
|
|
36
|
+
/** Drilldown config: `{ series, breadcrumbs? }` (Highcharts-native shape). */
|
|
37
|
+
this.drilldown = null;
|
|
37
38
|
this.seriesName = '';
|
|
38
39
|
this.yAxisTitle = '';
|
|
39
40
|
this.options = {};
|
|
@@ -110,7 +111,7 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
|
|
|
110
111
|
this._syncCssVars();
|
|
111
112
|
const props = [
|
|
112
113
|
'data',
|
|
113
|
-
'
|
|
114
|
+
'drilldown',
|
|
114
115
|
'seriesName',
|
|
115
116
|
'chartTitle',
|
|
116
117
|
'chartSubtitle',
|
|
@@ -266,26 +267,33 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
|
|
|
266
267
|
}
|
|
267
268
|
buildOptions() {
|
|
268
269
|
const self = this;
|
|
270
|
+
const defaultBreadcrumbs = {
|
|
271
|
+
position: {
|
|
272
|
+
align: 'left',
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
textOverflow: 'ellipsis',
|
|
276
|
+
},
|
|
277
|
+
formatter(breadcrumb) {
|
|
278
|
+
const name = breadcrumb?.levelOptions?.name || self.seriesName || 'Series';
|
|
279
|
+
const list = self.chart?.breadcrumbs?.list ?? [];
|
|
280
|
+
const isLast = !list.length || breadcrumb.level === list[list.length - 1].level;
|
|
281
|
+
if (!self._bcCollapsed)
|
|
282
|
+
return name;
|
|
283
|
+
if (!isLast)
|
|
284
|
+
return '..';
|
|
285
|
+
const stored = self._bcLastText;
|
|
286
|
+
return stored && name.startsWith(stored.replace(/…$/, '')) ? stored : name;
|
|
287
|
+
},
|
|
288
|
+
};
|
|
269
289
|
const drilldown = {
|
|
270
|
-
series: this.
|
|
290
|
+
series: (this.drilldown?.series ?? []).map(ds => ({
|
|
271
291
|
type: 'column',
|
|
272
292
|
id: ds.id,
|
|
273
293
|
name: ds.name,
|
|
274
|
-
data: ds.data.map(d => ({ name: d.name, y: d.y })),
|
|
294
|
+
data: ds.data.map(d => (Array.isArray(d) ? { name: d[0], y: d[1] } : { name: d.name, y: d.y })),
|
|
275
295
|
})),
|
|
276
|
-
breadcrumbs: {
|
|
277
|
-
formatter(breadcrumb) {
|
|
278
|
-
const name = breadcrumb?.levelOptions?.name || self.seriesName || 'Series';
|
|
279
|
-
const list = self.chart?.breadcrumbs?.list ?? [];
|
|
280
|
-
const isLast = !list.length || breadcrumb.level === list[list.length - 1].level;
|
|
281
|
-
if (!self._bcCollapsed)
|
|
282
|
-
return name;
|
|
283
|
-
if (!isLast)
|
|
284
|
-
return '..';
|
|
285
|
-
const stored = self._bcLastText;
|
|
286
|
-
return stored && name.startsWith(stored.replace(/…$/, '')) ? stored : name;
|
|
287
|
-
},
|
|
288
|
-
},
|
|
296
|
+
breadcrumbs: deepMerge(defaultBreadcrumbs, this.drilldown?.breadcrumbs ?? {}),
|
|
289
297
|
};
|
|
290
298
|
return deepMerge({
|
|
291
299
|
chart: { type: 'column', ...(this.height ? { height: this.height } : {}),
|
|
@@ -370,8 +378,8 @@ __decorate([
|
|
|
370
378
|
property({ type: Array })
|
|
371
379
|
], NileColumnDrilldownChart.prototype, "data", void 0);
|
|
372
380
|
__decorate([
|
|
373
|
-
property({ type:
|
|
374
|
-
], NileColumnDrilldownChart.prototype, "
|
|
381
|
+
property({ type: Object })
|
|
382
|
+
], NileColumnDrilldownChart.prototype, "drilldown", void 0);
|
|
375
383
|
__decorate([
|
|
376
384
|
property({ type: String, attribute: 'series-name' })
|
|
377
385
|
], NileColumnDrilldownChart.prototype, "seriesName", void 0);
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface ColumnPyramidSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface ColumnRangeSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: [number, number][];
|
|
@@ -30,7 +30,7 @@ export declare class NileDonutChart extends NileElement {
|
|
|
30
30
|
showDataLabels: boolean;
|
|
31
31
|
showLegend: boolean;
|
|
32
32
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
33
|
-
legend: import('../
|
|
33
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
34
34
|
chartBg: string;
|
|
35
35
|
chartBorderRadius: string | number;
|
|
36
36
|
chartBorder: string;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface DumbbellPoint {
|
|
7
7
|
name: string;
|
|
8
8
|
low: number;
|
|
@@ -3,7 +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 '../
|
|
6
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
7
7
|
export declare class NileDumbbellLowerChart extends NileElement {
|
|
8
8
|
static styles: CSSResultGroup;
|
|
9
9
|
private _hc;
|
|
@@ -3,7 +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 '../
|
|
6
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
7
7
|
export declare class NileDumbbellUpperChart extends NileElement {
|
|
8
8
|
static styles: CSSResultGroup;
|
|
9
9
|
private _hc;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface EulerVennDataPoint {
|
|
7
7
|
sets: string[];
|
|
8
8
|
value: number;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
/** Central path (history + median / point forecast). */
|
|
7
7
|
export interface FanLinePoint {
|
|
8
8
|
category: string;
|
|
@@ -79,6 +79,7 @@ export declare class NileFilterChart extends NileElement implements FilterChartH
|
|
|
79
79
|
private _validateOrClear;
|
|
80
80
|
private _clearPromptValidation;
|
|
81
81
|
private _syncPromptAnimations;
|
|
82
|
+
private _shouldAnimateTypewriter;
|
|
82
83
|
private _startPromptAnimation;
|
|
83
84
|
private _stopPromptAnimation;
|
|
84
85
|
private _stopAllPromptAnimations;
|
|
@@ -241,18 +241,23 @@ let NileFilterChart = NileFilterChart_1 = class NileFilterChart extends NileElem
|
|
|
241
241
|
_syncPromptAnimations() {
|
|
242
242
|
const wanted = new Set();
|
|
243
243
|
for (const ctrl of this._flatControls()) {
|
|
244
|
-
|
|
244
|
+
const isPromptLike = ctrl.variant === 'prompt' || ctrl.variant === 'hybrid' || ctrl.variant === 'expression';
|
|
245
|
+
if (isPromptLike && this._shouldAnimateTypewriter(ctrl)) {
|
|
245
246
|
wanted.add(ctrl.id);
|
|
246
247
|
if (!this._promptTimers.has(ctrl.id))
|
|
247
248
|
this._startPromptAnimation(ctrl);
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
|
-
// Stop animations whose controls were removed from the config
|
|
251
251
|
for (const id of [...this._promptTimers.keys()]) {
|
|
252
252
|
if (!wanted.has(id))
|
|
253
253
|
this._stopPromptAnimation(id);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
+
_shouldAnimateTypewriter(ctrl) {
|
|
257
|
+
return ((ctrl.placeholders?.length ?? 0) > 1 ||
|
|
258
|
+
(ctrl.promptPlaceholders?.length ?? 0) > 1 ||
|
|
259
|
+
(ctrl.expressionPlaceholders?.length ?? 0) > 1);
|
|
260
|
+
}
|
|
256
261
|
_startPromptAnimation(ctrl) {
|
|
257
262
|
const getPhrases = () => {
|
|
258
263
|
const mode = this.promptModes.get(ctrl.id);
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
/** Segment row for the flame / icicle layout (`columnrange`-based). */
|
|
7
7
|
export interface FlameChartPoint {
|
|
8
8
|
name: string;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface FunnelDataPoint {
|
|
7
7
|
name: string;
|
|
8
8
|
y: number;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface GaugeBand {
|
|
7
7
|
from: number;
|
|
8
8
|
to: number;
|
|
@@ -32,7 +32,7 @@ export declare class NileHeatmapChart extends NileElement {
|
|
|
32
32
|
showDataLabels: boolean;
|
|
33
33
|
showLegend: boolean;
|
|
34
34
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
35
|
-
legend: import('../
|
|
35
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
36
36
|
chartBg: string;
|
|
37
37
|
chartBorderRadius: string | number;
|
|
38
38
|
chartBorder: string;
|
|
@@ -34,7 +34,7 @@ export declare class NileHistogramChart extends NileElement {
|
|
|
34
34
|
binWidth: number;
|
|
35
35
|
showLegend: boolean;
|
|
36
36
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
37
|
-
legend: import('../
|
|
37
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
38
38
|
chartBg: string;
|
|
39
39
|
chartBorderRadius: string | number;
|
|
40
40
|
chartBorder: string;
|
|
@@ -2,7 +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/index.js';
|
|
5
|
-
import type { LegendConfig } from '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface InvertedAreaChartSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -25,7 +25,7 @@ export declare class NileLineChart extends NileElement {
|
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
showLegend: boolean;
|
|
27
27
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
28
|
-
legend: import('../
|
|
28
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
29
29
|
chartBg: string;
|
|
30
30
|
chartBorderRadius: string | number;
|
|
31
31
|
chartBorder: string;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface LineColumnSeriesPart {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface LollipopSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface MapChartDataPoint {
|
|
7
7
|
/** Highcharts map key matching the map topology (e.g. 'us-ca'). */
|
|
8
8
|
'hc-key'?: string;
|
|
@@ -3,7 +3,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
|
3
3
|
import type Highcharts from 'highcharts';
|
|
4
4
|
import NileElement from '../internal/nile-element.js';
|
|
5
5
|
import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
|
|
6
|
-
import type { LegendConfig } from '../
|
|
6
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
7
7
|
export interface MasterDetailPoint {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
/** Directed edge: reporting line from `from` to `to` (node ids). */
|
|
7
7
|
export interface OrgChartLink {
|
|
8
8
|
from: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { NilePieChart } from './nile-pie-chart.js';
|
|
2
|
-
export type { PieChartSeriesData } from './nile-pie-chart.js';
|
|
2
|
+
export type { PieChartSeriesData, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, CSSObject, } from './nile-pie-chart.js';
|
|
@@ -2,6 +2,8 @@ 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
|
+
export type { CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, } from '../internal/types/index.js';
|
|
6
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
5
7
|
export interface PieChartSeriesData {
|
|
6
8
|
name: string;
|
|
7
9
|
y: number;
|
|
@@ -9,57 +11,6 @@ export interface PieChartSeriesData {
|
|
|
9
11
|
sliced?: boolean;
|
|
10
12
|
selected?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export interface LegendNavigationConfig {
|
|
13
|
-
activeColor?: string;
|
|
14
|
-
animation?: boolean | {
|
|
15
|
-
duration?: number;
|
|
16
|
-
};
|
|
17
|
-
arrowSize?: number;
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
inactiveColor?: string;
|
|
20
|
-
style?: Record<string, string | number>;
|
|
21
|
-
}
|
|
22
|
-
export interface LegendConfig {
|
|
23
|
-
/** Show or hide the legend (maps to Highcharts `enabled`). */
|
|
24
|
-
show?: boolean;
|
|
25
|
-
layout?: 'horizontal' | 'vertical';
|
|
26
|
-
align?: 'left' | 'center' | 'right';
|
|
27
|
-
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
28
|
-
navigation?: LegendNavigationConfig;
|
|
29
|
-
backgroundColor?: string;
|
|
30
|
-
borderColor?: string;
|
|
31
|
-
borderRadius?: number;
|
|
32
|
-
borderWidth?: number;
|
|
33
|
-
floating?: boolean;
|
|
34
|
-
itemDistance?: number;
|
|
35
|
-
itemHiddenStyle?: Record<string, string | number>;
|
|
36
|
-
itemHoverStyle?: Record<string, string | number>;
|
|
37
|
-
itemMarginBottom?: number;
|
|
38
|
-
itemMarginTop?: number;
|
|
39
|
-
itemStyle?: Record<string, string | number>;
|
|
40
|
-
itemWidth?: number;
|
|
41
|
-
labelFormat?: string;
|
|
42
|
-
lineHeight?: number;
|
|
43
|
-
margin?: number;
|
|
44
|
-
maxHeight?: number;
|
|
45
|
-
maxWidth?: number;
|
|
46
|
-
padding?: number;
|
|
47
|
-
reversed?: boolean;
|
|
48
|
-
rtl?: boolean;
|
|
49
|
-
squareSymbol?: boolean;
|
|
50
|
-
symbolHeight?: number;
|
|
51
|
-
symbolPadding?: number;
|
|
52
|
-
symbolRadius?: number;
|
|
53
|
-
symbolWidth?: number;
|
|
54
|
-
title?: {
|
|
55
|
-
text?: string;
|
|
56
|
-
style?: Record<string, string | number>;
|
|
57
|
-
};
|
|
58
|
-
useHTML?: boolean;
|
|
59
|
-
width?: number;
|
|
60
|
-
x?: number;
|
|
61
|
-
y?: number;
|
|
62
|
-
}
|
|
63
14
|
export declare class NilePieChart extends NileElement {
|
|
64
15
|
static styles: CSSResultGroup;
|
|
65
16
|
private _hc;
|
|
@@ -152,6 +152,7 @@ let NilePieChart = class NilePieChart extends NileElement {
|
|
|
152
152
|
'loading',
|
|
153
153
|
'showDataLabels',
|
|
154
154
|
'showLegend',
|
|
155
|
+
'legend',
|
|
155
156
|
];
|
|
156
157
|
const needsUpdate = chartProps.some(p => changedProperties.has(p));
|
|
157
158
|
if (!needsUpdate)
|
|
@@ -234,6 +235,8 @@ let NilePieChart = class NilePieChart extends NileElement {
|
|
|
234
235
|
},
|
|
235
236
|
],
|
|
236
237
|
legend: (() => {
|
|
238
|
+
// All legend config maps straight through to the native Highcharts
|
|
239
|
+
// legend. `show` is a friendlier alias for Highcharts `enabled`.
|
|
237
240
|
const { show, ...rest } = this.legend ?? {};
|
|
238
241
|
return { enabled: show ?? this.showLegend, ...rest };
|
|
239
242
|
})(),
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface PolygonSeriesConfig {
|
|
7
7
|
name: string;
|
|
8
8
|
data: [number, number][];
|
|
@@ -25,7 +25,7 @@ export declare class NileRadarChart extends NileElement {
|
|
|
25
25
|
showArea: boolean;
|
|
26
26
|
showLegend: boolean;
|
|
27
27
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
28
|
-
legend: import('../
|
|
28
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
29
29
|
chartBg: string;
|
|
30
30
|
chartBorderRadius: string | number;
|
|
31
31
|
chartBorder: string;
|
|
@@ -26,7 +26,7 @@ export declare class NileRadialBarChart extends NileElement {
|
|
|
26
26
|
paneSize: string;
|
|
27
27
|
showLegend: boolean;
|
|
28
28
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
-
legend: import('../
|
|
29
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
30
30
|
chartBg: string;
|
|
31
31
|
chartBorderRadius: string | number;
|
|
32
32
|
chartBorder: string;
|
|
@@ -25,7 +25,7 @@ export declare class NileScatterChart extends NileElement {
|
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
showLegend: boolean;
|
|
27
27
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
28
|
-
legend: import('../
|
|
28
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
29
29
|
chartBg: string;
|
|
30
30
|
chartBorderRadius: string | number;
|
|
31
31
|
chartBorder: string;
|
|
@@ -29,7 +29,7 @@ export declare class NileSpiderwebChart extends NileElement {
|
|
|
29
29
|
showArea: boolean;
|
|
30
30
|
showLegend: boolean;
|
|
31
31
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
32
|
-
legend: import('../
|
|
32
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
33
33
|
chartBg: string;
|
|
34
34
|
chartBorderRadius: string | number;
|
|
35
35
|
chartBorder: string;
|
|
@@ -25,7 +25,7 @@ export declare class NileSplineChart extends NileElement {
|
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
showLegend: boolean;
|
|
27
27
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
28
|
-
legend: import('../
|
|
28
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
29
29
|
chartBg: string;
|
|
30
30
|
chartBorderRadius: string | number;
|
|
31
31
|
chartBorder: string;
|
|
@@ -25,7 +25,7 @@ export declare class NileStackedChart extends NileElement {
|
|
|
25
25
|
yAxisTitle: string;
|
|
26
26
|
showLegend: boolean;
|
|
27
27
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
28
|
-
legend: import('../
|
|
28
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
29
29
|
/** `normal` = stacked values; `percent` = 100% proportional stacks. */
|
|
30
30
|
stackMode: 'normal' | 'percent';
|
|
31
31
|
pointPadding: number;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface TimelineEvent {
|
|
7
7
|
/** Shown on axis / tooltip header (e.g. date string). */
|
|
8
8
|
name: string;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface TrendlineSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -22,7 +22,7 @@ export declare class NileVariablePieChart extends NileElement {
|
|
|
22
22
|
showDataLabels: boolean;
|
|
23
23
|
showLegend: boolean;
|
|
24
24
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
25
|
-
legend: import('../
|
|
25
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
26
26
|
options: Highcharts.Options;
|
|
27
27
|
loading: boolean;
|
|
28
28
|
height: string;
|
|
@@ -2,7 +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 '../
|
|
5
|
+
import type { LegendConfig } from '../internal/types/index.js';
|
|
6
6
|
export interface VectorDataPoint {
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
@@ -26,7 +26,7 @@ export declare class NileWaterfallChart extends NileElement {
|
|
|
26
26
|
yAxisTitle: string;
|
|
27
27
|
showLegend: boolean;
|
|
28
28
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
29
|
-
legend: import('../
|
|
29
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
30
30
|
chartBg: string;
|
|
31
31
|
chartBorderRadius: string | number;
|
|
32
32
|
chartBorder: string;
|
|
@@ -28,7 +28,7 @@ export declare class NileXrangeChart extends NileElement {
|
|
|
28
28
|
height: string;
|
|
29
29
|
showLegend: boolean;
|
|
30
30
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
31
|
-
legend: import('../
|
|
31
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
32
32
|
chartBg: string;
|
|
33
33
|
chartBorderRadius: string | number;
|
|
34
34
|
chartBorder: string;
|