@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
package/README.md
CHANGED
|
@@ -35,6 +35,13 @@ To run a local development server that serves the basic demo located in `demo/in
|
|
|
35
35
|
## Release Notes
|
|
36
36
|
|
|
37
37
|
In this section, you can find the updates for each release of `nile-visualization`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
|
|
38
|
+
#### Version 2.9.25 (July 10, 2026)
|
|
39
|
+
- Nile Filter Chart: Streamlined the prompt typewriter animation logic — introduced `_shouldAnimateTypewriter` and updated `_syncPromptAnimations` so animations run only for active prompt-like controls that have more than one placeholder phrase (UIF-1301)
|
|
40
|
+
- Nile Chart: Moved the shared legend and chart spacing types (`LegendConfig`, `LegendNavigationConfig`, `LegendTitleConfig`, `LegendAccessibilityConfig`, `CSSObject`) into a shared `internal/types` module and re-pointed all chart components' `legend` property to import from there (UIF-1302)
|
|
41
|
+
|
|
42
|
+
#### Version 2.9.24 (July 09, 2026)
|
|
43
|
+
- Nile Chart: Reworked the `columnDrilldown` chart config to match the Highcharts-native shape — the flat `drilldownSeries` array is now nested under a `drilldown` object (`{ series, breadcrumbs? }`), enabling configurable breadcrumb navigation for drilling into columns. Drilldown data points accept either object (`{ name, y }`) or tuple (`[name, y]`) form (UIF-1300)
|
|
44
|
+
|
|
38
45
|
#### Version 2.9.23 (July 08, 2026)
|
|
39
46
|
- Nile Chart: Added the `masterCollapsible` property to the master-detail chart — renders a chevron toggle between the panes so the master (overview) pane can be collapsed; the detail pane expands to fill the freed space while collapsed (UIF-1292)
|
|
40
47
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { NileBarChart } from './nile-bar-chart/index.js';
|
|
|
2
2
|
export type { BarChartSeriesData } from './nile-bar-chart/index.js';
|
|
3
3
|
export { NilePieChart } from './nile-pie-chart/index.js';
|
|
4
4
|
export type { PieChartSeriesData } from './nile-pie-chart/index.js';
|
|
5
|
+
export type { LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, CSSObject, } from './internal/types/index.js';
|
|
5
6
|
export { NileTrendlineChart } from './nile-trendline-chart/index.js';
|
|
6
7
|
export type { TrendlineSeriesData, ForecastConfig } from './nile-trendline-chart/index.js';
|
|
7
8
|
export { NileAnomalyChart } from './nile-anomaly-chart/index.js';
|
|
@@ -5,6 +5,12 @@ import type { NileChartMenuConfig, NileChartMenuItem } from '../../nile-chart/ni
|
|
|
5
5
|
export interface AqConfigType {
|
|
6
6
|
chartTitle?: string;
|
|
7
7
|
chartSubtitle?: string;
|
|
8
|
+
/** Font size for the header title (number → px, or any CSS length string). */
|
|
9
|
+
titleFontSize?: string | number;
|
|
10
|
+
/** Font size for the header subtitle (number → px, or any CSS length string). */
|
|
11
|
+
subtitleFontSize?: string | number;
|
|
12
|
+
/** Hide the chart header (title/subtitle/actions) entirely. */
|
|
13
|
+
noHeader?: boolean;
|
|
8
14
|
summary?: string;
|
|
9
15
|
toggleLabel?: string;
|
|
10
16
|
/** AI chat panel configuration. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Options } from 'highcharts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ColumnDrilldownConfig, ColumnDrilldownParentPoint } from '../../nile-column-drilldown-chart/nile-column-drilldown-chart.js';
|
|
3
3
|
/** Column with drilldown (`<nile-column-drilldown-chart>`). */
|
|
4
4
|
export interface ChartColumnDrilldownConfigType {
|
|
5
5
|
type: 'columnDrilldown';
|
|
6
6
|
data: ColumnDrilldownParentPoint[];
|
|
7
|
-
|
|
7
|
+
drilldown: ColumnDrilldownConfig;
|
|
8
8
|
seriesName?: string;
|
|
9
9
|
yAxisTitle?: string;
|
|
10
10
|
height?: string;
|
|
@@ -51,6 +51,7 @@ export type { ChartMapConfigType } from './chart-map-config.type.js';
|
|
|
51
51
|
export type { PrimitiveChartConfigType } from './primitive-chart-config.type.js';
|
|
52
52
|
export type { SeparatedChartConfigInputType } from './separated-chart-config-input.type.js';
|
|
53
53
|
export type { AllChartConfigType } from './all-chart-config.type.js';
|
|
54
|
+
export type { CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, } from './legend-config.type.js';
|
|
54
55
|
export type { ChartConfigType } from './chart-config.type.js';
|
|
55
56
|
export type { NileChartConfigInputType } from './nile-chart-config-input.type.js';
|
|
56
57
|
export type { ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from './nile-ai-widgets-config-input.type.js';
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared legend + chart-spacing configuration types.
|
|
3
|
+
*
|
|
4
|
+
* These are cross-cutting — every `nile-*-chart` component and the universal
|
|
5
|
+
* `nile-chart` wrapper consume them, so they live here in `internal/types`
|
|
6
|
+
* rather than inside any single chart component.
|
|
7
|
+
*/
|
|
8
|
+
/** A Highcharts CSS-in-JS style object (camelCased CSS properties). */
|
|
9
|
+
export type CSSObject = Record<string, string | number>;
|
|
10
|
+
/** Highcharts legend paging navigation (the native up/down arrows). */
|
|
11
|
+
export interface LegendNavigationConfig {
|
|
12
|
+
activeColor?: string;
|
|
13
|
+
animation?: boolean | {
|
|
14
|
+
duration?: number;
|
|
15
|
+
};
|
|
16
|
+
arrowSize?: number;
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
inactiveColor?: string;
|
|
19
|
+
style?: CSSObject;
|
|
20
|
+
}
|
|
21
|
+
/** Legend title (a heading rendered above the legend items). */
|
|
22
|
+
export interface LegendTitleConfig {
|
|
23
|
+
text?: string;
|
|
24
|
+
style?: CSSObject;
|
|
25
|
+
}
|
|
26
|
+
/** Accessibility options for the legend. */
|
|
27
|
+
export interface LegendAccessibilityConfig {
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
keyboardNavigation?: {
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Legend configuration — the complete set of Highcharts legend options, plus
|
|
35
|
+
* Nile's `show` (a friendlier alias for `enabled`). Every field maps straight
|
|
36
|
+
* through to the native Highcharts legend, so the legend is fully configurable
|
|
37
|
+
* via Highcharts config — including native height-based paging (`maxHeight` +
|
|
38
|
+
* `navigation`). Applies to every chart type.
|
|
39
|
+
*/
|
|
40
|
+
export interface LegendConfig {
|
|
41
|
+
/** Show or hide the legend (alias for Highcharts `enabled`). */
|
|
42
|
+
show?: boolean;
|
|
43
|
+
/** Accessibility options for the legend. */
|
|
44
|
+
accessibility?: LegendAccessibilityConfig;
|
|
45
|
+
/** Horizontal alignment of the legend box. */
|
|
46
|
+
align?: 'left' | 'center' | 'right';
|
|
47
|
+
/** In vertical legends, whether to align the columns. */
|
|
48
|
+
alignColumns?: boolean;
|
|
49
|
+
/** Background color of the legend box. */
|
|
50
|
+
backgroundColor?: string;
|
|
51
|
+
/** Color of the legend border. */
|
|
52
|
+
borderColor?: string;
|
|
53
|
+
/** Corner radius of the legend border. */
|
|
54
|
+
borderRadius?: number;
|
|
55
|
+
/** Width of the legend border. */
|
|
56
|
+
borderWidth?: number;
|
|
57
|
+
/** Bubble legend options (bubble charts only). */
|
|
58
|
+
bubbleLegend?: Record<string, unknown>;
|
|
59
|
+
/** CSS class name applied to the legend group. */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** Enable/disable the legend (Highcharts native flag). Prefer `show`. */
|
|
62
|
+
enabled?: boolean;
|
|
63
|
+
/** Legend item / group event handlers. */
|
|
64
|
+
events?: Record<string, unknown>;
|
|
65
|
+
/** Whether the legend floats over the plot area. */
|
|
66
|
+
floating?: boolean;
|
|
67
|
+
/** Style of the checkbox next to each item (checkbox legends). */
|
|
68
|
+
itemCheckboxStyle?: CSSObject;
|
|
69
|
+
/** Pixel distance between each legend item. */
|
|
70
|
+
itemDistance?: number;
|
|
71
|
+
/** Text/box style applied to hidden (toggled-off) items. */
|
|
72
|
+
itemHiddenStyle?: CSSObject;
|
|
73
|
+
/** Text/box style applied to items on hover. */
|
|
74
|
+
itemHoverStyle?: CSSObject;
|
|
75
|
+
/** Bottom margin of each legend item. */
|
|
76
|
+
itemMarginBottom?: number;
|
|
77
|
+
/** Top margin of each legend item. */
|
|
78
|
+
itemMarginTop?: number;
|
|
79
|
+
/** Base text style for legend items. */
|
|
80
|
+
itemStyle?: CSSObject;
|
|
81
|
+
/** Fixed width of each legend item. */
|
|
82
|
+
itemWidth?: number;
|
|
83
|
+
/** Format string for each label, e.g. `'{name}'`, `'{name}: {y}'`. */
|
|
84
|
+
labelFormat?: string;
|
|
85
|
+
/** Callback returning the label text; called with the point/series as `this`. */
|
|
86
|
+
labelFormatter?: (this: unknown) => string;
|
|
87
|
+
/** Legend item layout. */
|
|
88
|
+
layout?: 'horizontal' | 'vertical' | 'proximate';
|
|
89
|
+
/** Outer margin below the legend. */
|
|
90
|
+
margin?: number;
|
|
91
|
+
/** Maximum pixel height before the legend scrolls/paginates. */
|
|
92
|
+
maxHeight?: number;
|
|
93
|
+
/** Maximum width of the legend (px or `%`). */
|
|
94
|
+
maxWidth?: number | string;
|
|
95
|
+
/** Native Highcharts legend paging navigation (up/down arrows on overflow). */
|
|
96
|
+
navigation?: LegendNavigationConfig;
|
|
97
|
+
/** Inner padding of the legend box. */
|
|
98
|
+
padding?: number;
|
|
99
|
+
/** Reverse the order of legend items. */
|
|
100
|
+
reversed?: boolean;
|
|
101
|
+
/** Right-to-left rendering (symbol after label). */
|
|
102
|
+
rtl?: boolean;
|
|
103
|
+
/** Drop shadow for the legend box. */
|
|
104
|
+
shadow?: boolean | CSSObject;
|
|
105
|
+
/** Force a square (equal-sided) symbol. */
|
|
106
|
+
squareSymbol?: boolean;
|
|
107
|
+
/** Pixel height of the item symbol/swatch. */
|
|
108
|
+
symbolHeight?: number;
|
|
109
|
+
/** Pixel gap between symbol and label. */
|
|
110
|
+
symbolPadding?: number;
|
|
111
|
+
/** Corner radius of the item symbol/swatch. */
|
|
112
|
+
symbolRadius?: number;
|
|
113
|
+
/** Pixel width of the item symbol/swatch. */
|
|
114
|
+
symbolWidth?: number;
|
|
115
|
+
/** Legend title heading. */
|
|
116
|
+
title?: LegendTitleConfig;
|
|
117
|
+
/** Render labels as HTML (allows markup in `labelFormat`/`labelFormatter`). */
|
|
118
|
+
useHTML?: boolean;
|
|
119
|
+
/** Decimals used when a value token is formatted in `labelFormat`. */
|
|
120
|
+
valueDecimals?: number;
|
|
121
|
+
/** Suffix appended after a value token in `labelFormat`. */
|
|
122
|
+
valueSuffix?: string;
|
|
123
|
+
/** Vertical alignment of the legend box. */
|
|
124
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
125
|
+
/** Fixed width of the legend (px or `%`). */
|
|
126
|
+
width?: number | string;
|
|
127
|
+
/** Horizontal pixel offset of the legend. */
|
|
128
|
+
x?: number;
|
|
129
|
+
/** Vertical pixel offset of the legend. */
|
|
130
|
+
y?: number;
|
|
131
|
+
/** @deprecated Not a native Highcharts option; retained for back-compat. */
|
|
132
|
+
lineHeight?: number;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Space (in px) between the outer chart edge and the plot area — maps to
|
|
136
|
+
* Highcharts `chart.spacingTop/Right/Bottom/Left`. Use it to give a
|
|
137
|
+
* right-aligned legend room so its labels aren't clipped, etc. Applies to
|
|
138
|
+
* every chart type.
|
|
139
|
+
*/
|
|
140
|
+
export interface ChartSpacingConfig {
|
|
141
|
+
top?: number;
|
|
142
|
+
right?: number;
|
|
143
|
+
bottom?: number;
|
|
144
|
+
left?: number;
|
|
145
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared legend + chart-spacing configuration types.
|
|
3
|
+
*
|
|
4
|
+
* These are cross-cutting — every `nile-*-chart` component and the universal
|
|
5
|
+
* `nile-chart` wrapper consume them, so they live here in `internal/types`
|
|
6
|
+
* rather than inside any single chart component.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=legend-config.type.js.map
|
|
@@ -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 AnomalySeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -26,7 +26,7 @@ export declare class NileAreaChart extends NileElement {
|
|
|
26
26
|
stacked: boolean;
|
|
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;
|
|
@@ -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 AreaNegativeSeriesData {
|
|
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 AreaRangeSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: [number, 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 AreaSplineSeriesData {
|
|
7
7
|
name: string;
|
|
8
8
|
data: number[];
|
|
@@ -34,7 +34,7 @@ export declare class NileBarChart extends NileElement {
|
|
|
34
34
|
/** Whether to enable the legend. */
|
|
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;
|
|
@@ -31,7 +31,7 @@ export declare class NileBellcurveChart extends NileElement {
|
|
|
31
31
|
pointsInInterval: number;
|
|
32
32
|
showLegend: boolean;
|
|
33
33
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
34
|
-
legend: import('../
|
|
34
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
35
35
|
chartBg: string;
|
|
36
36
|
chartBorderRadius: string | number;
|
|
37
37
|
chartBorder: string;
|
|
@@ -37,7 +37,7 @@ export declare class NileBoxplotChart extends NileElement {
|
|
|
37
37
|
yAxisTitle: string;
|
|
38
38
|
showLegend: boolean;
|
|
39
39
|
/** Full legend configuration — all Highcharts legend options in one object. */
|
|
40
|
-
legend: import('../
|
|
40
|
+
legend: import('../internal/types/index.js').LegendConfig | null;
|
|
41
41
|
/** When true, draws horizontal boxes (categories on the y-axis). */
|
|
42
42
|
horizontal: boolean;
|
|
43
43
|
chartBg: string;
|
|
@@ -25,7 +25,7 @@ export declare class NileBubbleChart 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,4 +2,4 @@ export { NileChart } from './nile-chart.js';
|
|
|
2
2
|
export type { NileChartConfig, NileBarChartConfig, NilePieChartConfig, NileTrendlineChartConfig, NileAnomalyChartConfig, NileLineChartConfig, NileAreaChartConfig, NileColumnChartConfig, NileDonutChartConfig, NileScatterChartConfig, NileBubbleChartConfig, NileSplineChartConfig, NileRadarChartConfig, NileGaugeChartConfig, NileWaterfallChartConfig, NileMasterDetailChartConfig, NileKpiChartConfig, NileMapChartConfig, NileListChartConfig, NileMessageChartConfig, ChartType, SwitchAggregation, NileAiConfig, NileChartMenuConfig, NileChartMenuItem, } from './nile-chart-config.js';
|
|
3
3
|
export { convertConfig, registerAdapter } from '../internal/chart-adapters.js';
|
|
4
4
|
export { nileChartConfig } from './nile-chart-config-builder.js';
|
|
5
|
-
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
|
|
5
|
+
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
|
|
@@ -2,7 +2,8 @@ import type { ChartConfigType } from '../internal/types/chart-config.type.js';
|
|
|
2
2
|
/** Every supported `chart.type` value for `<nile-chart>`. */
|
|
3
3
|
export type ChartType = ChartConfigType['type'];
|
|
4
4
|
import type { BarChartSeriesData } from '../nile-bar-chart/nile-bar-chart.js';
|
|
5
|
-
import type { PieChartSeriesData
|
|
5
|
+
import type { PieChartSeriesData } from '../nile-pie-chart/nile-pie-chart.js';
|
|
6
|
+
import type { LegendConfig, ChartSpacingConfig } from '../internal/types/index.js';
|
|
6
7
|
import type { TrendlineSeriesData, ForecastConfig } from '../nile-trendline-chart/nile-trendline-chart.js';
|
|
7
8
|
import type { AnomalySeriesData, AnomalyConfig } from '../nile-anomaly-chart/nile-anomaly-chart.js';
|
|
8
9
|
import type { LineChartSeriesData } from '../nile-line-chart/nile-line-chart.js';
|
|
@@ -41,7 +42,7 @@ import type { AreaSplineSeriesData } from '../nile-area-spline-chart/nile-area-s
|
|
|
41
42
|
import type { AreaNegativeSeriesData } from '../nile-area-negative-chart/nile-area-negative-chart.js';
|
|
42
43
|
import type { AreaRangeSeriesData } from '../nile-area-range-chart/nile-area-range-chart.js';
|
|
43
44
|
import type { ColumnRangeSeriesData } from '../nile-column-range-chart/nile-column-range-chart.js';
|
|
44
|
-
import type {
|
|
45
|
+
import type { ColumnDrilldownConfig, ColumnDrilldownParentPoint } from '../nile-column-drilldown-chart/nile-column-drilldown-chart.js';
|
|
45
46
|
import type { RadialBarSeriesData } from '../nile-radial-bar-chart/nile-radial-bar-chart.js';
|
|
46
47
|
import type { VariablePieDataPoint } from '../nile-variable-pie-chart/nile-variable-pie-chart.js';
|
|
47
48
|
import type { EulerVennDataPoint } from '../nile-euler-chart/nile-euler-chart.js';
|
|
@@ -149,6 +150,10 @@ export interface NileAiConfig {
|
|
|
149
150
|
export interface NileChartConfigBase {
|
|
150
151
|
chartTitle?: string;
|
|
151
152
|
chartSubtitle?: string;
|
|
153
|
+
/** Font size for the header title (number → px, or any CSS length string). */
|
|
154
|
+
titleFontSize?: string | number;
|
|
155
|
+
/** Font size for the header subtitle (number → px, or any CSS length string). */
|
|
156
|
+
subtitleFontSize?: string | number;
|
|
152
157
|
noHeader?: boolean;
|
|
153
158
|
height?: string;
|
|
154
159
|
loading?: boolean;
|
|
@@ -163,6 +168,12 @@ export interface NileChartConfigBase {
|
|
|
163
168
|
legend?: LegendConfig;
|
|
164
169
|
/** Color palette applied to the chart's series. */
|
|
165
170
|
colorPalette?: ChartColorPaletteConfig;
|
|
171
|
+
/**
|
|
172
|
+
* Space (px) between the chart's outer edge and its plot area — maps to
|
|
173
|
+
* Highcharts `chart.spacingTop/Right/Bottom/Left`. Applies to every chart
|
|
174
|
+
* type. e.g. `{ right: 40 }` gives a right-aligned legend room to breathe.
|
|
175
|
+
*/
|
|
176
|
+
chartSpacing?: ChartSpacingConfig;
|
|
166
177
|
chartBg?: string;
|
|
167
178
|
chartBorderRadius?: string | number;
|
|
168
179
|
chartBorder?: string;
|
|
@@ -376,7 +387,7 @@ export interface NileColumnRangeChartConfig extends NileChartConfigBase {
|
|
|
376
387
|
export interface NileColumnDrilldownChartConfig extends NileChartConfigBase {
|
|
377
388
|
type: 'columnDrilldown';
|
|
378
389
|
data: ColumnDrilldownParentPoint[];
|
|
379
|
-
|
|
390
|
+
drilldown?: ColumnDrilldownConfig;
|
|
380
391
|
seriesName?: string;
|
|
381
392
|
yAxisTitle?: string;
|
|
382
393
|
}
|
|
@@ -56,6 +56,7 @@ import '../nile-ai-panel/index.js';
|
|
|
56
56
|
export declare class NileChart extends NileElement {
|
|
57
57
|
static styles: CSSResultGroup;
|
|
58
58
|
private _headerTipEl;
|
|
59
|
+
private _headerResizeObs;
|
|
59
60
|
/** Full chart configuration. Accepts flat NileChartConfig or separated { chart, aq } input. */
|
|
60
61
|
config: NileChartConfig | NileChartConfigInputType | null;
|
|
61
62
|
/**
|
|
@@ -125,6 +126,10 @@ export declare class NileChart extends NileElement {
|
|
|
125
126
|
private get isPromotableFilter();
|
|
126
127
|
private get headerTitle();
|
|
127
128
|
private get headerSubtitle();
|
|
129
|
+
/** Normalize a numeric (→px) or string dimension to a CSS length. */
|
|
130
|
+
private static toCssSize;
|
|
131
|
+
private get titleFontSize();
|
|
132
|
+
private get subtitleFontSize();
|
|
128
133
|
private onHeaderSlotChange;
|
|
129
134
|
private onHeaderActionsSlotChange;
|
|
130
135
|
private syncHeaderSlots;
|
|
@@ -144,8 +149,8 @@ export declare class NileChart extends NileElement {
|
|
|
144
149
|
private renderAiTrigger;
|
|
145
150
|
private _showHeaderTip;
|
|
146
151
|
private _hideHeaderTip;
|
|
147
|
-
private
|
|
148
|
-
private
|
|
152
|
+
private _onHeaderTextEnter;
|
|
153
|
+
private _syncHeaderTruncationA11y;
|
|
149
154
|
private renderHeader;
|
|
150
155
|
private renderAiPanel;
|
|
151
156
|
private renderChartContent;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var NileChart_1;
|
|
1
2
|
import { __decorate } from "tslib";
|
|
2
3
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
3
4
|
import { html, nothing } from 'lit';
|
|
@@ -9,11 +10,6 @@ import { convertConfig } from '../internal/chart-adapters.js';
|
|
|
9
10
|
import { deepMerge } from '../internal/utils.js';
|
|
10
11
|
import { initNileChartExporting, getHighcharts } from '../internal/highcharts-provider.js';
|
|
11
12
|
import { resolveColorPaletteColors } from '../internal/color-palettes/index.js';
|
|
12
|
-
// Start loading exporting/offline-exporting/export-data at module import time.
|
|
13
|
-
// `chart.fullscreen` is attached via a `beforeRender` hook installed by the exporting module's
|
|
14
|
-
// compose step, so if a chart is constructed before the module applies, that instance will have
|
|
15
|
-
// no `fullscreen`. Kicking the load off here gives it a head start; handlers still await it
|
|
16
|
-
// before invoking methods, and viewFullscreen falls back to the DOM Fullscreen API.
|
|
17
13
|
initNileChartExporting();
|
|
18
14
|
import '../nile-bar-chart/index.js';
|
|
19
15
|
import '../nile-pie-chart/index.js';
|
|
@@ -133,10 +129,11 @@ function ensureHeaderTooltipStyles() {
|
|
|
133
129
|
document.head.appendChild(style);
|
|
134
130
|
_headerTooltipStylesInjected = true;
|
|
135
131
|
}
|
|
136
|
-
let NileChart = class NileChart extends NileElement {
|
|
132
|
+
let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
137
133
|
constructor() {
|
|
138
134
|
super(...arguments);
|
|
139
135
|
this._headerTipEl = null;
|
|
136
|
+
this._headerResizeObs = null;
|
|
140
137
|
/** Full chart configuration. Accepts flat NileChartConfig or separated { chart, aq } input. */
|
|
141
138
|
this.config = null;
|
|
142
139
|
/**
|
|
@@ -200,14 +197,9 @@ let NileChart = class NileChart extends NileElement {
|
|
|
200
197
|
this._hcChart = e.detail?.chart ?? null;
|
|
201
198
|
};
|
|
202
199
|
this.resolvedConfig = null;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return;
|
|
207
|
-
const rect = el.getBoundingClientRect();
|
|
208
|
-
this._showHeaderTip(el.textContent ?? '', rect.left + rect.width / 2, rect.top);
|
|
209
|
-
};
|
|
210
|
-
this._onSubtitleEnter = (e) => {
|
|
200
|
+
// Reveal the full text when a title/subtitle is truncated. Accepts any Event
|
|
201
|
+
// so it works for BOTH pointer (mouseenter) and keyboard (focus) users.
|
|
202
|
+
this._onHeaderTextEnter = (e) => {
|
|
211
203
|
const el = e.currentTarget;
|
|
212
204
|
if (el.scrollWidth <= el.clientWidth)
|
|
213
205
|
return;
|
|
@@ -231,6 +223,7 @@ let NileChart = class NileChart extends NileElement {
|
|
|
231
223
|
injectGlobalChartMenuOverrides();
|
|
232
224
|
const tip = document.createElement('div');
|
|
233
225
|
tip.className = 'nile-chart-header-tooltip';
|
|
226
|
+
tip.setAttribute('role', 'tooltip');
|
|
234
227
|
document.body.appendChild(tip);
|
|
235
228
|
this._headerTipEl = tip;
|
|
236
229
|
document.addEventListener('click', this.handleOutsideClick);
|
|
@@ -249,6 +242,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
249
242
|
this.removeEventListener('nile-chart-ready', this.handleChartReady);
|
|
250
243
|
this._headerTipEl?.remove();
|
|
251
244
|
this._headerTipEl = null;
|
|
245
|
+
this._headerResizeObs?.disconnect();
|
|
246
|
+
this._headerResizeObs = null;
|
|
252
247
|
}
|
|
253
248
|
mergeChartTypeFromAttr(chart) {
|
|
254
249
|
const t = this.chartTypeAttr?.trim();
|
|
@@ -280,6 +275,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
280
275
|
if (resolved.appearance && this.appearance !== resolved.appearance)
|
|
281
276
|
this.appearance = resolved.appearance;
|
|
282
277
|
}
|
|
278
|
+
// Keep truncated-title focusability in sync after any re-render.
|
|
279
|
+
this._syncHeaderTruncationA11y();
|
|
283
280
|
}
|
|
284
281
|
closeMenu() {
|
|
285
282
|
const dropdown = this.shadowRoot?.querySelector('.nile-chart-menu-anchor');
|
|
@@ -346,6 +343,18 @@ let NileChart = class NileChart extends NileElement {
|
|
|
346
343
|
}
|
|
347
344
|
return '';
|
|
348
345
|
}
|
|
346
|
+
/** Normalize a numeric (→px) or string dimension to a CSS length. */
|
|
347
|
+
static toCssSize(value) {
|
|
348
|
+
if (value == null || value === '')
|
|
349
|
+
return undefined;
|
|
350
|
+
return typeof value === 'number' ? `${value}px` : value;
|
|
351
|
+
}
|
|
352
|
+
get titleFontSize() {
|
|
353
|
+
return NileChart_1.toCssSize(this.activeConfig?.titleFontSize ?? this.resolvedConfig?.titleFontSize);
|
|
354
|
+
}
|
|
355
|
+
get subtitleFontSize() {
|
|
356
|
+
return NileChart_1.toCssSize(this.activeConfig?.subtitleFontSize ?? this.resolvedConfig?.subtitleFontSize);
|
|
357
|
+
}
|
|
349
358
|
onHeaderSlotChange(e) {
|
|
350
359
|
const slot = e.target;
|
|
351
360
|
this.hasHeaderSlotContent = slot.assignedElements({ flatten: true }).length > 0;
|
|
@@ -383,6 +392,10 @@ let NileChart = class NileChart extends NileElement {
|
|
|
383
392
|
firstUpdated(changedProperties) {
|
|
384
393
|
super.firstUpdated(changedProperties);
|
|
385
394
|
this.syncHeaderSlots();
|
|
395
|
+
this._syncHeaderTruncationA11y();
|
|
396
|
+
// Truncation depends on width, so re-check when the host resizes.
|
|
397
|
+
this._headerResizeObs = new ResizeObserver(() => this._syncHeaderTruncationA11y());
|
|
398
|
+
this._headerResizeObs.observe(this);
|
|
386
399
|
}
|
|
387
400
|
/** Direct children with `slot=` — header row renders on first paint before slot assignment runs. */
|
|
388
401
|
lightDomHasSlot(name) {
|
|
@@ -560,6 +573,24 @@ let NileChart = class NileChart extends NileElement {
|
|
|
560
573
|
if (this._headerTipEl)
|
|
561
574
|
this._headerTipEl.style.display = 'none';
|
|
562
575
|
}
|
|
576
|
+
_syncHeaderTruncationA11y() {
|
|
577
|
+
const root = this.shadowRoot;
|
|
578
|
+
if (!root)
|
|
579
|
+
return;
|
|
580
|
+
for (const sel of ['.nile-chart-header-title', '.nile-chart-header-subtitle']) {
|
|
581
|
+
const el = root.querySelector(sel);
|
|
582
|
+
if (!el)
|
|
583
|
+
continue;
|
|
584
|
+
const truncated = el.scrollWidth > el.clientWidth;
|
|
585
|
+
if (truncated) {
|
|
586
|
+
el.setAttribute('tabindex', '0');
|
|
587
|
+
}
|
|
588
|
+
else {
|
|
589
|
+
el.removeAttribute('tabindex');
|
|
590
|
+
this._hideHeaderTip();
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
563
594
|
renderHeader() {
|
|
564
595
|
if (!this.shouldShowHeader())
|
|
565
596
|
return nothing;
|
|
@@ -567,18 +598,20 @@ let NileChart = class NileChart extends NileElement {
|
|
|
567
598
|
const subtitle = this.headerSubtitle;
|
|
568
599
|
const showDefaultTitles = !this.hasHeaderSlotContent && !!(title || subtitle);
|
|
569
600
|
const headerCompact = !subtitle?.trim();
|
|
601
|
+
const titleFontSize = this.titleFontSize;
|
|
602
|
+
const subtitleFontSize = this.subtitleFontSize;
|
|
570
603
|
return html `
|
|
571
|
-
<div class="nile-chart-header ${headerCompact ? 'nile-chart-header--compact' : ''}">
|
|
572
|
-
<div class="nile-chart-header-titles">
|
|
604
|
+
<div class="nile-chart-header ${headerCompact ? 'nile-chart-header--compact' : ''}" part="header">
|
|
605
|
+
<div class="nile-chart-header-titles" part="header-titles">
|
|
573
606
|
<slot name="header" @slotchange=${this.onHeaderSlotChange}></slot>
|
|
574
607
|
${showDefaultTitles
|
|
575
608
|
? html `
|
|
576
|
-
${title ? html `<p class="nile-chart-header-title" @mouseenter=${this.
|
|
577
|
-
${subtitle ? html `<p class="nile-chart-header-subtitle" @mouseenter=${this.
|
|
609
|
+
${title ? html `<p class="nile-chart-header-title" part="header-title" style=${titleFontSize ? `font-size:${titleFontSize}` : nothing} @mouseenter=${this._onHeaderTextEnter} @mouseleave=${() => this._hideHeaderTip()} @focus=${this._onHeaderTextEnter} @blur=${() => this._hideHeaderTip()}>${title}</p>` : nothing}
|
|
610
|
+
${subtitle ? html `<p class="nile-chart-header-subtitle" part="header-subtitle" style=${subtitleFontSize ? `font-size:${subtitleFontSize}` : nothing} @mouseenter=${this._onHeaderTextEnter} @mouseleave=${() => this._hideHeaderTip()} @focus=${this._onHeaderTextEnter} @blur=${() => this._hideHeaderTip()}>${subtitle}</p>` : nothing}
|
|
578
611
|
`
|
|
579
612
|
: nothing}
|
|
580
613
|
</div>
|
|
581
|
-
<div class="nile-chart-header-actions">
|
|
614
|
+
<div class="nile-chart-header-actions" part="header-actions">
|
|
582
615
|
<slot name="header-actions" @slotchange=${this.onHeaderActionsSlotChange}></slot>
|
|
583
616
|
${this.masterZoomed && (this.activeType ?? this.resolvedConfig?.type) === 'master-detail'
|
|
584
617
|
? html `<nile-tooltip content="Reset zoom" placement="top">
|
|
@@ -631,16 +664,28 @@ let NileChart = class NileChart extends NileElement {
|
|
|
631
664
|
const { show, ...rest } = config.legend;
|
|
632
665
|
legendOptions.legend = { enabled: show ?? true, ...rest };
|
|
633
666
|
}
|
|
667
|
+
const spacingOptions = {};
|
|
668
|
+
if (config.chartSpacing) {
|
|
669
|
+
const { top, right, bottom, left } = config.chartSpacing;
|
|
670
|
+
const chart = {};
|
|
671
|
+
if (top != null)
|
|
672
|
+
chart.spacingTop = top;
|
|
673
|
+
if (right != null)
|
|
674
|
+
chart.spacingRight = right;
|
|
675
|
+
if (bottom != null)
|
|
676
|
+
chart.spacingBottom = bottom;
|
|
677
|
+
if (left != null)
|
|
678
|
+
chart.spacingLeft = left;
|
|
679
|
+
if (Object.keys(chart).length)
|
|
680
|
+
spacingOptions.chart = chart;
|
|
681
|
+
}
|
|
634
682
|
const cfgData = config.data;
|
|
635
683
|
const dataCount = Array.isArray(cfgData) ? cfgData.length : undefined;
|
|
636
|
-
// Apply the built-in 'default' palette automatically when no colorPalette is
|
|
637
|
-
// given — so charts use Nile colors out of the box with no config needed. A
|
|
638
|
-
// consumer who supplies their own `options.colors` opts out (not clobbered).
|
|
639
684
|
const hasExplicitColors = Array.isArray(config.options?.colors);
|
|
640
685
|
const paletteCfg = config.colorPalette ?? (hasExplicitColors ? undefined : { theme: 'default' });
|
|
641
686
|
const paletteColors = resolveColorPaletteColors(paletteCfg, dataCount);
|
|
642
687
|
const paletteOptions = paletteColors ? { colors: paletteColors } : {};
|
|
643
|
-
const mergedOptions = deepMerge(deepMerge(deepMerge(deepMerge(config.options ?? {}, legendOptions), paletteOptions), noTitle), this.buildExportingOptions());
|
|
688
|
+
const mergedOptions = deepMerge(deepMerge(deepMerge(deepMerge(deepMerge(config.options ?? {}, legendOptions), spacingOptions), paletteOptions), noTitle), this.buildExportingOptions());
|
|
644
689
|
switch (config.type) {
|
|
645
690
|
case 'bar':
|
|
646
691
|
return html `<nile-bar-chart
|
|
@@ -1569,7 +1614,7 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1569
1614
|
case 'columnDrilldown':
|
|
1570
1615
|
return html `<nile-column-drilldown-chart
|
|
1571
1616
|
.data=${config.data}
|
|
1572
|
-
.
|
|
1617
|
+
.drilldown=${config.drilldown}
|
|
1573
1618
|
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1574
1619
|
.seriesName=${config.seriesName ?? ''}
|
|
1575
1620
|
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
@@ -1970,7 +2015,7 @@ __decorate([
|
|
|
1970
2015
|
__decorate([
|
|
1971
2016
|
state()
|
|
1972
2017
|
], NileChart.prototype, "masterZoomed", void 0);
|
|
1973
|
-
NileChart = __decorate([
|
|
2018
|
+
NileChart = NileChart_1 = __decorate([
|
|
1974
2019
|
customElement('nile-chart')
|
|
1975
2020
|
], NileChart);
|
|
1976
2021
|
export { NileChart };
|
|
@@ -26,7 +26,7 @@ export declare class NileClusterChart 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
|
groupPadding: number;
|
|
31
31
|
pointPadding: number;
|
|
32
32
|
chartBg: string;
|
|
@@ -25,7 +25,7 @@ export declare class NileColumnChart 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;
|