@syncfusion/ej2-treemap 30.2.4 → 31.2.2
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/dist/ej2-treemap.min.js +3 -3
- package/dist/ej2-treemap.umd.min.js +3 -3
- package/dist/ej2-treemap.umd.min.js.map +1 -1
- package/dist/es6/ej2-treemap.es2015.js +0 -4
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +0 -4
- package/dist/es6/ej2-treemap.es5.js.map +1 -1
- package/dist/global/ej2-treemap.min.js +3 -3
- package/dist/global/ej2-treemap.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/dist/ts/index.d.ts +4 -0
- package/dist/ts/index.ts +4 -0
- package/dist/ts/treemap/index.d.ts +19 -0
- package/dist/ts/treemap/index.ts +19 -0
- package/dist/ts/treemap/layout/legend.d.ts +137 -0
- package/dist/ts/treemap/layout/legend.ts +1095 -0
- package/dist/ts/treemap/layout/render-panel.d.ts +47 -0
- package/dist/ts/treemap/layout/render-panel.ts +758 -0
- package/dist/ts/treemap/model/base-model.d.ts +795 -0
- package/dist/ts/treemap/model/base.d.ts +671 -0
- package/dist/ts/treemap/model/base.ts +798 -0
- package/dist/ts/treemap/model/constants.d.ts +117 -0
- package/dist/ts/treemap/model/constants.ts +118 -0
- package/dist/ts/treemap/model/image-export.d.ts +34 -0
- package/dist/ts/treemap/model/image-export.ts +117 -0
- package/dist/ts/treemap/model/interface.d.ts +555 -0
- package/dist/ts/treemap/model/interface.ts +583 -0
- package/dist/ts/treemap/model/pdf-export.d.ts +36 -0
- package/dist/ts/treemap/model/pdf-export.ts +105 -0
- package/dist/ts/treemap/model/print.d.ts +45 -0
- package/dist/ts/treemap/model/print.ts +106 -0
- package/dist/ts/treemap/model/theme.d.ts +19 -0
- package/dist/ts/treemap/model/theme.ts +450 -0
- package/dist/ts/treemap/treemap-model.d.ts +374 -0
- package/dist/ts/treemap/treemap.d.ts +724 -0
- package/dist/ts/treemap/treemap.ts +1817 -0
- package/dist/ts/treemap/user-interaction/highlight-selection.d.ts +118 -0
- package/dist/ts/treemap/user-interaction/highlight-selection.ts +799 -0
- package/dist/ts/treemap/user-interaction/tooltip.d.ts +42 -0
- package/dist/ts/treemap/user-interaction/tooltip.ts +228 -0
- package/dist/ts/treemap/utils/enum.d.ts +256 -0
- package/dist/ts/treemap/utils/enum.ts +263 -0
- package/dist/ts/treemap/utils/helper.d.ts +543 -0
- package/dist/ts/treemap/utils/helper.ts +1453 -0
- package/package.json +52 -17
- package/src/treemap/treemap.d.ts +0 -1
- package/src/treemap/treemap.js +0 -4
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, extend, Fetch, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Complex, Collection, ModuleDeclaration } from '@syncfusion/ej2-base';import { Event, EmitType, Internationalization } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { isNullOrUndefined, createElement, EventHandler, Browser, remove } from '@syncfusion/ej2-base';import { BorderModel, TitleSettingsModel, MarginModel, LevelSettingsModel, FontModel } from './model/base-model';import { LeafItemSettingsModel, TooltipSettingsModel, LegendSettingsModel, InitialDrillSettingsModel } from './model/base-model';import { HighlightSettingsModel, SelectionSettingsModel } from './model/base-model';import { Border, Margin, TitleSettings, LegendSettings, InitialDrillSettings } from './model/base';import { SelectionSettings, TooltipSettings, LevelSettings, LeafItemSettings, HighlightSettings } from './model/base';import { LayoutMode, TreeMapTheme, RenderingMode } from './utils/enum';import { ILoadEventArgs, ILoadedEventArgs, IPrintEventArgs } from '../treemap/model/interface';import { ILegendItemRenderingEventArgs, ILegendRenderingEventArgs } from '../treemap/model/interface';import { IItemRenderingEventArgs, IResizeEventArgs, IDoubleClickEventArgs, IRightClickEventArgs } from '../treemap/model/interface';import { IItemClickEventArgs, IItemMoveEventArgs, IClickEventArgs, IMouseMoveEventArgs } from '../treemap/model/interface';import { IDrillStartEventArgs, IItemSelectedEventArgs, ITreeMapTooltipRenderEventArgs } from '../treemap/model/interface';import { IItemHighlightEventArgs, IDrillEndEventArgs, IThemeStyle } from '../treemap/model/interface';import { Size, stringToNumber, RectOption, Rect, textTrim, measureText, findChildren, removeElement, setItemTemplateContent, legendMaintain, removeLegend } from '../treemap/utils/helper';import { removeClassNames, textFormatter } from '../treemap/utils/helper';import { findPosition, Location, TextOption, renderTextElement, isContainsData, TreeMapAjax } from '../treemap/utils/helper';import { load, loaded, drillStart, drillEnd } from '../treemap/model/constants';import { itemClick, itemMove, click, mouseMove, resize, doubleClick, rightClick } from '../treemap/model/constants';import { LayoutPanel } from './layout/render-panel';import { TreeMapTooltip } from './user-interaction/tooltip';import { ExportType } from '../treemap/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { TreeMapHighlight, TreeMapSelection } from './user-interaction/highlight-selection';import { TreeMapLegend } from './layout/legend';import { DataManager, Query } from '@syncfusion/ej2-data';import { getThemeStyle } from './model/theme';import { Print } from './model/print';import { ImageExport } from './model/image-export';import { PdfExport } from './model/pdf-export';
|
|
2
|
+
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface for a class TreeMap
|
|
6
|
+
*/
|
|
7
|
+
export interface TreeMapModel extends ComponentModel{
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Enables and disables the print functionality in treemap.
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
allowPrint?: boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Enables and disables the export to image functionality in treemap.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
allowImageExport?: boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Enables and disables the export to pdf functionality in treemap.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
allowPdfExport?: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Sets and gets the width of the treemap.
|
|
32
|
+
*
|
|
33
|
+
* @default null
|
|
34
|
+
*/
|
|
35
|
+
width?: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Sets and gets the height of the treemap.
|
|
39
|
+
*
|
|
40
|
+
* @default null
|
|
41
|
+
*/
|
|
42
|
+
height?: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Sets and gets the options for customizing the color and width of the treemap border.
|
|
46
|
+
*/
|
|
47
|
+
border?: BorderModel;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Sets and gets the options for customizing the margin in the treemap.
|
|
51
|
+
*/
|
|
52
|
+
margin?: MarginModel;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Sets and gets the background color of the treemap.
|
|
56
|
+
*
|
|
57
|
+
* @default null
|
|
58
|
+
*/
|
|
59
|
+
background?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sets and gets the theme styles supported for treemap. When the theme is set, the styles associated with the theme will be set in the treemap.
|
|
63
|
+
*
|
|
64
|
+
* @default Material
|
|
65
|
+
*/
|
|
66
|
+
theme?: TreeMapTheme;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Sets and gets the options for customizing the title of the treemap.
|
|
70
|
+
*/
|
|
71
|
+
titleSettings?: TitleSettingsModel;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Specifies the rendering type for the layout of the treemap.
|
|
75
|
+
*
|
|
76
|
+
* @default 'Squarified'
|
|
77
|
+
*/
|
|
78
|
+
layoutType?: LayoutMode;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Sets and gets the data source for the treemap.
|
|
82
|
+
*
|
|
83
|
+
* @isGenericType true
|
|
84
|
+
* @isObservable true
|
|
85
|
+
* @default null
|
|
86
|
+
*/
|
|
87
|
+
dataSource?: DataManager | TreeMapAjax | Object[];
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sets and gets the query to select particular data from the shape data.
|
|
91
|
+
* This property is applicable only when the data source is created by data manager.
|
|
92
|
+
*
|
|
93
|
+
* @default null
|
|
94
|
+
*/
|
|
95
|
+
query?: Query;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Sets and gets the value path of the weight from the data source, based on which the treemap item is rendered.
|
|
99
|
+
*
|
|
100
|
+
* @default null
|
|
101
|
+
*/
|
|
102
|
+
weightValuePath?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Sets and gets the value path from the data source, based on it color is filled in treemap.
|
|
106
|
+
* This property is used when range color mapping is set in the treemap.
|
|
107
|
+
*
|
|
108
|
+
* @default ''
|
|
109
|
+
*/
|
|
110
|
+
rangeColorValuePath?: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Sets and gets the value path from the data source, based on it color is filled in treemap.
|
|
114
|
+
* This property is used when equal color mapping is set in the treemap.
|
|
115
|
+
*
|
|
116
|
+
* @default ''
|
|
117
|
+
*/
|
|
118
|
+
equalColorValuePath?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Sets and gets the value path from the data source, based on it color is filled in treemap.
|
|
122
|
+
*
|
|
123
|
+
* @default null
|
|
124
|
+
*/
|
|
125
|
+
colorValuePath?: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sets and gets a set of colors to apply in the treemap items.
|
|
129
|
+
*
|
|
130
|
+
* @default []
|
|
131
|
+
*/
|
|
132
|
+
palette?: string[];
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Specifies the rendering direction of layout of the treemap items.
|
|
136
|
+
*
|
|
137
|
+
* @default TopLeftBottomRight
|
|
138
|
+
*/
|
|
139
|
+
renderDirection?: RenderingMode;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Enables or disables the drill down functionality in treemap.
|
|
143
|
+
*
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
enableDrillDown?: boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Enables or disables the connection text in the header of the treemap when drill down is enabled.
|
|
150
|
+
*
|
|
151
|
+
* @default false
|
|
152
|
+
*/
|
|
153
|
+
enableBreadcrumb?: boolean;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Specifies the symbol to show connection between the two words in the header of the treemap during drill down.
|
|
157
|
+
*
|
|
158
|
+
* @default ' - '
|
|
159
|
+
*/
|
|
160
|
+
breadcrumbConnector?: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Enables or disables the initial drill in the treemap.
|
|
164
|
+
*
|
|
165
|
+
* @default false
|
|
166
|
+
*/
|
|
167
|
+
drillDownView?: boolean;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Specifies whether to enable the rendering of untrusted HTML values in the TreeMap. If `enableHtmlSanitizer` set to **true**, the component will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
171
|
+
*
|
|
172
|
+
* @default false
|
|
173
|
+
*/
|
|
174
|
+
enableHtmlSanitizer?: boolean;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Specifies the options for customizing the initial drill down in treemap.
|
|
178
|
+
*/
|
|
179
|
+
initialDrillDown?: InitialDrillSettingsModel;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Sets and gets the options for customizing the leaf item of the treemap.
|
|
183
|
+
*/
|
|
184
|
+
leafItemSettings?: LeafItemSettingsModel;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Sets and gets the options to configure and customize the levels of treemap items.
|
|
188
|
+
*/
|
|
189
|
+
levels?: LevelSettingsModel[];
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Sets and gets the options to customize the highlight functionality of the treemap.
|
|
193
|
+
*/
|
|
194
|
+
highlightSettings?: HighlightSettingsModel;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Sets and gets the options for customizing the selection functionality of the treemap.
|
|
198
|
+
*/
|
|
199
|
+
selectionSettings?: SelectionSettingsModel;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Sets and gets the options for customizing the tooltip of the treemap.
|
|
203
|
+
*/
|
|
204
|
+
tooltipSettings?: TooltipSettingsModel;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Sets and gets the options for customizing the legend of the treemap.
|
|
208
|
+
*/
|
|
209
|
+
legendSettings?: LegendSettingsModel;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Enables or disables the visibility state of the separator for grouping.
|
|
213
|
+
*
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
useGroupingSeparator?: boolean;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Sets and gets the description for treemap.
|
|
220
|
+
*
|
|
221
|
+
* @default null
|
|
222
|
+
*/
|
|
223
|
+
description?: string;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Sets and gets the tab index value for treemap.
|
|
227
|
+
*
|
|
228
|
+
* @default 0
|
|
229
|
+
*/
|
|
230
|
+
tabIndex?: number;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Sets and gets format for the texts in the treemap. This property accepts any global string format like 'C', 'N1', 'P' etc.
|
|
234
|
+
*
|
|
235
|
+
* @default null
|
|
236
|
+
*/
|
|
237
|
+
format?: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Triggers before the treemap is rendered.
|
|
241
|
+
*
|
|
242
|
+
* @event load
|
|
243
|
+
*/
|
|
244
|
+
load?: EmitType<ILoadEventArgs>;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Triggers before the print gets started.
|
|
248
|
+
*
|
|
249
|
+
* @event beforePrint
|
|
250
|
+
*/
|
|
251
|
+
beforePrint?: EmitType<IPrintEventArgs>;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Triggers after treemap is rendered.
|
|
255
|
+
*
|
|
256
|
+
* @event loaded
|
|
257
|
+
*/
|
|
258
|
+
loaded?: EmitType<ILoadedEventArgs>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Triggers before item rendering in the treemap.
|
|
262
|
+
*
|
|
263
|
+
* @event itemRendering
|
|
264
|
+
*/
|
|
265
|
+
itemRendering?: EmitType<IItemRenderingEventArgs>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Triggers on performing drill down functionality in the treemap.
|
|
269
|
+
*
|
|
270
|
+
* @event drillStart
|
|
271
|
+
*/
|
|
272
|
+
drillStart?: EmitType<IDrillStartEventArgs>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Triggers after drill down functionality gets completed in the treemap.
|
|
276
|
+
*
|
|
277
|
+
* @event drillEnd
|
|
278
|
+
*/
|
|
279
|
+
drillEnd?: EmitType<IDrillEndEventArgs>;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Triggers after selecting a treemap item.
|
|
283
|
+
*
|
|
284
|
+
* @event itemSelected
|
|
285
|
+
*/
|
|
286
|
+
itemSelected?: EmitType<IItemSelectedEventArgs>;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Triggers after highlighting on the treemap item.
|
|
290
|
+
*
|
|
291
|
+
* @event itemHighlight
|
|
292
|
+
*/
|
|
293
|
+
itemHighlight?: EmitType<IItemHighlightEventArgs>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Triggers on rendering of the tooltip in the treemap.
|
|
297
|
+
*
|
|
298
|
+
* @event tooltipRendering
|
|
299
|
+
*/
|
|
300
|
+
tooltipRendering?: EmitType<ITreeMapTooltipRenderEventArgs>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Triggers after clicking an item in the treemap.
|
|
304
|
+
*
|
|
305
|
+
* @event itemClick
|
|
306
|
+
*/
|
|
307
|
+
itemClick?: EmitType<IItemClickEventArgs>;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Triggers after mouse hover on the treemap item.
|
|
311
|
+
*
|
|
312
|
+
* @event itemMove
|
|
313
|
+
*/
|
|
314
|
+
itemMove?: EmitType<IItemMoveEventArgs>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Triggers after clicking on the treemap.
|
|
318
|
+
*
|
|
319
|
+
* @event click
|
|
320
|
+
*/
|
|
321
|
+
click?: EmitType<IItemClickEventArgs>;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Triggers after double clicking on the treemap.
|
|
325
|
+
*
|
|
326
|
+
* @event doubleClick
|
|
327
|
+
*/
|
|
328
|
+
doubleClick?: EmitType<IDoubleClickEventArgs>;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Triggers after right clicking on the treemap.
|
|
332
|
+
*
|
|
333
|
+
* @event rightClick
|
|
334
|
+
*/
|
|
335
|
+
rightClick?: EmitType<IMouseMoveEventArgs>;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Triggers after mouse hover on the treemap.
|
|
339
|
+
*
|
|
340
|
+
* @event mouseMove
|
|
341
|
+
*/
|
|
342
|
+
mouseMove?: EmitType<IMouseMoveEventArgs>;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Triggers to notify the resize of the treemap when the window is resized.
|
|
346
|
+
*
|
|
347
|
+
* @event resize
|
|
348
|
+
*/
|
|
349
|
+
resize?: EmitType<IResizeEventArgs>;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Triggers before rendering each legend item in the treemap.
|
|
353
|
+
*
|
|
354
|
+
* @event legendItemRendering
|
|
355
|
+
*/
|
|
356
|
+
legendItemRendering?: EmitType<ILegendItemRenderingEventArgs>;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Triggers before rendering the legend items in the treemap.
|
|
360
|
+
*
|
|
361
|
+
* @event legendRendering
|
|
362
|
+
* @deprecated
|
|
363
|
+
*/
|
|
364
|
+
legendRendering?: EmitType<ILegendRenderingEventArgs>;
|
|
365
|
+
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Interface for a class LevelsData
|
|
370
|
+
* @private
|
|
371
|
+
*/
|
|
372
|
+
export interface LevelsDataModel {
|
|
373
|
+
|
|
374
|
+
}
|