@revivejs/angular-infinity-charts 2.0.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.
package/src/types.d.ts ADDED
@@ -0,0 +1,220 @@
1
+ export type AngularInfinityChartType = 'line' | 'area' | 'stacked-area' | 'bar' | 'bar-3d' | 'combo' | 'sparkline' | 'scatter' | 'gauge' | 'gauge-semicircle' | 'radial-progress' | 'thermometer' | 'thermometer-horizontal' | 'battery' | 'pie' | 'donut';
2
+ export type AngularInfinityThemeMode = 'light' | 'dark' | 'custom';
3
+ export type AngularInfinityLegendPosition = 'top' | 'right' | 'bottom' | 'left';
4
+ export type AngularInfinityLegendAlign = 'start' | 'center' | 'end';
5
+ export type AngularInfinityValue = number | string | Date;
6
+ export interface AngularInfinityTitleOptions {
7
+ text?: string;
8
+ subtitle?: string;
9
+ align?: AngularInfinityLegendAlign;
10
+ }
11
+ export interface AngularInfinityAxisOptions {
12
+ show?: boolean;
13
+ title?: string;
14
+ tickCount?: number;
15
+ min?: number;
16
+ max?: number;
17
+ nice?: boolean;
18
+ format?: (value: number | string) => string;
19
+ }
20
+ export interface AngularInfinityGridOptions {
21
+ show?: boolean;
22
+ x?: boolean;
23
+ y?: boolean;
24
+ color?: string;
25
+ opacity?: number;
26
+ }
27
+ export interface AngularInfinityLegendOptions {
28
+ show?: boolean;
29
+ position?: AngularInfinityLegendPosition;
30
+ align?: AngularInfinityLegendAlign;
31
+ }
32
+ export interface AngularInfinityLayoutOptions {
33
+ padding?: any;
34
+ plotPadding?: any;
35
+ cornerRadius?: number;
36
+ background?: string;
37
+ }
38
+ export interface AngularInfinityChartColorOverrides {
39
+ background?: string;
40
+ surface?: string;
41
+ surfaceAlt?: string;
42
+ plotBackground?: string;
43
+ plotBorder?: string;
44
+ border?: string;
45
+ grid?: string;
46
+ axis?: string;
47
+ text?: string;
48
+ mutedText?: string;
49
+ title?: string;
50
+ legendText?: string;
51
+ tooltipBackground?: string;
52
+ tooltipText?: string;
53
+ pointStroke?: string;
54
+ threshold?: string;
55
+ gaugeTrack?: string;
56
+ gaugeNeedle?: string;
57
+ interactiveGlow?: string;
58
+ shadow?: string;
59
+ }
60
+ export interface AngularInfinityAnimationOptions {
61
+ enabled?: boolean;
62
+ duration?: number;
63
+ easing?: string;
64
+ stagger?: number;
65
+ mode?: 'subtle' | 'expressive' | 'none';
66
+ }
67
+ export interface AngularInfinityResponsiveOptions {
68
+ enabled?: boolean;
69
+ debounceMs?: number;
70
+ minHeight?: number;
71
+ }
72
+ export interface AngularInfinityInteractionOptions {
73
+ enabled?: boolean;
74
+ tooltip?: boolean;
75
+ hover?: boolean;
76
+ click?: boolean;
77
+ }
78
+ export interface AngularInfinityRealtimeOptions {
79
+ enabled?: boolean;
80
+ maxPoints?: number;
81
+ batchWindowMs?: number;
82
+ preserveDomain?: boolean;
83
+ }
84
+ export interface AngularInfinityChartThreshold {
85
+ id?: string;
86
+ axis?: 'x' | 'y';
87
+ value: number;
88
+ label?: string;
89
+ color?: string;
90
+ dasharray?: string;
91
+ }
92
+ export interface AngularInfinityGaugeBandInput {
93
+ from: number;
94
+ to: number;
95
+ color?: string;
96
+ label?: string;
97
+ }
98
+ export interface AngularInfinityGaugeOptions {
99
+ min?: number;
100
+ max?: number;
101
+ unit?: string;
102
+ label?: string;
103
+ startAngle?: number;
104
+ endAngle?: number;
105
+ needle?: boolean;
106
+ trackColor?: string;
107
+ bands?: AngularInfinityGaugeBandInput[];
108
+ valueFormatter?: (value: number) => string;
109
+ }
110
+ export interface AngularInfinityThemeTokens {
111
+ name?: string;
112
+ mode?: AngularInfinityThemeMode;
113
+ background?: string;
114
+ surface?: string;
115
+ surfaceAlt?: string;
116
+ plotBackground?: string;
117
+ plotBorder?: string;
118
+ border?: string;
119
+ grid?: string;
120
+ axis?: string;
121
+ text?: string;
122
+ mutedText?: string;
123
+ title?: string;
124
+ legendText?: string;
125
+ shadow?: string;
126
+ palette?: string[];
127
+ fontFamily?: string;
128
+ fontSize?: number;
129
+ tooltipBackground?: string;
130
+ tooltipText?: string;
131
+ pointStroke?: string;
132
+ threshold?: string;
133
+ gaugeTrack?: string;
134
+ gaugeNeedle?: string;
135
+ interactiveGlow?: string;
136
+ }
137
+ export type AngularInfinityThemeInput = 'light' | 'dark' | AngularInfinityThemeTokens;
138
+ export interface AngularInfinityCartesianPoint {
139
+ x?: AngularInfinityValue;
140
+ y: number;
141
+ label?: string;
142
+ }
143
+ export type AngularInfinityCartesianValueInput = number | AngularInfinityCartesianPoint;
144
+ export interface AngularInfinityCartesianSeriesInput {
145
+ id?: string;
146
+ name?: string;
147
+ color?: string;
148
+ type?: 'line' | 'area' | 'bar' | 'scatter';
149
+ data: AngularInfinityCartesianValueInput[];
150
+ }
151
+ export interface AngularInfinityDonutSliceInput {
152
+ id?: string;
153
+ label: string;
154
+ value: number;
155
+ color?: string;
156
+ }
157
+ export interface AngularInfinityLabeledValueInput {
158
+ label: string;
159
+ value: number;
160
+ color?: string;
161
+ }
162
+ export type AngularInfinityChartDataInput = number[] | AngularInfinityCartesianValueInput[] | AngularInfinityDonutSliceInput[] | AngularInfinityLabeledValueInput[] | any;
163
+ export type AngularInfinitySeriesCollectionInput = AngularInfinityCartesianSeriesInput[] | AngularInfinityDonutSliceInput[];
164
+ export interface AngularInfinityChartPlugin {
165
+ id: string;
166
+ hooks?: any;
167
+ }
168
+ export interface AngularInfinityChartConfig {
169
+ container?: HTMLElement | string;
170
+ type?: AngularInfinityChartType | string;
171
+ width?: number;
172
+ height?: number;
173
+ title?: string | AngularInfinityTitleOptions;
174
+ labels?: string[];
175
+ data?: AngularInfinityChartDataInput;
176
+ series?: AngularInfinitySeriesCollectionInput;
177
+ theme?: AngularInfinityThemeInput;
178
+ showNumber?: boolean;
179
+ showLegend?: boolean;
180
+ showTooltip?: boolean;
181
+ xAxis?: AngularInfinityAxisOptions;
182
+ yAxis?: AngularInfinityAxisOptions;
183
+ grid?: AngularInfinityGridOptions;
184
+ legend?: AngularInfinityLegendOptions;
185
+ layout?: AngularInfinityLayoutOptions;
186
+ colors?: AngularInfinityChartColorOverrides;
187
+ thresholds?: AngularInfinityChartThreshold[];
188
+ gauge?: AngularInfinityGaugeOptions;
189
+ animation?: AngularInfinityAnimationOptions;
190
+ responsive?: AngularInfinityResponsiveOptions;
191
+ interaction?: AngularInfinityInteractionOptions;
192
+ realtime?: AngularInfinityRealtimeOptions;
193
+ plugins?: AngularInfinityChartPlugin[];
194
+ [key: string]: any;
195
+ }
196
+ export interface AngularInfinityChartPublicApi {
197
+ ready(): Promise<void>;
198
+ update(config: AngularInfinityChartConfig): void;
199
+ updateSeries(series: AngularInfinitySeriesCollectionInput): void;
200
+ appendData(point: any): void;
201
+ appendBatch(points: any[]): void;
202
+ replaceData(data: AngularInfinityChartDataInput): void;
203
+ resize(width?: number, height?: number): void;
204
+ setTheme(theme: AngularInfinityThemeInput): void;
205
+ registerPlugin(plugin: AngularInfinityChartPlugin): void;
206
+ on(event: string, handler: (payload?: any) => void): () => void;
207
+ destroy(): void;
208
+ }
209
+ export interface AngularInfinityChartEvent {
210
+ host: HTMLElement;
211
+ chart: AngularInfinityChartPublicApi | null;
212
+ config: AngularInfinityChartConfig;
213
+ }
214
+ export interface InfinityChartLifecycleHooks {
215
+ onCreate(event: AngularInfinityChartEvent): void;
216
+ onReady(event: AngularInfinityChartEvent): void;
217
+ onUpdated(event: AngularInfinityChartEvent): void;
218
+ onResized(event: AngularInfinityChartEvent): void;
219
+ onDestroyed(event: AngularInfinityChartEvent): void;
220
+ }
package/src/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}