@aquera/nile-visualization 2.9.22 → 2.9.24

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 CHANGED
@@ -35,6 +35,12 @@ 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.24 (July 09, 2026)
39
+ - 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)
40
+
41
+ #### Version 2.9.23 (July 08, 2026)
42
+ - 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)
43
+
38
44
  #### Version 2.9.22 (July 07, 2026)
39
45
  - Nile chart-message: removed the relative path bare import
40
46
  - Nile chart-list: removed the relative path bare import
@@ -1,10 +1,10 @@
1
1
  import type { Options } from 'highcharts';
2
- import type { ColumnDrilldownParentPoint, ColumnDrilldownSeriesConfig } from '../../nile-column-drilldown-chart/nile-column-drilldown-chart.js';
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
- drilldownSeries: ColumnDrilldownSeriesConfig[];
7
+ drilldown: ColumnDrilldownConfig;
8
8
  seriesName?: string;
9
9
  yAxisTitle?: string;
10
10
  height?: string;
@@ -8,6 +8,7 @@ export interface ChartMasterDetailConfigType {
8
8
  detailType?: MasterDetailSeriesType;
9
9
  masterType?: MasterDetailSeriesType;
10
10
  masterOnly?: boolean;
11
+ masterCollapsible?: boolean;
11
12
  xAxisType?: MasterDetailXAxisType;
12
13
  xAxisMin?: number | null;
13
14
  xAxisMax?: number | null;
@@ -41,7 +41,7 @@ import type { AreaSplineSeriesData } from '../nile-area-spline-chart/nile-area-s
41
41
  import type { AreaNegativeSeriesData } from '../nile-area-negative-chart/nile-area-negative-chart.js';
42
42
  import type { AreaRangeSeriesData } from '../nile-area-range-chart/nile-area-range-chart.js';
43
43
  import type { ColumnRangeSeriesData } from '../nile-column-range-chart/nile-column-range-chart.js';
44
- import type { ColumnDrilldownParentPoint, ColumnDrilldownSeriesConfig } from '../nile-column-drilldown-chart/nile-column-drilldown-chart.js';
44
+ import type { ColumnDrilldownConfig, ColumnDrilldownParentPoint } from '../nile-column-drilldown-chart/nile-column-drilldown-chart.js';
45
45
  import type { RadialBarSeriesData } from '../nile-radial-bar-chart/nile-radial-bar-chart.js';
46
46
  import type { VariablePieDataPoint } from '../nile-variable-pie-chart/nile-variable-pie-chart.js';
47
47
  import type { EulerVennDataPoint } from '../nile-euler-chart/nile-euler-chart.js';
@@ -376,7 +376,7 @@ export interface NileColumnRangeChartConfig extends NileChartConfigBase {
376
376
  export interface NileColumnDrilldownChartConfig extends NileChartConfigBase {
377
377
  type: 'columnDrilldown';
378
378
  data: ColumnDrilldownParentPoint[];
379
- drilldownSeries?: ColumnDrilldownSeriesConfig[];
379
+ drilldown?: ColumnDrilldownConfig;
380
380
  seriesName?: string;
381
381
  yAxisTitle?: string;
382
382
  }
@@ -458,6 +458,7 @@ export interface NileMasterDetailChartConfig extends NileChartConfigBase {
458
458
  masterType?: string;
459
459
  /** Render only the master (overview) pane — no detail chart. */
460
460
  masterOnly?: boolean;
461
+ masterCollapsible?: boolean;
461
462
  xAxisType?: 'datetime' | 'linear' | 'logarithmic' | 'category';
462
463
  xAxisMin?: number | null;
463
464
  xAxisMax?: number | null;
@@ -53,7 +53,6 @@ import '../nile-filter-chart/index.js';
53
53
  import '../nile-chart-message/nile-chart-message.js';
54
54
  import '../nile-chart-list/nile-chart-list.js';
55
55
  import '../nile-ai-panel/index.js';
56
- import '@aquera/nile-elements/nile-tooltip';
57
56
  export declare class NileChart extends NileElement {
58
57
  static styles: CSSResultGroup;
59
58
  private _headerTipEl;
@@ -66,7 +66,6 @@ import '../nile-filter-chart/index.js';
66
66
  import '../nile-chart-message/nile-chart-message.js';
67
67
  import '../nile-chart-list/nile-chart-list.js';
68
68
  import '../nile-ai-panel/index.js';
69
- import '@aquera/nile-elements/nile-tooltip';
70
69
  const CORE_CHART_LABELS = {
71
70
  bar: 'Bar',
72
71
  pie: 'Pie',
@@ -1139,6 +1138,7 @@ let NileChart = class NileChart extends NileElement {
1139
1138
  .detailType=${config.detailType ?? 'area'}
1140
1139
  .masterType=${config.masterType ?? 'area'}
1141
1140
  .masterOnly=${config.masterOnly ?? false}
1141
+ .masterCollapsible=${config.masterCollapsible ?? false}
1142
1142
  .xAxisType=${config.xAxisType ?? 'datetime'}
1143
1143
  .xAxisMin=${config.xAxisMin ?? null}
1144
1144
  .xAxisMax=${config.xAxisMax ?? null}
@@ -1569,7 +1569,7 @@ let NileChart = class NileChart extends NileElement {
1569
1569
  case 'columnDrilldown':
1570
1570
  return html `<nile-column-drilldown-chart
1571
1571
  .data=${config.data}
1572
- .drilldownSeries=${config.drilldownSeries}
1572
+ .drilldown=${config.drilldown}
1573
1573
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1574
1574
  .seriesName=${config.seriesName ?? ''}
1575
1575
  .yAxisTitle=${config.yAxisTitle ?? ''}
@@ -8,13 +8,18 @@ export interface ColumnDrilldownParentPoint {
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
- name: string;
16
- y: number;
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
- drilldownSeries: ColumnDrilldownSeriesConfig[];
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
- this.drilldownSeries = [];
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
- 'drilldownSeries',
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.drilldownSeries.map(ds => ({
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: Array })
374
- ], NileColumnDrilldownChart.prototype, "drilldownSeries", void 0);
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);
@@ -14,6 +14,7 @@ export const styles = css `
14
14
  .chart-stack {
15
15
  display: flex;
16
16
  flex-direction: column;
17
+ box-sizing: border-box;
17
18
  height: 100%;
18
19
  min-height: var(--nile-chart-min-height, var(--nile-height-200px, var(--ng-height-200px)));
19
20
  background: var(--nile-chart-bg, transparent);
@@ -24,11 +25,15 @@ export const styles = css `
24
25
  }
25
26
 
26
27
  .detail-container {
27
- flex: 1 1 auto;
28
28
  min-height: 0;
29
+ overflow: hidden;
29
30
  width: 100%;
30
31
  }
31
32
 
33
+ .detail-container--grow {
34
+ flex: 1 1 auto;
35
+ }
36
+
32
37
  .master-container {
33
38
  flex: 0 0 auto;
34
39
  height: var(--nile-master-detail-master-height, var(--nile-height-100px, var(--ng-height-100px)));
@@ -1,5 +1,4 @@
1
1
  import { nothing } from 'lit';
2
- import '@aquera/nile-elements/nile-tooltip';
3
2
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
4
3
  import type Highcharts from 'highcharts';
5
4
  import NileElement from '../internal/nile-element.js';
@@ -34,6 +33,7 @@ export declare class NileMasterDetailChart extends NileElement {
34
33
  detailType: MasterDetailSeriesType;
35
34
  masterType: MasterDetailSeriesType;
36
35
  masterOnly: boolean;
36
+ masterCollapsible: boolean;
37
37
  height: string;
38
38
  masterHeight: string | number;
39
39
  xAxisType: MasterDetailXAxisType;
@@ -1,7 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query, state } from 'lit/decorators.js';
3
3
  import { html, nothing } from 'lit';
4
- import '@aquera/nile-elements/nile-tooltip';
5
4
  import { getHighcharts } from '../internal/highcharts-provider.js';
6
5
  import NileElement from '../internal/nile-element.js';
7
6
  import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
@@ -24,8 +23,7 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
24
23
  this.masterChart = null;
25
24
  this.resizeObserver = null;
26
25
  this.zoomed = false;
27
- // Split mode starts with the master pane hidden; the toggle button reveals it.
28
- this.masterCollapsed = true;
26
+ this.masterCollapsed = false;
29
27
  this.config = null;
30
28
  this.chartTitle = '';
31
29
  this.chartSubtitle = '';
@@ -35,6 +33,7 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
35
33
  this.detailType = 'area';
36
34
  this.masterType = 'area';
37
35
  this.masterOnly = false;
36
+ this.masterCollapsible = false;
38
37
  this.height = '600px';
39
38
  this.masterHeight = 100;
40
39
  this.xAxisType = 'datetime';
@@ -136,6 +135,10 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
136
135
  this.initCharts();
137
136
  return;
138
137
  }
138
+ if (changedProperties.has('masterCollapsible') && !this.masterCollapsible && this.masterCollapsed) {
139
+ this.masterCollapsed = false;
140
+ this.updateComplete.then(() => this.masterChart?.reflow());
141
+ }
139
142
  const props = [
140
143
  'data',
141
144
  'options',
@@ -429,7 +432,7 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
429
432
  return;
430
433
  if (!this.masterOnly && !this.detailContainer)
431
434
  return;
432
- this.masterCollapsed = true;
435
+ this.masterCollapsed = false;
433
436
  if (!this._hc)
434
437
  this._hc = await getHighcharts();
435
438
  if (!this.masterOnly && this.detailContainer) {
@@ -462,19 +465,21 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
462
465
  return html `<div class="chart-stack">
463
466
  ${this.masterOnly
464
467
  ? null
465
- : html `<div class="detail-container" part="detail-container"></div>
466
- <nile-tooltip content=${this.masterCollapsed ? 'Show master' : 'Hide master'} placement="top">
467
- <button
468
- type="button"
469
- class="master-toggle"
470
- part="master-toggle"
471
- aria-expanded=${!this.masterCollapsed}
472
- aria-label=${this.masterCollapsed ? 'Show master pane' : 'Hide master pane'}
473
- @click=${this.toggleMasterCollapsed}
474
- >
475
- <nile-glyph name="ng-chevron-down" method="stroke" size="20"></nile-glyph>
476
- </button>
477
- </nile-tooltip>`}
468
+ : html `<div class="detail-container ${masterHidden ? 'detail-container--grow' : ''}" part="detail-container"></div>
469
+ ${this.masterCollapsible
470
+ ? html `<nile-lite-tooltip content=${this.masterCollapsed ? 'Show master' : 'Hide master'} placement="top">
471
+ <button
472
+ type="button"
473
+ class="master-toggle"
474
+ part="master-toggle"
475
+ aria-expanded=${!this.masterCollapsed}
476
+ aria-label=${this.masterCollapsed ? 'Show master pane' : 'Hide master pane'}
477
+ @click=${this.toggleMasterCollapsed}
478
+ >
479
+ <nile-glyph name="ng-chevron-down" method="stroke" size="20"></nile-glyph>
480
+ </button>
481
+ </nile-lite-tooltip>`
482
+ : null}`}
478
483
  <div class="master-container ${masterHidden ? 'master-container--collapsed' : ''}" part="master-container"></div>
479
484
  </div>`;
480
485
  }
@@ -516,6 +521,9 @@ __decorate([
516
521
  __decorate([
517
522
  property({ type: Boolean, reflect: true, attribute: 'master-only' })
518
523
  ], NileMasterDetailChart.prototype, "masterOnly", void 0);
524
+ __decorate([
525
+ property({ type: Boolean, attribute: 'master-collapsible' })
526
+ ], NileMasterDetailChart.prototype, "masterCollapsible", void 0);
519
527
  __decorate([
520
528
  property({ type: String })
521
529
  ], NileMasterDetailChart.prototype, "height", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.9.22",
3
+ "version": "2.9.24",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",