@aquera/nile-visualization 2.9.24 → 2.9.26

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.
Files changed (61) hide show
  1. package/README.md +7 -0
  2. package/dist/src/index.d.ts +1 -0
  3. package/dist/src/internal/types/aq-config.type.d.ts +6 -0
  4. package/dist/src/internal/types/index.d.ts +1 -0
  5. package/dist/src/internal/types/legend-config.type.d.ts +145 -0
  6. package/dist/src/internal/types/legend-config.type.js +9 -0
  7. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +1 -1
  8. package/dist/src/nile-area-chart/nile-area-chart.d.ts +1 -1
  9. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -1
  10. package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -1
  11. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +1 -1
  12. package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +1 -1
  13. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +1 -1
  14. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +1 -1
  15. package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +1 -1
  16. package/dist/src/nile-chart/index.d.ts +1 -1
  17. package/dist/src/nile-chart/nile-chart-config.d.ts +12 -1
  18. package/dist/src/nile-chart/nile-chart.d.ts +36 -2
  19. package/dist/src/nile-chart/nile-chart.js +123 -46
  20. package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +1 -1
  21. package/dist/src/nile-column-chart/nile-column-chart.d.ts +1 -1
  22. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +1 -1
  23. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -1
  24. package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -1
  25. package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +1 -1
  26. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -1
  27. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -1
  28. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -1
  29. package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -1
  30. package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -1
  31. package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +1 -0
  32. package/dist/src/nile-filter-chart/nile-filter-chart.js +7 -2
  33. package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +1 -1
  34. package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -1
  35. package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +1 -1
  36. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +1 -1
  37. package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +1 -1
  38. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -1
  39. package/dist/src/nile-line-chart/nile-line-chart.d.ts +1 -1
  40. package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -1
  41. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -1
  42. package/dist/src/nile-map-chart/nile-map-chart.d.ts +1 -1
  43. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -1
  44. package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -1
  45. package/dist/src/nile-pie-chart/index.d.ts +1 -1
  46. package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +2 -51
  47. package/dist/src/nile-pie-chart/nile-pie-chart.js +3 -0
  48. package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -1
  49. package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +1 -1
  50. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +1 -1
  51. package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +1 -1
  52. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +1 -1
  53. package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +1 -1
  54. package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +1 -1
  55. package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -1
  56. package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +1 -1
  57. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +1 -1
  58. package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -1
  59. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +1 -1
  60. package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +1 -1
  61. package/package.json +1 -1
@@ -2,6 +2,8 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
+ export type { CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, } from '../internal/types/index.js';
6
+ import type { LegendConfig } from '../internal/types/index.js';
5
7
  export interface PieChartSeriesData {
6
8
  name: string;
7
9
  y: number;
@@ -9,57 +11,6 @@ export interface PieChartSeriesData {
9
11
  sliced?: boolean;
10
12
  selected?: boolean;
11
13
  }
12
- export interface LegendNavigationConfig {
13
- activeColor?: string;
14
- animation?: boolean | {
15
- duration?: number;
16
- };
17
- arrowSize?: number;
18
- enabled?: boolean;
19
- inactiveColor?: string;
20
- style?: Record<string, string | number>;
21
- }
22
- export interface LegendConfig {
23
- /** Show or hide the legend (maps to Highcharts `enabled`). */
24
- show?: boolean;
25
- layout?: 'horizontal' | 'vertical';
26
- align?: 'left' | 'center' | 'right';
27
- verticalAlign?: 'top' | 'middle' | 'bottom';
28
- navigation?: LegendNavigationConfig;
29
- backgroundColor?: string;
30
- borderColor?: string;
31
- borderRadius?: number;
32
- borderWidth?: number;
33
- floating?: boolean;
34
- itemDistance?: number;
35
- itemHiddenStyle?: Record<string, string | number>;
36
- itemHoverStyle?: Record<string, string | number>;
37
- itemMarginBottom?: number;
38
- itemMarginTop?: number;
39
- itemStyle?: Record<string, string | number>;
40
- itemWidth?: number;
41
- labelFormat?: string;
42
- lineHeight?: number;
43
- margin?: number;
44
- maxHeight?: number;
45
- maxWidth?: number;
46
- padding?: number;
47
- reversed?: boolean;
48
- rtl?: boolean;
49
- squareSymbol?: boolean;
50
- symbolHeight?: number;
51
- symbolPadding?: number;
52
- symbolRadius?: number;
53
- symbolWidth?: number;
54
- title?: {
55
- text?: string;
56
- style?: Record<string, string | number>;
57
- };
58
- useHTML?: boolean;
59
- width?: number;
60
- x?: number;
61
- y?: number;
62
- }
63
14
  export declare class NilePieChart extends NileElement {
64
15
  static styles: CSSResultGroup;
65
16
  private _hc;
@@ -152,6 +152,7 @@ let NilePieChart = class NilePieChart extends NileElement {
152
152
  'loading',
153
153
  'showDataLabels',
154
154
  'showLegend',
155
+ 'legend',
155
156
  ];
156
157
  const needsUpdate = chartProps.some(p => changedProperties.has(p));
157
158
  if (!needsUpdate)
@@ -234,6 +235,8 @@ let NilePieChart = class NilePieChart extends NileElement {
234
235
  },
235
236
  ],
236
237
  legend: (() => {
238
+ // All legend config maps straight through to the native Highcharts
239
+ // legend. `show` is a friendlier alias for Highcharts `enabled`.
237
240
  const { show, ...rest } = this.legend ?? {};
238
241
  return { enabled: show ?? this.showLegend, ...rest };
239
242
  })(),
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface PolygonSeriesConfig {
7
7
  name: string;
8
8
  data: [number, number][];
@@ -25,7 +25,7 @@ export declare class NileRadarChart extends NileElement {
25
25
  showArea: boolean;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -26,7 +26,7 @@ export declare class NileRadialBarChart extends NileElement {
26
26
  paneSize: string;
27
27
  showLegend: boolean;
28
28
  /** Full legend configuration — all Highcharts legend options in one object. */
29
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
29
+ legend: import('../internal/types/index.js').LegendConfig | null;
30
30
  chartBg: string;
31
31
  chartBorderRadius: string | number;
32
32
  chartBorder: string;
@@ -25,7 +25,7 @@ export declare class NileScatterChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -29,7 +29,7 @@ export declare class NileSpiderwebChart extends NileElement {
29
29
  showArea: boolean;
30
30
  showLegend: boolean;
31
31
  /** Full legend configuration — all Highcharts legend options in one object. */
32
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
32
+ legend: import('../internal/types/index.js').LegendConfig | null;
33
33
  chartBg: string;
34
34
  chartBorderRadius: string | number;
35
35
  chartBorder: string;
@@ -25,7 +25,7 @@ export declare class NileSplineChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  chartBg: string;
30
30
  chartBorderRadius: string | number;
31
31
  chartBorder: string;
@@ -25,7 +25,7 @@ export declare class NileStackedChart extends NileElement {
25
25
  yAxisTitle: string;
26
26
  showLegend: boolean;
27
27
  /** Full legend configuration — all Highcharts legend options in one object. */
28
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
28
+ legend: import('../internal/types/index.js').LegendConfig | null;
29
29
  /** `normal` = stacked values; `percent` = 100% proportional stacks. */
30
30
  stackMode: 'normal' | 'percent';
31
31
  pointPadding: number;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface TimelineEvent {
7
7
  /** Shown on axis / tooltip header (e.g. date string). */
8
8
  name: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface TrendlineSeriesData {
7
7
  name: string;
8
8
  data: number[];
@@ -22,7 +22,7 @@ export declare class NileVariablePieChart extends NileElement {
22
22
  showDataLabels: boolean;
23
23
  showLegend: boolean;
24
24
  /** Full legend configuration — all Highcharts legend options in one object. */
25
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
25
+ legend: import('../internal/types/index.js').LegendConfig | null;
26
26
  options: Highcharts.Options;
27
27
  loading: boolean;
28
28
  height: string;
@@ -2,7 +2,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
3
  import NileElement from '../internal/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
- import type { LegendConfig } from '../nile-pie-chart/nile-pie-chart.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface VectorDataPoint {
7
7
  x: number;
8
8
  y: number;
@@ -26,7 +26,7 @@ export declare class NileWaterfallChart extends NileElement {
26
26
  yAxisTitle: string;
27
27
  showLegend: boolean;
28
28
  /** Full legend configuration — all Highcharts legend options in one object. */
29
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
29
+ legend: import('../internal/types/index.js').LegendConfig | null;
30
30
  chartBg: string;
31
31
  chartBorderRadius: string | number;
32
32
  chartBorder: string;
@@ -28,7 +28,7 @@ export declare class NileXrangeChart extends NileElement {
28
28
  height: string;
29
29
  showLegend: boolean;
30
30
  /** Full legend configuration — all Highcharts legend options in one object. */
31
- legend: import('../nile-pie-chart/nile-pie-chart.js').LegendConfig | null;
31
+ legend: import('../internal/types/index.js').LegendConfig | null;
32
32
  chartBg: string;
33
33
  chartBorderRadius: string | number;
34
34
  chartBorder: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.9.24",
3
+ "version": "2.9.26",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",