@syncfusion/ej2-treemap 20.3.59 → 20.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/.eslintrc.json +16 -1
- package/CHANGELOG.md +0 -6
- package/README.md +53 -41
- package/dist/ej2-treemap.min.js +2 -2
- 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 +469 -193
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +491 -215
- 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/package.json +25 -17
- package/src/treemap/layout/legend.d.ts +15 -0
- package/src/treemap/layout/legend.js +47 -45
- package/src/treemap/layout/render-panel.d.ts +2 -1
- package/src/treemap/layout/render-panel.js +25 -44
- package/src/treemap/model/image-export.d.ts +1 -0
- package/src/treemap/model/image-export.js +4 -2
- package/src/treemap/model/pdf-export.d.ts +1 -0
- package/src/treemap/model/pdf-export.js +5 -4
- package/src/treemap/model/print.d.ts +2 -0
- package/src/treemap/model/print.js +4 -1
- package/src/treemap/treemap-model.d.ts +19 -19
- package/src/treemap/treemap.d.ts +74 -47
- package/src/treemap/treemap.js +74 -59
- package/src/treemap/user-interaction/highlight-selection.d.ts +6 -1
- package/src/treemap/user-interaction/highlight-selection.js +22 -21
- package/src/treemap/user-interaction/tooltip.js +3 -5
- package/src/treemap/utils/helper.d.ts +281 -12
- package/src/treemap/utils/helper.js +308 -77
|
@@ -11,12 +11,13 @@ var ImageExport = /** @class */ (function () {
|
|
|
11
11
|
*
|
|
12
12
|
* @param {TreeMap} control - Specifies the treemap instance
|
|
13
13
|
*/
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15
15
|
function ImageExport(control) {
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* This method is used to perform the export functionality for the rendered treemap.
|
|
19
19
|
*
|
|
20
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
20
21
|
* @param {ExportType} type - Specifies the type of the image file.
|
|
21
22
|
* @param {string} fileName - Specifies the file name of the image file.
|
|
22
23
|
* @param {boolean} allowDownload - Specifies whether to download the file or not.
|
|
@@ -24,7 +25,7 @@ var ImageExport = /** @class */ (function () {
|
|
|
24
25
|
* @private
|
|
25
26
|
*/
|
|
26
27
|
ImageExport.prototype.export = function (treeMap, type, fileName, allowDownload) {
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
|
28
29
|
var promise = new Promise(function (resolve, reject) {
|
|
29
30
|
var element = createElement('canvas', {
|
|
30
31
|
id: 'ej2-canvas',
|
|
@@ -80,6 +81,7 @@ var ImageExport = /** @class */ (function () {
|
|
|
80
81
|
* @returns {void}
|
|
81
82
|
* @private
|
|
82
83
|
*/
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
83
85
|
ImageExport.prototype.destroy = function () { };
|
|
84
86
|
return ImageExport;
|
|
85
87
|
}());
|
|
@@ -16,6 +16,7 @@ export declare class PdfExport {
|
|
|
16
16
|
/**
|
|
17
17
|
* This method is used to perform the export functionality for the rendered treemap.
|
|
18
18
|
*
|
|
19
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
19
20
|
* @param {ExportType} type - Specifies the type of the document.
|
|
20
21
|
* @param {string} fileName - Specifies the name of the document.
|
|
21
22
|
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the component.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement, isNullOrUndefined
|
|
1
|
+
import { createElement, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
2
|
import { PdfPageOrientation, PdfDocument, PdfBitmap } from '@syncfusion/ej2-pdf-export';
|
|
3
3
|
/**
|
|
4
4
|
* PdfExport module handles the export to pdf functionality for treemap.
|
|
@@ -11,12 +11,13 @@ var PdfExport = /** @class */ (function () {
|
|
|
11
11
|
*
|
|
12
12
|
* @param {TreeMap} control - Specifies the treemap instance
|
|
13
13
|
*/
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15
15
|
function PdfExport(control) {
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* This method is used to perform the export functionality for the rendered treemap.
|
|
19
19
|
*
|
|
20
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
20
21
|
* @param {ExportType} type - Specifies the type of the document.
|
|
21
22
|
* @param {string} fileName - Specifies the name of the document.
|
|
22
23
|
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the component.
|
|
@@ -25,7 +26,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
25
26
|
* @private
|
|
26
27
|
*/
|
|
27
28
|
PdfExport.prototype.export = function (treeMap, type, fileName, orientation, allowDownload) {
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
|
29
30
|
var promise = new Promise(function (resolve, reject) {
|
|
30
31
|
var element = createElement('canvas', {
|
|
31
32
|
id: 'ej2-canvas',
|
|
@@ -34,7 +35,6 @@ var PdfExport = /** @class */ (function () {
|
|
|
34
35
|
'height': treeMap.availableSize.height.toString()
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
|
-
var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
|
|
38
38
|
orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
|
|
39
39
|
var exportElement = treeMap.svgObject.cloneNode(true);
|
|
40
40
|
var backgroundElement = exportElement.childNodes[0];
|
|
@@ -78,6 +78,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
78
78
|
* @returns {void}
|
|
79
79
|
* @private
|
|
80
80
|
*/
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
81
82
|
PdfExport.prototype.destroy = function () { };
|
|
82
83
|
return PdfExport;
|
|
83
84
|
}());
|
|
@@ -14,6 +14,7 @@ export declare class Print {
|
|
|
14
14
|
/**
|
|
15
15
|
* This method is used to perform the print functionality in treemap.
|
|
16
16
|
*
|
|
17
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
17
18
|
* @param { string[] | string | Element} elements - Specifies the element.
|
|
18
19
|
* @returns {void}
|
|
19
20
|
* @private
|
|
@@ -22,6 +23,7 @@ export declare class Print {
|
|
|
22
23
|
/**
|
|
23
24
|
* To get the html string of the Maps
|
|
24
25
|
*
|
|
26
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
25
27
|
* @param {string[] | string | Element} elements - Specifies the element
|
|
26
28
|
* @returns {Element} - Returns the element
|
|
27
29
|
* @private
|
|
@@ -12,12 +12,13 @@ var Print = /** @class */ (function () {
|
|
|
12
12
|
*
|
|
13
13
|
* @param {TreeMap} control - Specifies the treemap instance.
|
|
14
14
|
*/
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
16
16
|
function Print(control) {
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* This method is used to perform the print functionality in treemap.
|
|
20
20
|
*
|
|
21
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
21
22
|
* @param { string[] | string | Element} elements - Specifies the element.
|
|
22
23
|
* @returns {void}
|
|
23
24
|
* @private
|
|
@@ -38,6 +39,7 @@ var Print = /** @class */ (function () {
|
|
|
38
39
|
/**
|
|
39
40
|
* To get the html string of the Maps
|
|
40
41
|
*
|
|
42
|
+
* @param {TreeMap} treeMap - Specifies the treemap instance.
|
|
41
43
|
* @param {string[] | string | Element} elements - Specifies the element
|
|
42
44
|
* @returns {Element} - Returns the element
|
|
43
45
|
* @private
|
|
@@ -77,6 +79,7 @@ var Print = /** @class */ (function () {
|
|
|
77
79
|
* @returns {void}
|
|
78
80
|
* @private
|
|
79
81
|
*/
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
80
83
|
Print.prototype.destroy = function () { };
|
|
81
84
|
return Print;
|
|
82
85
|
}());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, extend, Ajax } 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
|
|
1
|
+
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, extend, Ajax } 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 } from '../treemap/utils/helper';import { removeClassNames, removeShape, 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
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -206,126 +206,126 @@ export interface TreeMapModel extends ComponentModel{
|
|
|
206
206
|
/**
|
|
207
207
|
* Triggers when the treemap is on load.
|
|
208
208
|
*
|
|
209
|
-
* @event
|
|
209
|
+
* @event load
|
|
210
210
|
*/
|
|
211
211
|
load?: EmitType<ILoadEventArgs>;
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* Triggers before the prints gets started.
|
|
215
215
|
*
|
|
216
|
-
* @event
|
|
216
|
+
* @event beforePrint
|
|
217
217
|
*/
|
|
218
218
|
beforePrint?: EmitType<IPrintEventArgs>;
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
221
|
* Triggers after treemap is rendered.
|
|
222
222
|
*
|
|
223
|
-
* @event
|
|
223
|
+
* @event loaded
|
|
224
224
|
*/
|
|
225
225
|
loaded?: EmitType<ILoadedEventArgs>;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* Triggers before item rendering in the treemap component.
|
|
229
229
|
*
|
|
230
|
-
* @event
|
|
230
|
+
* @event itemRendering
|
|
231
231
|
*/
|
|
232
232
|
itemRendering?: EmitType<IItemRenderingEventArgs>;
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* Triggers on performing drill down functionality in the treemap.
|
|
236
236
|
*
|
|
237
|
-
* @event
|
|
237
|
+
* @event drillStart
|
|
238
238
|
*/
|
|
239
239
|
drillStart?: EmitType<IDrillStartEventArgs>;
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
242
|
* Triggers after drill down functionality gets completed in the treemap.
|
|
243
243
|
*
|
|
244
|
-
* @event
|
|
244
|
+
* @event drillEnd
|
|
245
245
|
*/
|
|
246
246
|
drillEnd?: EmitType<IDrillEndEventArgs>;
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
249
|
* Triggers after selecting a treemap item.
|
|
250
250
|
*
|
|
251
|
-
* @event
|
|
251
|
+
* @event itemSelected
|
|
252
252
|
*/
|
|
253
253
|
itemSelected?: EmitType<IItemSelectedEventArgs>;
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
256
|
* Triggers after highlighting on the treemap item.
|
|
257
257
|
*
|
|
258
|
-
* @event
|
|
258
|
+
* @event itemHighlight
|
|
259
259
|
*/
|
|
260
260
|
itemHighlight?: EmitType<IItemHighlightEventArgs>;
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* Triggers on rendering of the tooltip in the treemap component.
|
|
264
264
|
*
|
|
265
|
-
* @event
|
|
265
|
+
* @event tooltipRendering
|
|
266
266
|
*/
|
|
267
267
|
tooltipRendering?: EmitType<ITreeMapTooltipRenderEventArgs>;
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
270
|
* Triggers after clicking an item in the treemap.
|
|
271
271
|
*
|
|
272
|
-
* @event
|
|
272
|
+
* @event itemClick
|
|
273
273
|
*/
|
|
274
274
|
itemClick?: EmitType<IItemClickEventArgs>;
|
|
275
275
|
|
|
276
276
|
/**
|
|
277
277
|
* Triggers after mouse hover on the treemap item.
|
|
278
278
|
*
|
|
279
|
-
* @event
|
|
279
|
+
* @event itemMove
|
|
280
280
|
*/
|
|
281
281
|
itemMove?: EmitType<IItemMoveEventArgs>;
|
|
282
282
|
|
|
283
283
|
/**
|
|
284
284
|
* Triggers after clicking on the treemap.
|
|
285
285
|
*
|
|
286
|
-
* @event
|
|
286
|
+
* @event click
|
|
287
287
|
*/
|
|
288
288
|
click?: EmitType<IItemClickEventArgs>;
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* Triggers after double clicking on the treemap.
|
|
292
292
|
*
|
|
293
|
-
* @event
|
|
293
|
+
* @event doubleClick
|
|
294
294
|
*/
|
|
295
295
|
doubleClick?: EmitType<IDoubleClickEventArgs>;
|
|
296
296
|
|
|
297
297
|
/**
|
|
298
298
|
* Triggers after right clicking on the treemap.
|
|
299
299
|
*
|
|
300
|
-
* @event
|
|
300
|
+
* @event rightClick
|
|
301
301
|
*/
|
|
302
302
|
rightClick?: EmitType<IMouseMoveEventArgs>;
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Triggers after mouse hover on the treemap.
|
|
306
306
|
*
|
|
307
|
-
* @event
|
|
307
|
+
* @event mouseMove
|
|
308
308
|
*/
|
|
309
309
|
mouseMove?: EmitType<IMouseMoveEventArgs>;
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
312
|
* Triggers after resizing the treemap component.
|
|
313
313
|
*
|
|
314
|
-
* @event
|
|
314
|
+
* @event resize
|
|
315
315
|
*/
|
|
316
316
|
resize?: EmitType<IResizeEventArgs>;
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
319
|
* Triggers before rendering each legend item in the treemap.
|
|
320
320
|
*
|
|
321
|
-
* @event
|
|
321
|
+
* @event legendItemRendering
|
|
322
322
|
*/
|
|
323
323
|
legendItemRendering?: EmitType<ILegendItemRenderingEventArgs>;
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
326
|
* Triggers before rendering the legend items in the treemap.
|
|
327
327
|
*
|
|
328
|
-
* @event
|
|
328
|
+
* @event legendRendering
|
|
329
329
|
|
|
330
330
|
*/
|
|
331
331
|
legendRendering?: EmitType<ILegendRenderingEventArgs>;
|
package/src/treemap/treemap.d.ts
CHANGED
|
@@ -239,109 +239,109 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
239
239
|
/**
|
|
240
240
|
* Triggers when the treemap is on load.
|
|
241
241
|
*
|
|
242
|
-
* @event
|
|
242
|
+
* @event load
|
|
243
243
|
*/
|
|
244
244
|
load: EmitType<ILoadEventArgs>;
|
|
245
245
|
/**
|
|
246
246
|
* Triggers before the prints gets started.
|
|
247
247
|
*
|
|
248
|
-
* @event
|
|
248
|
+
* @event beforePrint
|
|
249
249
|
*/
|
|
250
250
|
beforePrint: EmitType<IPrintEventArgs>;
|
|
251
251
|
/**
|
|
252
252
|
* Triggers after treemap is rendered.
|
|
253
253
|
*
|
|
254
|
-
* @event
|
|
254
|
+
* @event loaded
|
|
255
255
|
*/
|
|
256
256
|
loaded: EmitType<ILoadedEventArgs>;
|
|
257
257
|
/**
|
|
258
258
|
* Triggers before item rendering in the treemap component.
|
|
259
259
|
*
|
|
260
|
-
* @event
|
|
260
|
+
* @event itemRendering
|
|
261
261
|
*/
|
|
262
262
|
itemRendering: EmitType<IItemRenderingEventArgs>;
|
|
263
263
|
/**
|
|
264
264
|
* Triggers on performing drill down functionality in the treemap.
|
|
265
265
|
*
|
|
266
|
-
* @event
|
|
266
|
+
* @event drillStart
|
|
267
267
|
*/
|
|
268
268
|
drillStart: EmitType<IDrillStartEventArgs>;
|
|
269
269
|
/**
|
|
270
270
|
* Triggers after drill down functionality gets completed in the treemap.
|
|
271
271
|
*
|
|
272
|
-
* @event
|
|
272
|
+
* @event drillEnd
|
|
273
273
|
*/
|
|
274
274
|
drillEnd: EmitType<IDrillEndEventArgs>;
|
|
275
275
|
/**
|
|
276
276
|
* Triggers after selecting a treemap item.
|
|
277
277
|
*
|
|
278
|
-
* @event
|
|
278
|
+
* @event itemSelected
|
|
279
279
|
*/
|
|
280
280
|
itemSelected: EmitType<IItemSelectedEventArgs>;
|
|
281
281
|
/**
|
|
282
282
|
* Triggers after highlighting on the treemap item.
|
|
283
283
|
*
|
|
284
|
-
* @event
|
|
284
|
+
* @event itemHighlight
|
|
285
285
|
*/
|
|
286
286
|
itemHighlight: EmitType<IItemHighlightEventArgs>;
|
|
287
287
|
/**
|
|
288
288
|
* Triggers on rendering of the tooltip in the treemap component.
|
|
289
289
|
*
|
|
290
|
-
* @event
|
|
290
|
+
* @event tooltipRendering
|
|
291
291
|
*/
|
|
292
292
|
tooltipRendering: EmitType<ITreeMapTooltipRenderEventArgs>;
|
|
293
293
|
/**
|
|
294
294
|
* Triggers after clicking an item in the treemap.
|
|
295
295
|
*
|
|
296
|
-
* @event
|
|
296
|
+
* @event itemClick
|
|
297
297
|
*/
|
|
298
298
|
itemClick: EmitType<IItemClickEventArgs>;
|
|
299
299
|
/**
|
|
300
300
|
* Triggers after mouse hover on the treemap item.
|
|
301
301
|
*
|
|
302
|
-
* @event
|
|
302
|
+
* @event itemMove
|
|
303
303
|
*/
|
|
304
304
|
itemMove: EmitType<IItemMoveEventArgs>;
|
|
305
305
|
/**
|
|
306
306
|
* Triggers after clicking on the treemap.
|
|
307
307
|
*
|
|
308
|
-
* @event
|
|
308
|
+
* @event click
|
|
309
309
|
*/
|
|
310
310
|
click: EmitType<IItemClickEventArgs>;
|
|
311
311
|
/**
|
|
312
312
|
* Triggers after double clicking on the treemap.
|
|
313
313
|
*
|
|
314
|
-
* @event
|
|
314
|
+
* @event doubleClick
|
|
315
315
|
*/
|
|
316
316
|
doubleClick: EmitType<IDoubleClickEventArgs>;
|
|
317
317
|
/**
|
|
318
318
|
* Triggers after right clicking on the treemap.
|
|
319
319
|
*
|
|
320
|
-
* @event
|
|
320
|
+
* @event rightClick
|
|
321
321
|
*/
|
|
322
322
|
rightClick: EmitType<IMouseMoveEventArgs>;
|
|
323
323
|
/**
|
|
324
324
|
* Triggers after mouse hover on the treemap.
|
|
325
325
|
*
|
|
326
|
-
* @event
|
|
326
|
+
* @event mouseMove
|
|
327
327
|
*/
|
|
328
328
|
mouseMove: EmitType<IMouseMoveEventArgs>;
|
|
329
329
|
/**
|
|
330
330
|
* Triggers after resizing the treemap component.
|
|
331
331
|
*
|
|
332
|
-
* @event
|
|
332
|
+
* @event resize
|
|
333
333
|
*/
|
|
334
334
|
resize: EmitType<IResizeEventArgs>;
|
|
335
335
|
/**
|
|
336
336
|
* Triggers before rendering each legend item in the treemap.
|
|
337
337
|
*
|
|
338
|
-
* @event
|
|
338
|
+
* @event legendItemRendering
|
|
339
339
|
*/
|
|
340
340
|
legendItemRendering: EmitType<ILegendItemRenderingEventArgs>;
|
|
341
341
|
/**
|
|
342
342
|
* Triggers before rendering the legend items in the treemap.
|
|
343
343
|
*
|
|
344
|
-
* @event
|
|
344
|
+
* @event legendRendering
|
|
345
345
|
|
|
346
346
|
*/
|
|
347
347
|
legendRendering: EmitType<ILegendRenderingEventArgs>;
|
|
@@ -374,8 +374,9 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
374
374
|
*/
|
|
375
375
|
intl: Internationalization;
|
|
376
376
|
/**
|
|
377
|
-
* @private
|
|
378
377
|
* Stores the area bounds.
|
|
378
|
+
*
|
|
379
|
+
* @private
|
|
379
380
|
*/
|
|
380
381
|
areaRect: Rect;
|
|
381
382
|
/**
|
|
@@ -385,8 +386,9 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
385
386
|
*/
|
|
386
387
|
themeStyle: IThemeStyle;
|
|
387
388
|
/**
|
|
388
|
-
* @private
|
|
389
389
|
* Stores the legend bounds.
|
|
390
|
+
*
|
|
391
|
+
* @private
|
|
390
392
|
*/
|
|
391
393
|
totalRect: Rect;
|
|
392
394
|
/** @private */
|
|
@@ -415,8 +417,11 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
415
417
|
legendId: string[];
|
|
416
418
|
/** @private */
|
|
417
419
|
selectionId: string;
|
|
418
|
-
/**
|
|
420
|
+
/**
|
|
419
421
|
* Constructor for TreeMap component.
|
|
422
|
+
*
|
|
423
|
+
* @param {TreeMapModel} options - Specifies the treemap instance.
|
|
424
|
+
* @param {string | HTMLElement} element - Specifies the treemap element.
|
|
420
425
|
*/
|
|
421
426
|
constructor(options?: TreeMapModel, element?: string | HTMLElement);
|
|
422
427
|
protected preRender(): void;
|
|
@@ -434,9 +439,9 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
434
439
|
private createSecondaryElement;
|
|
435
440
|
private elementChange;
|
|
436
441
|
/**
|
|
437
|
-
* @private
|
|
438
442
|
* Render the treemap border
|
|
439
443
|
*
|
|
444
|
+
* @private
|
|
440
445
|
* @returns {void}
|
|
441
446
|
*/
|
|
442
447
|
private renderBorder;
|
|
@@ -447,30 +452,35 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
447
452
|
/**
|
|
448
453
|
* This method is used to perform the print functionality in treemap.
|
|
449
454
|
*
|
|
450
|
-
* @param id - Specifies the element to print the treemap.
|
|
455
|
+
* @param {string[] | string | Element} id - Specifies the element to print the treemap.
|
|
456
|
+
* @returns {void}
|
|
451
457
|
*/
|
|
452
458
|
print(id?: string[] | string | Element): void;
|
|
453
459
|
/**
|
|
454
460
|
* This method is used to perform the export functionality for the rendered treemap.
|
|
455
461
|
*
|
|
456
|
-
* @param type - Specifies the
|
|
457
|
-
* @param fileName - Specifies file name for exporting the rendered
|
|
458
|
-
* @param orientation - Specifies the orientation of the
|
|
462
|
+
* @param {ExportType} type - Specifies the extension type of the exported document.
|
|
463
|
+
* @param {string} fileName - Specifies file name for exporting the rendered TreeMap.
|
|
464
|
+
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document.
|
|
465
|
+
* @param {boolean} allowDownload - Specifies whether the exported file should be downloaded or not.
|
|
466
|
+
* @returns {string} - Specifies the base64 string of the exported image which is returned when the allowDownload is set to false.
|
|
459
467
|
*/
|
|
460
468
|
export(type: ExportType, fileName: string, orientation?: PdfPageOrientation, allowDownload?: boolean): Promise<string>;
|
|
461
469
|
private processFlatJsonData;
|
|
462
470
|
/**
|
|
463
471
|
* This method orders the treemap level data.
|
|
464
472
|
*
|
|
465
|
-
* @param start - Specifies the start value of the treemap level.
|
|
473
|
+
* @param {number} start - Specifies the start value of the treemap level.
|
|
474
|
+
* @returns {void}
|
|
466
475
|
*/
|
|
467
476
|
reOrderLevelData(start: number): void;
|
|
468
477
|
private IsChildHierarchy;
|
|
469
478
|
/**
|
|
470
479
|
* This method finds the weight value of the treemap level.
|
|
471
480
|
*
|
|
472
|
-
* @param processData - Specifies the treemap data.
|
|
473
|
-
* @param type - Specifies the type of the data.
|
|
481
|
+
* @param {any[]} processData - Specifies the treemap data.
|
|
482
|
+
* @param {string} type - Specifies the type of the data.
|
|
483
|
+
* @returns {void}
|
|
474
484
|
*/
|
|
475
485
|
findTotalWeight(processData: any[], type: string): void;
|
|
476
486
|
/**
|
|
@@ -500,77 +510,92 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
500
510
|
/**
|
|
501
511
|
* This method handles the window resize event on treemap.
|
|
502
512
|
*
|
|
503
|
-
* @param e - Specifies the pointer event.
|
|
513
|
+
* @param {Event} e - Specifies the pointer event.
|
|
514
|
+
* @returns {void}
|
|
504
515
|
*/
|
|
505
516
|
resizeOnTreeMap(e: Event): void;
|
|
506
517
|
/**
|
|
507
518
|
* This method handles the click event on the treemap.
|
|
508
519
|
*
|
|
509
|
-
* @param e - Specifies the mouse click event in the treemap.
|
|
520
|
+
* @param {PointerEvent} e - Specifies the mouse click event in the treemap.
|
|
521
|
+
* @returns {void}
|
|
510
522
|
*/
|
|
511
523
|
clickOnTreeMap(e: PointerEvent): void;
|
|
512
524
|
/**
|
|
513
525
|
* This method handles the double click event in the treemap.
|
|
514
526
|
*
|
|
515
|
-
* @param e - Specifies the pointer event of mouse click.
|
|
527
|
+
* @param {PointerEvent} e - Specifies the pointer event of mouse click.
|
|
528
|
+
* @returns {void}
|
|
516
529
|
*/
|
|
517
530
|
doubleClickOnTreeMap(e: PointerEvent): void;
|
|
518
531
|
/**
|
|
519
532
|
* This method handles the right click event in the treemap.
|
|
520
533
|
*
|
|
521
|
-
* @param e - Specifies the pointer event of mouse click.
|
|
534
|
+
* @param {PointerEvent} e - Specifies the pointer event of mouse click.
|
|
535
|
+
* @returns {void}
|
|
522
536
|
*/
|
|
523
537
|
rightClickOnTreeMap(e: PointerEvent): void;
|
|
524
538
|
/**
|
|
525
539
|
* This method handles the mouse down event in the treemap.
|
|
526
540
|
*
|
|
527
|
-
* @param e - Specifies the pointer event of mouse click.
|
|
541
|
+
* @param {PointerEvent} e - Specifies the pointer event of mouse click.
|
|
542
|
+
* @returns {void}
|
|
528
543
|
*/
|
|
529
544
|
mouseDownOnTreeMap(e: PointerEvent): void;
|
|
530
545
|
/**
|
|
531
546
|
* This method handles the mouse move event in the treemap.
|
|
532
547
|
*
|
|
533
|
-
* @param e - Specifies the pointer event of mouse click.
|
|
548
|
+
* @param {PointerEvent} e - Specifies the pointer event of mouse click.
|
|
549
|
+
* @returns {void}
|
|
534
550
|
*/
|
|
535
551
|
mouseMoveOnTreeMap(e: PointerEvent): void;
|
|
536
552
|
/**
|
|
537
553
|
* This method calculates the selected treemap levels.
|
|
538
554
|
*
|
|
539
|
-
* @param labelText - Specifies the label text.
|
|
540
|
-
* @param item - Specifies the treemap item.
|
|
555
|
+
* @param {string} labelText - Specifies the label text.
|
|
556
|
+
* @param {any} item - Specifies the treemap item.
|
|
557
|
+
* @returns {any} - Returns label of the drilled level.
|
|
541
558
|
*/
|
|
542
559
|
calculateSelectedTextLevels(labelText: string, item: any): any;
|
|
543
560
|
/**
|
|
544
561
|
* This method calculates the previous level of child items in treemap.
|
|
545
562
|
*
|
|
546
|
-
* @param
|
|
547
|
-
* @param
|
|
548
|
-
* @param
|
|
549
|
-
* @
|
|
563
|
+
* @param {any} drillLevelValues - Specifies the values of drill level.
|
|
564
|
+
* @param {any} item - Specifies the treemap item.
|
|
565
|
+
* @param {boolean} directLevel - Specifies the current level.
|
|
566
|
+
* @returns {boolean} - check whether it is previous level or not.
|
|
567
|
+
* @private
|
|
550
568
|
*/
|
|
551
|
-
calculatePreviousLevelChildItems(
|
|
569
|
+
calculatePreviousLevelChildItems(drillLevelValues: any, item: any, directLevel: boolean): boolean;
|
|
552
570
|
/**
|
|
553
571
|
* This method compares the selected labels with the drill down items.
|
|
554
572
|
*
|
|
555
|
-
* @param drillLevelValues - Specifies the values of drill level.
|
|
556
|
-
* @param item - Specifies the treemap item.
|
|
557
|
-
* @param i - Specifies the treemap item.
|
|
573
|
+
* @param {any} drillLevelValues - Specifies the values of drill level.
|
|
574
|
+
* @param {any} item - Specifies the treemap item.
|
|
575
|
+
* @param {number} i - Specifies the treemap item.
|
|
576
|
+
* @returns {any} - return the new drill down object.
|
|
558
577
|
*/
|
|
559
578
|
compareSelectedLabelWithDrillDownItems(drillLevelValues: any, item: any, i: number): any;
|
|
560
579
|
/**
|
|
561
580
|
* This method handles mouse end event in treemap.
|
|
562
581
|
*
|
|
563
|
-
* @param e - Specifies the pointer event of mouse.
|
|
582
|
+
* @param {PointerEvent} e - Specifies the pointer event of mouse.
|
|
583
|
+
* @returns {void}
|
|
564
584
|
*/
|
|
565
585
|
mouseEndOnTreeMap(e: PointerEvent): void;
|
|
566
586
|
/**
|
|
567
587
|
* This method handles mouse leave event in treemap.
|
|
568
588
|
*
|
|
569
|
-
* @param e - Specifies the pointer event of mouse.
|
|
589
|
+
* @param {PointerEvent} e - Specifies the pointer event of mouse.
|
|
590
|
+
* @return {void}
|
|
570
591
|
*/
|
|
571
592
|
mouseLeaveOnTreeMap(e: PointerEvent): void;
|
|
572
593
|
/**
|
|
573
594
|
* This method is used to select or remove the selection of treemap item based on the provided selection settings.
|
|
595
|
+
*
|
|
596
|
+
* @param {string[]} levelOrder - Specifies the order of the level.
|
|
597
|
+
* @param {boolean} isSelected - check whether it is selected or not.
|
|
598
|
+
* @return {void}
|
|
574
599
|
*/
|
|
575
600
|
selectItem(levelOrder: string[], isSelected?: boolean): void;
|
|
576
601
|
/**
|
|
@@ -591,6 +616,8 @@ export declare class TreeMap extends Component<HTMLElement> implements INotifyPr
|
|
|
591
616
|
onPropertyChanged(newProp: TreeMapModel, oldProp: TreeMapModel): void;
|
|
592
617
|
/**
|
|
593
618
|
* Gets component name.
|
|
619
|
+
*
|
|
620
|
+
* @returns {string} - return the treemap instance.
|
|
594
621
|
*/
|
|
595
622
|
getModuleName(): string;
|
|
596
623
|
/**
|