@aquera/nile-visualization 2.9.23 → 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,9 @@ 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
+
38
41
  #### Version 2.9.23 (July 08, 2026)
39
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)
40
43
 
@@ -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;
@@ -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
  }
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.9.23",
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",