@syncfusion/ej2-treemap 19.3.53 → 19.4.38
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/dist/ej2-treemap.umd.min.js +2 -2
- package/dist/ej2-treemap.umd.min.js.map +1 -1
- package/dist/es6/ej2-treemap.es2015.js +40 -8
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +40 -8
- package/dist/es6/ej2-treemap.es5.js.map +1 -1
- package/dist/global/ej2-treemap.min.js +2 -2
- package/dist/global/ej2-treemap.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/treemap/layout/legend.ts +991 -0
- package/dist/ts/treemap/layout/render-panel.ts +717 -0
- package/dist/ts/treemap/model/base.ts +800 -0
- package/dist/ts/treemap/model/constants.ts +118 -0
- package/dist/ts/treemap/model/image-export.ts +109 -0
- package/dist/ts/treemap/model/interface.ts +554 -0
- package/dist/ts/treemap/model/pdf-export.ts +103 -0
- package/dist/ts/treemap/model/print.ts +93 -0
- package/dist/ts/treemap/model/theme.ts +202 -0
- package/dist/ts/treemap/treemap.ts +1571 -0
- package/dist/ts/treemap/user-interaction/highlight-selection.ts +530 -0
- package/dist/ts/treemap/user-interaction/tooltip.ts +199 -0
- package/dist/ts/treemap/utils/enum.ts +218 -0
- package/dist/ts/treemap/utils/helper.ts +1181 -0
- package/package.json +11 -11
- package/src/treemap/layout/render-panel.js +1 -1
- package/src/treemap/model/theme.js +34 -0
- package/src/treemap/utils/helper.js +5 -7
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps base doc
|
|
3
|
+
*/
|
|
4
|
+
import { Property, ChildProperty, Complex, Collection } from '@syncfusion/ej2-base';
|
|
5
|
+
import { LabelPosition, Alignment, HighLightMode, SelectionMode, LabelIntersectAction, LabelPlacement } from '../utils/enum';
|
|
6
|
+
import { LabelAlignment, LegendShape, LegendPosition, LegendMode, LegendOrientation } from '../utils/enum';
|
|
7
|
+
import { BorderModel, FontModel, SubTitleSettingsModel, ColorMappingModel, CommonTitleSettingsModel } from './base-model';
|
|
8
|
+
import { Location } from '../utils/helper';
|
|
9
|
+
import { defaultFont } from './constants';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Sets and gets the shape of the marker in the treemap.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export type MarkerShape = 'Circle' | 'Rectangle' | 'Triangle' | 'Diamond' | 'Cross' |
|
|
16
|
+
'HorizontalLine' | 'VerticalLine' | 'Pentagon' | 'InvertedTriangle' | 'Image';
|
|
17
|
+
/**
|
|
18
|
+
* Sets and gets the options for customizing the color and width of the border in treemap component.
|
|
19
|
+
*/
|
|
20
|
+
export class Border extends ChildProperty<Border> {
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Sets and gets the color of the border. This property accepts the value in hex code and rgba string as a valid CSS color string.
|
|
24
|
+
*
|
|
25
|
+
* @default '#808080'
|
|
26
|
+
*/
|
|
27
|
+
@Property('#808080')
|
|
28
|
+
public color: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Defines the width of the border in the treemap component.
|
|
32
|
+
*
|
|
33
|
+
* @default 0
|
|
34
|
+
*/
|
|
35
|
+
@Property(0)
|
|
36
|
+
public width: number;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Sets and gets the margin for the treemap component.
|
|
42
|
+
*/
|
|
43
|
+
export class Margin extends ChildProperty<Margin> {
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Sets and gets the left margin for the treemap component.
|
|
47
|
+
*
|
|
48
|
+
* @default 10
|
|
49
|
+
*/
|
|
50
|
+
@Property(10)
|
|
51
|
+
public left: number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Sets and gets the right margin for the treemap component.
|
|
55
|
+
*
|
|
56
|
+
* @default 10
|
|
57
|
+
*/
|
|
58
|
+
@Property(10)
|
|
59
|
+
public right: number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sets and gets the top margin for the treemap component.
|
|
63
|
+
*
|
|
64
|
+
* @default 10
|
|
65
|
+
*/
|
|
66
|
+
@Property(10)
|
|
67
|
+
public top: number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets and gets the bottom margin for the treemap component.
|
|
71
|
+
*
|
|
72
|
+
* @default 10
|
|
73
|
+
*/
|
|
74
|
+
@Property(10)
|
|
75
|
+
public bottom: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Sets and gets the options to customize the style of the text contents in the treemap component.
|
|
80
|
+
*/
|
|
81
|
+
export class Font extends ChildProperty<Font> {
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Sets and gets the size for the text in the treemap component.
|
|
85
|
+
*
|
|
86
|
+
* @default null
|
|
87
|
+
*/
|
|
88
|
+
@Property(null)
|
|
89
|
+
public size: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Sets and gets the color for the text in the treemap component.
|
|
93
|
+
*
|
|
94
|
+
* @default null
|
|
95
|
+
*/
|
|
96
|
+
@Property(null)
|
|
97
|
+
public color: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Sets and gets the font family for the text in the treemap component.
|
|
101
|
+
*
|
|
102
|
+
* @default ''
|
|
103
|
+
*/
|
|
104
|
+
@Property(defaultFont)
|
|
105
|
+
public fontFamily: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets and gets the font weight for the text in the treemap component.
|
|
109
|
+
*
|
|
110
|
+
* @default 'Normal'
|
|
111
|
+
*/
|
|
112
|
+
@Property('Normal')
|
|
113
|
+
public fontWeight: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Sets and gets the font style for the text in the treemap component.
|
|
117
|
+
*
|
|
118
|
+
* @default 'Normal'
|
|
119
|
+
*/
|
|
120
|
+
@Property('Normal')
|
|
121
|
+
public fontStyle: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Sets and gets the opacity of the text in the treemap component.
|
|
125
|
+
*
|
|
126
|
+
* @default 1
|
|
127
|
+
*/
|
|
128
|
+
@Property(1)
|
|
129
|
+
public opacity: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Sets and gets the options for customizing the common title of the treemap component.
|
|
135
|
+
*/
|
|
136
|
+
export class CommonTitleSettings extends ChildProperty<CommonTitleSettings> {
|
|
137
|
+
/**
|
|
138
|
+
* Sets and gets the text for the title in the treemap component.
|
|
139
|
+
*
|
|
140
|
+
* @default ''
|
|
141
|
+
*/
|
|
142
|
+
@Property('')
|
|
143
|
+
public text: string;
|
|
144
|
+
/**
|
|
145
|
+
* Define the description of the title for the accessibility in the treemap component.
|
|
146
|
+
*
|
|
147
|
+
* @default ''
|
|
148
|
+
*/
|
|
149
|
+
@Property('')
|
|
150
|
+
public description: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Sets and gets the options for customizing the subtitle of the treemap component.
|
|
154
|
+
*/
|
|
155
|
+
export class SubTitleSettings extends CommonTitleSettings {
|
|
156
|
+
/**
|
|
157
|
+
* Sets and gets the text style for the subtitle in the treemap component.
|
|
158
|
+
*/
|
|
159
|
+
@Complex<FontModel>({ size: '14px' }, Font)
|
|
160
|
+
public textStyle: FontModel;
|
|
161
|
+
/**
|
|
162
|
+
* Sets and gets the alignment of the subtitle text in the treemap component.
|
|
163
|
+
*
|
|
164
|
+
* @default 'Center'
|
|
165
|
+
*/
|
|
166
|
+
@Property('Center')
|
|
167
|
+
public alignment: Alignment;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Sets and gets the options for customizing the title of the treemap component.
|
|
171
|
+
*/
|
|
172
|
+
export class TitleSettings extends CommonTitleSettings {
|
|
173
|
+
/**
|
|
174
|
+
* Sets and gets the options to customizing the text styles of the treemap component.
|
|
175
|
+
*/
|
|
176
|
+
@Complex<FontModel>({ size: '15px' }, Font)
|
|
177
|
+
public textStyle: FontModel;
|
|
178
|
+
/**
|
|
179
|
+
* Sets and gets the text position of the title text in the treemap component.
|
|
180
|
+
*
|
|
181
|
+
* @default 'Center'
|
|
182
|
+
*/
|
|
183
|
+
@Property('Center')
|
|
184
|
+
public alignment: Alignment;
|
|
185
|
+
/**
|
|
186
|
+
* Sets and gets the options to customize the subtitle for the treemap.
|
|
187
|
+
*/
|
|
188
|
+
@Complex<SubTitleSettingsModel>({}, SubTitleSettings)
|
|
189
|
+
public subtitleSettings: SubTitleSettingsModel;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Sets and gets the options to customize the color-mapping in treemap component.
|
|
193
|
+
*/
|
|
194
|
+
export class ColorMapping extends ChildProperty<ColorMapping> {
|
|
195
|
+
/**
|
|
196
|
+
* Sets and gets the value from which the range of color mapping starts.
|
|
197
|
+
*
|
|
198
|
+
* @default null
|
|
199
|
+
*/
|
|
200
|
+
@Property(null)
|
|
201
|
+
public from: number;
|
|
202
|
+
/**
|
|
203
|
+
* Sets and gets the value to which the range of color mapping ends.
|
|
204
|
+
*
|
|
205
|
+
* @default null
|
|
206
|
+
*/
|
|
207
|
+
@Property(null)
|
|
208
|
+
public to: number;
|
|
209
|
+
/**
|
|
210
|
+
* Sets and gets the color for the color-mapping in treemap.
|
|
211
|
+
*
|
|
212
|
+
* @default null
|
|
213
|
+
*/
|
|
214
|
+
@Property(null)
|
|
215
|
+
public color: string | string[];
|
|
216
|
+
/**
|
|
217
|
+
* Sets and gets the label text for the legend based on color mapping.
|
|
218
|
+
*
|
|
219
|
+
* @default null
|
|
220
|
+
*/
|
|
221
|
+
@Property(null)
|
|
222
|
+
public label: string;
|
|
223
|
+
/**
|
|
224
|
+
* Sets and gets the value for the color-mapping from the data source.
|
|
225
|
+
*
|
|
226
|
+
* @default null
|
|
227
|
+
*/
|
|
228
|
+
@Property(null)
|
|
229
|
+
public value: string | number;
|
|
230
|
+
/**
|
|
231
|
+
* Sets and gets the minimum opacity for the color-mapping in the treemap component.
|
|
232
|
+
*
|
|
233
|
+
* @default null
|
|
234
|
+
*/
|
|
235
|
+
@Property(null)
|
|
236
|
+
public minOpacity: number;
|
|
237
|
+
/**
|
|
238
|
+
* Sets and gets the maximum opacity for the color-mapping in the treemap component.
|
|
239
|
+
*
|
|
240
|
+
* @default null
|
|
241
|
+
*/
|
|
242
|
+
@Property(null)
|
|
243
|
+
public maxOpacity: number;
|
|
244
|
+
/**
|
|
245
|
+
* Enables or disables the visibility of the legend for color mapping in the treemap component.
|
|
246
|
+
*
|
|
247
|
+
* @default true
|
|
248
|
+
*/
|
|
249
|
+
@Property(true)
|
|
250
|
+
public showLegend: boolean;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Sets and gets the options for customizing the legend of the treemap component.
|
|
255
|
+
*/
|
|
256
|
+
export class LegendSettings extends ChildProperty<LegendSettings> {
|
|
257
|
+
/**
|
|
258
|
+
* Enables or disables the visibility of legend in the treemap component.
|
|
259
|
+
*
|
|
260
|
+
* @default false
|
|
261
|
+
*/
|
|
262
|
+
@Property(false)
|
|
263
|
+
public visible: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Sets and gets the mode of legend in the treemap component. The modes available are default and interactive modes.
|
|
266
|
+
*
|
|
267
|
+
* @default 'Default'
|
|
268
|
+
*/
|
|
269
|
+
@Property('Default')
|
|
270
|
+
public mode: LegendMode;
|
|
271
|
+
/**
|
|
272
|
+
* Sets and gets the background color of legend in the treemap component.
|
|
273
|
+
*
|
|
274
|
+
* @default 'transparent'
|
|
275
|
+
*/
|
|
276
|
+
@Property('transparent')
|
|
277
|
+
public background: string;
|
|
278
|
+
/**
|
|
279
|
+
* Sets and gets the shape of legend in the treemap component.
|
|
280
|
+
*
|
|
281
|
+
* @default 'Circle'
|
|
282
|
+
*/
|
|
283
|
+
@Property('Circle')
|
|
284
|
+
public shape: LegendShape;
|
|
285
|
+
/**
|
|
286
|
+
* Sets and gets the width of legend in the treemap component.
|
|
287
|
+
*
|
|
288
|
+
* @default ''
|
|
289
|
+
*/
|
|
290
|
+
@Property('')
|
|
291
|
+
public width: string;
|
|
292
|
+
/**
|
|
293
|
+
* Sets and gets the height of legend in the treemap component.
|
|
294
|
+
*
|
|
295
|
+
* @default ''
|
|
296
|
+
*/
|
|
297
|
+
@Property('')
|
|
298
|
+
public height: string;
|
|
299
|
+
/**
|
|
300
|
+
* Sets and gets the options to customize the text style of legend in the treemap component.
|
|
301
|
+
*/
|
|
302
|
+
@Complex<FontModel>({ size: '13px' }, Font)
|
|
303
|
+
public textStyle: FontModel;
|
|
304
|
+
/**
|
|
305
|
+
* Sets and gets the shape color of legend in the treemap component.
|
|
306
|
+
*
|
|
307
|
+
* @default null
|
|
308
|
+
*/
|
|
309
|
+
@Property(null)
|
|
310
|
+
public fill: string;
|
|
311
|
+
/**
|
|
312
|
+
* Sets and gets the opacity of legends in the treemap component.
|
|
313
|
+
*
|
|
314
|
+
* @default 1
|
|
315
|
+
*/
|
|
316
|
+
@Property(1)
|
|
317
|
+
public opacity: number;
|
|
318
|
+
/**
|
|
319
|
+
* Sets and gets the width of the shapes in legend in the treemap component.
|
|
320
|
+
*
|
|
321
|
+
* @default 15
|
|
322
|
+
*/
|
|
323
|
+
@Property(15)
|
|
324
|
+
public shapeWidth: number;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Sets and gets the height of the shapes of legend in the treemap component.
|
|
328
|
+
*
|
|
329
|
+
* @default 15
|
|
330
|
+
*/
|
|
331
|
+
@Property(15)
|
|
332
|
+
public shapeHeight: number;
|
|
333
|
+
/**
|
|
334
|
+
* Sets and gets the shape padding of legend in the treemap component.
|
|
335
|
+
*
|
|
336
|
+
* @default 10
|
|
337
|
+
*/
|
|
338
|
+
@Property(10)
|
|
339
|
+
public shapePadding: number;
|
|
340
|
+
/**
|
|
341
|
+
* Sets and gets the URL path of the legend shapes rendered as image in the treemap component.
|
|
342
|
+
*
|
|
343
|
+
* @default null
|
|
344
|
+
*/
|
|
345
|
+
@Property(null)
|
|
346
|
+
public imageUrl: string;
|
|
347
|
+
/**
|
|
348
|
+
* Sets and gets the options for customizing the color and width of the border of the legend in the treemap component.
|
|
349
|
+
*/
|
|
350
|
+
@Complex<BorderModel>({ color: '#000000', width: 0 }, Border)
|
|
351
|
+
public border: BorderModel;
|
|
352
|
+
/**
|
|
353
|
+
* Sets and gets the options for customizing the color and width of the border of the legend shape in the treemap.
|
|
354
|
+
*/
|
|
355
|
+
@Complex<BorderModel>({ color: '#000000', width: 0 }, Border)
|
|
356
|
+
public shapeBorder: BorderModel;
|
|
357
|
+
/**
|
|
358
|
+
* Sets and gets the options to customize the title of the legend in the treemap component.
|
|
359
|
+
*/
|
|
360
|
+
@Complex<CommonTitleSettingsModel>({}, CommonTitleSettings)
|
|
361
|
+
public title: CommonTitleSettingsModel;
|
|
362
|
+
/**
|
|
363
|
+
* Sets and gets the options to customize the text style of the legend in the treemap component.
|
|
364
|
+
*/
|
|
365
|
+
@Complex<FontModel>({ size: '14px' }, Font)
|
|
366
|
+
public titleStyle: FontModel;
|
|
367
|
+
/**
|
|
368
|
+
* Sets and gets the position of legend in the treemap component.
|
|
369
|
+
*
|
|
370
|
+
* @default 'Bottom'
|
|
371
|
+
*/
|
|
372
|
+
@Property('Bottom')
|
|
373
|
+
public position: LegendPosition;
|
|
374
|
+
/**
|
|
375
|
+
* Sets and gets the orientation of legend in the treemap component.
|
|
376
|
+
*
|
|
377
|
+
* @default 'None'
|
|
378
|
+
*/
|
|
379
|
+
@Property('None')
|
|
380
|
+
public orientation: LegendOrientation;
|
|
381
|
+
/**
|
|
382
|
+
* Enables or disables the pointer for interactive legend in the treemap component.
|
|
383
|
+
*
|
|
384
|
+
* @default false
|
|
385
|
+
*/
|
|
386
|
+
@Property(false)
|
|
387
|
+
public invertedPointer: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Sets and gets the label position for interactive legend in the treemap component.
|
|
390
|
+
*
|
|
391
|
+
* @default 'After'
|
|
392
|
+
*/
|
|
393
|
+
@Property('After')
|
|
394
|
+
public labelPosition: LabelPlacement;
|
|
395
|
+
/**
|
|
396
|
+
* Sets and gets the label intersect action of legend in the treemap component.
|
|
397
|
+
*
|
|
398
|
+
* @default 'None'
|
|
399
|
+
*/
|
|
400
|
+
@Property('None')
|
|
401
|
+
public labelDisplayMode: LabelIntersectAction;
|
|
402
|
+
/**
|
|
403
|
+
* Sets and gets the alignment of legend in the treemap component.
|
|
404
|
+
*
|
|
405
|
+
* @default 'Center'
|
|
406
|
+
*/
|
|
407
|
+
@Property('Center')
|
|
408
|
+
public alignment: Alignment;
|
|
409
|
+
/**
|
|
410
|
+
* Sets and gets the location of the legend using x and y values in the treemap component.
|
|
411
|
+
*/
|
|
412
|
+
@Property({ x: 0, y: 0 })
|
|
413
|
+
public location: Location;
|
|
414
|
+
/**
|
|
415
|
+
* Sets and gets the visibility state of the legend in the treemap component.
|
|
416
|
+
*
|
|
417
|
+
* @default null
|
|
418
|
+
*/
|
|
419
|
+
@Property(null)
|
|
420
|
+
public showLegendPath: string;
|
|
421
|
+
/**
|
|
422
|
+
* Sets and gets the value path from the data source to render legend in the treemap component.
|
|
423
|
+
*
|
|
424
|
+
* @default null
|
|
425
|
+
*/
|
|
426
|
+
@Property(null)
|
|
427
|
+
public valuePath: string;
|
|
428
|
+
/**
|
|
429
|
+
* Enables or disables to remove the duplicate legend item.
|
|
430
|
+
*
|
|
431
|
+
* @default false
|
|
432
|
+
*/
|
|
433
|
+
@Property(false)
|
|
434
|
+
public removeDuplicateLegend: boolean;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Sets and gets the settings for drill to visualize the treemap rendered in the initial state.
|
|
438
|
+
*/
|
|
439
|
+
export class InitialDrillSettings extends ChildProperty<InitialDrillSettings> {
|
|
440
|
+
/**
|
|
441
|
+
* Sets and gets the initial rendering level index in the treemap component.
|
|
442
|
+
*
|
|
443
|
+
* @default null
|
|
444
|
+
*/
|
|
445
|
+
@Property(null)
|
|
446
|
+
public groupIndex: number;
|
|
447
|
+
/**
|
|
448
|
+
* Sets and gets the initial rendering level name in the treemap component.
|
|
449
|
+
*
|
|
450
|
+
* @default null
|
|
451
|
+
*/
|
|
452
|
+
@Property(null)
|
|
453
|
+
public groupName: string;
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Sets and gets the options for customizing the leaf item of the treemap component.
|
|
458
|
+
*/
|
|
459
|
+
export class LeafItemSettings extends ChildProperty<LeafItemSettings> {
|
|
460
|
+
/**
|
|
461
|
+
* Sets and gets the fill color of leaf items in the treemap component.
|
|
462
|
+
*
|
|
463
|
+
* @default null
|
|
464
|
+
*/
|
|
465
|
+
@Property(null)
|
|
466
|
+
public fill: string;
|
|
467
|
+
/**
|
|
468
|
+
* Enables or disables automatic filling of colors in leaf items of the treemap component.
|
|
469
|
+
*
|
|
470
|
+
* @default false
|
|
471
|
+
*/
|
|
472
|
+
@Property(false)
|
|
473
|
+
public autoFill: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Sets and gets the options for customizing the color and width of the border of the leaf item in the treemap component.
|
|
476
|
+
*/
|
|
477
|
+
@Complex<BorderModel>({}, Border)
|
|
478
|
+
public border: BorderModel;
|
|
479
|
+
/**
|
|
480
|
+
* Sets and gets the gap between the leaf item in the treemap component.
|
|
481
|
+
*
|
|
482
|
+
* @default 0
|
|
483
|
+
*/
|
|
484
|
+
@Property(0)
|
|
485
|
+
public gap: number;
|
|
486
|
+
/**
|
|
487
|
+
* Sets and gets the padding of leaf item in the treemap component.
|
|
488
|
+
*
|
|
489
|
+
* @default 10
|
|
490
|
+
*/
|
|
491
|
+
@Property(10)
|
|
492
|
+
public padding: number;
|
|
493
|
+
/**
|
|
494
|
+
* Sets and gets the opacity of leaf item in the treemap component.
|
|
495
|
+
*
|
|
496
|
+
* @default 1
|
|
497
|
+
*/
|
|
498
|
+
@Property(1)
|
|
499
|
+
public opacity: number;
|
|
500
|
+
/**
|
|
501
|
+
* Shows or hides the labels in the treemap component.
|
|
502
|
+
*
|
|
503
|
+
* @default true
|
|
504
|
+
*/
|
|
505
|
+
@Property(true)
|
|
506
|
+
public showLabels: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* Sets and gets the value path from the data source for label of leaf item in the treemap component.
|
|
509
|
+
*
|
|
510
|
+
* @default null
|
|
511
|
+
*/
|
|
512
|
+
@Property(null)
|
|
513
|
+
public labelPath: string;
|
|
514
|
+
/**
|
|
515
|
+
* Sets and gets the label text format of leaf item in the treemap component.
|
|
516
|
+
*
|
|
517
|
+
* @default null
|
|
518
|
+
*/
|
|
519
|
+
@Property(null)
|
|
520
|
+
public labelFormat: string;
|
|
521
|
+
/**
|
|
522
|
+
* Sets and gets the position of the labels in the treemap component.
|
|
523
|
+
*
|
|
524
|
+
* @default 'TopLeft'
|
|
525
|
+
*/
|
|
526
|
+
@Property('TopLeft')
|
|
527
|
+
public labelPosition: LabelPosition;
|
|
528
|
+
/**
|
|
529
|
+
* Sets and gets the style of the labels of leaf item in the treemap component.
|
|
530
|
+
*/
|
|
531
|
+
@Complex<FontModel>({ color: null, size: '12px' }, Font)
|
|
532
|
+
public labelStyle: FontModel;
|
|
533
|
+
/**
|
|
534
|
+
* Sets and gets the label template of leaf item in the treemap component.
|
|
535
|
+
*
|
|
536
|
+
* @default null
|
|
537
|
+
*/
|
|
538
|
+
@Property(null)
|
|
539
|
+
public labelTemplate: string;
|
|
540
|
+
/**
|
|
541
|
+
* Sets and gets the position of the template of leaf item in the treemap component.
|
|
542
|
+
*
|
|
543
|
+
* @default 'Center'
|
|
544
|
+
*/
|
|
545
|
+
@Property('Center')
|
|
546
|
+
public templatePosition: LabelPosition;
|
|
547
|
+
/**
|
|
548
|
+
* Sets and gets the label intersect action of leaf item in the treemap component.
|
|
549
|
+
*
|
|
550
|
+
* @default 'Trim'
|
|
551
|
+
*/
|
|
552
|
+
@Property('Trim')
|
|
553
|
+
public interSectAction: LabelAlignment;
|
|
554
|
+
/**
|
|
555
|
+
* Sets and gets the options to customize color-mapping of the treemap component.
|
|
556
|
+
*/
|
|
557
|
+
@Collection<ColorMappingModel>([], ColorMapping)
|
|
558
|
+
public colorMapping: ColorMappingModel[];
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Sets and gets the options for customizing the tooltip of the treemap component.
|
|
562
|
+
*/
|
|
563
|
+
export class TooltipSettings extends ChildProperty<TooltipSettings> {
|
|
564
|
+
/**
|
|
565
|
+
* Enables or disables the visibility state of tooltip in the treemap component.
|
|
566
|
+
*
|
|
567
|
+
* @default false
|
|
568
|
+
*/
|
|
569
|
+
@Property(false)
|
|
570
|
+
public visible: boolean;
|
|
571
|
+
/**
|
|
572
|
+
* Sets and gets the template for tooltip in the treemap component.
|
|
573
|
+
*
|
|
574
|
+
* @default ''
|
|
575
|
+
*/
|
|
576
|
+
@Property('')
|
|
577
|
+
public template: string;
|
|
578
|
+
/**
|
|
579
|
+
* Sets and gets the format of the tooltip in the treemap component.
|
|
580
|
+
*
|
|
581
|
+
* @default null
|
|
582
|
+
*/
|
|
583
|
+
@Property(null)
|
|
584
|
+
public format: string;
|
|
585
|
+
/**
|
|
586
|
+
* Sets and gets the background color of tooltip in the treemap component.
|
|
587
|
+
*
|
|
588
|
+
* @default null
|
|
589
|
+
*/
|
|
590
|
+
@Property(null)
|
|
591
|
+
public fill: string;
|
|
592
|
+
/**
|
|
593
|
+
* Sets and gets the opacity of tooltip in the treemap component.
|
|
594
|
+
*
|
|
595
|
+
* @default 0.75
|
|
596
|
+
*/
|
|
597
|
+
@Property(0.75)
|
|
598
|
+
public opacity: number;
|
|
599
|
+
/**
|
|
600
|
+
* Sets and gets the marker shapes in the treemap component.
|
|
601
|
+
*
|
|
602
|
+
* @default '[Circle]'
|
|
603
|
+
*/
|
|
604
|
+
@Property(['Circle'])
|
|
605
|
+
public markerShapes: MarkerShape[];
|
|
606
|
+
/**
|
|
607
|
+
* Sets and gets the options for customizing the color and width of the border of the tooltip.
|
|
608
|
+
*/
|
|
609
|
+
@Complex<BorderModel>({}, Border)
|
|
610
|
+
public border: BorderModel;
|
|
611
|
+
/**
|
|
612
|
+
* Sets and gets the options for customizing the text style of tooltip of the treemap component.
|
|
613
|
+
*/
|
|
614
|
+
@Complex<FontModel>({fontFamily: defaultFont, size: '13px' }, Font)
|
|
615
|
+
public textStyle: FontModel;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Sets and gets the options for customizing the selection of the leaf items in treemap component.
|
|
619
|
+
*/
|
|
620
|
+
export class SelectionSettings extends ChildProperty<SelectionSettings> {
|
|
621
|
+
/**
|
|
622
|
+
* Enables or disables the selection functionality in the treemap component.
|
|
623
|
+
*
|
|
624
|
+
* @default false
|
|
625
|
+
*/
|
|
626
|
+
@Property(false)
|
|
627
|
+
public enable: boolean;
|
|
628
|
+
/**
|
|
629
|
+
* Sets and gets the color of the selection when the leaf item is selected in the treemap component.
|
|
630
|
+
*
|
|
631
|
+
* @default null
|
|
632
|
+
*/
|
|
633
|
+
@Property(null)
|
|
634
|
+
public fill: string;
|
|
635
|
+
/**
|
|
636
|
+
* Sets and gets the opacity of the selection when the leaf item is selected in the treemap component.
|
|
637
|
+
*
|
|
638
|
+
* @default '0.5'
|
|
639
|
+
*/
|
|
640
|
+
@Property('0.5')
|
|
641
|
+
public opacity: string;
|
|
642
|
+
/**
|
|
643
|
+
* Sets and gets the border of the selected items in the treemap component.
|
|
644
|
+
*/
|
|
645
|
+
@Complex<BorderModel>({}, Border)
|
|
646
|
+
public border: BorderModel;
|
|
647
|
+
/**
|
|
648
|
+
* Sets and gets the element in which selection must be done in the treemap component.
|
|
649
|
+
*
|
|
650
|
+
* @default 'Item'
|
|
651
|
+
*/
|
|
652
|
+
@Property('Item')
|
|
653
|
+
public mode: SelectionMode;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Sets and gets the options for customizing the highlighting of the treemap item,
|
|
657
|
+
* when the mouse hover is performed in it.
|
|
658
|
+
*/
|
|
659
|
+
export class HighlightSettings extends ChildProperty<HighlightSettings> {
|
|
660
|
+
/**
|
|
661
|
+
* Enables or disables the highlight functionality of the treemap component.
|
|
662
|
+
*
|
|
663
|
+
* @default false
|
|
664
|
+
*/
|
|
665
|
+
@Property(false)
|
|
666
|
+
public enable: boolean;
|
|
667
|
+
/**
|
|
668
|
+
* Sets and gets the highlight color of the treemap component.
|
|
669
|
+
*
|
|
670
|
+
* @default '#808080'
|
|
671
|
+
*/
|
|
672
|
+
@Property('#808080')
|
|
673
|
+
public fill: string;
|
|
674
|
+
/**
|
|
675
|
+
* Sets and gets the opacity of the treemap component.
|
|
676
|
+
*
|
|
677
|
+
* @default '0.5'
|
|
678
|
+
*/
|
|
679
|
+
@Property('0.5')
|
|
680
|
+
public opacity: string;
|
|
681
|
+
/**
|
|
682
|
+
* Sets and gets the options for customizing the color and width of the border of the
|
|
683
|
+
* highlighted item in the treemap component.
|
|
684
|
+
*/
|
|
685
|
+
@Complex<BorderModel>({}, Border)
|
|
686
|
+
public border: BorderModel;
|
|
687
|
+
/**
|
|
688
|
+
* Sets and gets the element in which highlight must be done in the treemap component.
|
|
689
|
+
*
|
|
690
|
+
* @default 'Item'
|
|
691
|
+
*/
|
|
692
|
+
@Property('Item')
|
|
693
|
+
public mode: HighLightMode;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Sets and gets the options for customizing the levels of the treemap component.
|
|
698
|
+
*/
|
|
699
|
+
export class LevelSettings extends ChildProperty<LevelSettings> {
|
|
700
|
+
/**
|
|
701
|
+
* Sets and gets the value path from the data source in the treemap component to render the item.
|
|
702
|
+
*
|
|
703
|
+
* @default null
|
|
704
|
+
*/
|
|
705
|
+
@Property(null)
|
|
706
|
+
public groupPath: string;
|
|
707
|
+
/**
|
|
708
|
+
* Sets and gets the gap between the levels in the treemap component.
|
|
709
|
+
*
|
|
710
|
+
* @default 0
|
|
711
|
+
*/
|
|
712
|
+
@Property(0)
|
|
713
|
+
public groupGap: number;
|
|
714
|
+
/**
|
|
715
|
+
* Sets and gets the padding of levels in the treemap component.
|
|
716
|
+
*
|
|
717
|
+
* @default 10
|
|
718
|
+
*/
|
|
719
|
+
@Property(10)
|
|
720
|
+
public groupPadding: number;
|
|
721
|
+
/**
|
|
722
|
+
* Sets and gets the options for customizing the color and width of the border of
|
|
723
|
+
* the levels of the treemap component.
|
|
724
|
+
*/
|
|
725
|
+
@Complex<BorderModel>({}, Border)
|
|
726
|
+
public border: BorderModel;
|
|
727
|
+
/**
|
|
728
|
+
* Sets and gets the fill color of the level in the treemap component.
|
|
729
|
+
*
|
|
730
|
+
* @default null
|
|
731
|
+
*/
|
|
732
|
+
@Property(null)
|
|
733
|
+
public fill: string;
|
|
734
|
+
/**
|
|
735
|
+
* Enables or disables the automatic filling of the colors in the items in the treemap component.
|
|
736
|
+
*
|
|
737
|
+
* @default false
|
|
738
|
+
*/
|
|
739
|
+
@Property(false)
|
|
740
|
+
public autoFill: boolean;
|
|
741
|
+
/**
|
|
742
|
+
* Sets and gets the opacity in the treemap component.
|
|
743
|
+
*
|
|
744
|
+
* @default 1
|
|
745
|
+
*/
|
|
746
|
+
@Property(1)
|
|
747
|
+
public opacity: number;
|
|
748
|
+
/**
|
|
749
|
+
* Shows or hides the header in level of the treemap component.
|
|
750
|
+
*
|
|
751
|
+
* @default true
|
|
752
|
+
*/
|
|
753
|
+
@Property(true)
|
|
754
|
+
public showHeader: boolean;
|
|
755
|
+
/**
|
|
756
|
+
* Sets and gets the height of header in the treemap component.
|
|
757
|
+
*
|
|
758
|
+
* @default 20
|
|
759
|
+
*/
|
|
760
|
+
@Property(20)
|
|
761
|
+
public headerHeight: number;
|
|
762
|
+
/**
|
|
763
|
+
* Sets and gets the template for header in the treemap component.
|
|
764
|
+
*
|
|
765
|
+
* @default null
|
|
766
|
+
*/
|
|
767
|
+
@Property(null)
|
|
768
|
+
public headerTemplate: string;
|
|
769
|
+
/**
|
|
770
|
+
* Sets and gets the format of header of the levels in the treemap component.
|
|
771
|
+
*
|
|
772
|
+
* @default null
|
|
773
|
+
*/
|
|
774
|
+
@Property(null)
|
|
775
|
+
public headerFormat: string;
|
|
776
|
+
/**
|
|
777
|
+
* Sets and gets the alignment of the header of the treemap component.
|
|
778
|
+
*
|
|
779
|
+
* @default 'Near'
|
|
780
|
+
*/
|
|
781
|
+
@Property('Near')
|
|
782
|
+
public headerAlignment: Alignment;
|
|
783
|
+
/**
|
|
784
|
+
* Sets and gets the options for customizing the style of header of the treemap component.
|
|
785
|
+
*/
|
|
786
|
+
@Complex<FontModel>({ color: null, size: '13px' }, Font)
|
|
787
|
+
public headerStyle: FontModel;
|
|
788
|
+
/**
|
|
789
|
+
* Sets and gets the options for customizing the template position of the treemap component.
|
|
790
|
+
*
|
|
791
|
+
* @default 'TopLeft'
|
|
792
|
+
*/
|
|
793
|
+
@Property('TopLeft')
|
|
794
|
+
public templatePosition: LabelPosition;
|
|
795
|
+
/**
|
|
796
|
+
* Sets and gets the options for customizing the color-mapping in the treemap component.
|
|
797
|
+
*/
|
|
798
|
+
@Collection<ColorMappingModel>([], ColorMapping)
|
|
799
|
+
public colorMapping: ColorMappingModel[];
|
|
800
|
+
}
|