-
Notifications
You must be signed in to change notification settings - Fork 155
/
Copy pathseries.ts
366 lines (320 loc) · 7.24 KB
/
series.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
/* eslint-disable @typescript-eslint/ban-types */
import { Property, Complex, ChildProperty } from '@syncfusion/ej2-base';
import { SeriesMarkerModel, SeriesMarkerBorderModel } from '../series/series-model';
import { SeriesMarkerDataLabelModel, SeriesMarkerDataLabelBorderModel } from '../series/series-model';
import { SeriesMarkerDataLabelConnectorLineModel } from '../series/series-model';
import { SeriesTooltipBorderModel, SeriesTooltipModel } from '../series/series-model';
import { SmithchartFont } from '../utils/utils';
import { SmithchartFontModel } from '../utils/utils-model';
import { Theme } from '../model/theme';
import { ISmithChartPoint } from '../model/interface';
export class SeriesTooltipBorder extends ChildProperty<SeriesTooltipBorder> {
/**
* border width for tooltip.
*
* @default 1
*/
@Property(1)
public width: number;
/**
* border color for tooltip
*
* @default null
*/
@Property(null)
public color: string;
}
export class SeriesTooltip extends ChildProperty<SeriesTooltip> {
/**
* visibility of tooltip.
*
* @default false
*/
@Property(false)
public visible: boolean;
/**
* color for tooltip
*
* @default null
*/
@Property(null)
public fill: string;
/**
* opacity for tooltip.
*
* @default 0.95
*/
@Property(0.95)
public opacity: number;
/**
* template for tooltip
*
* @default ''
*/
@Property('')
public template: string;
/**
* options for customizing tooltip border
*/
@Complex<SeriesTooltipBorderModel>({}, SeriesTooltipBorder)
public border: SeriesTooltipBorderModel;
}
export class SeriesMarkerBorder extends ChildProperty<SeriesMarkerBorder> {
/**
* border width for marker border.
*
* @default 3
*/
@Property(3)
public width: number;
/**
* border color for marker border.
*
* @default 'white'
*/
@Property('white')
public color: string;
}
export class SeriesMarkerDataLabelBorder extends ChildProperty<SeriesMarkerDataLabelBorder> {
/**
* border width for data label border.
*
* @default 0.1
*/
@Property(0.1)
public width: number;
/**
* border color for data label color.
*
* @default 'white'
*/
@Property('white')
public color: string;
}
export class SeriesMarkerDataLabelConnectorLine extends ChildProperty<SeriesMarkerDataLabelConnectorLine> {
/**
* border width for data label connector line.
*
* @default 1
*/
@Property(1)
public width: number;
/**
* border color for data label connector line.
*
* @default null
*/
@Property(null)
public color: string;
}
export class SeriesMarkerDataLabel extends ChildProperty<SeriesMarkerDataLabel> {
/**
* visibility for data label.
*
* @default false
*/
@Property(false)
public visible: boolean;
/**
* showing template for data label template
*
* @default ''
*/
@Property('')
public template: string;
/**
* color for data label.
*
* @default null
*/
@Property(null)
public fill: string;
/**
* opacity for data label.
*
* @default 1
*/
@Property(1)
public opacity: number;
/**
* options for customizing data label border
*
*/
@Complex<SeriesMarkerDataLabelBorderModel>({}, SeriesMarkerDataLabelBorder)
public border: SeriesMarkerDataLabelBorderModel;
/**
* options for customizing data label connector line
*/
@Complex<SeriesMarkerDataLabelConnectorLineModel>({}, SeriesMarkerDataLabelConnectorLine)
public connectorLine: SeriesMarkerDataLabelConnectorLineModel;
/**
* options for customizing font
*/
@Complex<SmithchartFontModel>(Theme.dataLabelFont, SmithchartFont)
public textStyle: SmithchartFontModel;
}
export class SeriesMarker extends ChildProperty<SeriesMarker> {
/**
* visibility for marker.
*
* @default false
*/
@Property(false)
public visible: boolean;
/**
* shape for marker.
*
* @default 'circle'
*/
@Property('circle')
public shape: string;
/**
* width for marker.
*
* @default 6
*/
@Property(6)
public width: number;
/**
* height for marker.
*
* @default 6
*/
@Property(6)
public height: number;
/**
* Url for the image that is to be displayed as marker
*
* @default ''
*/
@Property('')
public imageUrl: string;
/**
* color for marker.
*
* @default ''
*/
@Property('')
public fill: string;
/**
* opacity for marker.
*
* @default 1
*/
@Property(1)
public opacity: number;
/**
* options for customizing marker border
*/
@Complex<SeriesMarkerBorderModel>({}, SeriesMarkerBorder)
public border: SeriesMarkerBorderModel;
/**
* options for customizing marker data label
*/
@Complex<SeriesMarkerDataLabelModel>({}, SeriesMarkerDataLabel)
public dataLabel: SeriesMarkerDataLabelModel;
}
export class SmithchartSeries extends ChildProperty<SmithchartSeries> {
/**
* visibility for series.
*
* @default 'visible'
*/
@Property('visible')
public visibility: string;
/**
* points for series.
*
* @default []
*/
@Property([])
public points: ISmithChartPoint[];
/**
* resistance name for dataSource
*
* @default ''
*/
@Property('')
public resistance: string;
/**
* reactance name for dataSource
*
* @default ''
*/
@Property('')
public reactance: string;
/**
* tooltip mapping name for the series
*
* @default ''
*/
@Property('')
public tooltipMappingName: string;
/**
* Specifies the dataSource
*
* @default null
* @isdatamanager false
*/
@Property(null)
public dataSource: Object;
/**
* The name of the series visible in legend.
*
* @default ''
*/
@Property('')
public name: string;
/**
* color for series.
*
* @default null
*/
@Property(null)
public fill: string;
/**
* enable or disable the animation of series.
*
* @default false
*/
@Property(false)
public enableAnimation: boolean;
/**
* perform animation of series based on animation duration.
*
* @default '2000ms'
*/
@Property('2000ms')
public animationDuration: string;
/**
* avoid the overlap of dataLabels.
*
* @default false
*/
@Property(false)
public enableSmartLabels: boolean;
/**
* width for series.
*
* @default 1
*/
@Property(1)
public width: number;
/**
* opacity for series.
*
* @default 1
*/
@Property(1)
public opacity: number;
/**
* options for customizing marker
*/
@Complex<SeriesMarkerModel>({}, SeriesMarker)
public marker: SeriesMarkerModel;
/**
* options for customizing tooltip
*/
@Complex<SeriesTooltipModel>({}, SeriesTooltip)
public tooltip: SeriesTooltipModel;
}