@aquera/nile-visualization 1.2.0 → 1.4.0

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.
@@ -13,6 +13,7 @@ import type { ChartRadarConfigType } from './chart-radar-config.type.js';
13
13
  import type { ChartGaugeConfigType } from './chart-gauge-config.type.js';
14
14
  import type { ChartWaterfallConfigType } from './chart-waterfall-config.type.js';
15
15
  import type { ChartMapConfigType } from './chart-map-config.type.js';
16
+ import type { ChartGridConfigType } from './chart-grid-config.type.js';
16
17
  import type { PrimitiveChartConfigType } from './primitive-chart-config.type.js';
17
18
  /** Core chart configs (bar, pie, …) plus all primitive series types — use with `<nile-chart>` via `chart.type`. */
18
- export type ChartConfigType = ChartBarConfigType | ChartPieConfigType | ChartTrendlineConfigType | ChartAnomalyConfigType | ChartLineConfigType | ChartAreaConfigType | ChartColumnConfigType | ChartDonutConfigType | ChartScatterConfigType | ChartBubbleConfigType | ChartSplineConfigType | ChartRadarConfigType | ChartGaugeConfigType | ChartWaterfallConfigType | ChartMapConfigType | PrimitiveChartConfigType;
19
+ export type ChartConfigType = ChartBarConfigType | ChartPieConfigType | ChartTrendlineConfigType | ChartAnomalyConfigType | ChartLineConfigType | ChartAreaConfigType | ChartColumnConfigType | ChartDonutConfigType | ChartScatterConfigType | ChartBubbleConfigType | ChartSplineConfigType | ChartRadarConfigType | ChartGaugeConfigType | ChartWaterfallConfigType | ChartMapConfigType | ChartGridConfigType | PrimitiveChartConfigType;
@@ -0,0 +1,16 @@
1
+ import type { Options } from 'highcharts';
2
+ import type { NileDataGridColumn } from '@aquera/nile-data-grid';
3
+ /** Tabular grid variant of `<nile-chart>`, renders a `<nile-data-grid>`. */
4
+ export interface ChartGridConfigType {
5
+ type: 'grid';
6
+ data: unknown[];
7
+ columns: NileDataGridColumn[];
8
+ loading?: boolean;
9
+ striped?: boolean;
10
+ hoverable?: boolean;
11
+ emptyMessage?: string;
12
+ loadingMessage?: string;
13
+ noMatchMessage?: string;
14
+ height?: string;
15
+ options?: Options;
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=chart-grid-config.type.js.map
@@ -16,6 +16,7 @@ import type { RadarChartSeriesData } from '../nile-radar-chart/nile-radar-chart.
16
16
  import type { GaugeBand } from '../nile-gauge-chart/nile-gauge-chart.js';
17
17
  import type { WaterfallDataPoint } from '../nile-waterfall-chart/nile-waterfall-chart.js';
18
18
  import type { MapChartDataPoint } from '../nile-map-chart/nile-map-chart.js';
19
+ import type { NileDataGridColumn } from '@aquera/nile-data-grid';
19
20
  export type SwitchAggregation = 'by-category' | 'by-series' | 'flatten';
20
21
  export interface NileAiConfig {
21
22
  /** Show the AI chat icon on the chart. Default: false. */
@@ -157,6 +158,16 @@ export interface NileMapChartConfig extends NileChartConfigBase {
157
158
  /** Enable mouse-wheel zoom, double-click zoom, and +/− buttons. Default: true. */
158
159
  zoom?: boolean;
159
160
  }
161
+ export interface NileGridChartConfig extends NileChartConfigBase {
162
+ type: 'grid';
163
+ data: unknown[];
164
+ columns: NileDataGridColumn[];
165
+ striped?: boolean;
166
+ hoverable?: boolean;
167
+ emptyMessage?: string;
168
+ loadingMessage?: string;
169
+ noMatchMessage?: string;
170
+ }
160
171
  /** Flat config for `<nile-chart>`: discriminated `chart` fields plus merged `aq` / card chrome. */
161
172
  export type NileChartConfig = ChartConfigType & NileChartConfigBase;
162
173
  export type NileKpiChartConfig = Extract<NileChartConfig, {
@@ -278,38 +278,37 @@ export const styles = css `
278
278
  /* ── AI Chat Trigger (in header) ── */
279
279
 
280
280
  .ai-trigger {
281
- display: flex;
281
+ display: inline-flex;
282
282
  align-items: center;
283
283
  justify-content: center;
284
- width: var(--nile-width-28px, var(--ng-height-28px));
285
- height: var(--nile-width-28px, var(--ng-height-28px));
284
+ width: 28px;
285
+ height: 28px;
286
286
  padding: 0;
287
- border: none;
288
- border-radius: var(--nile-radius-radius-lg, var(--ng-radius-sm));
289
- background: transparent;
290
- color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
287
+ border-radius: var(--ng-radius-md, 10px);
288
+ background: var(--ng-componentcolors-utility-brand-50, #EFF4FF);
289
+ border: 1.5px solid var(--ng-componentcolors-utility-brand-200, #C7D7FE);
290
+ box-shadow: 0 4px 20px rgba(41, 112, 255, 0.12);
291
+ color: var(--ng-componentcolors-utility-brand-600, #2970FF);
291
292
  cursor: pointer;
292
- transition: background var(--nile-transition-duration-short, var(--ng-transition-duration-fast)) ease, color var(--nile-transition-duration-short, var(--ng-transition-duration-fast)) ease;
293
+ transition: background 150ms ease;
294
+ flex-shrink: 0;
295
+ outline: none;
293
296
  }
294
297
 
295
- .ai-trigger:hover {
296
- background: transparent;
297
- color: var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));
298
+ .ai-trigger:hover,
299
+ .ai-trigger:focus-visible {
300
+ background: var(--ng-componentcolors-utility-brand-100, #DBE8FF);
298
301
  }
302
+
299
303
  .chart-inner--kpi {
300
304
  overflow-x: hidden;
301
305
  overflow-y: auto;
302
306
  -webkit-overflow-scrolling: touch;
303
307
  contain: none;
304
308
  }
305
- .ai-trigger.active {
306
- background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary));
307
- color: var(--nile-colors-primary-700, var(--ng-colors-bg-brand-solid-hover));
308
- }
309
309
 
310
- .ai-trigger:focus-visible {
311
- outline: var(--nile-border-width-2, var(--ng-stroke-width-2)) solid var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));
312
- outline-offset: var(--nile-spacing-1px, var(--ng-outline-offset-1));
310
+ .ai-trigger.active {
311
+ background: var(--ng-componentcolors-utility-brand-100, #DBE8FF);
313
312
  }
314
313
 
315
314
  /* ── AI Chat Panel Overlay ── */
@@ -48,6 +48,7 @@ import '../nile-polygon-chart/index.js';
48
48
  import '../nile-vector-chart/index.js';
49
49
  import '../nile-xrange-chart/index.js';
50
50
  import '../nile-kpi-chart/index.js';
51
+ import '@aquera/nile-data-grid';
51
52
  import '../nile-ai-panel/index.js';
52
53
  export declare class NileChart extends NileElement {
53
54
  static styles: CSSResultGroup;
@@ -51,6 +51,7 @@ import '../nile-polygon-chart/index.js';
51
51
  import '../nile-vector-chart/index.js';
52
52
  import '../nile-xrange-chart/index.js';
53
53
  import '../nile-kpi-chart/index.js';
54
+ import '@aquera/nile-data-grid';
54
55
  import '../nile-ai-panel/index.js';
55
56
  const CORE_CHART_LABELS = {
56
57
  bar: 'Bar',
@@ -88,6 +89,7 @@ const CORE_CHART_LABELS = {
88
89
  lollipop: 'Lollipop',
89
90
  'line-column': 'Line + column',
90
91
  kpi: 'KPI',
92
+ grid: 'Grid',
91
93
  };
92
94
  function chartTypeLabel(type) {
93
95
  const hit = CORE_CHART_LABELS[type];
@@ -331,6 +333,7 @@ let NileChart = class NileChart extends NileElement {
331
333
  >
332
334
  <nile-glyph name="smart-code" size="16"></nile-glyph>
333
335
  </button>
336
+ <slot name="ai-trigger-after"></slot>
334
337
  `;
335
338
  }
336
339
  renderHeader() {
@@ -390,7 +393,7 @@ let NileChart = class NileChart extends NileElement {
390
393
  return html `<nile-bar-chart
391
394
  .data=${config.data}
392
395
  .categories=${config.categories ?? []}
393
- .height=${config.height ?? '400px'}
396
+ .height=${config.height ?? '100%'}
394
397
  .yAxisTitle=${config.yAxisTitle ?? ''}
395
398
  .options=${mergedOptions}
396
399
  .loading=${config.loading ?? false}
@@ -399,7 +402,7 @@ let NileChart = class NileChart extends NileElement {
399
402
  return html `<nile-pie-chart
400
403
  .data=${config.data}
401
404
  .seriesName=${config.seriesName ?? ''}
402
- .height=${config.height ?? '400px'}
405
+ .height=${config.height ?? '100%'}
403
406
  .showDataLabels=${config.showDataLabels ?? true}
404
407
  .showLegend=${config.showLegend ?? true}
405
408
  .options=${mergedOptions}
@@ -409,7 +412,7 @@ let NileChart = class NileChart extends NileElement {
409
412
  return html `<nile-trendline-chart
410
413
  .data=${config.data}
411
414
  .categories=${config.categories ?? []}
412
- .height=${config.height ?? '400px'}
415
+ .height=${config.height ?? '100%'}
413
416
  .yAxisTitle=${config.yAxisTitle ?? ''}
414
417
  .forecast=${config.forecast ?? null}
415
418
  .options=${mergedOptions}
@@ -419,7 +422,7 @@ let NileChart = class NileChart extends NileElement {
419
422
  return html `<nile-anomaly-chart
420
423
  .data=${config.data}
421
424
  .categories=${config.categories ?? []}
422
- .height=${config.height ?? '400px'}
425
+ .height=${config.height ?? '100%'}
423
426
  .yAxisTitle=${config.yAxisTitle ?? ''}
424
427
  .anomaly=${config.anomaly ?? {}}
425
428
  .options=${mergedOptions}
@@ -429,7 +432,7 @@ let NileChart = class NileChart extends NileElement {
429
432
  return html `<nile-line-chart
430
433
  .data=${config.data}
431
434
  .categories=${config.categories ?? []}
432
- .height=${config.height ?? '400px'}
435
+ .height=${config.height ?? '100%'}
433
436
  .yAxisTitle=${config.yAxisTitle ?? ''}
434
437
  .options=${mergedOptions}
435
438
  .loading=${config.loading ?? false}
@@ -438,7 +441,7 @@ let NileChart = class NileChart extends NileElement {
438
441
  return html `<nile-area-chart
439
442
  .data=${config.data}
440
443
  .categories=${config.categories ?? []}
441
- .height=${config.height ?? '400px'}
444
+ .height=${config.height ?? '100%'}
442
445
  .yAxisTitle=${config.yAxisTitle ?? ''}
443
446
  .stacked=${config.stacked ?? false}
444
447
  .options=${mergedOptions}
@@ -448,7 +451,7 @@ let NileChart = class NileChart extends NileElement {
448
451
  return html `<nile-column-chart
449
452
  .data=${config.data}
450
453
  .categories=${config.categories ?? []}
451
- .height=${config.height ?? '400px'}
454
+ .height=${config.height ?? '100%'}
452
455
  .yAxisTitle=${config.yAxisTitle ?? ''}
453
456
  .options=${mergedOptions}
454
457
  .loading=${config.loading ?? false}
@@ -457,7 +460,7 @@ let NileChart = class NileChart extends NileElement {
457
460
  return html `<nile-donut-chart
458
461
  .data=${config.data}
459
462
  .seriesName=${config.seriesName ?? ''}
460
- .height=${config.height ?? '400px'}
463
+ .height=${config.height ?? '100%'}
461
464
  .innerSize=${config.innerSize ?? '50%'}
462
465
  .semiCircle=${config.semiCircle ?? false}
463
466
  .semiCircle=${config.semiCircle ?? false}
@@ -469,7 +472,7 @@ let NileChart = class NileChart extends NileElement {
469
472
  case 'scatter':
470
473
  return html `<nile-scatter-chart
471
474
  .data=${config.data}
472
- .height=${config.height ?? '400px'}
475
+ .height=${config.height ?? '100%'}
473
476
  .xAxisTitle=${config.xAxisTitle ?? ''}
474
477
  .yAxisTitle=${config.yAxisTitle ?? ''}
475
478
  .options=${mergedOptions}
@@ -478,7 +481,7 @@ let NileChart = class NileChart extends NileElement {
478
481
  case 'bubble':
479
482
  return html `<nile-bubble-chart
480
483
  .data=${config.data}
481
- .height=${config.height ?? '400px'}
484
+ .height=${config.height ?? '100%'}
482
485
  .xAxisTitle=${config.xAxisTitle ?? ''}
483
486
  .yAxisTitle=${config.yAxisTitle ?? ''}
484
487
  .options=${mergedOptions}
@@ -488,7 +491,7 @@ let NileChart = class NileChart extends NileElement {
488
491
  return html `<nile-spline-chart
489
492
  .data=${config.data}
490
493
  .categories=${config.categories ?? []}
491
- .height=${config.height ?? '400px'}
494
+ .height=${config.height ?? '100%'}
492
495
  .yAxisTitle=${config.yAxisTitle ?? ''}
493
496
  .options=${mergedOptions}
494
497
  .loading=${config.loading ?? false}
@@ -497,7 +500,7 @@ let NileChart = class NileChart extends NileElement {
497
500
  return html `<nile-radar-chart
498
501
  .data=${config.data}
499
502
  .categories=${config.categories ?? []}
500
- .height=${config.height ?? '400px'}
503
+ .height=${config.height ?? '100%'}
501
504
  .showArea=${config.showArea ?? false}
502
505
  .options=${mergedOptions}
503
506
  .loading=${config.loading ?? false}
@@ -509,14 +512,14 @@ let NileChart = class NileChart extends NileElement {
509
512
  .max=${config.max ?? 100}
510
513
  .suffix=${config.suffix ?? ''}
511
514
  .bands=${config.bands ?? []}
512
- .height=${config.height ?? '280px'}
515
+ .height=${config.height ?? '100%'}
513
516
  .options=${mergedOptions}
514
517
  .loading=${config.loading ?? false}
515
518
  ></nile-gauge-chart>`;
516
519
  case 'waterfall':
517
520
  return html `<nile-waterfall-chart
518
521
  .data=${config.data}
519
- .height=${config.height ?? '400px'}
522
+ .height=${config.height ?? '100%'}
520
523
  .yAxisTitle=${config.yAxisTitle ?? ''}
521
524
  .options=${mergedOptions}
522
525
  .loading=${config.loading ?? false}
@@ -528,7 +531,7 @@ let NileChart = class NileChart extends NileElement {
528
531
  .joinBy=${config.joinBy ?? ['hc-key', 'hc-key']}
529
532
  .seriesType=${config.seriesType ?? 'map'}
530
533
  .zoom=${config.zoom ?? true}
531
- .height=${config.height ?? '500px'}
534
+ .height=${config.height ?? '100%'}
532
535
  .options=${mergedOptions}
533
536
  .loading=${config.loading ?? false}
534
537
  ></nile-map-chart>`;
@@ -536,7 +539,7 @@ let NileChart = class NileChart extends NileElement {
536
539
  return html `<nile-stacked-chart
537
540
  .data=${config.data}
538
541
  .categories=${config.categories ?? []}
539
- .height=${config.height ?? '400px'}
542
+ .height=${config.height ?? '100%'}
540
543
  .yAxisTitle=${config.yAxisTitle ?? ''}
541
544
  .stackMode=${config.stackMode ?? 'normal'}
542
545
  .showLegend=${config.showLegend ?? true}
@@ -548,7 +551,7 @@ let NileChart = class NileChart extends NileElement {
548
551
  return html `<nile-cluster-chart
549
552
  .data=${config.data}
550
553
  .categories=${config.categories ?? []}
551
- .height=${config.height ?? '400px'}
554
+ .height=${config.height ?? '100%'}
552
555
  .yAxisTitle=${config.yAxisTitle ?? ''}
553
556
  .showLegend=${config.showLegend ?? true}
554
557
  .groupPadding=${config.groupPadding ?? 0.15}
@@ -559,7 +562,7 @@ let NileChart = class NileChart extends NileElement {
559
562
  case 'histogram':
560
563
  return html `<nile-histogram-chart
561
564
  .data=${config.data}
562
- .height=${config.height ?? '400px'}
565
+ .height=${config.height ?? '100%'}
563
566
  .xAxisTitle=${config.xAxisTitle ?? ''}
564
567
  .yAxisTitle=${config.yAxisTitle ?? ''}
565
568
  .histogramSeriesName=${config.histogramSeriesName ?? ''}
@@ -574,7 +577,7 @@ let NileChart = class NileChart extends NileElement {
574
577
  case 'bellcurve':
575
578
  return html `<nile-bellcurve-chart
576
579
  .data=${config.data}
577
- .height=${config.height ?? '400px'}
580
+ .height=${config.height ?? '100%'}
578
581
  .xAxisTitle=${config.xAxisTitle ?? ''}
579
582
  .yAxisTitle=${config.yAxisTitle ?? ''}
580
583
  .bellcurveSeriesName=${config.bellcurveSeriesName ?? ''}
@@ -591,7 +594,7 @@ let NileChart = class NileChart extends NileElement {
591
594
  return html `<nile-boxplot-chart
592
595
  .data=${config.data}
593
596
  .categories=${config.categories ?? []}
594
- .height=${config.height ?? '400px'}
597
+ .height=${config.height ?? '100%'}
595
598
  .xAxisTitle=${config.xAxisTitle ?? ''}
596
599
  .yAxisTitle=${config.yAxisTitle ?? ''}
597
600
  .horizontal=${config.horizontal ?? false}
@@ -602,7 +605,7 @@ let NileChart = class NileChart extends NileElement {
602
605
  case 'timeline':
603
606
  return html `<nile-timeline-chart
604
607
  .data=${config.data}
605
- .height=${config.height ?? '400px'}
608
+ .height=${config.height ?? '100%'}
606
609
  .seriesName=${config.seriesName ?? ''}
607
610
  .datetimeAxis=${config.datetimeAxis ?? false}
608
611
  .inverted=${config.inverted ?? false}
@@ -614,7 +617,7 @@ let NileChart = class NileChart extends NileElement {
614
617
  case 'dumbbell':
615
618
  return html `<nile-dumbbell-chart
616
619
  .data=${config.data}
617
- .height=${config.height ?? '400px'}
620
+ .height=${config.height ?? '100%'}
618
621
  .yAxisTitle=${config.yAxisTitle ?? ''}
619
622
  .seriesName=${config.seriesName ?? ''}
620
623
  .lowMarkerColor=${config.lowMarkerColor ?? ''}
@@ -627,7 +630,7 @@ let NileChart = class NileChart extends NileElement {
627
630
  case 'dumbbellLower':
628
631
  return html `<nile-dumbbell-lower-chart
629
632
  .data=${config.data}
630
- .height=${config.height ?? '400px'}
633
+ .height=${config.height ?? '100%'}
631
634
  .yAxisTitle=${config.yAxisTitle ?? ''}
632
635
  .seriesName=${config.seriesName ?? ''}
633
636
  .lowMarkerColor=${config.lowMarkerColor ?? ''}
@@ -640,7 +643,7 @@ let NileChart = class NileChart extends NileElement {
640
643
  case 'dumbbellUpper':
641
644
  return html `<nile-dumbbell-upper-chart
642
645
  .data=${config.data}
643
- .height=${config.height ?? '400px'}
646
+ .height=${config.height ?? '100%'}
644
647
  .yAxisTitle=${config.yAxisTitle ?? ''}
645
648
  .seriesName=${config.seriesName ?? ''}
646
649
  .lowMarkerColor=${config.lowMarkerColor ?? ''}
@@ -654,7 +657,7 @@ let NileChart = class NileChart extends NileElement {
654
657
  return html `<nile-fan-chart
655
658
  .lineData=${config.lineData}
656
659
  .bands=${config.bands}
657
- .height=${config.height ?? '400px'}
660
+ .height=${config.height ?? '100%'}
658
661
  .yAxisTitle=${config.yAxisTitle ?? ''}
659
662
  .lineSeriesName=${config.lineSeriesName ?? ''}
660
663
  .lineColor=${config.lineColor ?? '#1d4ed8'}
@@ -667,7 +670,7 @@ let NileChart = class NileChart extends NileElement {
667
670
  case 'funnel':
668
671
  return html `<nile-funnel-chart
669
672
  .data=${config.data}
670
- .height=${config.height ?? '400px'}
673
+ .height=${config.height ?? '100%'}
671
674
  .seriesName=${config.seriesName ?? ''}
672
675
  .showDataLabels=${config.showDataLabels ?? true}
673
676
  .options=${mergedOptions}
@@ -677,7 +680,7 @@ let NileChart = class NileChart extends NileElement {
677
680
  return html `<nile-organization-chart
678
681
  .nodes=${config.nodes}
679
682
  .links=${config.links}
680
- .height=${config.height ?? '480px'}
683
+ .height=${config.height ?? '100%'}
681
684
  .seriesName=${config.seriesName ?? ''}
682
685
  .inverted=${config.inverted ?? true}
683
686
  .options=${mergedOptions}
@@ -688,7 +691,7 @@ let NileChart = class NileChart extends NileElement {
688
691
  .categories=${config.categories}
689
692
  .columnSeries=${config.columnSeries}
690
693
  .lineSeries=${config.lineSeries}
691
- .height=${config.height ?? '400px'}
694
+ .height=${config.height ?? '100%'}
692
695
  .columnAxisTitle=${config.columnAxisTitle ?? ''}
693
696
  .lineAxisTitle=${config.lineAxisTitle ?? ''}
694
697
  .options=${mergedOptions}
@@ -699,7 +702,7 @@ let NileChart = class NileChart extends NileElement {
699
702
  .xCategories=${config.xCategories}
700
703
  .yCategories=${config.yCategories}
701
704
  .data=${config.data}
702
- .height=${config.height ?? '400px'}
705
+ .height=${config.height ?? '100%'}
703
706
  .seriesName=${config.seriesName ?? ''}
704
707
  .colorMin=${config.colorMin ?? null}
705
708
  .colorMax=${config.colorMax ?? null}
@@ -715,7 +718,7 @@ let NileChart = class NileChart extends NileElement {
715
718
  .layout=${config.layout ?? 'flame'}
716
719
  .data=${config.data ?? []}
717
720
  .sunburstData=${config.sunburstData ?? []}
718
- .height=${config.height ?? '480px'}
721
+ .height=${config.height ?? '100%'}
719
722
  .options=${mergedOptions}
720
723
  .loading=${config.loading ?? false}
721
724
  ></nile-flame-chart>`;
@@ -723,7 +726,7 @@ let NileChart = class NileChart extends NileElement {
723
726
  return html `<nile-spiderweb-chart
724
727
  .data=${config.data}
725
728
  .categories=${config.categories ?? []}
726
- .height=${config.height ?? '400px'}
729
+ .height=${config.height ?? '100%'}
727
730
  .showArea=${config.showArea ?? false}
728
731
  .options=${mergedOptions}
729
732
  .loading=${config.loading ?? false}
@@ -732,7 +735,7 @@ let NileChart = class NileChart extends NileElement {
732
735
  return html `<nile-inverted-area-chart
733
736
  .data=${config.data}
734
737
  .categories=${config.categories ?? []}
735
- .height=${config.height ?? '400px'}
738
+ .height=${config.height ?? '100%'}
736
739
  .yAxisTitle=${config.yAxisTitle ?? ''}
737
740
  .stacked=${config.stacked ?? false}
738
741
  .options=${mergedOptions}
@@ -742,7 +745,7 @@ let NileChart = class NileChart extends NileElement {
742
745
  return html `<nile-column-pyramid-chart
743
746
  .data=${config.data}
744
747
  .categories=${config.categories ?? []}
745
- .height=${config.height ?? '400px'}
748
+ .height=${config.height ?? '100%'}
746
749
  .options=${mergedOptions}
747
750
  .loading=${config.loading ?? false}
748
751
  ></nile-column-pyramid-chart>`;
@@ -750,7 +753,7 @@ let NileChart = class NileChart extends NileElement {
750
753
  return html `<nile-lollipop-chart
751
754
  .data=${config.data}
752
755
  .categories=${config.categories ?? []}
753
- .height=${config.height ?? '400px'}
756
+ .height=${config.height ?? '100%'}
754
757
  .options=${mergedOptions}
755
758
  .loading=${config.loading ?? false}
756
759
  ></nile-lollipop-chart>`;
@@ -758,7 +761,7 @@ let NileChart = class NileChart extends NileElement {
758
761
  return html `<nile-area-spline-chart
759
762
  .data=${config.data}
760
763
  .categories=${config.categories ?? []}
761
- .height=${config.height ?? '400px'}
764
+ .height=${config.height ?? '100%'}
762
765
  .yAxisTitle=${config.yAxisTitle ?? ''}
763
766
  .stacked=${config.stacked ?? false}
764
767
  .options=${mergedOptions}
@@ -768,7 +771,7 @@ let NileChart = class NileChart extends NileElement {
768
771
  return html `<nile-area-negative-chart
769
772
  .data=${config.data}
770
773
  .categories=${config.categories ?? []}
771
- .height=${config.height ?? '400px'}
774
+ .height=${config.height ?? '100%'}
772
775
  .yAxisTitle=${config.yAxisTitle ?? ''}
773
776
  .threshold=${config.threshold ?? 0}
774
777
  .options=${mergedOptions}
@@ -778,7 +781,7 @@ let NileChart = class NileChart extends NileElement {
778
781
  return html `<nile-area-range-chart
779
782
  .data=${config.data}
780
783
  .categories=${config.categories ?? []}
781
- .height=${config.height ?? '400px'}
784
+ .height=${config.height ?? '100%'}
782
785
  .yAxisTitle=${config.yAxisTitle ?? ''}
783
786
  .options=${mergedOptions}
784
787
  .loading=${config.loading ?? false}
@@ -787,7 +790,7 @@ let NileChart = class NileChart extends NileElement {
787
790
  return html `<nile-column-range-chart
788
791
  .data=${config.data}
789
792
  .categories=${config.categories ?? []}
790
- .height=${config.height ?? '400px'}
793
+ .height=${config.height ?? '100%'}
791
794
  .yAxisTitle=${config.yAxisTitle ?? ''}
792
795
  .options=${mergedOptions}
793
796
  .loading=${config.loading ?? false}
@@ -796,7 +799,7 @@ let NileChart = class NileChart extends NileElement {
796
799
  return html `<nile-column-drilldown-chart
797
800
  .data=${config.data}
798
801
  .drilldownSeries=${config.drilldownSeries}
799
- .height=${config.height ?? '400px'}
802
+ .height=${config.height ?? '100%'}
800
803
  .seriesName=${config.seriesName ?? ''}
801
804
  .yAxisTitle=${config.yAxisTitle ?? ''}
802
805
  .options=${mergedOptions}
@@ -806,7 +809,7 @@ let NileChart = class NileChart extends NileElement {
806
809
  return html `<nile-radial-bar-chart
807
810
  .data=${config.data}
808
811
  .categories=${config.categories}
809
- .height=${config.height ?? '400px'}
812
+ .height=${config.height ?? '100%'}
810
813
  .yAxisTitle=${config.yAxisTitle ?? ''}
811
814
  .innerSize=${config.innerSize ?? '28%'}
812
815
  .paneSize=${config.paneSize ?? '82%'}
@@ -816,7 +819,7 @@ let NileChart = class NileChart extends NileElement {
816
819
  case 'variablePie':
817
820
  return html `<nile-variable-pie-chart
818
821
  .data=${config.data}
819
- .height=${config.height ?? '400px'}
822
+ .height=${config.height ?? '100%'}
820
823
  .seriesName=${config.seriesName ?? ''}
821
824
  .showDataLabels=${config.showDataLabels ?? true}
822
825
  .showLegend=${config.showLegend ?? true}
@@ -826,14 +829,14 @@ let NileChart = class NileChart extends NileElement {
826
829
  case 'euler':
827
830
  return html `<nile-euler-chart
828
831
  .data=${config.data}
829
- .height=${config.height ?? '400px'}
832
+ .height=${config.height ?? '100%'}
830
833
  .options=${mergedOptions}
831
834
  .loading=${config.loading ?? false}
832
835
  ></nile-euler-chart>`;
833
836
  case 'polygon':
834
837
  return html `<nile-polygon-chart
835
838
  .series=${config.series}
836
- .height=${config.height ?? '400px'}
839
+ .height=${config.height ?? '100%'}
837
840
  .xAxisTitle=${config.xAxisTitle ?? ''}
838
841
  .yAxisTitle=${config.yAxisTitle ?? ''}
839
842
  .options=${mergedOptions}
@@ -842,7 +845,7 @@ let NileChart = class NileChart extends NileElement {
842
845
  case 'vector':
843
846
  return html `<nile-vector-chart
844
847
  .data=${config.data}
845
- .height=${config.height ?? '400px'}
848
+ .height=${config.height ?? '100%'}
846
849
  .seriesName=${config.seriesName ?? ''}
847
850
  .xAxisTitle=${config.xAxisTitle ?? ''}
848
851
  .yAxisTitle=${config.yAxisTitle ?? ''}
@@ -853,7 +856,7 @@ let NileChart = class NileChart extends NileElement {
853
856
  return html `<nile-xrange-chart
854
857
  .data=${config.data}
855
858
  .categories=${config.categories}
856
- .height=${config.height ?? '400px'}
859
+ .height=${config.height ?? '100%'}
857
860
  .seriesName=${config.seriesName ?? ''}
858
861
  .datetimeAxis=${config.datetimeAxis ?? false}
859
862
  .options=${mergedOptions}
@@ -890,6 +893,27 @@ let NileChart = class NileChart extends NileElement {
890
893
  },
891
894
  }}
892
895
  ></nile-kpi-chart>`;
896
+ }
897
+ case 'grid': {
898
+ const gridChrome = '--nile-data-grid-radius:0;' +
899
+ '--nile-data-grid-border-color:transparent;' +
900
+ '--nile-data-grid-shadow:none;' +
901
+ 'display:block;';
902
+ const gridStyle = config.height
903
+ ? `${gridChrome}height:${config.height};`
904
+ : gridChrome;
905
+ return html `<nile-data-grid
906
+ class="nile-chart-grid"
907
+ .data=${config.data}
908
+ .columns=${config.columns}
909
+ .loading=${config.loading ?? false}
910
+ .striped=${config.striped ?? false}
911
+ .hoverable=${config.hoverable ?? false}
912
+ .emptyMessage=${config.emptyMessage ?? 'No data'}
913
+ .loadingMessage=${config.loadingMessage ?? 'Loading\u2026'}
914
+ .noMatchMessage=${config.noMatchMessage ?? 'No matching rows'}
915
+ style=${gridStyle}
916
+ ></nile-data-grid>`;
893
917
  }
894
918
  default: {
895
919
  const _exhaustive = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",
@@ -59,7 +59,13 @@
59
59
  "lit": "^3.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "highcharts": ">=10.0.0"
62
+ "highcharts": ">=10.0.0",
63
+ "@aquera/nile-data-grid": ">=0.1.0"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "@aquera/nile-data-grid": {
67
+ "optional": true
68
+ }
63
69
  },
64
70
  "devDependencies": {
65
71
  "@rollup/plugin-babel": "^6.0.3",