@unovis/angular 1.0.0-beta.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.
Files changed (108) hide show
  1. package/LICENSE +193 -0
  2. package/dist/lib/LICENSE +193 -0
  3. package/dist/lib/bundles/unovis-angular.umd.js +2833 -0
  4. package/dist/lib/bundles/unovis-angular.umd.js.map +1 -0
  5. package/dist/lib/components/area/area.component.d.ts +94 -0
  6. package/dist/lib/components/area/area.module.d.ts +7 -0
  7. package/dist/lib/components/axis/axis.component.d.ts +125 -0
  8. package/dist/lib/components/axis/axis.module.d.ts +7 -0
  9. package/dist/lib/components/brush/brush.component.d.ts +104 -0
  10. package/dist/lib/components/brush/brush.module.d.ts +7 -0
  11. package/dist/lib/components/crosshair/crosshair.component.d.ts +104 -0
  12. package/dist/lib/components/crosshair/crosshair.module.d.ts +7 -0
  13. package/dist/lib/components/donut/donut.component.d.ts +86 -0
  14. package/dist/lib/components/donut/donut.module.d.ts +7 -0
  15. package/dist/lib/components/free-brush/free-brush.component.d.ts +106 -0
  16. package/dist/lib/components/free-brush/free-brush.module.d.ts +7 -0
  17. package/dist/lib/components/graph/graph.component.d.ts +190 -0
  18. package/dist/lib/components/graph/graph.module.d.ts +7 -0
  19. package/dist/lib/components/grouped-bar/grouped-bar.component.d.ts +101 -0
  20. package/dist/lib/components/grouped-bar/grouped-bar.module.d.ts +7 -0
  21. package/dist/lib/components/line/line.component.d.ts +97 -0
  22. package/dist/lib/components/line/line.module.d.ts +7 -0
  23. package/dist/lib/components/sankey/sankey.component.d.ts +164 -0
  24. package/dist/lib/components/sankey/sankey.module.d.ts +7 -0
  25. package/dist/lib/components/scatter/scatter.component.d.ts +104 -0
  26. package/dist/lib/components/scatter/scatter.module.d.ts +7 -0
  27. package/dist/lib/components/stacked-bar/stacked-bar.component.d.ts +103 -0
  28. package/dist/lib/components/stacked-bar/stacked-bar.module.d.ts +7 -0
  29. package/dist/lib/components/timeline/timeline.component.d.ts +105 -0
  30. package/dist/lib/components/timeline/timeline.module.d.ts +7 -0
  31. package/dist/lib/components/tooltip/tooltip.component.d.ts +41 -0
  32. package/dist/lib/components/tooltip/tooltip.module.d.ts +7 -0
  33. package/dist/lib/components/topojson-map/topojson-map.component.d.ts +125 -0
  34. package/dist/lib/components/topojson-map/topojson-map.module.d.ts +7 -0
  35. package/dist/lib/components/xy-labels/xy-labels.component.d.ts +107 -0
  36. package/dist/lib/components/xy-labels/xy-labels.module.d.ts +7 -0
  37. package/dist/lib/components.d.ts +39 -0
  38. package/dist/lib/containers/single-container/single-container.component.d.ts +26 -0
  39. package/dist/lib/containers/single-container/single-container.module.d.ts +7 -0
  40. package/dist/lib/containers/xy-container/xy-container.component.d.ts +80 -0
  41. package/dist/lib/containers/xy-container/xy-container.module.d.ts +7 -0
  42. package/dist/lib/containers.d.ts +4 -0
  43. package/dist/lib/core/core-component.d.ts +6 -0
  44. package/dist/lib/core/generic-component.d.ts +3 -0
  45. package/dist/lib/core/index.d.ts +3 -0
  46. package/dist/lib/core/xy-component.d.ts +6 -0
  47. package/dist/lib/esm2015/components/area/area.component.js +75 -0
  48. package/dist/lib/esm2015/components/area/area.module.js +18 -0
  49. package/dist/lib/esm2015/components/axis/axis.component.js +109 -0
  50. package/dist/lib/esm2015/components/axis/axis.module.js +18 -0
  51. package/dist/lib/esm2015/components/brush/brush.component.js +83 -0
  52. package/dist/lib/esm2015/components/brush/brush.module.js +18 -0
  53. package/dist/lib/esm2015/components/crosshair/crosshair.component.js +81 -0
  54. package/dist/lib/esm2015/components/crosshair/crosshair.module.js +18 -0
  55. package/dist/lib/esm2015/components/donut/donut.component.js +77 -0
  56. package/dist/lib/esm2015/components/donut/donut.module.js +18 -0
  57. package/dist/lib/esm2015/components/free-brush/free-brush.component.js +83 -0
  58. package/dist/lib/esm2015/components/free-brush/free-brush.module.js +18 -0
  59. package/dist/lib/esm2015/components/graph/graph.component.js +157 -0
  60. package/dist/lib/esm2015/components/graph/graph.module.js +18 -0
  61. package/dist/lib/esm2015/components/grouped-bar/grouped-bar.component.js +83 -0
  62. package/dist/lib/esm2015/components/grouped-bar/grouped-bar.module.js +18 -0
  63. package/dist/lib/esm2015/components/line/line.component.js +77 -0
  64. package/dist/lib/esm2015/components/line/line.module.js +18 -0
  65. package/dist/lib/esm2015/components/sankey/sankey.component.js +139 -0
  66. package/dist/lib/esm2015/components/sankey/sankey.module.js +18 -0
  67. package/dist/lib/esm2015/components/scatter/scatter.component.js +83 -0
  68. package/dist/lib/esm2015/components/scatter/scatter.module.js +18 -0
  69. package/dist/lib/esm2015/components/stacked-bar/stacked-bar.component.js +83 -0
  70. package/dist/lib/esm2015/components/stacked-bar/stacked-bar.module.js +18 -0
  71. package/dist/lib/esm2015/components/timeline/timeline.component.js +87 -0
  72. package/dist/lib/esm2015/components/timeline/timeline.module.js +18 -0
  73. package/dist/lib/esm2015/components/tooltip/tooltip.component.js +49 -0
  74. package/dist/lib/esm2015/components/tooltip/tooltip.module.js +18 -0
  75. package/dist/lib/esm2015/components/topojson-map/topojson-map.component.js +111 -0
  76. package/dist/lib/esm2015/components/topojson-map/topojson-map.module.js +18 -0
  77. package/dist/lib/esm2015/components/xy-labels/xy-labels.component.js +91 -0
  78. package/dist/lib/esm2015/components/xy-labels/xy-labels.module.js +18 -0
  79. package/dist/lib/esm2015/components.js +43 -0
  80. package/dist/lib/esm2015/containers/single-container/single-container.component.js +71 -0
  81. package/dist/lib/esm2015/containers/single-container/single-container.module.js +17 -0
  82. package/dist/lib/esm2015/containers/xy-container/xy-container.component.js +159 -0
  83. package/dist/lib/esm2015/containers/xy-container/xy-container.module.js +17 -0
  84. package/dist/lib/esm2015/containers.js +5 -0
  85. package/dist/lib/esm2015/core/core-component.js +4 -0
  86. package/dist/lib/esm2015/core/generic-component.js +3 -0
  87. package/dist/lib/esm2015/core/index.js +4 -0
  88. package/dist/lib/esm2015/core/xy-component.js +4 -0
  89. package/dist/lib/esm2015/html-components/bullet-legend/bullet-legend.component.js +48 -0
  90. package/dist/lib/esm2015/html-components/bullet-legend/bullet-legend.module.js +18 -0
  91. package/dist/lib/esm2015/html-components/leaflet-flow-map/leaflet-flow-map.component.js +157 -0
  92. package/dist/lib/esm2015/html-components/leaflet-flow-map/leaflet-flow-map.module.js +17 -0
  93. package/dist/lib/esm2015/html-components/leaflet-map/leaflet-map.component.js +131 -0
  94. package/dist/lib/esm2015/html-components/leaflet-map/leaflet-map.module.js +17 -0
  95. package/dist/lib/esm2015/public-api.js +3 -0
  96. package/dist/lib/esm2015/unovis-angular.js +5 -0
  97. package/dist/lib/fesm2015/unovis-angular.js +2278 -0
  98. package/dist/lib/fesm2015/unovis-angular.js.map +1 -0
  99. package/dist/lib/html-components/bullet-legend/bullet-legend.component.d.ts +24 -0
  100. package/dist/lib/html-components/bullet-legend/bullet-legend.module.d.ts +7 -0
  101. package/dist/lib/html-components/leaflet-flow-map/leaflet-flow-map.component.d.ts +197 -0
  102. package/dist/lib/html-components/leaflet-flow-map/leaflet-flow-map.module.d.ts +7 -0
  103. package/dist/lib/html-components/leaflet-map/leaflet-map.component.d.ts +168 -0
  104. package/dist/lib/html-components/leaflet-map/leaflet-map.module.d.ts +7 -0
  105. package/dist/lib/package.json +24 -0
  106. package/dist/lib/public-api.d.ts +2 -0
  107. package/dist/lib/unovis-angular.d.ts +5 -0
  108. package/package.json +44 -0
@@ -0,0 +1,94 @@
1
+ import { AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { Area, AreaConfigInterface, ContainerCore, VisEventType, VisEventCallback, NumericAccessor, ColorAccessor, ContinuousScale, CurveType, StringAccessor } from '@unovis/ts';
3
+ import * as i0 from "@angular/core";
4
+ export declare class VisAreaComponent<Datum> implements AreaConfigInterface<Datum>, AfterViewInit {
5
+ /** Animation duration of the data update transitions in milliseconds. Default: `600` */
6
+ duration?: number;
7
+ /** Events configuration. An object containing properties in the following format:
8
+ *
9
+ * ```
10
+ * {
11
+ * \[selectorString]: {
12
+ * \[eventType]: callbackFunction
13
+ * }
14
+ * }
15
+ * ```
16
+ * e.g.:
17
+ * ```
18
+ * {
19
+ * \[Area.selectors.area]: {
20
+ * click: (d) => console.log("Clicked Area", d)
21
+ * }
22
+ * }
23
+ * ``` */
24
+ events?: {
25
+ [selector: string]: {
26
+ [eventType in VisEventType]?: VisEventCallback;
27
+ };
28
+ };
29
+ /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful
30
+ * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:
31
+ *
32
+ * ```
33
+ * {
34
+ * \[selectorString]: {
35
+ * \[attributeName]: attribute constant value or accessor function
36
+ * }
37
+ * }
38
+ * ```
39
+ * e.g.:
40
+ * ```
41
+ * {
42
+ * \[Area.selectors.area]: {
43
+ * "test-value": d => d.value
44
+ * }
45
+ * }
46
+ * ``` */
47
+ attributes?: {
48
+ [selector: string]: {
49
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
50
+ };
51
+ };
52
+ /** Accessor function for getting the values along the X axis. Default: `undefined` */
53
+ x: NumericAccessor<Datum>;
54
+ /** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */
55
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
56
+ /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */
57
+ id?: ((d: Datum, i?: number, ...rest: any[]) => string);
58
+ /** Component color accessor function. Default: `d => d.color` */
59
+ color?: ColorAccessor<Datum | Datum[]>;
60
+ /** Scale for X dimension, e.g. Scale.scaleLinear(). If you set xScale you'll be responsible for setting it's `domain` and `range` as well.
61
+ * Only continuous scales are supported.
62
+ * Default: `undefined` */
63
+ xScale?: ContinuousScale;
64
+ /** Scale for Y dimension, e.g. Scale.scaleLinear(). If you set yScale you'll be responsible for setting it's `domain` and `range` as well.
65
+ * Only continuous scales are supported.
66
+ * Default: `undefined` */
67
+ yScale?: ContinuousScale;
68
+ /** Identifies whether the component should be excluded from overall X and Y domain calculations or not.
69
+ * This property can be useful when you want pass individual data to a component and you don't want it to affect
70
+ * the scales of the chart.
71
+ * Default: `false` */
72
+ excludeFromDomainCalculation?: boolean;
73
+ /** Curve type from the CurveType enum. Default: `CurveType.MonotoneX` */
74
+ curveType?: CurveType;
75
+ /** Baseline value or accessor function. Default: `undefined` */
76
+ baseline?: NumericAccessor<Datum>;
77
+ /** Opacity value or accessor function. Default: `1` */
78
+ opacity?: NumericAccessor<Datum>;
79
+ /** Optional area cursor. String or accessor function. Default: `null` */
80
+ cursor?: StringAccessor<Datum[]>;
81
+ /** If an area is smaller than 1px, extend it to have 1px height.
82
+ * This setting is useful when some of the area values are zeros or very small so visually they become
83
+ * practically invisible, but you want to show that the data behind them exists and they're not just empty segments.
84
+ * Default: `false` */
85
+ minHeight1Px?: boolean;
86
+ data: Datum[];
87
+ component: Area<Datum> | undefined;
88
+ componentContainer: ContainerCore | undefined;
89
+ ngAfterViewInit(): void;
90
+ ngOnChanges(changes: SimpleChanges): void;
91
+ private getConfig;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisAreaComponent<any>, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisAreaComponent<any>, "vis-area", never, { "duration": "duration"; "events": "events"; "attributes": "attributes"; "x": "x"; "y": "y"; "id": "id"; "color": "color"; "xScale": "xScale"; "yScale": "yScale"; "excludeFromDomainCalculation": "excludeFromDomainCalculation"; "curveType": "curveType"; "baseline": "baseline"; "opacity": "opacity"; "cursor": "cursor"; "minHeight1Px": "minHeight1Px"; "data": "data"; }, {}, never, never>;
94
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./area.component";
3
+ export declare class VisAreaModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisAreaModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VisAreaModule, [typeof i1.VisAreaComponent], never, [typeof i1.VisAreaComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<VisAreaModule>;
7
+ }
@@ -0,0 +1,125 @@
1
+ import { AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { Axis, AxisConfigInterface, ContainerCore, VisEventType, VisEventCallback, NumericAccessor, ColorAccessor, ContinuousScale, Position, AxisType, FitMode, TrimMode, TextAlign } from '@unovis/ts';
3
+ import * as i0 from "@angular/core";
4
+ export declare class VisAxisComponent<Datum> implements AxisConfigInterface<Datum>, AfterViewInit {
5
+ /** Animation duration of the data update transitions in milliseconds. Default: `600` */
6
+ duration?: number;
7
+ /** Events configuration. An object containing properties in the following format:
8
+ *
9
+ * ```
10
+ * {
11
+ * \[selectorString]: {
12
+ * \[eventType]: callbackFunction
13
+ * }
14
+ * }
15
+ * ```
16
+ * e.g.:
17
+ * ```
18
+ * {
19
+ * \[Area.selectors.area]: {
20
+ * click: (d) => console.log("Clicked Area", d)
21
+ * }
22
+ * }
23
+ * ``` */
24
+ events?: {
25
+ [selector: string]: {
26
+ [eventType in VisEventType]?: VisEventCallback;
27
+ };
28
+ };
29
+ /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful
30
+ * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:
31
+ *
32
+ * ```
33
+ * {
34
+ * \[selectorString]: {
35
+ * \[attributeName]: attribute constant value or accessor function
36
+ * }
37
+ * }
38
+ * ```
39
+ * e.g.:
40
+ * ```
41
+ * {
42
+ * \[Area.selectors.area]: {
43
+ * "test-value": d => d.value
44
+ * }
45
+ * }
46
+ * ``` */
47
+ attributes?: {
48
+ [selector: string]: {
49
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
50
+ };
51
+ };
52
+ /** Accessor function for getting the values along the X axis. Default: `undefined` */
53
+ x: NumericAccessor<Datum>;
54
+ /** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */
55
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
56
+ /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */
57
+ id?: ((d: Datum, i?: number, ...rest: any[]) => string);
58
+ /** Component color accessor function. Default: `d => d.color` */
59
+ color?: ColorAccessor<Datum | Datum[]>;
60
+ /** Scale for X dimension, e.g. Scale.scaleLinear(). If you set xScale you'll be responsible for setting it's `domain` and `range` as well.
61
+ * Only continuous scales are supported.
62
+ * Default: `undefined` */
63
+ xScale?: ContinuousScale;
64
+ /** Scale for Y dimension, e.g. Scale.scaleLinear(). If you set yScale you'll be responsible for setting it's `domain` and `range` as well.
65
+ * Only continuous scales are supported.
66
+ * Default: `undefined` */
67
+ yScale?: ContinuousScale;
68
+ /** Identifies whether the component should be excluded from overall X and Y domain calculations or not.
69
+ * This property can be useful when you want pass individual data to a component and you don't want it to affect
70
+ * the scales of the chart.
71
+ * Default: `false` */
72
+ excludeFromDomainCalculation?: boolean;
73
+ /** Axis position: `Position.Top`, `Position.Bottom`, `Position.Right` or `Position.Left`. Default: `undefined` */
74
+ position?: Position | string;
75
+ /** Axis type: `AxisType.X` or `AxisType.Y` */
76
+ type?: AxisType | string;
77
+ /** Extend the axis domain line to be full width or full height. Default: `true` */
78
+ fullSize?: boolean;
79
+ /** Axis label. Default: `undefined` */
80
+ label?: string;
81
+ /** Font size of the axis label as CSS string. Default: `null` */
82
+ labelFontSize?: string | null;
83
+ /** Distance between the axis and the label in pixels. Default: `8` */
84
+ labelMargin?: number;
85
+ /** Sets whether to draw the grid lines or not. Default: `true` */
86
+ gridLine?: boolean;
87
+ /** Sets whether to draw the tick lines or not. Default: `true` */
88
+ tickLine?: boolean;
89
+ /** Sets whether to draw the domain line or not. Default: `true` */
90
+ domainLine?: boolean;
91
+ /** Draw the min and max axis ticks only. Default: `false` */
92
+ minMaxTicksOnly?: boolean;
93
+ /** Tick label formatter function. Default: `undefined` */
94
+ tickFormat?: (tick: number | Date, i: number, ticks: (number | Date)[]) => string;
95
+ /** Explicitly set tick values. Default: `undefined` */
96
+ tickValues?: number[];
97
+ /** Set the approximate number of axis ticks (will be passed to D3's axis constructor). Default: `undefined` */
98
+ numTicks?: number;
99
+ /** Tick text fit mode: `FitMode.Wrap` or `FitMode.Trim`. Default: `FitMode.Wrap`. */
100
+ tickTextFitMode?: FitMode | string;
101
+ /** Maximum number of characters for tick text wrapping. Default: `undefined` */
102
+ tickTextLength?: number;
103
+ /** Maximum width in pixels for the tick text to be wrapped or trimmed. Default: `undefined` */
104
+ tickTextWidth?: number;
105
+ /** Tick text wrapping separator. String or array of strings. Default: `' '` */
106
+ tickTextSeparator?: string | string[];
107
+ /** Force word break for ticks when they don't fit. Default: `false` */
108
+ tickTextForceWordBreak?: boolean;
109
+ /** Tick text trim mode: `TrimMode.Start`, `TrimMode.Middle` or `TrimMode.End`. Default: `TrimMode.Middle` */
110
+ tickTextTrimType?: TrimMode | string;
111
+ /** Font size of the tick text as CSS string. Default: `null` */
112
+ tickTextFontSize?: string | null;
113
+ /** Text alignment for ticks: `TextAlign.Left`, `TextAlign.Center` or `TextAlign.Right`. Default: `undefined` */
114
+ tickTextAlign?: TextAlign;
115
+ /** The spacing in pixels between the tick and it's label. Default: `8` */
116
+ tickPadding?: number;
117
+ data: Datum[];
118
+ component: Axis<Datum> | undefined;
119
+ componentContainer: ContainerCore | undefined;
120
+ ngAfterViewInit(): void;
121
+ ngOnChanges(changes: SimpleChanges): void;
122
+ private getConfig;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisAxisComponent<any>, never>;
124
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisAxisComponent<any>, "vis-axis", never, { "duration": "duration"; "events": "events"; "attributes": "attributes"; "x": "x"; "y": "y"; "id": "id"; "color": "color"; "xScale": "xScale"; "yScale": "yScale"; "excludeFromDomainCalculation": "excludeFromDomainCalculation"; "position": "position"; "type": "type"; "fullSize": "fullSize"; "label": "label"; "labelFontSize": "labelFontSize"; "labelMargin": "labelMargin"; "gridLine": "gridLine"; "tickLine": "tickLine"; "domainLine": "domainLine"; "minMaxTicksOnly": "minMaxTicksOnly"; "tickFormat": "tickFormat"; "tickValues": "tickValues"; "numTicks": "numTicks"; "tickTextFitMode": "tickTextFitMode"; "tickTextLength": "tickTextLength"; "tickTextWidth": "tickTextWidth"; "tickTextSeparator": "tickTextSeparator"; "tickTextForceWordBreak": "tickTextForceWordBreak"; "tickTextTrimType": "tickTextTrimType"; "tickTextFontSize": "tickTextFontSize"; "tickTextAlign": "tickTextAlign"; "tickPadding": "tickPadding"; "data": "data"; }, {}, never, never>;
125
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./axis.component";
3
+ export declare class VisAxisModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisAxisModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VisAxisModule, [typeof i1.VisAxisComponent], never, [typeof i1.VisAxisComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<VisAxisModule>;
7
+ }
@@ -0,0 +1,104 @@
1
+ import { AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { Brush, BrushConfigInterface, ContainerCore, VisEventType, VisEventCallback, NumericAccessor, ColorAccessor, ContinuousScale, Arrangement } from '@unovis/ts';
3
+ import { D3BrushEvent } from 'd3-brush';
4
+ import * as i0 from "@angular/core";
5
+ export declare class VisBrushComponent<Datum> implements BrushConfigInterface<Datum>, AfterViewInit {
6
+ /** Animation duration of the data update transitions in milliseconds. Default: `600` */
7
+ duration?: number;
8
+ /** Events configuration. An object containing properties in the following format:
9
+ *
10
+ * ```
11
+ * {
12
+ * \[selectorString]: {
13
+ * \[eventType]: callbackFunction
14
+ * }
15
+ * }
16
+ * ```
17
+ * e.g.:
18
+ * ```
19
+ * {
20
+ * \[Area.selectors.area]: {
21
+ * click: (d) => console.log("Clicked Area", d)
22
+ * }
23
+ * }
24
+ * ``` */
25
+ events?: {
26
+ [selector: string]: {
27
+ [eventType in VisEventType]?: VisEventCallback;
28
+ };
29
+ };
30
+ /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful
31
+ * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:
32
+ *
33
+ * ```
34
+ * {
35
+ * \[selectorString]: {
36
+ * \[attributeName]: attribute constant value or accessor function
37
+ * }
38
+ * }
39
+ * ```
40
+ * e.g.:
41
+ * ```
42
+ * {
43
+ * \[Area.selectors.area]: {
44
+ * "test-value": d => d.value
45
+ * }
46
+ * }
47
+ * ``` */
48
+ attributes?: {
49
+ [selector: string]: {
50
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
51
+ };
52
+ };
53
+ /** Accessor function for getting the values along the X axis. Default: `undefined` */
54
+ x: NumericAccessor<Datum>;
55
+ /** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */
56
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
57
+ /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */
58
+ id?: ((d: Datum, i?: number, ...rest: any[]) => string);
59
+ /** Component color accessor function. Default: `d => d.color` */
60
+ color?: ColorAccessor<Datum | Datum[]>;
61
+ /** Scale for X dimension, e.g. Scale.scaleLinear(). If you set xScale you'll be responsible for setting it's `domain` and `range` as well.
62
+ * Only continuous scales are supported.
63
+ * Default: `undefined` */
64
+ xScale?: ContinuousScale;
65
+ /** Scale for Y dimension, e.g. Scale.scaleLinear(). If you set yScale you'll be responsible for setting it's `domain` and `range` as well.
66
+ * Only continuous scales are supported.
67
+ * Default: `undefined` */
68
+ yScale?: ContinuousScale;
69
+ /** Identifies whether the component should be excluded from overall X and Y domain calculations or not.
70
+ * This property can be useful when you want pass individual data to a component and you don't want it to affect
71
+ * the scales of the chart.
72
+ * Default: `false` */
73
+ excludeFromDomainCalculation?: boolean;
74
+ /** Callback function to be called on any Brush event.
75
+ * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}` */
76
+ onBrush?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);
77
+ /** Callback function to be called on the Brush start event.
78
+ * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}` */
79
+ onBrushStart?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);
80
+ /** Callback function to be called on the Brush move event.
81
+ * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}` */
82
+ onBrushMove?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);
83
+ /** Callback function to be called on the Brush end event.
84
+ * Default: `(selection: [number, number], event: D3BrushEvent<Datum>, userDriven: boolean): void => {}` */
85
+ onBrushEnd?: ((selection?: [number, number], event?: D3BrushEvent<Datum>, userDriven?: boolean) => void);
86
+ /** Width of the Brush handle. Default: `1` */
87
+ handleWidth?: number;
88
+ /** Brush selection in the data space coordinates, can be used to control the selection. Default: `undefined` */
89
+ selection?: [number, number] | null;
90
+ /** Allow dragging the selected area as a whole in order to change the selected range. Default: `false` */
91
+ draggable?: boolean;
92
+ /** Position of the handle: `Arrangement.Inside` or `Arrangement.Outside`. Default: `Arrangement.Inside` */
93
+ handlePosition?: Arrangement | string;
94
+ /** Constraint Brush selection to a minimal length in data units. Default: `undefined` */
95
+ selectionMinLength?: number;
96
+ data: Datum[];
97
+ component: Brush<Datum> | undefined;
98
+ componentContainer: ContainerCore | undefined;
99
+ ngAfterViewInit(): void;
100
+ ngOnChanges(changes: SimpleChanges): void;
101
+ private getConfig;
102
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisBrushComponent<any>, never>;
103
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisBrushComponent<any>, "vis-brush", never, { "duration": "duration"; "events": "events"; "attributes": "attributes"; "x": "x"; "y": "y"; "id": "id"; "color": "color"; "xScale": "xScale"; "yScale": "yScale"; "excludeFromDomainCalculation": "excludeFromDomainCalculation"; "onBrush": "onBrush"; "onBrushStart": "onBrushStart"; "onBrushMove": "onBrushMove"; "onBrushEnd": "onBrushEnd"; "handleWidth": "handleWidth"; "selection": "selection"; "draggable": "draggable"; "handlePosition": "handlePosition"; "selectionMinLength": "selectionMinLength"; "data": "data"; }, {}, never, never>;
104
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./brush.component";
3
+ export declare class VisBrushModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisBrushModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VisBrushModule, [typeof i1.VisBrushComponent], never, [typeof i1.VisBrushComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<VisBrushModule>;
7
+ }
@@ -0,0 +1,104 @@
1
+ import { AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { Crosshair, CrosshairConfigInterface, ContainerCore, VisEventType, VisEventCallback, NumericAccessor, ColorAccessor, ContinuousScale, Tooltip, CrosshairCircle } from '@unovis/ts';
3
+ import * as i0 from "@angular/core";
4
+ export declare class VisCrosshairComponent<Datum> implements CrosshairConfigInterface<Datum>, AfterViewInit {
5
+ /** Animation duration of the data update transitions in milliseconds. Default: `600` */
6
+ duration?: number;
7
+ /** Events configuration. An object containing properties in the following format:
8
+ *
9
+ * ```
10
+ * {
11
+ * \[selectorString]: {
12
+ * \[eventType]: callbackFunction
13
+ * }
14
+ * }
15
+ * ```
16
+ * e.g.:
17
+ * ```
18
+ * {
19
+ * \[Area.selectors.area]: {
20
+ * click: (d) => console.log("Clicked Area", d)
21
+ * }
22
+ * }
23
+ * ``` */
24
+ events?: {
25
+ [selector: string]: {
26
+ [eventType in VisEventType]?: VisEventCallback;
27
+ };
28
+ };
29
+ /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful
30
+ * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:
31
+ *
32
+ * ```
33
+ * {
34
+ * \[selectorString]: {
35
+ * \[attributeName]: attribute constant value or accessor function
36
+ * }
37
+ * }
38
+ * ```
39
+ * e.g.:
40
+ * ```
41
+ * {
42
+ * \[Area.selectors.area]: {
43
+ * "test-value": d => d.value
44
+ * }
45
+ * }
46
+ * ``` */
47
+ attributes?: {
48
+ [selector: string]: {
49
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
50
+ };
51
+ };
52
+ /** Accessor function for getting the values along the X axis. Default: `undefined` */
53
+ x: NumericAccessor<Datum>;
54
+ /** A single of multiple accessor functions for getting the values along the Y axis. Default: `undefined` */
55
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
56
+ /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */
57
+ id?: ((d: Datum, i?: number, ...rest: any[]) => string);
58
+ /** Component color accessor function. Default: `d => d.color` */
59
+ color?: ColorAccessor<Datum | Datum[]>;
60
+ /** Scale for X dimension, e.g. Scale.scaleLinear(). If you set xScale you'll be responsible for setting it's `domain` and `range` as well.
61
+ * Only continuous scales are supported.
62
+ * Default: `undefined` */
63
+ xScale?: ContinuousScale;
64
+ /** Scale for Y dimension, e.g. Scale.scaleLinear(). If you set yScale you'll be responsible for setting it's `domain` and `range` as well.
65
+ * Only continuous scales are supported.
66
+ * Default: `undefined` */
67
+ yScale?: ContinuousScale;
68
+ /** Identifies whether the component should be excluded from overall X and Y domain calculations or not.
69
+ * This property can be useful when you want pass individual data to a component and you don't want it to affect
70
+ * the scales of the chart.
71
+ * Default: `false` */
72
+ excludeFromDomainCalculation?: boolean;
73
+ /** Separate array of accessors for stacked components (eg StackedBar, Area). Default: `undefined` */
74
+ yStacked?: NumericAccessor<Datum>[];
75
+ /** Baseline accessor function for stacked values, useful with stacked areas. Default: `null` */
76
+ baseline?: NumericAccessor<Datum>;
77
+ /** An instance of the Tooltip component to be used with Crosshair. Default: `undefined` */
78
+ tooltip?: Tooltip | undefined;
79
+ /** Tooltip template accessor. The function is supposed to return either a valid HTML string or an HTMLElement. Default: `d => ''` */
80
+ template?: (data: Datum, x: number | Date) => string | HTMLElement;
81
+ /** Hide Crosshair when the corresponding element is far from mouse pointer. Default: `true` */
82
+ hideWhenFarFromPointer?: boolean;
83
+ /** Distance in pixels to check in the hideWhenFarFromPointer condition. Default: `100` */
84
+ hideWhenFarFromPointerDistance?: number;
85
+ /** Snap to the nearest data point.
86
+ * If disabled, the tooltip template will receive only the horizontal position of the crosshair and you'll be responsible
87
+ * for getting the underlying data records and crosshair circles (see the `getCircles` configuration option).
88
+ * Default: `true` */
89
+ snapToData?: boolean;
90
+ /** Custom function for setting up the crosshair circles, usually needed when `snapToData` is set to `false`.
91
+ * The function receives the horizontal position of the crosshair (in the data space, not in pixels), the data array
92
+ * and the `yScale` instance to help you calculate the correct vertical position of the circles.
93
+ * It has to return an array of the CrosshairCircle objects: `{ y: number; color: string; opacity?: number }[]`.
94
+ * Default: `undefined` */
95
+ getCircles?: (x: number, data: Datum[], yScale: ContinuousScale) => CrosshairCircle[];
96
+ data: Datum[];
97
+ component: Crosshair<Datum> | undefined;
98
+ componentContainer: ContainerCore | undefined;
99
+ ngAfterViewInit(): void;
100
+ ngOnChanges(changes: SimpleChanges): void;
101
+ private getConfig;
102
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisCrosshairComponent<any>, never>;
103
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisCrosshairComponent<any>, "vis-crosshair", never, { "duration": "duration"; "events": "events"; "attributes": "attributes"; "x": "x"; "y": "y"; "id": "id"; "color": "color"; "xScale": "xScale"; "yScale": "yScale"; "excludeFromDomainCalculation": "excludeFromDomainCalculation"; "yStacked": "yStacked"; "baseline": "baseline"; "tooltip": "tooltip"; "template": "template"; "hideWhenFarFromPointer": "hideWhenFarFromPointer"; "hideWhenFarFromPointerDistance": "hideWhenFarFromPointerDistance"; "snapToData": "snapToData"; "getCircles": "getCircles"; "data": "data"; }, {}, never, never>;
104
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./crosshair.component";
3
+ export declare class VisCrosshairModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisCrosshairModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VisCrosshairModule, [typeof i1.VisCrosshairComponent], never, [typeof i1.VisCrosshairComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<VisCrosshairModule>;
7
+ }
@@ -0,0 +1,86 @@
1
+ import { AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { Donut, DonutConfigInterface, ContainerCore, VisEventType, VisEventCallback, NumericAccessor, ColorAccessor } from '@unovis/ts';
3
+ import * as i0 from "@angular/core";
4
+ export declare class VisDonutComponent<Datum> implements DonutConfigInterface<Datum>, AfterViewInit {
5
+ /** Animation duration of the data update transitions in milliseconds. Default: `600` */
6
+ duration?: number;
7
+ /** Events configuration. An object containing properties in the following format:
8
+ *
9
+ * ```
10
+ * {
11
+ * \[selectorString]: {
12
+ * \[eventType]: callbackFunction
13
+ * }
14
+ * }
15
+ * ```
16
+ * e.g.:
17
+ * ```
18
+ * {
19
+ * \[Area.selectors.area]: {
20
+ * click: (d) => console.log("Clicked Area", d)
21
+ * }
22
+ * }
23
+ * ``` */
24
+ events?: {
25
+ [selector: string]: {
26
+ [eventType in VisEventType]?: VisEventCallback;
27
+ };
28
+ };
29
+ /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful
30
+ * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:
31
+ *
32
+ * ```
33
+ * {
34
+ * \[selectorString]: {
35
+ * \[attributeName]: attribute constant value or accessor function
36
+ * }
37
+ * }
38
+ * ```
39
+ * e.g.:
40
+ * ```
41
+ * {
42
+ * \[Area.selectors.area]: {
43
+ * "test-value": d => d.value
44
+ * }
45
+ * }
46
+ * ``` */
47
+ attributes?: {
48
+ [selector: string]: {
49
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
50
+ };
51
+ };
52
+ /** Accessor function for getting the unique data record id. Used for more persistent data updates. Default: `(d, i) => d.id ?? i` */
53
+ id?: ((d: Datum, i?: number, ...rest: any[]) => string | number);
54
+ /** Value accessor function. Default: `undefined` */
55
+ value: NumericAccessor<Datum>;
56
+ /** Diagram angle range. Default: `[0, 2 * Math.PI]` */
57
+ angleRange?: [number, number];
58
+ /** Pad angle. Default: `0` */
59
+ padAngle?: number;
60
+ /** Custom sort function. Default: `undefined` */
61
+ sortFunction?: (a: Datum, b: Datum) => number;
62
+ /** Corner Radius. Default: `0` */
63
+ cornerRadius?: number;
64
+ /** Color accessor function. Default: `undefined` */
65
+ color?: ColorAccessor<Datum>;
66
+ /** Explicitly set the donut outer radius. Default: `undefined` */
67
+ radius?: number;
68
+ /** Arc width in pixels. Set to `0` if you want to have a pie chart. Default: `20` */
69
+ arcWidth?: number;
70
+ /** Central label accessor function or text. Default: `undefined` */
71
+ centralLabel?: string;
72
+ /** Central sub-label accessor function or text. Default: `undefined` */
73
+ centralSubLabel?: string;
74
+ /** Enables wrapping for the sub-label. Default: `true` */
75
+ centralSubLabelWrap?: boolean;
76
+ /** Draw segment as a thin line when its value is 0. Default: `false` */
77
+ preventEmptySegments?: boolean;
78
+ data: Datum[];
79
+ component: Donut<Datum> | undefined;
80
+ componentContainer: ContainerCore | undefined;
81
+ ngAfterViewInit(): void;
82
+ ngOnChanges(changes: SimpleChanges): void;
83
+ private getConfig;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisDonutComponent<any>, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisDonutComponent<any>, "vis-donut", never, { "duration": "duration"; "events": "events"; "attributes": "attributes"; "id": "id"; "value": "value"; "angleRange": "angleRange"; "padAngle": "padAngle"; "sortFunction": "sortFunction"; "cornerRadius": "cornerRadius"; "color": "color"; "radius": "radius"; "arcWidth": "arcWidth"; "centralLabel": "centralLabel"; "centralSubLabel": "centralSubLabel"; "centralSubLabelWrap": "centralSubLabelWrap"; "preventEmptySegments": "preventEmptySegments"; "data": "data"; }, {}, never, never>;
86
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./donut.component";
3
+ export declare class VisDonutModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisDonutModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VisDonutModule, [typeof i1.VisDonutComponent], never, [typeof i1.VisDonutComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<VisDonutModule>;
7
+ }