@aquera/nile-visualization 2.9.50 → 2.9.53

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
@@ -36,6 +36,13 @@ 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.53 (November 21, 2026)
40
+ - 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
+
42
+ #### Version 2.9.52 (November 20, 2026)
43
+ - Nile KPI Chart and Nile Chart: CSS parts at every level. Every element of `nile-kpi-chart` is now a part (`base`, `header`, `label`, `value`, `prefix`, `suffix`, `trend` + `trend-up` / `trend-down` / `trend-neutral`, `forecast-*`, `description`, `sparkline`, `gauge`, …; `value-info` and `forecast` unchanged). `nile-chart` tags every embedded chart `part="chart <type>"` (`kpi-chart`, `bar-chart`, …) and re-exports the parts of embedded elements under a prefix: `kpi-*`, `master-detail-*`, `grid-*`, `filter-*`, `list-*`, `message-*` — e.g. `nile-chart::part(kpi-value)`. New `header-info-tooltip` part. No visual change (UIF-1433)
44
+ - Nile Master-Detail Chart: fine-grained navigator steps. `navigator-pan-step` sets how far ‹ / ›, ← / → and `panBy()` move (`25%` default, a fraction, data points such as `1pt`, or a datetime duration such as `1d`); `navigator-slider-step` makes the slider move in stops (`10%`, `1pt`, `1w`; empty stays smooth); `navigator-slider-live` moves the window while the thumb is dragged; `navigator-zoom-step` sets the + / − factor (default `2`). `panBy(direction, step?)` takes an optional one-off step. Changing any of them keeps the current window. Also `<nile-chart>` config keys (UIF-1433)
45
+
39
46
  #### Version 2.9.50 (November 20, 2026)
40
47
  - Nile Master-Detail Chart: the window slider and the ‹ / › pan buttons are back as independent opt-in properties, separate from the + / − control: `navigator-slider` and `navigator-pan-buttons` (`navigatorSlider` / `navigatorPanButtons` in `<nile-chart>` config). Either renders a bar under the master pane (‹ slider ›, each piece only when its property is on); use any combination with `navigator-controls`, which is unchanged. `navigator-default-window` now applies when any of the three is on. The slider is a `nile-slider`, so apps register `@aquera/nile-elements`. New CSS parts `navigator-bar`, `navigator-slider`, `navigator-pan-button` (UIF-1433)
41
48
 
@@ -19,6 +19,14 @@ export interface ChartMasterDetailConfigType {
19
19
  navigatorSlider?: boolean;
20
20
  /** ‹ / › pan buttons under the master pane. Independent of `navigatorControls`. */
21
21
  navigatorPanButtons?: boolean;
22
+ /** Pan distance: `25%` (default), a fraction (`0.5`), data points (`3pt`) or a datetime duration (`1d`). */
23
+ navigatorPanStep?: string;
24
+ /** Slider granularity: empty = smooth, `10%`, a fraction, data points (`1pt`) or a datetime duration (`1d`). */
25
+ navigatorSliderStep?: string;
26
+ /** Move the window while the slider thumb is dragged, not only on release. */
27
+ navigatorSliderLive?: boolean;
28
+ /** Zoom factor for + / − (default `2`). */
29
+ navigatorZoomStep?: number;
22
30
  /** Opening window with navigator controls: a fraction (`0.25`) or a duration (`7d`, `12h`, `30m`, `2w`). */
23
31
  navigatorDefaultWindow?: string;
24
32
  xAxisType?: MasterDetailXAxisType;
@@ -17,7 +17,7 @@ import type { RadarChartSeriesData } from '../nile-radar-chart/nile-radar-chart.
17
17
  import type { GaugeBand } from '../nile-gauge-chart/nile-gauge-chart.js';
18
18
  import type { WaterfallDataPoint } from '../nile-waterfall-chart/nile-waterfall-chart.js';
19
19
  import type { ForecastConfigFields, ForecastSeriesInput } from '../internal/utils/chart-forecast.js';
20
- import type { KpiVariant, KpiValueFormat, KpiNumberSystem, SparklineType, TrendDirection, KpiInfoPlacement } from '../nile-kpi-chart/nile-kpi-chart.js';
20
+ import type { KpiVariant, KpiValueFormat, KpiNumberSystem, SparklineType, TrendDirection, KpiInfoPlacement, KpiSparklinePosition } from '../nile-kpi-chart/nile-kpi-chart.js';
21
21
  import type { MapChartDataPoint } from '../nile-map-chart/nile-map-chart.js';
22
22
  import type { StatusLightConfig } from '../nile-chart-message/nile-chart-message.js';
23
23
  import type { ChartListVariant, ChartListItem, ChartListMarker } from '../nile-chart-list/nile-chart-list.js';
@@ -427,6 +427,14 @@ export interface NileMasterDetailChartConfig extends NileChartConfigBase {
427
427
  navigatorSlider?: boolean;
428
428
  /** ‹ / › pan buttons under the master pane. Independent of `navigatorControls`. */
429
429
  navigatorPanButtons?: boolean;
430
+ /** Pan distance: `25%` (default), a fraction (`0.5`), data points (`3pt`) or a datetime duration (`1d`). */
431
+ navigatorPanStep?: string;
432
+ /** Slider granularity: empty = smooth, `10%`, a fraction, data points (`1pt`) or a datetime duration (`1d`). */
433
+ navigatorSliderStep?: string;
434
+ /** Move the window while the slider thumb is dragged, not only on release. */
435
+ navigatorSliderLive?: boolean;
436
+ /** Zoom factor for + / − (default `2`). */
437
+ navigatorZoomStep?: number;
430
438
  /** Opening window with navigator controls: a fraction (`0.25`) or a duration (`7d`, `12h`, `30m`, `2w`). */
431
439
  navigatorDefaultWindow?: string;
432
440
  xAxisType?: 'datetime' | 'linear' | 'logarithmic' | 'category';
@@ -549,6 +557,8 @@ export interface NileKpiChartConfig extends NileChartConfigBase {
549
557
  sparklineHeight?: number;
550
558
  sparklineLineWidth?: number;
551
559
  sparklineMarkers?: boolean;
560
+ /** Compact variant: sparkline below the value or to its right (default: 'bottom'). */
561
+ sparklinePosition?: KpiSparklinePosition;
552
562
  gaugeValue?: number;
553
563
  gaugeMin?: number;
554
564
  gaugeMax?: number;
@@ -85,6 +85,18 @@ import '../nile-ai-panel/index.js';
85
85
  * @csspart menu-item - Any actions-menu item (also carries a kind-specific
86
86
  * sub-part: `type`, `custom`, `fullscreen`, `print`, `download-png`, `download-svg`, `download-csv`).
87
87
  * @csspart menu-item-glyph - Glyph inside an actions-menu item.
88
+ * @csspart header-info-tooltip - Tooltip wrapping the header info icon.
89
+ * @csspart chart - The embedded chart element, whatever the type. Also carries the type as a
90
+ * second name: `bar-chart`, `line-chart`, `kpi-chart`, `master-detail-chart`, `data-grid`, `filter-chart`,
91
+ * `chart-list`, `chart-message`, … (the tag without `nile-`), e.g. `nile-chart::part(kpi-chart)`.
92
+ * @csspart kpi-* - Every `nile-kpi-chart` part, prefixed: `kpi-base`, `kpi-header`, `kpi-label`,
93
+ * `kpi-value`, `kpi-trend`, `kpi-trend-up`, `kpi-sparkline`, `kpi-gauge`, … (see `nile-kpi-chart`).
94
+ * @csspart master-detail-* - Every `nile-master-detail-chart` part, prefixed: `master-detail-navigator`,
95
+ * `master-detail-navigator-bar`, `master-detail-navigator-slider`, …
96
+ * @csspart grid-* - Every `nile-data-grid` part, prefixed: `grid-header-row`, `grid-pagination`, …
97
+ * @csspart filter-* - `nile-filter-chart` parts: `filter-root`, `filter-group`, `filter-control`.
98
+ * @csspart list-* - `nile-chart-list` parts, prefixed: `list-item`, `list-label`, `list` …
99
+ * @csspart message-* - `nile-chart-message` parts, prefixed: `message-section__heading`, …
88
100
  */
89
101
  export declare class NileChart extends NileElement {
90
102
  static styles: CSSResultGroup;
@@ -68,6 +68,10 @@ import '../nile-filter-chart/index.js';
68
68
  import '../nile-chart-message/nile-chart-message.js';
69
69
  import '../nile-chart-list/nile-chart-list.js';
70
70
  import '../nile-ai-panel/index.js';
71
+ // Embedded charts with parts of their own get a static `exportparts` list in the template below, re-exporting
72
+ // each part from <nile-chart> under a prefix (`header` → `kpi-header`), so `nile-chart::part(kpi-header)` reaches
73
+ // inside and never collides with nile-chart's own parts. Names already starting with the prefix keep their name.
74
+ // Static text (not computed) so nile-lint's manifest builder can read it; tests check the lists stay complete.
71
75
  const CORE_CHART_LABELS = {
72
76
  bar: 'Bar',
73
77
  pie: 'Pie',
@@ -166,6 +170,18 @@ function ensureHeaderTooltipStyles() {
166
170
  * @csspart menu-item - Any actions-menu item (also carries a kind-specific
167
171
  * sub-part: `type`, `custom`, `fullscreen`, `print`, `download-png`, `download-svg`, `download-csv`).
168
172
  * @csspart menu-item-glyph - Glyph inside an actions-menu item.
173
+ * @csspart header-info-tooltip - Tooltip wrapping the header info icon.
174
+ * @csspart chart - The embedded chart element, whatever the type. Also carries the type as a
175
+ * second name: `bar-chart`, `line-chart`, `kpi-chart`, `master-detail-chart`, `data-grid`, `filter-chart`,
176
+ * `chart-list`, `chart-message`, … (the tag without `nile-`), e.g. `nile-chart::part(kpi-chart)`.
177
+ * @csspart kpi-* - Every `nile-kpi-chart` part, prefixed: `kpi-base`, `kpi-header`, `kpi-label`,
178
+ * `kpi-value`, `kpi-trend`, `kpi-trend-up`, `kpi-sparkline`, `kpi-gauge`, … (see `nile-kpi-chart`).
179
+ * @csspart master-detail-* - Every `nile-master-detail-chart` part, prefixed: `master-detail-navigator`,
180
+ * `master-detail-navigator-bar`, `master-detail-navigator-slider`, …
181
+ * @csspart grid-* - Every `nile-data-grid` part, prefixed: `grid-header-row`, `grid-pagination`, …
182
+ * @csspart filter-* - `nile-filter-chart` parts: `filter-root`, `filter-group`, `filter-control`.
183
+ * @csspart list-* - `nile-chart-list` parts, prefixed: `list-item`, `list-label`, `list` …
184
+ * @csspart message-* - `nile-chart-message` parts, prefixed: `message-section__heading`, …
169
185
  */
170
186
  let NileChart = NileChart_1 = class NileChart extends NileElement {
171
187
  constructor() {
@@ -910,7 +926,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
910
926
  if (!info)
911
927
  return nothing;
912
928
  const size = this.headerInfo('chartInfoIconSize');
913
- return html `<nile-lite-tooltip class="nile-chart-header-info-tip" content=${info} placement="top"><span
929
+ return html `<nile-lite-tooltip part="header-info-tooltip" class="nile-chart-header-info-tip" content=${info} placement="top"><span
914
930
  class="nile-chart-header-info"
915
931
  part="header-info"
916
932
  role="img"
@@ -1112,6 +1128,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1112
1128
  switch (config.type) {
1113
1129
  case 'bar':
1114
1130
  return html `<nile-bar-chart
1131
+ part="chart bar-chart"
1115
1132
  .data=${config.data}
1116
1133
  .categories=${config.categories ?? []}
1117
1134
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1133,6 +1150,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1133
1150
  ></nile-bar-chart>`;
1134
1151
  case 'pie':
1135
1152
  return html `<nile-pie-chart
1153
+ part="chart pie-chart"
1136
1154
  .data=${config.data}
1137
1155
  .seriesName=${config.seriesName ?? ''}
1138
1156
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1154,6 +1172,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1154
1172
  ></nile-pie-chart>`;
1155
1173
  case 'trendline':
1156
1174
  return html `<nile-trendline-chart
1175
+ part="chart trendline-chart"
1157
1176
  .data=${config.data}
1158
1177
  .categories=${config.categories ?? []}
1159
1178
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1177,6 +1196,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1177
1196
  ></nile-trendline-chart>`;
1178
1197
  case 'anomaly':
1179
1198
  return html `<nile-anomaly-chart
1199
+ part="chart anomaly-chart"
1180
1200
  .data=${config.data}
1181
1201
  .categories=${config.categories ?? []}
1182
1202
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1200,6 +1220,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1200
1220
  ></nile-anomaly-chart>`;
1201
1221
  case 'line':
1202
1222
  return html `<nile-line-chart
1223
+ part="chart line-chart"
1203
1224
  .data=${config.data}
1204
1225
  .categories=${config.categories ?? []}
1205
1226
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1230,6 +1251,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1230
1251
  ></nile-line-chart>`;
1231
1252
  case 'area':
1232
1253
  return html `<nile-area-chart
1254
+ part="chart area-chart"
1233
1255
  .data=${config.data}
1234
1256
  .categories=${config.categories ?? []}
1235
1257
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1262,6 +1284,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1262
1284
  ></nile-area-chart>`;
1263
1285
  case 'column':
1264
1286
  return html `<nile-column-chart
1287
+ part="chart column-chart"
1265
1288
  .data=${config.data}
1266
1289
  .categories=${config.categories ?? []}
1267
1290
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1292,6 +1315,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1292
1315
  ></nile-column-chart>`;
1293
1316
  case 'donut':
1294
1317
  return html `<nile-donut-chart
1318
+ part="chart donut-chart"
1295
1319
  .data=${config.data}
1296
1320
  .seriesName=${config.seriesName ?? ''}
1297
1321
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1316,6 +1340,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1316
1340
  ></nile-donut-chart>`;
1317
1341
  case 'scatter':
1318
1342
  return html `<nile-scatter-chart
1343
+ part="chart scatter-chart"
1319
1344
  .data=${config.data}
1320
1345
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1321
1346
  .xAxisTitle=${config.xAxisTitle ?? ''}
@@ -1338,6 +1363,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1338
1363
  ></nile-scatter-chart>`;
1339
1364
  case 'bubble':
1340
1365
  return html `<nile-bubble-chart
1366
+ part="chart bubble-chart"
1341
1367
  .data=${config.data}
1342
1368
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1343
1369
  .xAxisTitle=${config.xAxisTitle ?? ''}
@@ -1360,6 +1386,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1360
1386
  ></nile-bubble-chart>`;
1361
1387
  case 'spline':
1362
1388
  return html `<nile-spline-chart
1389
+ part="chart spline-chart"
1363
1390
  .data=${config.data}
1364
1391
  .categories=${config.categories ?? []}
1365
1392
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1390,6 +1417,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1390
1417
  ></nile-spline-chart>`;
1391
1418
  case 'radar':
1392
1419
  return html `<nile-radar-chart
1420
+ part="chart radar-chart"
1393
1421
  .data=${config.data}
1394
1422
  .categories=${config.categories ?? []}
1395
1423
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1412,6 +1440,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1412
1440
  ></nile-radar-chart>`;
1413
1441
  case 'gauge':
1414
1442
  return html `<nile-gauge-chart
1443
+ part="chart gauge-chart"
1415
1444
  .value=${config.value}
1416
1445
  .min=${config.min ?? 0}
1417
1446
  .max=${config.max ?? 100}
@@ -1436,6 +1465,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1436
1465
  ></nile-gauge-chart>`;
1437
1466
  case 'waterfall':
1438
1467
  return html `<nile-waterfall-chart
1468
+ part="chart waterfall-chart"
1439
1469
  .data=${config.data}
1440
1470
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1441
1471
  .yAxisTitle=${config.yAxisTitle ?? ''}
@@ -1457,6 +1487,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1457
1487
  ></nile-waterfall-chart>`;
1458
1488
  case 'map':
1459
1489
  return html `<nile-map-chart
1490
+ part="chart map-chart"
1460
1491
  .data=${config.data}
1461
1492
  .mapData=${config.mapData ?? null}
1462
1493
  .joinBy=${config.joinBy ?? ['hc-key', 'hc-key']}
@@ -1481,6 +1512,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1481
1512
  ></nile-map-chart>`;
1482
1513
  case 'stacked':
1483
1514
  return html `<nile-stacked-chart
1515
+ part="chart stacked-chart"
1484
1516
  .data=${config.data}
1485
1517
  .categories=${config.categories ?? []}
1486
1518
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1505,6 +1537,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1505
1537
  ></nile-stacked-chart>`;
1506
1538
  case 'cluster':
1507
1539
  return html `<nile-cluster-chart
1540
+ part="chart cluster-chart"
1508
1541
  .data=${config.data}
1509
1542
  .categories=${config.categories ?? []}
1510
1543
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1529,6 +1562,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1529
1562
  ></nile-cluster-chart>`;
1530
1563
  case 'histogram':
1531
1564
  return html `<nile-histogram-chart
1565
+ part="chart histogram-chart"
1532
1566
  .data=${config.data}
1533
1567
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1534
1568
  .xAxisTitle=${config.xAxisTitle ?? ''}
@@ -1556,6 +1590,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1556
1590
  ></nile-histogram-chart>`;
1557
1591
  case 'bellcurve':
1558
1592
  return html `<nile-bellcurve-chart
1593
+ part="chart bellcurve-chart"
1559
1594
  .data=${config.data}
1560
1595
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1561
1596
  .xAxisTitle=${config.xAxisTitle ?? ''}
@@ -1584,6 +1619,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1584
1619
  ></nile-bellcurve-chart>`;
1585
1620
  case 'boxplot':
1586
1621
  return html `<nile-boxplot-chart
1622
+ part="chart boxplot-chart"
1587
1623
  .data=${config.data}
1588
1624
  .categories=${config.categories ?? []}
1589
1625
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1608,6 +1644,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1608
1644
  ></nile-boxplot-chart>`;
1609
1645
  case 'timeline':
1610
1646
  return html `<nile-timeline-chart
1647
+ part="chart timeline-chart"
1611
1648
  .data=${config.data}
1612
1649
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1613
1650
  .seriesName=${config.seriesName ?? ''}
@@ -1632,6 +1669,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1632
1669
  ></nile-timeline-chart>`;
1633
1670
  case 'master-detail':
1634
1671
  return html `<nile-master-detail-chart
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"
1635
1674
  .data=${config.data ?? []}
1636
1675
  .series=${config.series ?? []}
1637
1676
  .stacking=${config.stacking ?? ''}
@@ -1645,6 +1684,10 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1645
1684
  .navigatorControls=${config.navigatorControls ?? false}
1646
1685
  .navigatorSlider=${config.navigatorSlider ?? false}
1647
1686
  .navigatorPanButtons=${config.navigatorPanButtons ?? false}
1687
+ .navigatorPanStep=${config.navigatorPanStep ?? '25%'}
1688
+ .navigatorSliderStep=${config.navigatorSliderStep ?? ''}
1689
+ .navigatorSliderLive=${config.navigatorSliderLive ?? false}
1690
+ .navigatorZoomStep=${config.navigatorZoomStep ?? 2}
1648
1691
  .navigatorDefaultWindow=${config.navigatorDefaultWindow ?? ''}
1649
1692
  .xAxisType=${config.xAxisType ?? 'datetime'}
1650
1693
  .xAxisMin=${config.xAxisMin ?? null}
@@ -1677,6 +1720,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1677
1720
  ></nile-master-detail-chart>`;
1678
1721
  case 'dumbbell':
1679
1722
  return html `<nile-dumbbell-chart
1723
+ part="chart dumbbell-chart"
1680
1724
  .data=${config.data}
1681
1725
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1682
1726
  .yAxisTitle=${config.yAxisTitle ?? ''}
@@ -1702,6 +1746,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1702
1746
  ></nile-dumbbell-chart>`;
1703
1747
  case 'dumbbellLower':
1704
1748
  return html `<nile-dumbbell-lower-chart
1749
+ part="chart dumbbell-lower-chart"
1705
1750
  .data=${config.data}
1706
1751
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1707
1752
  .yAxisTitle=${config.yAxisTitle ?? ''}
@@ -1727,6 +1772,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1727
1772
  ></nile-dumbbell-lower-chart>`;
1728
1773
  case 'dumbbellUpper':
1729
1774
  return html `<nile-dumbbell-upper-chart
1775
+ part="chart dumbbell-upper-chart"
1730
1776
  .data=${config.data}
1731
1777
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1732
1778
  .yAxisTitle=${config.yAxisTitle ?? ''}
@@ -1752,6 +1798,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1752
1798
  ></nile-dumbbell-upper-chart>`;
1753
1799
  case 'fan':
1754
1800
  return html `<nile-fan-chart
1801
+ part="chart fan-chart"
1755
1802
  .lineData=${config.lineData}
1756
1803
  .bands=${config.bands}
1757
1804
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1778,6 +1825,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1778
1825
  ></nile-fan-chart>`;
1779
1826
  case 'funnel':
1780
1827
  return html `<nile-funnel-chart
1828
+ part="chart funnel-chart"
1781
1829
  .data=${config.data}
1782
1830
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
1783
1831
  .seriesName=${config.seriesName ?? ''}
@@ -1800,6 +1848,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1800
1848
  ></nile-funnel-chart>`;
1801
1849
  case 'organization':
1802
1850
  return html `<nile-organization-chart
1851
+ part="chart organization-chart"
1803
1852
  .nodes=${config.nodes}
1804
1853
  .links=${config.links}
1805
1854
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1823,6 +1872,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1823
1872
  ></nile-organization-chart>`;
1824
1873
  case 'line-column':
1825
1874
  return html `<nile-line-column-chart
1875
+ part="chart line-column-chart"
1826
1876
  .categories=${config.categories}
1827
1877
  .columnSeries=${config.columnSeries}
1828
1878
  .lineSeries=${config.lineSeries}
@@ -1847,6 +1897,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1847
1897
  ></nile-line-column-chart>`;
1848
1898
  case 'heatmap':
1849
1899
  return html `<nile-heatmap-chart
1900
+ part="chart heatmap-chart"
1850
1901
  .xCategories=${config.xCategories}
1851
1902
  .yCategories=${config.yCategories}
1852
1903
  .data=${config.data}
@@ -1876,6 +1927,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1876
1927
  ></nile-heatmap-chart>`;
1877
1928
  case 'flame':
1878
1929
  return html `<nile-flame-chart
1930
+ part="chart flame-chart"
1879
1931
  .layout=${config.layout ?? 'flame'}
1880
1932
  .data=${config.data ?? []}
1881
1933
  .sunburstData=${config.sunburstData ?? []}
@@ -1898,6 +1950,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1898
1950
  ></nile-flame-chart>`;
1899
1951
  case 'spiderweb':
1900
1952
  return html `<nile-spiderweb-chart
1953
+ part="chart spiderweb-chart"
1901
1954
  .data=${config.data}
1902
1955
  .categories=${config.categories ?? []}
1903
1956
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1920,6 +1973,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1920
1973
  ></nile-spiderweb-chart>`;
1921
1974
  case 'invertedArea':
1922
1975
  return html `<nile-inverted-area-chart
1976
+ part="chart inverted-area-chart"
1923
1977
  .data=${config.data}
1924
1978
  .categories=${config.categories ?? []}
1925
1979
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1943,6 +1997,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1943
1997
  ></nile-inverted-area-chart>`;
1944
1998
  case 'columnPyramid':
1945
1999
  return html `<nile-column-pyramid-chart
2000
+ part="chart column-pyramid-chart"
1946
2001
  .data=${config.data}
1947
2002
  .categories=${config.categories ?? []}
1948
2003
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1964,6 +2019,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1964
2019
  ></nile-column-pyramid-chart>`;
1965
2020
  case 'lollipop':
1966
2021
  return html `<nile-lollipop-chart
2022
+ part="chart lollipop-chart"
1967
2023
  .data=${config.data}
1968
2024
  .categories=${config.categories ?? []}
1969
2025
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -1985,6 +2041,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
1985
2041
  ></nile-lollipop-chart>`;
1986
2042
  case 'areaSpline':
1987
2043
  return html `<nile-area-spline-chart
2044
+ part="chart area-spline-chart"
1988
2045
  .data=${config.data}
1989
2046
  .categories=${config.categories ?? []}
1990
2047
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2017,6 +2074,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2017
2074
  ></nile-area-spline-chart>`;
2018
2075
  case 'areaNegative':
2019
2076
  return html `<nile-area-negative-chart
2077
+ part="chart area-negative-chart"
2020
2078
  .data=${config.data}
2021
2079
  .categories=${config.categories ?? []}
2022
2080
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2040,6 +2098,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2040
2098
  ></nile-area-negative-chart>`;
2041
2099
  case 'areaRange':
2042
2100
  return html `<nile-area-range-chart
2101
+ part="chart area-range-chart"
2043
2102
  .data=${config.data}
2044
2103
  .categories=${config.categories ?? []}
2045
2104
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2062,6 +2121,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2062
2121
  ></nile-area-range-chart>`;
2063
2122
  case 'columnRange':
2064
2123
  return html `<nile-column-range-chart
2124
+ part="chart column-range-chart"
2065
2125
  .data=${config.data}
2066
2126
  .categories=${config.categories ?? []}
2067
2127
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2084,6 +2144,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2084
2144
  ></nile-column-range-chart>`;
2085
2145
  case 'columnDrilldown':
2086
2146
  return html `<nile-column-drilldown-chart
2147
+ part="chart column-drilldown-chart"
2087
2148
  .data=${config.data}
2088
2149
  .drilldown=${config.drilldown}
2089
2150
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2107,6 +2168,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2107
2168
  ></nile-column-drilldown-chart>`;
2108
2169
  case 'radialBar':
2109
2170
  return html `<nile-radial-bar-chart
2171
+ part="chart radial-bar-chart"
2110
2172
  .data=${config.data}
2111
2173
  .categories=${config.categories}
2112
2174
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2131,6 +2193,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2131
2193
  ></nile-radial-bar-chart>`;
2132
2194
  case 'variablePie':
2133
2195
  return html `<nile-variable-pie-chart
2196
+ part="chart variable-pie-chart"
2134
2197
  .data=${config.data}
2135
2198
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
2136
2199
  .seriesName=${config.seriesName ?? ''}
@@ -2153,6 +2216,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2153
2216
  ></nile-variable-pie-chart>`;
2154
2217
  case 'euler':
2155
2218
  return html `<nile-euler-chart
2219
+ part="chart euler-chart"
2156
2220
  .data=${config.data}
2157
2221
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
2158
2222
  .showLegend=${config.legend?.show ?? true}
@@ -2173,6 +2237,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2173
2237
  ></nile-euler-chart>`;
2174
2238
  case 'polygon':
2175
2239
  return html `<nile-polygon-chart
2240
+ part="chart polygon-chart"
2176
2241
  .series=${config.series}
2177
2242
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
2178
2243
  .xAxisTitle=${config.xAxisTitle ?? ''}
@@ -2195,6 +2260,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2195
2260
  ></nile-polygon-chart>`;
2196
2261
  case 'vector':
2197
2262
  return html `<nile-vector-chart
2263
+ part="chart vector-chart"
2198
2264
  .data=${config.data}
2199
2265
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
2200
2266
  .seriesName=${config.seriesName ?? ''}
@@ -2218,6 +2284,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2218
2284
  ></nile-vector-chart>`;
2219
2285
  case 'xrange':
2220
2286
  return html `<nile-xrange-chart
2287
+ part="chart xrange-chart"
2221
2288
  .data=${config.data}
2222
2289
  .categories=${config.categories}
2223
2290
  .height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
@@ -2243,6 +2310,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2243
2310
  const k = config;
2244
2311
  const kpiOptions = deepMerge(k.options ?? {}, this.buildExportingOptions());
2245
2312
  return html `<nile-kpi-chart
2313
+ part="chart kpi-chart"
2314
+ exportparts="base: kpi-base, loading: kpi-loading, header: kpi-header, label-tooltip: kpi-label-tooltip, label: kpi-label, label-text: kpi-label-text, header-controls: kpi-header-controls, header-lead: kpi-header-lead, header-actions: kpi-header-actions, trend-row: kpi-trend-row, trend-tooltip: kpi-trend-tooltip, trend: kpi-trend, trend-up: kpi-trend-up, trend-down: kpi-trend-down, trend-neutral: kpi-trend-neutral, trend-arrow: kpi-trend-arrow, trend-value: kpi-trend-value, trend-label: kpi-trend-label, value-row: kpi-value-row, value-group: kpi-value-group, value-tooltip: kpi-value-tooltip, value: kpi-value, prefix: kpi-prefix, suffix: kpi-suffix, value-info-tooltip: kpi-value-info-tooltip, value-info: kpi-value-info, value-info-icon: kpi-value-info-icon, forecast: kpi-forecast, forecast-glyph: kpi-forecast-glyph, forecast-value: kpi-forecast-value, forecast-prefix: kpi-forecast-prefix, forecast-suffix: kpi-forecast-suffix, forecast-label: kpi-forecast-label, description-tooltip: kpi-description-tooltip, description: kpi-description, sparkline: kpi-sparkline, gauge-slot: kpi-gauge-slot, gauge: kpi-gauge"
2246
2315
  embed-in-nile-chart
2247
2316
  ?fit=${this.hasAttribute('fit')}
2248
2317
  .config=${{
@@ -2271,6 +2340,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2271
2340
  sparklineMarkers: k.sparklineMarkers,
2272
2341
  sparklineHeight: k.sparklineHeight,
2273
2342
  sparklineLineWidth: k.sparklineLineWidth,
2343
+ sparklinePosition: k.sparklinePosition,
2274
2344
  gaugeValue: k.gaugeValue,
2275
2345
  gaugeMin: k.gaugeMin,
2276
2346
  gaugeMax: k.gaugeMax,
@@ -2339,6 +2409,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2339
2409
  // nile-row-selection-change, …) are composed + bubbling, so they cross the
2340
2410
  // shadow boundary and reach listeners on <nile-chart> without re-emitting.
2341
2411
  return html `<nile-data-grid
2412
+ part="chart data-grid"
2413
+ exportparts="filter-input: grid-filter-input, filter-panel: grid-filter-panel, filter-panel-row: grid-filter-panel-row, filter-trigger: grid-filter-trigger, header-inner: grid-header-inner, header-label: grid-header-label, header-row: grid-header-row, pagination: grid-pagination, placeholder-row: grid-placeholder-row, resizer: grid-resizer, scroll-container: grid-scroll-container, skeleton-body: grid-skeleton-body, sort-indicator: grid-sort-indicator, table-data: grid-table-data, virtual-spacer: grid-virtual-spacer"
2342
2414
  class="nile-chart-grid"
2343
2415
  .data=${config.data}
2344
2416
  .columns=${config.columns}
@@ -2384,6 +2456,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2384
2456
  ? { ...config, controls: config.controls.map(c => ({ ...c, aiBorder: c.aiBorder ?? true })) }
2385
2457
  : config;
2386
2458
  return html `<nile-filter-chart
2459
+ part="chart filter-chart"
2460
+ exportparts="filter-control: filter-control, filter-group: filter-group, filter-root: filter-root"
2387
2461
  .config=${{ chart: filterConfig }}
2388
2462
  ?no-padding=${this.noPadding}
2389
2463
  @nile-change="${(e) => this.emit('nile-change', e.detail)}"
@@ -2391,6 +2465,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2391
2465
  }
2392
2466
  case 'message': {
2393
2467
  return html `<nile-chart-message
2468
+ part="chart chart-message"
2469
+ exportparts="content__wrapper: message-content__wrapper, icon__wrapper: message-icon__wrapper, parent__wrapper: message-parent__wrapper, section__description: message-section__description, section__heading: message-section__heading"
2394
2470
  variant=${config.variant ?? 'info'}
2395
2471
  heading=${config.heading ?? ''}
2396
2472
  description=${config.description ?? ''}
@@ -2400,6 +2476,8 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
2400
2476
  }
2401
2477
  case 'list': {
2402
2478
  return html `<nile-chart-list
2479
+ part="chart chart-list"
2480
+ exportparts="description: list-description, item: list-item, item-content: list-item-content, label: list-label, list: list, marker: list-marker, sub-label: list-sub-label"
2403
2481
  .config=${{
2404
2482
  list: {
2405
2483
  variant: config.variant,
@@ -993,6 +993,42 @@ export const styles = css `
993
993
  display: inline-flex;
994
994
  }
995
995
 
996
+ /* Compact, sparkline on the right: a small card with the chart beside the value. */
997
+ :host([variant='compact'][sparkline-position='right']) {
998
+ --nile-kpi-value-font-size: clamp(24px, 12cqi, 32px);
999
+ min-height: 0;
1000
+ }
1001
+
1002
+ :host([variant='compact'][sparkline-position='right'][has-sparkline]:not([embed-in-nile-chart])) {
1003
+ border-width: var(--nile-kpi-card-border-width);
1004
+ box-shadow: var(--nile-kpi-card-shadow);
1005
+ }
1006
+
1007
+ :host([variant='compact'][sparkline-position='right'][has-sparkline]:not([embed-in-nile-chart]):hover) {
1008
+ box-shadow: var(--nile-kpi-card-shadow-hover);
1009
+ }
1010
+
1011
+ :host([sparkline-position='right']) .kpi--compact .kpi-value-row {
1012
+ align-items: flex-end;
1013
+ justify-content: space-between;
1014
+ }
1015
+
1016
+ :host([sparkline-position='right']) .kpi--compact .kpi-value-group {
1017
+ flex: 0 1 auto;
1018
+ min-width: 0;
1019
+ }
1020
+
1021
+ :host([sparkline-position='right']) .kpi--compact .kpi-sparkline {
1022
+ flex: 0 1 45%;
1023
+ width: auto;
1024
+ max-width: 120px;
1025
+ min-width: 48px;
1026
+ height: 32px;
1027
+ min-height: 0;
1028
+ max-height: 32px;
1029
+ margin: 0;
1030
+ }
1031
+
996
1032
  /* 1. The sparkline stays at every size; it only goes when the card is too short for anything else. */
997
1033
  @container (max-height: 72px) {
998
1034
  :host([variant='compact']) .kpi-sparkline {