@aquera/nile-visualization 2.9.53 → 2.9.55
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 +8 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/internal/types/chart-master-detail-config.type.d.ts +11 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +11 -1
- package/dist/src/nile-chart/nile-chart.js +6 -1
- package/dist/src/nile-master-detail-chart/index.d.ts +1 -1
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.css.js +201 -6
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +67 -1
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.js +349 -16
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.test.js +353 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,6 +36,14 @@ To run a local development server that serves the basic demo located in `demo/in
|
|
|
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
38
|
|
|
39
|
+
#### Version 2.9.55 (November 25, 2026)
|
|
40
|
+
- Nile Master-Detail Chart: navigator handle value pills stay centred on their own handle instead of being pushed apart, and overlapping pills dim the one underneath. The `navigator-controls` zoom control now overlays the chart's top-right corner without reserving right spacing, and is revealed on hover / focus (UIF-1440)
|
|
41
|
+
|
|
42
|
+
#### Version 2.9.54 (November 23, 2026)
|
|
43
|
+
- Nile Master-Detail Chart: the `navigator-slider` thumb no longer shows its internal 0–1000 position in a tooltip (UIF-1439)
|
|
44
|
+
- Nile Master-Detail Chart: new `navigator-handles` (`navigatorHandles` in `<nile-chart>` config) overlays draggable grips on the master window — edge grips resize, the body moves it (width kept); keyboard-focusable `role="slider"` thumbs (← / → one point, Shift ±10%, Home/End to the bounds). Works in master+detail and `master-only`, turns on `navigator-default-window`, reuses `nile-chart-selection`. New CSS parts `navigator-handle`, `navigator-window`. Off by default (UIF-1439)
|
|
45
|
+
- Nile Master-Detail Chart: new `navigator-handle-variant="labeled"` (edge line, grip and a value pill above each edge, e.g. `Feb 11`), `navigator-handle-label="active|always"` (default `active`: pills only on hover / focus / drag), `navigator-handle-label-format` (Highcharts date format of the pills, default `%b %e`; close pills are pushed apart) and `navigator-mask="frost"` (a translucent blur over the master outside the window instead of `mask-fill`; tune with `--nile-master-detail-frost-tint` / `--nile-master-detail-frost-blur`). All additive, also `<nile-chart>` config keys. New CSS parts `navigator-handle-label`, `navigator-mask` (UIF-1439)
|
|
46
|
+
|
|
39
47
|
#### Version 2.9.53 (November 21, 2026)
|
|
40
48
|
- Nile KPI Chart: `sparkline-position` for the compact variant. `right` gives a small card with the sparkline beside the value (about 45% of the width, 48–120 px, 32 px tall, not full-bleed), a 24–32 px value and no 160 px minimum height; `bottom` (default) is unchanged. Also `sparklinePosition` in `<nile-chart>` KPI config (UIF-1436)
|
|
41
49
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type { BoxplotBox, BoxplotSeriesData } from './nile-boxplot-chart/index.j
|
|
|
40
40
|
export { NileTimelineChart } from './nile-timeline-chart/index.js';
|
|
41
41
|
export type { TimelineEvent } from './nile-timeline-chart/index.js';
|
|
42
42
|
export { NileMasterDetailChart } from './nile-master-detail-chart/index.js';
|
|
43
|
-
export type { MasterDetailPoint, MasterDetailSeries, MasterDetailSeriesType, MasterDetailStacking } from './nile-master-detail-chart/index.js';
|
|
43
|
+
export type { MasterDetailPoint, MasterDetailSeries, MasterDetailSeriesType, MasterDetailStacking, MasterDetailHandleVariant, MasterDetailHandleLabel, MasterDetailMask } from './nile-master-detail-chart/index.js';
|
|
44
44
|
export { NileDumbbellChart } from './nile-dumbbell-chart/index.js';
|
|
45
45
|
export type { DumbbellPoint } from './nile-dumbbell-chart/index.js';
|
|
46
46
|
export { NileDumbbellLowerChart } from './nile-dumbbell-lower-chart/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options } from 'highcharts';
|
|
2
|
-
import type { MasterDetailPoint, MasterDetailSeries, MasterDetailSeriesType, MasterDetailStacking, MasterDetailXAxisType } from '../../nile-master-detail-chart/nile-master-detail-chart.js';
|
|
2
|
+
import type { MasterDetailPoint, MasterDetailSeries, MasterDetailSeriesType, MasterDetailStacking, MasterDetailXAxisType, MasterDetailHandleVariant, MasterDetailHandleLabel, MasterDetailMask } from '../../nile-master-detail-chart/nile-master-detail-chart.js';
|
|
3
3
|
export interface ChartMasterDetailConfigType {
|
|
4
4
|
type: 'master-detail';
|
|
5
5
|
/** Single-series shorthand. Optional when `series` is given. */
|
|
@@ -29,6 +29,16 @@ export interface ChartMasterDetailConfigType {
|
|
|
29
29
|
navigatorZoomStep?: number;
|
|
30
30
|
/** Opening window with navigator controls: a fraction (`0.25`) or a duration (`7d`, `12h`, `30m`, `2w`). */
|
|
31
31
|
navigatorDefaultWindow?: string;
|
|
32
|
+
/** Draggable grips on the master window: edge grips resize, the body moves it (width kept). Off by default. */
|
|
33
|
+
navigatorHandles?: boolean;
|
|
34
|
+
/** Look of the handles: `pill` (default) or `labeled` (edge line, grip and value pill). */
|
|
35
|
+
navigatorHandleVariant?: MasterDetailHandleVariant;
|
|
36
|
+
/** When `labeled` handles show their value pills: `active` (default: hover, focus, drag) or `always`. */
|
|
37
|
+
navigatorHandleLabel?: MasterDetailHandleLabel;
|
|
38
|
+
/** Highcharts date format for the `labeled` pills on a datetime axis (default `%b %e`). */
|
|
39
|
+
navigatorHandleLabelFormat?: string;
|
|
40
|
+
/** Shading outside the master window: `solid` (default, `mask-fill`) or `frost` (blurred and faded). */
|
|
41
|
+
navigatorMask?: MasterDetailMask;
|
|
32
42
|
xAxisType?: MasterDetailXAxisType;
|
|
33
43
|
xAxisMin?: number | null;
|
|
34
44
|
xAxisMax?: number | null;
|
|
@@ -28,7 +28,7 @@ import type { HistogramSamples } from '../nile-histogram-chart/nile-histogram-ch
|
|
|
28
28
|
import type { BellcurveSamples } from '../nile-bellcurve-chart/nile-bellcurve-chart.js';
|
|
29
29
|
import type { BoxplotSeriesData } from '../nile-boxplot-chart/nile-boxplot-chart.js';
|
|
30
30
|
import type { TimelineEvent } from '../nile-timeline-chart/nile-timeline-chart.js';
|
|
31
|
-
import type { MasterDetailPoint, MasterDetailSeries, MasterDetailStacking } from '../nile-master-detail-chart/nile-master-detail-chart.js';
|
|
31
|
+
import type { MasterDetailPoint, MasterDetailSeries, MasterDetailStacking, MasterDetailHandleVariant, MasterDetailHandleLabel, MasterDetailMask } from '../nile-master-detail-chart/nile-master-detail-chart.js';
|
|
32
32
|
import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
|
|
33
33
|
import type { FanLinePoint, FanUncertaintyBand } from '../nile-fan-chart/nile-fan-chart.js';
|
|
34
34
|
import type { FunnelDataPoint } from '../nile-funnel-chart/nile-funnel-chart.js';
|
|
@@ -437,6 +437,16 @@ export interface NileMasterDetailChartConfig extends NileChartConfigBase {
|
|
|
437
437
|
navigatorZoomStep?: number;
|
|
438
438
|
/** Opening window with navigator controls: a fraction (`0.25`) or a duration (`7d`, `12h`, `30m`, `2w`). */
|
|
439
439
|
navigatorDefaultWindow?: string;
|
|
440
|
+
/** Draggable grips on the master window: edge grips resize, the body moves it (width kept). Off by default. */
|
|
441
|
+
navigatorHandles?: boolean;
|
|
442
|
+
/** Look of the handles: `pill` (default) or `labeled` (edge line, grip and value pill). */
|
|
443
|
+
navigatorHandleVariant?: MasterDetailHandleVariant;
|
|
444
|
+
/** When `labeled` handles show their value pills: `active` (default: hover, focus, drag) or `always`. */
|
|
445
|
+
navigatorHandleLabel?: MasterDetailHandleLabel;
|
|
446
|
+
/** Highcharts date format for the `labeled` pills on a datetime axis (default `%b %e`). */
|
|
447
|
+
navigatorHandleLabelFormat?: string;
|
|
448
|
+
/** Shading outside the master window: `solid` (default, `mask-fill`) or `frost` (blurred and faded). */
|
|
449
|
+
navigatorMask?: MasterDetailMask;
|
|
440
450
|
xAxisType?: 'datetime' | 'linear' | 'logarithmic' | 'category';
|
|
441
451
|
xAxisMin?: number | null;
|
|
442
452
|
xAxisMax?: number | null;
|
|
@@ -1670,7 +1670,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1670
1670
|
case 'master-detail':
|
|
1671
1671
|
return html `<nile-master-detail-chart
|
|
1672
1672
|
part="chart master-detail-chart"
|
|
1673
|
-
exportparts="detail-container: master-detail-detail-container, master-container: master-detail-master-container, master-toggle: master-detail-master-toggle, navigator: master-detail-navigator, navigator-button: master-detail-navigator-button, navigator-bar: master-detail-navigator-bar, navigator-slider: master-detail-navigator-slider, navigator-pan-button: master-detail-navigator-pan-button"
|
|
1673
|
+
exportparts="detail-container: master-detail-detail-container, master-container: master-detail-master-container, master-toggle: master-detail-master-toggle, navigator: master-detail-navigator, navigator-button: master-detail-navigator-button, navigator-bar: master-detail-navigator-bar, navigator-slider: master-detail-navigator-slider, navigator-pan-button: master-detail-navigator-pan-button, navigator-handle: master-detail-navigator-handle, navigator-window: master-detail-navigator-window, navigator-handle-label: master-detail-navigator-handle-label, navigator-mask: master-detail-navigator-mask"
|
|
1674
1674
|
.data=${config.data ?? []}
|
|
1675
1675
|
.series=${config.series ?? []}
|
|
1676
1676
|
.stacking=${config.stacking ?? ''}
|
|
@@ -1689,6 +1689,11 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1689
1689
|
.navigatorSliderLive=${config.navigatorSliderLive ?? false}
|
|
1690
1690
|
.navigatorZoomStep=${config.navigatorZoomStep ?? 2}
|
|
1691
1691
|
.navigatorDefaultWindow=${config.navigatorDefaultWindow ?? ''}
|
|
1692
|
+
.navigatorHandles=${config.navigatorHandles ?? false}
|
|
1693
|
+
.navigatorHandleVariant=${config.navigatorHandleVariant ?? 'pill'}
|
|
1694
|
+
.navigatorHandleLabel=${config.navigatorHandleLabel ?? 'active'}
|
|
1695
|
+
.navigatorHandleLabelFormat=${config.navigatorHandleLabelFormat ?? '%b %e'}
|
|
1696
|
+
.navigatorMask=${config.navigatorMask ?? 'solid'}
|
|
1692
1697
|
.xAxisType=${config.xAxisType ?? 'datetime'}
|
|
1693
1698
|
.xAxisMin=${config.xAxisMin ?? null}
|
|
1694
1699
|
.xAxisMax=${config.xAxisMax ?? null}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { NileMasterDetailChart } from './nile-master-detail-chart.js';
|
|
2
|
-
export type { MasterDetailPoint, MasterDetailSeries, MasterDetailSeriesType, MasterDetailStacking } from './nile-master-detail-chart.js';
|
|
2
|
+
export type { MasterDetailPoint, MasterDetailSeries, MasterDetailSeriesType, MasterDetailStacking, MasterDetailHandleVariant, MasterDetailHandleLabel, MasterDetailMask } from './nile-master-detail-chart.js';
|
|
@@ -44,28 +44,202 @@ export const styles = css `
|
|
|
44
44
|
the detail pane. Cap it at a share of the stack so the detail always wins:
|
|
45
45
|
tall cards are unaffected (the px value stays smaller than the cap), short
|
|
46
46
|
ones scale the master down instead of squeezing the detail out. */
|
|
47
|
-
|
|
47
|
+
/* Positioned wrapper so the draggable grip overlay can anchor to the master plot. */
|
|
48
|
+
.master-wrap {
|
|
49
|
+
position: relative;
|
|
48
50
|
flex: 0 0 auto;
|
|
49
51
|
height: min(
|
|
50
52
|
var(--nile-master-detail-master-height, var(--nile-height-100px, var(--ng-height-100px))),
|
|
51
53
|
40%
|
|
52
54
|
);
|
|
53
55
|
width: 100%;
|
|
54
|
-
overflow: hidden;
|
|
55
56
|
opacity: 1;
|
|
56
57
|
transition: height 220ms ease, opacity 180ms ease;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
.master-container {
|
|
61
|
+
height: 100%;
|
|
62
|
+
width: 100%;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([master-only]) .master-wrap {
|
|
60
67
|
flex: 1 1 auto;
|
|
61
68
|
min-height: 0;
|
|
62
69
|
height: 100%;
|
|
63
70
|
}
|
|
64
|
-
|
|
71
|
+
|
|
72
|
+
.master-wrap--collapsed {
|
|
65
73
|
height: 0;
|
|
66
74
|
opacity: 0;
|
|
67
75
|
pointer-events: none;
|
|
68
76
|
}
|
|
77
|
+
.master-container--collapsed {
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Draggable window grips, overlaid on the master plot; only the grips and body take pointer events,
|
|
82
|
+
so the master's drag-to-select on the masked area keeps working. */
|
|
83
|
+
.navigator-overlay {
|
|
84
|
+
position: absolute;
|
|
85
|
+
inset: 0;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
z-index: 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.navigator-handle {
|
|
91
|
+
position: absolute;
|
|
92
|
+
z-index: 1;
|
|
93
|
+
width: var(--nile-spacing-3xl, var(--ng-spacing-3xl, 24px));
|
|
94
|
+
transform: translateX(-50%);
|
|
95
|
+
pointer-events: auto;
|
|
96
|
+
cursor: ew-resize;
|
|
97
|
+
touch-action: none;
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* The visual grip: a narrow rounded pill centred in the wider hit target. */
|
|
104
|
+
.navigator-handle::before {
|
|
105
|
+
content: '';
|
|
106
|
+
width: var(--nile-spacing-2, var(--ng-spacing-2, 8px));
|
|
107
|
+
height: 100%;
|
|
108
|
+
background: var(--nile-colors-white-base, var(--ng-colors-bg-primary, Canvas));
|
|
109
|
+
border: var(--nile-border-width-1, var(--ng-stroke-width-1, 1px)) solid
|
|
110
|
+
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
111
|
+
border-radius: var(--nile-radius-sm, var(--ng-radius-md, 4px));
|
|
112
|
+
box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.navigator-handle:focus-visible {
|
|
116
|
+
outline: var(--nile-border-width-2, var(--ng-stroke-width-2, 2px)) solid
|
|
117
|
+
var(--nile-colors-primary-600, var(--ng-colors-border-brand));
|
|
118
|
+
outline-offset: 2px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.navigator-window {
|
|
122
|
+
position: absolute;
|
|
123
|
+
pointer-events: auto;
|
|
124
|
+
cursor: grab;
|
|
125
|
+
touch-action: none;
|
|
126
|
+
background: transparent;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.navigator-window:active {
|
|
130
|
+
cursor: grabbing;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.navigator-mask {
|
|
134
|
+
position: absolute;
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
background: color-mix(
|
|
137
|
+
in srgb,
|
|
138
|
+
var(--nile-colors-white-base, var(--ng-colors-bg-primary)) var(--nile-master-detail-frost-tint, 45%),
|
|
139
|
+
transparent
|
|
140
|
+
);
|
|
141
|
+
-webkit-backdrop-filter: blur(var(--nile-master-detail-frost-blur, 1px));
|
|
142
|
+
backdrop-filter: blur(var(--nile-master-detail-frost-blur, 1px));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* labeled: a full-height brand line, a grip centred on it and a value pill above the plot. */
|
|
146
|
+
.navigator-overlay--labeled .navigator-handle::before {
|
|
147
|
+
position: absolute;
|
|
148
|
+
left: 50%;
|
|
149
|
+
top: 0;
|
|
150
|
+
width: var(--nile-border-width-2, var(--ng-stroke-width-2, 2px));
|
|
151
|
+
height: 100%;
|
|
152
|
+
transform: translateX(-50%);
|
|
153
|
+
background: var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid));
|
|
154
|
+
border: none;
|
|
155
|
+
border-radius: 0;
|
|
156
|
+
box-shadow: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.navigator-handle-grip {
|
|
160
|
+
position: relative;
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
width: var(--nile-spacing-lg, var(--ng-spacing-lg, 12px));
|
|
163
|
+
height: min(100%, var(--nile-spacing-3xl, var(--ng-spacing-3xl, 24px)));
|
|
164
|
+
background:
|
|
165
|
+
linear-gradient(
|
|
166
|
+
var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid)),
|
|
167
|
+
var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid))
|
|
168
|
+
)
|
|
169
|
+
calc(50% - 2px) 50% / 1px 50% no-repeat,
|
|
170
|
+
linear-gradient(
|
|
171
|
+
var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid)),
|
|
172
|
+
var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid))
|
|
173
|
+
)
|
|
174
|
+
calc(50% + 2px) 50% / 1px 50% no-repeat,
|
|
175
|
+
var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
176
|
+
border: var(--nile-border-width-1, var(--ng-stroke-width-1, 1px)) solid
|
|
177
|
+
var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid));
|
|
178
|
+
border-radius: var(--nile-radius-full, var(--ng-radius-full, 9999px));
|
|
179
|
+
box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* The grip being hovered, focused or dragged lifts above its neighbour so its pill is never covered. */
|
|
183
|
+
.navigator-handle:hover,
|
|
184
|
+
.navigator-handle:focus-visible,
|
|
185
|
+
.navigator-handle:active {
|
|
186
|
+
z-index: 2;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.navigator-handle-label {
|
|
190
|
+
position: absolute;
|
|
191
|
+
bottom: calc(100% + var(--nile-spacing-xs, var(--ng-spacing-xs, 4px)));
|
|
192
|
+
left: 50%;
|
|
193
|
+
transform: translateX(-50%);
|
|
194
|
+
padding: var(--nile-spacing-xxs, var(--ng-spacing-xxs, 2px)) var(--nile-spacing-md, var(--ng-spacing-md, 8px));
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
|
|
197
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs, 12px));
|
|
198
|
+
font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold, 600));
|
|
199
|
+
line-height: 1.5;
|
|
200
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
201
|
+
background: var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid));
|
|
202
|
+
border-radius: var(--nile-radius-full, var(--ng-radius-full, 9999px));
|
|
203
|
+
pointer-events: none;
|
|
204
|
+
transition: opacity var(--nile-transition-duration-default, var(--ng-transition-duration-default)) ease;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.navigator-overlay--label-active .navigator-handle-label {
|
|
208
|
+
opacity: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.navigator-overlay--label-active .navigator-handle:hover .navigator-handle-label,
|
|
212
|
+
.navigator-overlay--label-active .navigator-handle:focus-visible .navigator-handle-label,
|
|
213
|
+
.navigator-overlay--label-active .navigator-handle:active .navigator-handle-label,
|
|
214
|
+
.navigator-overlay--label-active:has(.navigator-window:active) .navigator-handle-label {
|
|
215
|
+
opacity: 1;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Always-visible pills that overlap: the one underneath dims so the one on top reads clearly.
|
|
219
|
+
Idle, the end pill is on top; otherwise the grip in use is. */
|
|
220
|
+
.navigator-overlay:not(.navigator-overlay--label-active)[data-crowded] .navigator-handle[data-edge='start'] .navigator-handle-label {
|
|
221
|
+
opacity: 0.5;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.navigator-overlay:not(.navigator-overlay--label-active)[data-crowded]
|
|
225
|
+
.navigator-handle[data-edge='start']:is(:hover, :focus-visible, :active)
|
|
226
|
+
.navigator-handle-label {
|
|
227
|
+
opacity: 1;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.navigator-overlay:not(.navigator-overlay--label-active)[data-crowded]:has(
|
|
231
|
+
.navigator-handle[data-edge='start']:is(:hover, :focus-visible, :active)
|
|
232
|
+
)
|
|
233
|
+
.navigator-handle[data-edge='end']
|
|
234
|
+
.navigator-handle-label {
|
|
235
|
+
opacity: 0.5;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@media (prefers-reduced-motion: reduce) {
|
|
239
|
+
.navigator-handle-label {
|
|
240
|
+
transition: none;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
69
243
|
|
|
70
244
|
.master-toggle {
|
|
71
245
|
display: flex;
|
|
@@ -104,8 +278,8 @@ export const styles = css `
|
|
|
104
278
|
so disabled buttons stay opaque (only the icon dims) and the chart never shows through. */
|
|
105
279
|
.navigator {
|
|
106
280
|
position: absolute;
|
|
107
|
-
top: var(--nile-master-detail-navigator-offset, var(--nile-spacing-
|
|
108
|
-
right: var(--nile-master-detail-navigator-offset, var(--nile-spacing-
|
|
281
|
+
top: var(--nile-master-detail-navigator-offset, var(--nile-spacing-xl, var(--ng-spacing-xl)));
|
|
282
|
+
right: var(--nile-master-detail-navigator-offset, var(--nile-spacing-xl, var(--ng-spacing-xl)));
|
|
109
283
|
z-index: 2;
|
|
110
284
|
display: flex;
|
|
111
285
|
flex-direction: column;
|
|
@@ -115,6 +289,27 @@ export const styles = css `
|
|
|
115
289
|
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
116
290
|
border-radius: var(--nile-radius-sm, var(--ng-radius-md, 8px));
|
|
117
291
|
box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));
|
|
292
|
+
/* Revealed on hover / keyboard focus; always shown where there is no hover (touch). */
|
|
293
|
+
opacity: 0;
|
|
294
|
+
transition: opacity var(--nile-transition-duration-default, var(--ng-transition-duration-default)) ease;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.chart-stack:hover .navigator,
|
|
298
|
+
.chart-stack:focus-within .navigator,
|
|
299
|
+
.navigator:focus-within {
|
|
300
|
+
opacity: 1;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@media (hover: none) {
|
|
304
|
+
.navigator {
|
|
305
|
+
opacity: 1;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@media (prefers-reduced-motion: reduce) {
|
|
310
|
+
.navigator {
|
|
311
|
+
transition: none;
|
|
312
|
+
}
|
|
118
313
|
}
|
|
119
314
|
|
|
120
315
|
.navigator-button {
|
|
@@ -17,12 +17,15 @@ export interface MasterDetailSeries {
|
|
|
17
17
|
export declare const MASTER_DETAIL_STACKING: readonly ["normal", "percent"];
|
|
18
18
|
/** `''` (or any unknown value) means no stacking. */
|
|
19
19
|
export type MasterDetailStacking = (typeof MASTER_DETAIL_STACKING)[number] | '';
|
|
20
|
+
export type MasterDetailHandleVariant = 'pill' | 'labeled';
|
|
21
|
+
export type MasterDetailHandleLabel = 'always' | 'active';
|
|
22
|
+
export type MasterDetailMask = 'solid' | 'frost';
|
|
20
23
|
export declare const MASTER_DETAIL_SERIES_TYPES: readonly ["area", "line", "spline", "areaspline", "column", "bar"];
|
|
21
24
|
export type MasterDetailSeriesType = (typeof MASTER_DETAIL_SERIES_TYPES)[number];
|
|
22
25
|
export declare const MASTER_DETAIL_X_AXIS_TYPES: readonly ["datetime", "linear", "logarithmic", "category"];
|
|
23
26
|
export type MasterDetailXAxisType = (typeof MASTER_DETAIL_X_AXIS_TYPES)[number];
|
|
24
27
|
/** Every CSS part `nile-master-detail-chart` renders; `nile-chart` re-exports them as `master-detail-<part>`. */
|
|
25
|
-
export declare const MASTER_DETAIL_CHART_PARTS: readonly ["detail-container", "master-container", "master-toggle", "navigator", "navigator-button", "navigator-bar", "navigator-slider", "navigator-pan-button"];
|
|
28
|
+
export declare const MASTER_DETAIL_CHART_PARTS: readonly ["detail-container", "master-container", "master-toggle", "navigator", "navigator-button", "navigator-bar", "navigator-slider", "navigator-pan-button", "navigator-handle", "navigator-window", "navigator-handle-label", "navigator-mask"];
|
|
26
29
|
/**
|
|
27
30
|
* @tag nile-master-detail-chart
|
|
28
31
|
* @summary A detail chart above an overview (master) strip; dragging on the strip zooms the detail.
|
|
@@ -40,7 +43,14 @@ export declare const MASTER_DETAIL_CHART_PARTS: readonly ["detail-container", "m
|
|
|
40
43
|
* (`navigator-slider`, `navigator-pan-buttons`).
|
|
41
44
|
* @csspart navigator-slider - The `nile-slider` that positions the window (`navigator-slider`).
|
|
42
45
|
* @csspart navigator-pan-button - Each pan button (`Pan back`, `Pan forward`) in the bar (`navigator-pan-buttons`).
|
|
46
|
+
* @csspart navigator-handle - Each draggable edge grip on the master window (`navigator-handles`).
|
|
47
|
+
* @csspart navigator-window - The draggable window body between the grips (`navigator-handles`).
|
|
48
|
+
* @csspart navigator-handle-label - The value pill above each `labeled` grip (`navigator-handle-variant="labeled"`).
|
|
49
|
+
* @csspart navigator-mask - Each frosted area outside the window on the master pane (`navigator-mask="frost"`).
|
|
43
50
|
*
|
|
51
|
+
* @cssproperty --nile-master-detail-frost-tint - How much surface colour covers the master outside the window
|
|
52
|
+
* with `navigator-mask="frost"`: `0%` is clear, `100%` hides it. Default `45%`.
|
|
53
|
+
* @cssproperty --nile-master-detail-frost-blur - Blur behind the `frost` mask. Default `1px`; `0` turns it off.
|
|
44
54
|
* @dependency nile-slider - `navigator-slider` renders a `nile-slider` from `@aquera/nile-elements`; register it in the app.
|
|
45
55
|
*/
|
|
46
56
|
export declare class NileMasterDetailChart extends NileElement {
|
|
@@ -58,6 +68,9 @@ export declare class NileMasterDetailChart extends NileElement {
|
|
|
58
68
|
private _panning;
|
|
59
69
|
private _drag;
|
|
60
70
|
private _dragFrame;
|
|
71
|
+
/** Live grip-drag gesture: which edge (or the body), the pointer id, and the master-axis geometry at grab. */
|
|
72
|
+
private _grip;
|
|
73
|
+
private _gripFrame;
|
|
61
74
|
private toggleMasterCollapsed;
|
|
62
75
|
config: SeparatedChartConfigInputType | null;
|
|
63
76
|
chartTitle: string;
|
|
@@ -113,6 +126,35 @@ export declare class NileMasterDetailChart extends NileElement {
|
|
|
113
126
|
* ending at the latest data. Empty opens on the full range.
|
|
114
127
|
*/
|
|
115
128
|
navigatorDefaultWindow: string;
|
|
129
|
+
/**
|
|
130
|
+
* Draggable grips on the master window: an edge grip on each side resizes the window (the other edge
|
|
131
|
+
* stays put, grips never cross), the body between them moves it keeping its width. Each grip is a
|
|
132
|
+
* keyboard-focusable `role="slider"` thumb. Works in master+detail and `master-only`. Turns on
|
|
133
|
+
* `navigator-default-window`.
|
|
134
|
+
*/
|
|
135
|
+
navigatorHandles: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Look of the `navigator-handles` grips: `pill` (default) is a small rounded grip; `labeled` is a
|
|
138
|
+
* full-height edge line with a grip and a pill above it showing the edge's value.
|
|
139
|
+
*/
|
|
140
|
+
navigatorHandleVariant: MasterDetailHandleVariant;
|
|
141
|
+
/**
|
|
142
|
+
* When the `labeled` handles show their value pills: `active` (default) — only while a grip is hovered,
|
|
143
|
+
* focused or dragged, or the window is dragged — or `always`.
|
|
144
|
+
*/
|
|
145
|
+
navigatorHandleLabel: MasterDetailHandleLabel;
|
|
146
|
+
/**
|
|
147
|
+
* Highcharts date format for the `labeled` handles' pills on a datetime axis, e.g. `%b %e` (default,
|
|
148
|
+
* `Jun 15`), `%e %b %Y` (`15 Jun 2026`) or `%H:%M`. Other axes show the formatted value.
|
|
149
|
+
*/
|
|
150
|
+
navigatorHandleLabelFormat: string;
|
|
151
|
+
/**
|
|
152
|
+
* How the master pane shades the range outside the window: `solid` (default) fills it with `mask-fill`;
|
|
153
|
+
* `frost` blurs and fades it so the window stands out.
|
|
154
|
+
*/
|
|
155
|
+
navigatorMask: MasterDetailMask;
|
|
156
|
+
private get _labeledHandles();
|
|
157
|
+
private get _frostMask();
|
|
116
158
|
private _window;
|
|
117
159
|
/** True when any navigator feature is on. */
|
|
118
160
|
private get _anyNavigator();
|
|
@@ -153,6 +195,8 @@ export declare class NileMasterDetailChart extends NileElement {
|
|
|
153
195
|
disconnectedCallback(): void;
|
|
154
196
|
protected firstUpdated(): void;
|
|
155
197
|
protected updated(changedProperties: PropertyValues): void;
|
|
198
|
+
/** Applies a handle-look or mask change to the master without resetting the window. */
|
|
199
|
+
private _restyleMaster;
|
|
156
200
|
private setupResizeObserver;
|
|
157
201
|
/** `series` when given, else one series built from `data` / `seriesName` / `seriesColor`. */
|
|
158
202
|
private get _seriesList();
|
|
@@ -220,6 +264,24 @@ export declare class NileMasterDetailChart extends NileElement {
|
|
|
220
264
|
private _onPanStart;
|
|
221
265
|
private _onPanMove;
|
|
222
266
|
private _onPanEnd;
|
|
267
|
+
/** Grip step for Shift + arrow: ~10% of the data points, at least one. */
|
|
268
|
+
private get _gripShiftStep();
|
|
269
|
+
/** Moves one window edge to data index `index`, clamped so the grips stay at least one point apart. */
|
|
270
|
+
private _resizeWindow;
|
|
271
|
+
/** The master x-axis, when the chart exists. */
|
|
272
|
+
private get _masterAxis();
|
|
273
|
+
/** Positions the two grips and the body over the master plot from the current window. No-op when off. */
|
|
274
|
+
private _positionHandles;
|
|
275
|
+
/** Centres each value pill on top of its edge and keeps both inside the master. */
|
|
276
|
+
private _placeLabels;
|
|
277
|
+
private _onGripStart;
|
|
278
|
+
private _onGripMove;
|
|
279
|
+
private _onGripEnd;
|
|
280
|
+
private _onGripKeydown;
|
|
281
|
+
/** An x value as a `labeled` grip's pill shows it: `navigator-handle-label-format` on a datetime axis. */
|
|
282
|
+
private _formatShortX;
|
|
283
|
+
/** Formats an x value for a grip's `aria-valuetext`: a date on a datetime axis, else the raw value. */
|
|
284
|
+
private _formatX;
|
|
223
285
|
/** Arrow keys pan, + / − zoom, when the chart pane has focus. */
|
|
224
286
|
private _onNavKeydown;
|
|
225
287
|
/**
|
|
@@ -232,6 +294,10 @@ export declare class NileMasterDetailChart extends NileElement {
|
|
|
232
294
|
private _currentSliderKey;
|
|
233
295
|
/** Bar under the master pane: optional ‹ pan, slider, › pan — each part on its own property. */
|
|
234
296
|
private _renderNavigatorBar;
|
|
297
|
+
/** Draggable grips over the master window: an edge grip each side plus the movable body between them. */
|
|
298
|
+
private _renderOverlay;
|
|
299
|
+
private _renderGrip;
|
|
300
|
+
private _renderHandles;
|
|
235
301
|
/** Map-style + / − zoom buttons, overlaid on the top-right corner of the chart. */
|
|
236
302
|
private _renderZoomControls;
|
|
237
303
|
private initCharts;
|