@syncfusion/ej2-treemap 25.2.3 → 26.1.35
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 +3 -2
- 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 +378 -257
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +395 -274
- 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 +12 -12
- package/src/treemap/layout/legend.js +6 -2
- package/src/treemap/layout/render-panel.js +8 -5
- package/src/treemap/model/base.js +3 -3
- package/src/treemap/model/image-export.js +5 -2
- package/src/treemap/model/interface.d.ts +20 -0
- package/src/treemap/model/interface.js +0 -1
- package/src/treemap/model/pdf-export.js +5 -2
- package/src/treemap/model/print.js +5 -2
- package/src/treemap/model/theme.js +122 -12
- package/src/treemap/treemap.js +17 -15
- package/src/treemap/user-interaction/tooltip.js +7 -1
- package/src/treemap/utils/enum.d.ts +7 -1
- package/src/treemap/utils/enum.js +0 -1
- package/CHANGELOG.md +0 -80
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Property, ChildProperty, Complex, Collection, createElement, SanitizeHtmlHelper, isNullOrUndefined, compile, merge, remove, extend, print, Browser, Fetch, EventHandler, Internationalization, Event, NotifyPropertyChanges, Component } from '@syncfusion/ej2-base';
|
|
2
2
|
import { SvgRenderer, Tooltip } from '@syncfusion/ej2-svg-base';
|
|
3
3
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
4
|
-
import {
|
|
4
|
+
import { PdfPageOrientation, PdfDocument, PdfBitmap } from '@syncfusion/ej2-pdf-export';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* TreeMap constants doc
|
|
@@ -121,7 +121,7 @@ var resize = 'resize';
|
|
|
121
121
|
*/
|
|
122
122
|
var defaultFont = 'Roboto, Segoe UI, Noto, Sans-serif';
|
|
123
123
|
|
|
124
|
-
var __extends
|
|
124
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
125
125
|
var extendStatics = function (d, b) {
|
|
126
126
|
extendStatics = Object.setPrototypeOf ||
|
|
127
127
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -134,27 +134,24 @@ var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
|
134
134
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
135
135
|
};
|
|
136
136
|
})();
|
|
137
|
-
var __decorate
|
|
137
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
138
138
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
139
139
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
140
140
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
141
141
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
142
142
|
};
|
|
143
|
-
/**
|
|
144
|
-
* Maps base doc
|
|
145
|
-
*/
|
|
146
143
|
/**
|
|
147
144
|
* Sets and gets the options for customizing the color and width of the border in treemap.
|
|
148
145
|
*/
|
|
149
146
|
var Border = /** @__PURE__ @class */ (function (_super) {
|
|
150
|
-
__extends
|
|
147
|
+
__extends(Border, _super);
|
|
151
148
|
function Border() {
|
|
152
149
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
153
150
|
}
|
|
154
|
-
__decorate
|
|
151
|
+
__decorate([
|
|
155
152
|
Property('#808080')
|
|
156
153
|
], Border.prototype, "color", void 0);
|
|
157
|
-
__decorate
|
|
154
|
+
__decorate([
|
|
158
155
|
Property(0)
|
|
159
156
|
], Border.prototype, "width", void 0);
|
|
160
157
|
return Border;
|
|
@@ -163,20 +160,20 @@ var Border = /** @__PURE__ @class */ (function (_super) {
|
|
|
163
160
|
* Sets and gets the margin for the treemap.
|
|
164
161
|
*/
|
|
165
162
|
var Margin = /** @__PURE__ @class */ (function (_super) {
|
|
166
|
-
__extends
|
|
163
|
+
__extends(Margin, _super);
|
|
167
164
|
function Margin() {
|
|
168
165
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
169
166
|
}
|
|
170
|
-
__decorate
|
|
167
|
+
__decorate([
|
|
171
168
|
Property(10)
|
|
172
169
|
], Margin.prototype, "left", void 0);
|
|
173
|
-
__decorate
|
|
170
|
+
__decorate([
|
|
174
171
|
Property(10)
|
|
175
172
|
], Margin.prototype, "right", void 0);
|
|
176
|
-
__decorate
|
|
173
|
+
__decorate([
|
|
177
174
|
Property(10)
|
|
178
175
|
], Margin.prototype, "top", void 0);
|
|
179
|
-
__decorate
|
|
176
|
+
__decorate([
|
|
180
177
|
Property(10)
|
|
181
178
|
], Margin.prototype, "bottom", void 0);
|
|
182
179
|
return Margin;
|
|
@@ -185,26 +182,26 @@ var Margin = /** @__PURE__ @class */ (function (_super) {
|
|
|
185
182
|
* Sets and gets the options to customize the style of the text contents in the treemap.
|
|
186
183
|
*/
|
|
187
184
|
var Font = /** @__PURE__ @class */ (function (_super) {
|
|
188
|
-
__extends
|
|
185
|
+
__extends(Font, _super);
|
|
189
186
|
function Font() {
|
|
190
187
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
191
188
|
}
|
|
192
|
-
__decorate
|
|
189
|
+
__decorate([
|
|
193
190
|
Property(null)
|
|
194
191
|
], Font.prototype, "size", void 0);
|
|
195
|
-
__decorate
|
|
192
|
+
__decorate([
|
|
196
193
|
Property(null)
|
|
197
194
|
], Font.prototype, "color", void 0);
|
|
198
|
-
__decorate
|
|
195
|
+
__decorate([
|
|
199
196
|
Property(defaultFont)
|
|
200
197
|
], Font.prototype, "fontFamily", void 0);
|
|
201
|
-
__decorate
|
|
198
|
+
__decorate([
|
|
202
199
|
Property('')
|
|
203
200
|
], Font.prototype, "fontWeight", void 0);
|
|
204
|
-
__decorate
|
|
201
|
+
__decorate([
|
|
205
202
|
Property('Normal')
|
|
206
203
|
], Font.prototype, "fontStyle", void 0);
|
|
207
|
-
__decorate
|
|
204
|
+
__decorate([
|
|
208
205
|
Property(1)
|
|
209
206
|
], Font.prototype, "opacity", void 0);
|
|
210
207
|
return Font;
|
|
@@ -213,14 +210,14 @@ var Font = /** @__PURE__ @class */ (function (_super) {
|
|
|
213
210
|
* Sets and gets the options for customizing the title of the treemap.
|
|
214
211
|
*/
|
|
215
212
|
var CommonTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
216
|
-
__extends
|
|
213
|
+
__extends(CommonTitleSettings, _super);
|
|
217
214
|
function CommonTitleSettings() {
|
|
218
215
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
219
216
|
}
|
|
220
|
-
__decorate
|
|
217
|
+
__decorate([
|
|
221
218
|
Property('')
|
|
222
219
|
], CommonTitleSettings.prototype, "text", void 0);
|
|
223
|
-
__decorate
|
|
220
|
+
__decorate([
|
|
224
221
|
Property('')
|
|
225
222
|
], CommonTitleSettings.prototype, "description", void 0);
|
|
226
223
|
return CommonTitleSettings;
|
|
@@ -229,14 +226,14 @@ var CommonTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
229
226
|
* Sets and gets the options for customizing the subtitle of the treemap.
|
|
230
227
|
*/
|
|
231
228
|
var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
232
|
-
__extends
|
|
229
|
+
__extends(SubTitleSettings, _super);
|
|
233
230
|
function SubTitleSettings() {
|
|
234
231
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
235
232
|
}
|
|
236
|
-
__decorate
|
|
233
|
+
__decorate([
|
|
237
234
|
Complex({ fontFamily: null, fontWeight: null }, Font)
|
|
238
235
|
], SubTitleSettings.prototype, "textStyle", void 0);
|
|
239
|
-
__decorate
|
|
236
|
+
__decorate([
|
|
240
237
|
Property('Center')
|
|
241
238
|
], SubTitleSettings.prototype, "alignment", void 0);
|
|
242
239
|
return SubTitleSettings;
|
|
@@ -245,17 +242,17 @@ var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
245
242
|
* Sets and gets the options for customizing the title of the treemap.
|
|
246
243
|
*/
|
|
247
244
|
var TitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
248
|
-
__extends
|
|
245
|
+
__extends(TitleSettings, _super);
|
|
249
246
|
function TitleSettings() {
|
|
250
247
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
251
248
|
}
|
|
252
|
-
__decorate
|
|
249
|
+
__decorate([
|
|
253
250
|
Complex({ fontFamily: null, fontWeight: null }, Font)
|
|
254
251
|
], TitleSettings.prototype, "textStyle", void 0);
|
|
255
|
-
__decorate
|
|
252
|
+
__decorate([
|
|
256
253
|
Property('Center')
|
|
257
254
|
], TitleSettings.prototype, "alignment", void 0);
|
|
258
|
-
__decorate
|
|
255
|
+
__decorate([
|
|
259
256
|
Complex({}, SubTitleSettings)
|
|
260
257
|
], TitleSettings.prototype, "subtitleSettings", void 0);
|
|
261
258
|
return TitleSettings;
|
|
@@ -264,32 +261,32 @@ var TitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
264
261
|
* Sets and gets the options to customize the color-mapping in treemap.
|
|
265
262
|
*/
|
|
266
263
|
var ColorMapping = /** @__PURE__ @class */ (function (_super) {
|
|
267
|
-
__extends
|
|
264
|
+
__extends(ColorMapping, _super);
|
|
268
265
|
function ColorMapping() {
|
|
269
266
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
270
267
|
}
|
|
271
|
-
__decorate
|
|
268
|
+
__decorate([
|
|
272
269
|
Property(null)
|
|
273
270
|
], ColorMapping.prototype, "from", void 0);
|
|
274
|
-
__decorate
|
|
271
|
+
__decorate([
|
|
275
272
|
Property(null)
|
|
276
273
|
], ColorMapping.prototype, "to", void 0);
|
|
277
|
-
__decorate
|
|
274
|
+
__decorate([
|
|
278
275
|
Property(null)
|
|
279
276
|
], ColorMapping.prototype, "color", void 0);
|
|
280
|
-
__decorate
|
|
277
|
+
__decorate([
|
|
281
278
|
Property(null)
|
|
282
279
|
], ColorMapping.prototype, "label", void 0);
|
|
283
|
-
__decorate
|
|
280
|
+
__decorate([
|
|
284
281
|
Property(null)
|
|
285
282
|
], ColorMapping.prototype, "value", void 0);
|
|
286
|
-
__decorate
|
|
283
|
+
__decorate([
|
|
287
284
|
Property(null)
|
|
288
285
|
], ColorMapping.prototype, "minOpacity", void 0);
|
|
289
|
-
__decorate
|
|
286
|
+
__decorate([
|
|
290
287
|
Property(null)
|
|
291
288
|
], ColorMapping.prototype, "maxOpacity", void 0);
|
|
292
|
-
__decorate
|
|
289
|
+
__decorate([
|
|
293
290
|
Property(true)
|
|
294
291
|
], ColorMapping.prototype, "showLegend", void 0);
|
|
295
292
|
return ColorMapping;
|
|
@@ -298,89 +295,89 @@ var ColorMapping = /** @__PURE__ @class */ (function (_super) {
|
|
|
298
295
|
* Sets and gets the options for customizing the legend of the treemap.
|
|
299
296
|
*/
|
|
300
297
|
var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
301
|
-
__extends
|
|
298
|
+
__extends(LegendSettings, _super);
|
|
302
299
|
function LegendSettings() {
|
|
303
300
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
304
301
|
}
|
|
305
|
-
__decorate
|
|
302
|
+
__decorate([
|
|
306
303
|
Property(false)
|
|
307
304
|
], LegendSettings.prototype, "visible", void 0);
|
|
308
|
-
__decorate
|
|
305
|
+
__decorate([
|
|
309
306
|
Property('Default')
|
|
310
307
|
], LegendSettings.prototype, "mode", void 0);
|
|
311
|
-
__decorate
|
|
308
|
+
__decorate([
|
|
312
309
|
Property('transparent')
|
|
313
310
|
], LegendSettings.prototype, "background", void 0);
|
|
314
|
-
__decorate
|
|
311
|
+
__decorate([
|
|
315
312
|
Property('Circle')
|
|
316
313
|
], LegendSettings.prototype, "shape", void 0);
|
|
317
|
-
__decorate
|
|
314
|
+
__decorate([
|
|
318
315
|
Property('')
|
|
319
316
|
], LegendSettings.prototype, "width", void 0);
|
|
320
|
-
__decorate
|
|
317
|
+
__decorate([
|
|
321
318
|
Property('')
|
|
322
319
|
], LegendSettings.prototype, "height", void 0);
|
|
323
|
-
__decorate
|
|
320
|
+
__decorate([
|
|
324
321
|
Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
|
|
325
322
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
326
|
-
__decorate
|
|
323
|
+
__decorate([
|
|
327
324
|
Property(null)
|
|
328
325
|
], LegendSettings.prototype, "fill", void 0);
|
|
329
|
-
__decorate
|
|
326
|
+
__decorate([
|
|
330
327
|
Property(1)
|
|
331
328
|
], LegendSettings.prototype, "opacity", void 0);
|
|
332
|
-
__decorate
|
|
329
|
+
__decorate([
|
|
333
330
|
Property(15)
|
|
334
331
|
], LegendSettings.prototype, "shapeWidth", void 0);
|
|
335
|
-
__decorate
|
|
332
|
+
__decorate([
|
|
336
333
|
Property(15)
|
|
337
334
|
], LegendSettings.prototype, "shapeHeight", void 0);
|
|
338
|
-
__decorate
|
|
335
|
+
__decorate([
|
|
339
336
|
Property(10)
|
|
340
337
|
], LegendSettings.prototype, "shapePadding", void 0);
|
|
341
|
-
__decorate
|
|
338
|
+
__decorate([
|
|
342
339
|
Property(null)
|
|
343
340
|
], LegendSettings.prototype, "imageUrl", void 0);
|
|
344
|
-
__decorate
|
|
345
|
-
Complex({ color:
|
|
341
|
+
__decorate([
|
|
342
|
+
Complex({ color: null, width: null }, Border)
|
|
346
343
|
], LegendSettings.prototype, "border", void 0);
|
|
347
|
-
__decorate
|
|
344
|
+
__decorate([
|
|
348
345
|
Complex({ color: '#000000', width: 0 }, Border)
|
|
349
346
|
], LegendSettings.prototype, "shapeBorder", void 0);
|
|
350
|
-
__decorate
|
|
347
|
+
__decorate([
|
|
351
348
|
Complex({}, CommonTitleSettings)
|
|
352
349
|
], LegendSettings.prototype, "title", void 0);
|
|
353
|
-
__decorate
|
|
350
|
+
__decorate([
|
|
354
351
|
Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
|
|
355
352
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
356
|
-
__decorate
|
|
353
|
+
__decorate([
|
|
357
354
|
Property('Bottom')
|
|
358
355
|
], LegendSettings.prototype, "position", void 0);
|
|
359
|
-
__decorate
|
|
356
|
+
__decorate([
|
|
360
357
|
Property('None')
|
|
361
358
|
], LegendSettings.prototype, "orientation", void 0);
|
|
362
|
-
__decorate
|
|
359
|
+
__decorate([
|
|
363
360
|
Property(false)
|
|
364
361
|
], LegendSettings.prototype, "invertedPointer", void 0);
|
|
365
|
-
__decorate
|
|
362
|
+
__decorate([
|
|
366
363
|
Property('After')
|
|
367
364
|
], LegendSettings.prototype, "labelPosition", void 0);
|
|
368
|
-
__decorate
|
|
365
|
+
__decorate([
|
|
369
366
|
Property('None')
|
|
370
367
|
], LegendSettings.prototype, "labelDisplayMode", void 0);
|
|
371
|
-
__decorate
|
|
368
|
+
__decorate([
|
|
372
369
|
Property('Center')
|
|
373
370
|
], LegendSettings.prototype, "alignment", void 0);
|
|
374
|
-
__decorate
|
|
371
|
+
__decorate([
|
|
375
372
|
Property({ x: 0, y: 0 })
|
|
376
373
|
], LegendSettings.prototype, "location", void 0);
|
|
377
|
-
__decorate
|
|
374
|
+
__decorate([
|
|
378
375
|
Property(null)
|
|
379
376
|
], LegendSettings.prototype, "showLegendPath", void 0);
|
|
380
|
-
__decorate
|
|
377
|
+
__decorate([
|
|
381
378
|
Property(null)
|
|
382
379
|
], LegendSettings.prototype, "valuePath", void 0);
|
|
383
|
-
__decorate
|
|
380
|
+
__decorate([
|
|
384
381
|
Property(false)
|
|
385
382
|
], LegendSettings.prototype, "removeDuplicateLegend", void 0);
|
|
386
383
|
return LegendSettings;
|
|
@@ -389,14 +386,14 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
389
386
|
* Sets and gets the settings for drill down to visualize the treemap rendered in the initial state.
|
|
390
387
|
*/
|
|
391
388
|
var InitialDrillSettings = /** @__PURE__ @class */ (function (_super) {
|
|
392
|
-
__extends
|
|
389
|
+
__extends(InitialDrillSettings, _super);
|
|
393
390
|
function InitialDrillSettings() {
|
|
394
391
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
395
392
|
}
|
|
396
|
-
__decorate
|
|
393
|
+
__decorate([
|
|
397
394
|
Property(null)
|
|
398
395
|
], InitialDrillSettings.prototype, "groupIndex", void 0);
|
|
399
|
-
__decorate
|
|
396
|
+
__decorate([
|
|
400
397
|
Property(null)
|
|
401
398
|
], InitialDrillSettings.prototype, "groupName", void 0);
|
|
402
399
|
return InitialDrillSettings;
|
|
@@ -405,53 +402,53 @@ var InitialDrillSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
405
402
|
* Sets and gets the options for customizing the leaf item of the treemap.
|
|
406
403
|
*/
|
|
407
404
|
var LeafItemSettings = /** @__PURE__ @class */ (function (_super) {
|
|
408
|
-
__extends
|
|
405
|
+
__extends(LeafItemSettings, _super);
|
|
409
406
|
function LeafItemSettings() {
|
|
410
407
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
411
408
|
}
|
|
412
|
-
__decorate
|
|
409
|
+
__decorate([
|
|
413
410
|
Property(null)
|
|
414
411
|
], LeafItemSettings.prototype, "fill", void 0);
|
|
415
|
-
__decorate
|
|
412
|
+
__decorate([
|
|
416
413
|
Property(false)
|
|
417
414
|
], LeafItemSettings.prototype, "autoFill", void 0);
|
|
418
|
-
__decorate
|
|
415
|
+
__decorate([
|
|
419
416
|
Complex({}, Border)
|
|
420
417
|
], LeafItemSettings.prototype, "border", void 0);
|
|
421
|
-
__decorate
|
|
418
|
+
__decorate([
|
|
422
419
|
Property(0)
|
|
423
420
|
], LeafItemSettings.prototype, "gap", void 0);
|
|
424
|
-
__decorate
|
|
421
|
+
__decorate([
|
|
425
422
|
Property(10)
|
|
426
423
|
], LeafItemSettings.prototype, "padding", void 0);
|
|
427
|
-
__decorate
|
|
424
|
+
__decorate([
|
|
428
425
|
Property(1)
|
|
429
426
|
], LeafItemSettings.prototype, "opacity", void 0);
|
|
430
|
-
__decorate
|
|
427
|
+
__decorate([
|
|
431
428
|
Property(true)
|
|
432
429
|
], LeafItemSettings.prototype, "showLabels", void 0);
|
|
433
|
-
__decorate
|
|
430
|
+
__decorate([
|
|
434
431
|
Property(null)
|
|
435
432
|
], LeafItemSettings.prototype, "labelPath", void 0);
|
|
436
|
-
__decorate
|
|
433
|
+
__decorate([
|
|
437
434
|
Property(null)
|
|
438
435
|
], LeafItemSettings.prototype, "labelFormat", void 0);
|
|
439
|
-
__decorate
|
|
436
|
+
__decorate([
|
|
440
437
|
Property('TopLeft')
|
|
441
438
|
], LeafItemSettings.prototype, "labelPosition", void 0);
|
|
442
|
-
__decorate
|
|
443
|
-
Complex({ color: null, size:
|
|
439
|
+
__decorate([
|
|
440
|
+
Complex({ color: null, size: null }, Font)
|
|
444
441
|
], LeafItemSettings.prototype, "labelStyle", void 0);
|
|
445
|
-
__decorate
|
|
442
|
+
__decorate([
|
|
446
443
|
Property(null)
|
|
447
444
|
], LeafItemSettings.prototype, "labelTemplate", void 0);
|
|
448
|
-
__decorate
|
|
445
|
+
__decorate([
|
|
449
446
|
Property('Center')
|
|
450
447
|
], LeafItemSettings.prototype, "templatePosition", void 0);
|
|
451
|
-
__decorate
|
|
448
|
+
__decorate([
|
|
452
449
|
Property('Trim')
|
|
453
450
|
], LeafItemSettings.prototype, "interSectAction", void 0);
|
|
454
|
-
__decorate
|
|
451
|
+
__decorate([
|
|
455
452
|
Collection([], ColorMapping)
|
|
456
453
|
], LeafItemSettings.prototype, "colorMapping", void 0);
|
|
457
454
|
return LeafItemSettings;
|
|
@@ -460,32 +457,32 @@ var LeafItemSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
460
457
|
* Sets and gets the options for customizing the tooltip of the treemap.
|
|
461
458
|
*/
|
|
462
459
|
var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
463
|
-
__extends
|
|
460
|
+
__extends(TooltipSettings, _super);
|
|
464
461
|
function TooltipSettings() {
|
|
465
462
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
466
463
|
}
|
|
467
|
-
__decorate
|
|
464
|
+
__decorate([
|
|
468
465
|
Property(false)
|
|
469
466
|
], TooltipSettings.prototype, "visible", void 0);
|
|
470
|
-
__decorate
|
|
467
|
+
__decorate([
|
|
471
468
|
Property('')
|
|
472
469
|
], TooltipSettings.prototype, "template", void 0);
|
|
473
|
-
__decorate
|
|
470
|
+
__decorate([
|
|
474
471
|
Property(null)
|
|
475
472
|
], TooltipSettings.prototype, "format", void 0);
|
|
476
|
-
__decorate
|
|
473
|
+
__decorate([
|
|
477
474
|
Property(null)
|
|
478
475
|
], TooltipSettings.prototype, "fill", void 0);
|
|
479
|
-
__decorate
|
|
476
|
+
__decorate([
|
|
480
477
|
Property(0.75)
|
|
481
478
|
], TooltipSettings.prototype, "opacity", void 0);
|
|
482
|
-
__decorate
|
|
479
|
+
__decorate([
|
|
483
480
|
Property(['Circle'])
|
|
484
481
|
], TooltipSettings.prototype, "markerShapes", void 0);
|
|
485
|
-
__decorate
|
|
486
|
-
Complex({}, Border)
|
|
482
|
+
__decorate([
|
|
483
|
+
Complex({ width: null, color: null }, Border)
|
|
487
484
|
], TooltipSettings.prototype, "border", void 0);
|
|
488
|
-
__decorate
|
|
485
|
+
__decorate([
|
|
489
486
|
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
490
487
|
], TooltipSettings.prototype, "textStyle", void 0);
|
|
491
488
|
return TooltipSettings;
|
|
@@ -494,23 +491,23 @@ var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
494
491
|
* Sets and gets the options for customizing the selection of the leaf items in treemap.
|
|
495
492
|
*/
|
|
496
493
|
var SelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
497
|
-
__extends
|
|
494
|
+
__extends(SelectionSettings, _super);
|
|
498
495
|
function SelectionSettings() {
|
|
499
496
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
500
497
|
}
|
|
501
|
-
__decorate
|
|
498
|
+
__decorate([
|
|
502
499
|
Property(false)
|
|
503
500
|
], SelectionSettings.prototype, "enable", void 0);
|
|
504
|
-
__decorate
|
|
501
|
+
__decorate([
|
|
505
502
|
Property(null)
|
|
506
503
|
], SelectionSettings.prototype, "fill", void 0);
|
|
507
|
-
__decorate
|
|
504
|
+
__decorate([
|
|
508
505
|
Property('0.5')
|
|
509
506
|
], SelectionSettings.prototype, "opacity", void 0);
|
|
510
|
-
__decorate
|
|
507
|
+
__decorate([
|
|
511
508
|
Complex({}, Border)
|
|
512
509
|
], SelectionSettings.prototype, "border", void 0);
|
|
513
|
-
__decorate
|
|
510
|
+
__decorate([
|
|
514
511
|
Property('Item')
|
|
515
512
|
], SelectionSettings.prototype, "mode", void 0);
|
|
516
513
|
return SelectionSettings;
|
|
@@ -520,23 +517,23 @@ var SelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
520
517
|
* when the mouse hover is performed in it.
|
|
521
518
|
*/
|
|
522
519
|
var HighlightSettings = /** @__PURE__ @class */ (function (_super) {
|
|
523
|
-
__extends
|
|
520
|
+
__extends(HighlightSettings, _super);
|
|
524
521
|
function HighlightSettings() {
|
|
525
522
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
526
523
|
}
|
|
527
|
-
__decorate
|
|
524
|
+
__decorate([
|
|
528
525
|
Property(false)
|
|
529
526
|
], HighlightSettings.prototype, "enable", void 0);
|
|
530
|
-
__decorate
|
|
527
|
+
__decorate([
|
|
531
528
|
Property('#808080')
|
|
532
529
|
], HighlightSettings.prototype, "fill", void 0);
|
|
533
|
-
__decorate
|
|
530
|
+
__decorate([
|
|
534
531
|
Property('0.5')
|
|
535
532
|
], HighlightSettings.prototype, "opacity", void 0);
|
|
536
|
-
__decorate
|
|
533
|
+
__decorate([
|
|
537
534
|
Complex({}, Border)
|
|
538
535
|
], HighlightSettings.prototype, "border", void 0);
|
|
539
|
-
__decorate
|
|
536
|
+
__decorate([
|
|
540
537
|
Property('Item')
|
|
541
538
|
], HighlightSettings.prototype, "mode", void 0);
|
|
542
539
|
return HighlightSettings;
|
|
@@ -545,53 +542,53 @@ var HighlightSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
545
542
|
* Sets and gets the options for customizing the level leaf items of the treemap.
|
|
546
543
|
*/
|
|
547
544
|
var LevelSettings = /** @__PURE__ @class */ (function (_super) {
|
|
548
|
-
__extends
|
|
545
|
+
__extends(LevelSettings, _super);
|
|
549
546
|
function LevelSettings() {
|
|
550
547
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
551
548
|
}
|
|
552
|
-
__decorate
|
|
549
|
+
__decorate([
|
|
553
550
|
Property(null)
|
|
554
551
|
], LevelSettings.prototype, "groupPath", void 0);
|
|
555
|
-
__decorate
|
|
552
|
+
__decorate([
|
|
556
553
|
Property(0)
|
|
557
554
|
], LevelSettings.prototype, "groupGap", void 0);
|
|
558
|
-
__decorate
|
|
555
|
+
__decorate([
|
|
559
556
|
Property(10)
|
|
560
557
|
], LevelSettings.prototype, "groupPadding", void 0);
|
|
561
|
-
__decorate
|
|
558
|
+
__decorate([
|
|
562
559
|
Complex({}, Border)
|
|
563
560
|
], LevelSettings.prototype, "border", void 0);
|
|
564
|
-
__decorate
|
|
561
|
+
__decorate([
|
|
565
562
|
Property(null)
|
|
566
563
|
], LevelSettings.prototype, "fill", void 0);
|
|
567
|
-
__decorate
|
|
564
|
+
__decorate([
|
|
568
565
|
Property(false)
|
|
569
566
|
], LevelSettings.prototype, "autoFill", void 0);
|
|
570
|
-
__decorate
|
|
567
|
+
__decorate([
|
|
571
568
|
Property(1)
|
|
572
569
|
], LevelSettings.prototype, "opacity", void 0);
|
|
573
|
-
__decorate
|
|
570
|
+
__decorate([
|
|
574
571
|
Property(true)
|
|
575
572
|
], LevelSettings.prototype, "showHeader", void 0);
|
|
576
|
-
__decorate
|
|
573
|
+
__decorate([
|
|
577
574
|
Property(20)
|
|
578
575
|
], LevelSettings.prototype, "headerHeight", void 0);
|
|
579
|
-
__decorate
|
|
576
|
+
__decorate([
|
|
580
577
|
Property(null)
|
|
581
578
|
], LevelSettings.prototype, "headerTemplate", void 0);
|
|
582
|
-
__decorate
|
|
579
|
+
__decorate([
|
|
583
580
|
Property(null)
|
|
584
581
|
], LevelSettings.prototype, "headerFormat", void 0);
|
|
585
|
-
__decorate
|
|
582
|
+
__decorate([
|
|
586
583
|
Property('Near')
|
|
587
584
|
], LevelSettings.prototype, "headerAlignment", void 0);
|
|
588
|
-
__decorate
|
|
585
|
+
__decorate([
|
|
589
586
|
Complex({ color: null, size: '13px' }, Font)
|
|
590
587
|
], LevelSettings.prototype, "headerStyle", void 0);
|
|
591
|
-
__decorate
|
|
588
|
+
__decorate([
|
|
592
589
|
Property('TopLeft')
|
|
593
590
|
], LevelSettings.prototype, "templatePosition", void 0);
|
|
594
|
-
__decorate
|
|
591
|
+
__decorate([
|
|
595
592
|
Collection([], ColorMapping)
|
|
596
593
|
], LevelSettings.prototype, "colorMapping", void 0);
|
|
597
594
|
return LevelSettings;
|
|
@@ -1835,7 +1832,6 @@ function setColor(element, fill, opacity, borderColor, borderWidth) {
|
|
|
1835
1832
|
*/
|
|
1836
1833
|
function removeSelectionWithHighlight(collection, element, treemap) {
|
|
1837
1834
|
removeShape(collection);
|
|
1838
|
-
element = [];
|
|
1839
1835
|
removeClassNames(document.getElementsByClassName('treeMapHighLight'), 'treeMapHighLight', treemap);
|
|
1840
1836
|
}
|
|
1841
1837
|
/**
|
|
@@ -1983,7 +1979,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
1983
1979
|
}
|
|
1984
1980
|
return drillData;
|
|
1985
1981
|
};
|
|
1986
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1982
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1987
1983
|
LayoutPanel.prototype.calculateLayoutItems = function (data, rect) {
|
|
1988
1984
|
this.renderItems = [];
|
|
1989
1985
|
this.parentData = [];
|
|
@@ -2288,7 +2284,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2288
2284
|
}
|
|
2289
2285
|
return result;
|
|
2290
2286
|
};
|
|
2291
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2292
2288
|
LayoutPanel.prototype.onDemandProcess = function (childItems) {
|
|
2293
2289
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2294
2290
|
var parentItem = {};
|
|
@@ -2428,6 +2424,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2428
2424
|
textStyle = (isLeafItem ? leaf.labelStyle : levels[index].headerStyle);
|
|
2429
2425
|
textStyle.fontFamily = this_1.treemap.themeStyle.labelFontFamily || textStyle.fontFamily;
|
|
2430
2426
|
textStyle.fontWeight = textStyle.fontWeight || this_1.treemap.themeStyle.fontWeight;
|
|
2427
|
+
textStyle.size = textStyle.size || this_1.treemap.themeStyle.labelFontSize;
|
|
2431
2428
|
border = isLeafItem ? leaf.border : levels[index].border;
|
|
2432
2429
|
position = !isLeafItem ? (levels[index].headerAlignment) === 'Near' ? 'TopLeft' : (levels[index].headerAlignment) === 'Center' ?
|
|
2433
2430
|
'TopCenter' : 'TopRight' : leaf.labelPosition;
|
|
@@ -2563,14 +2560,16 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2563
2560
|
if (colorMapping.length > 0) {
|
|
2564
2561
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2565
2562
|
var option = colorMap(colorMapping, item['data'][treemap.equalColorValuePath], item['data'][treemap.rangeColorValuePath]);
|
|
2566
|
-
|
|
2567
|
-
|
|
2563
|
+
if (!isNullOrUndefined(option)) {
|
|
2564
|
+
itemFill = !isNullOrUndefined(option['fill']) ? option['fill'] : treemap.leafItemSettings.fill;
|
|
2565
|
+
itemOpacity = option['opacity'];
|
|
2566
|
+
}
|
|
2568
2567
|
}
|
|
2569
2568
|
else {
|
|
2570
2569
|
for (var i = 0; i < parentData.length; i++) {
|
|
2571
2570
|
if (parentData[i]['levelOrderName'] === item['levelOrderName'].split('#')[0]) {
|
|
2572
2571
|
itemFill = !isNullOrUndefined(itemFill) ? itemFill : !isNullOrUndefined(treemap.colorValuePath) ?
|
|
2573
|
-
parentData[i]['data'][treemap.colorValuePath] : treemap.palette.length > 0 ?
|
|
2572
|
+
parentData[i]['data'][treemap.colorValuePath] : (!isNullOrUndefined(treemap.palette) && treemap.palette.length > 0) ?
|
|
2574
2573
|
treemap.palette[i % treemap.palette.length] : '#808080';
|
|
2575
2574
|
}
|
|
2576
2575
|
}
|
|
@@ -2707,7 +2706,10 @@ function getThemeStyle(theme) {
|
|
|
2707
2706
|
fontWeight: 'Normal',
|
|
2708
2707
|
subtitleFontSize: '14px',
|
|
2709
2708
|
legendFontSize: '13px',
|
|
2710
|
-
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2709
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
2710
|
+
labelFontSize: '12px',
|
|
2711
|
+
legendBorderColor: '#000000',
|
|
2712
|
+
legendBorderWidth: 0
|
|
2711
2713
|
};
|
|
2712
2714
|
break;
|
|
2713
2715
|
case 'highcontrast':
|
|
@@ -2725,7 +2727,10 @@ function getThemeStyle(theme) {
|
|
|
2725
2727
|
fontWeight: 'Normal',
|
|
2726
2728
|
subtitleFontSize: '14px',
|
|
2727
2729
|
legendFontSize: '13px',
|
|
2728
|
-
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
2730
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
2731
|
+
labelFontSize: '12px',
|
|
2732
|
+
legendBorderColor: '#000000',
|
|
2733
|
+
legendBorderWidth: 0
|
|
2729
2734
|
};
|
|
2730
2735
|
break;
|
|
2731
2736
|
case 'bootstrap4':
|
|
@@ -2746,7 +2751,10 @@ function getThemeStyle(theme) {
|
|
|
2746
2751
|
fontWeight: 'Normal',
|
|
2747
2752
|
subtitleFontSize: '14px',
|
|
2748
2753
|
legendFontSize: '14px',
|
|
2749
|
-
labelFontFamily: 'HelveticaNeue'
|
|
2754
|
+
labelFontFamily: 'HelveticaNeue',
|
|
2755
|
+
labelFontSize: '12px',
|
|
2756
|
+
legendBorderColor: '#000000',
|
|
2757
|
+
legendBorderWidth: 0
|
|
2750
2758
|
};
|
|
2751
2759
|
break;
|
|
2752
2760
|
case 'tailwind':
|
|
@@ -2767,7 +2775,10 @@ function getThemeStyle(theme) {
|
|
|
2767
2775
|
fontWeight: 'Normal',
|
|
2768
2776
|
subtitleFontSize: '12px',
|
|
2769
2777
|
legendFontSize: '12px',
|
|
2770
|
-
labelFontFamily: 'Inter'
|
|
2778
|
+
labelFontFamily: 'Inter',
|
|
2779
|
+
labelFontSize: '12px',
|
|
2780
|
+
legendBorderColor: '#000000',
|
|
2781
|
+
legendBorderWidth: 0
|
|
2771
2782
|
};
|
|
2772
2783
|
break;
|
|
2773
2784
|
case 'tailwinddark':
|
|
@@ -2788,7 +2799,10 @@ function getThemeStyle(theme) {
|
|
|
2788
2799
|
fontSize: '14px',
|
|
2789
2800
|
subtitleFontSize: '12px',
|
|
2790
2801
|
legendFontSize: '12px',
|
|
2791
|
-
labelFontFamily: 'Inter'
|
|
2802
|
+
labelFontFamily: 'Inter',
|
|
2803
|
+
labelFontSize: '12px',
|
|
2804
|
+
legendBorderColor: '#000000',
|
|
2805
|
+
legendBorderWidth: 0
|
|
2792
2806
|
};
|
|
2793
2807
|
break;
|
|
2794
2808
|
case 'bootstrap5':
|
|
@@ -2809,7 +2823,10 @@ function getThemeStyle(theme) {
|
|
|
2809
2823
|
fontWeight: 'Normal',
|
|
2810
2824
|
subtitleFontSize: '12px',
|
|
2811
2825
|
legendFontSize: '12px',
|
|
2812
|
-
labelFontFamily: 'Helvetica Neue'
|
|
2826
|
+
labelFontFamily: 'Helvetica Neue',
|
|
2827
|
+
labelFontSize: '12px',
|
|
2828
|
+
legendBorderColor: '#000000',
|
|
2829
|
+
legendBorderWidth: 0
|
|
2813
2830
|
};
|
|
2814
2831
|
break;
|
|
2815
2832
|
case 'bootstrap5dark':
|
|
@@ -2830,7 +2847,10 @@ function getThemeStyle(theme) {
|
|
|
2830
2847
|
fontWeight: 'Normal',
|
|
2831
2848
|
subtitleFontSize: '12px',
|
|
2832
2849
|
legendFontSize: '12px',
|
|
2833
|
-
labelFontFamily: 'Helvetica Neue'
|
|
2850
|
+
labelFontFamily: 'Helvetica Neue',
|
|
2851
|
+
labelFontSize: '12px',
|
|
2852
|
+
legendBorderColor: '#000000',
|
|
2853
|
+
legendBorderWidth: 0
|
|
2834
2854
|
};
|
|
2835
2855
|
break;
|
|
2836
2856
|
case 'fluent':
|
|
@@ -2851,7 +2871,10 @@ function getThemeStyle(theme) {
|
|
|
2851
2871
|
fontWeight: 'Normal',
|
|
2852
2872
|
subtitleFontSize: '12px',
|
|
2853
2873
|
legendFontSize: '12px',
|
|
2854
|
-
labelFontFamily: 'Segoe UI'
|
|
2874
|
+
labelFontFamily: 'Segoe UI',
|
|
2875
|
+
labelFontSize: '12px',
|
|
2876
|
+
legendBorderColor: '#000000',
|
|
2877
|
+
legendBorderWidth: 0
|
|
2855
2878
|
};
|
|
2856
2879
|
break;
|
|
2857
2880
|
case 'fluentdark':
|
|
@@ -2872,7 +2895,10 @@ function getThemeStyle(theme) {
|
|
|
2872
2895
|
fontWeight: 'Normal',
|
|
2873
2896
|
subtitleFontSize: '12px',
|
|
2874
2897
|
legendFontSize: '12px',
|
|
2875
|
-
labelFontFamily: 'Segoe UI'
|
|
2898
|
+
labelFontFamily: 'Segoe UI',
|
|
2899
|
+
labelFontSize: '12px',
|
|
2900
|
+
legendBorderColor: '#000000',
|
|
2901
|
+
legendBorderWidth: 0
|
|
2876
2902
|
};
|
|
2877
2903
|
break;
|
|
2878
2904
|
case 'material3':
|
|
@@ -2893,7 +2919,10 @@ function getThemeStyle(theme) {
|
|
|
2893
2919
|
fontWeight: '400',
|
|
2894
2920
|
subtitleFontSize: '14px',
|
|
2895
2921
|
legendFontSize: '14px',
|
|
2896
|
-
labelFontFamily: 'Roboto'
|
|
2922
|
+
labelFontFamily: 'Roboto',
|
|
2923
|
+
labelFontSize: '12px',
|
|
2924
|
+
legendBorderColor: '#000000',
|
|
2925
|
+
legendBorderWidth: 0
|
|
2897
2926
|
};
|
|
2898
2927
|
break;
|
|
2899
2928
|
case 'material3dark':
|
|
@@ -2914,7 +2943,84 @@ function getThemeStyle(theme) {
|
|
|
2914
2943
|
fontWeight: '400',
|
|
2915
2944
|
subtitleFontSize: '14px',
|
|
2916
2945
|
legendFontSize: '14px',
|
|
2917
|
-
labelFontFamily: 'Roboto'
|
|
2946
|
+
labelFontFamily: 'Roboto',
|
|
2947
|
+
labelFontSize: '12px',
|
|
2948
|
+
legendBorderColor: '#000000',
|
|
2949
|
+
legendBorderWidth: 0
|
|
2950
|
+
};
|
|
2951
|
+
break;
|
|
2952
|
+
case 'fluent2':
|
|
2953
|
+
style = {
|
|
2954
|
+
backgroundColor: 'transparent',
|
|
2955
|
+
titleFontColor: '#242424',
|
|
2956
|
+
titleFontWeight: '600',
|
|
2957
|
+
subTitleFontColor: '#242424',
|
|
2958
|
+
tooltipFillColor: '#FFFFFF',
|
|
2959
|
+
tooltipFontColor: '#242424',
|
|
2960
|
+
tooltipFontSize: '12px',
|
|
2961
|
+
tooltipFillOpacity: 1,
|
|
2962
|
+
tooltipTextOpacity: 1,
|
|
2963
|
+
legendTitleColor: '#242424',
|
|
2964
|
+
legendTextColor: '#242424',
|
|
2965
|
+
fontFamily: 'Segoe UI',
|
|
2966
|
+
fontSize: '14px',
|
|
2967
|
+
fontWeight: '400',
|
|
2968
|
+
subtitleFontSize: '12px',
|
|
2969
|
+
legendFontSize: '12px',
|
|
2970
|
+
labelFontFamily: 'Segoe UI',
|
|
2971
|
+
labelFontSize: '10px',
|
|
2972
|
+
legendBorderColor: '#000000',
|
|
2973
|
+
legendBorderWidth: 0
|
|
2974
|
+
};
|
|
2975
|
+
break;
|
|
2976
|
+
case 'fluent2dark':
|
|
2977
|
+
style = {
|
|
2978
|
+
backgroundColor: 'transparent',
|
|
2979
|
+
titleFontColor: '#FFFFFF',
|
|
2980
|
+
titleFontWeight: '600',
|
|
2981
|
+
subTitleFontColor: '#FFFFFF',
|
|
2982
|
+
tooltipFillColor: '#292929',
|
|
2983
|
+
tooltipFontColor: '#FFFFFF',
|
|
2984
|
+
tooltipFontSize: '12px',
|
|
2985
|
+
tooltipFillOpacity: 1,
|
|
2986
|
+
tooltipTextOpacity: 1,
|
|
2987
|
+
legendTitleColor: '#FFFFFF',
|
|
2988
|
+
legendTextColor: '#FFFFFF',
|
|
2989
|
+
fontFamily: 'Segoe UI',
|
|
2990
|
+
fontSize: '14px',
|
|
2991
|
+
fontWeight: '400',
|
|
2992
|
+
subtitleFontSize: '12px',
|
|
2993
|
+
legendFontSize: '12px',
|
|
2994
|
+
labelFontFamily: 'Segoe UI',
|
|
2995
|
+
labelFontSize: '10px',
|
|
2996
|
+
legendBorderColor: '#000000',
|
|
2997
|
+
legendBorderWidth: 0
|
|
2998
|
+
};
|
|
2999
|
+
break;
|
|
3000
|
+
case 'fluent2highcontrast':
|
|
3001
|
+
style = {
|
|
3002
|
+
backgroundColor: 'transparent',
|
|
3003
|
+
titleFontColor: '#FFFFFF',
|
|
3004
|
+
titleFontWeight: '600',
|
|
3005
|
+
subTitleFontColor: '#FFFFFF',
|
|
3006
|
+
tooltipFillColor: '#000000',
|
|
3007
|
+
tooltipFontColor: '#FFFFFF',
|
|
3008
|
+
tooltipFontSize: '12px',
|
|
3009
|
+
tooltipFillOpacity: 1,
|
|
3010
|
+
tooltipTextOpacity: 1,
|
|
3011
|
+
legendTitleColor: '#FFFFFF',
|
|
3012
|
+
legendTextColor: '#FFFFFF',
|
|
3013
|
+
fontFamily: 'Segoe UI',
|
|
3014
|
+
fontSize: '14px',
|
|
3015
|
+
fontWeight: '400',
|
|
3016
|
+
subtitleFontSize: '12px',
|
|
3017
|
+
legendFontSize: '12px',
|
|
3018
|
+
labelFontFamily: 'Segoe UI',
|
|
3019
|
+
labelFontSize: '10px',
|
|
3020
|
+
legendBorderColor: '#FFF',
|
|
3021
|
+
legendBorderWidth: 1,
|
|
3022
|
+
tooltipBorderColor: '#FFF',
|
|
3023
|
+
tooltipBorderWidth: 1
|
|
2918
3024
|
};
|
|
2919
3025
|
break;
|
|
2920
3026
|
default:
|
|
@@ -2932,7 +3038,10 @@ function getThemeStyle(theme) {
|
|
|
2932
3038
|
fontWeight: 'Normal',
|
|
2933
3039
|
subtitleFontSize: '14px',
|
|
2934
3040
|
legendFontSize: '13px',
|
|
2935
|
-
fontFamily: 'Roboto, Noto, Sans-serif'
|
|
3041
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3042
|
+
labelFontSize: '12px',
|
|
3043
|
+
legendBorderColor: '#000000',
|
|
3044
|
+
legendBorderWidth: 0
|
|
2936
3045
|
};
|
|
2937
3046
|
break;
|
|
2938
3047
|
}
|
|
@@ -3005,10 +3114,13 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
3005
3114
|
backgroundElement = backgroundElement.childNodes[0];
|
|
3006
3115
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3007
3116
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3008
|
-
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3'
|
|
3117
|
+
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' || treeMap.theme === 'Fluent2')
|
|
3118
|
+
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3009
3119
|
backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3010
3120
|
}
|
|
3011
|
-
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark'
|
|
3121
|
+
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark' ||
|
|
3122
|
+
treeMap.theme === 'Fluent2Dark' || treeMap.theme === 'Fluent2HighContrast')
|
|
3123
|
+
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3012
3124
|
backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3013
3125
|
}
|
|
3014
3126
|
}
|
|
@@ -3075,10 +3187,13 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
3075
3187
|
var backgroundElement = exportElement.childNodes[0];
|
|
3076
3188
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3077
3189
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3078
|
-
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3'
|
|
3190
|
+
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' || treeMap.theme === 'Fluent2')
|
|
3191
|
+
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3079
3192
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3080
3193
|
}
|
|
3081
|
-
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark'
|
|
3194
|
+
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark' ||
|
|
3195
|
+
treeMap.theme === 'Fluent2Dark' || treeMap.theme === 'Fluent2HighContrast')
|
|
3196
|
+
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3082
3197
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3083
3198
|
}
|
|
3084
3199
|
}
|
|
@@ -3174,10 +3289,13 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
3174
3289
|
var backgroundElement = exportElement.childNodes[0];
|
|
3175
3290
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3176
3291
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3177
|
-
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3'
|
|
3292
|
+
if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3' || treeMap.theme === 'Fluent2')
|
|
3293
|
+
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3178
3294
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3179
3295
|
}
|
|
3180
|
-
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark'
|
|
3296
|
+
else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark' ||
|
|
3297
|
+
treeMap.theme === 'Fluent2Dark' || treeMap.theme === 'Fluent2HighContrast')
|
|
3298
|
+
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
3181
3299
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3182
3300
|
}
|
|
3183
3301
|
}
|
|
@@ -3222,7 +3340,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
3222
3340
|
/**
|
|
3223
3341
|
* Tree Map Components
|
|
3224
3342
|
*/
|
|
3225
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
3343
|
+
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
3226
3344
|
var extendStatics = function (d, b) {
|
|
3227
3345
|
extendStatics = Object.setPrototypeOf ||
|
|
3228
3346
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -3235,7 +3353,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
3235
3353
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3236
3354
|
};
|
|
3237
3355
|
})();
|
|
3238
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3356
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3239
3357
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3240
3358
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3241
3359
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3252,7 +3370,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
3252
3370
|
* ```
|
|
3253
3371
|
*/
|
|
3254
3372
|
var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
3255
|
-
__extends(TreeMap, _super);
|
|
3373
|
+
__extends$1(TreeMap, _super);
|
|
3256
3374
|
/**
|
|
3257
3375
|
* Constructor for TreeMap.
|
|
3258
3376
|
*
|
|
@@ -3610,19 +3728,21 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3610
3728
|
if (dataCount === this.treemapLevelData.hierarchyData.length - 1) {
|
|
3611
3729
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3612
3730
|
var mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3731
|
+
if (!isNullOrUndefined(mainData_1)) {
|
|
3732
|
+
for (var k = 0; k < this.treemapLevelData.hierarchyData.length; k++) {
|
|
3733
|
+
childData = findChildren(this.treemapLevelData.hierarchyData[k])['values'];
|
|
3734
|
+
if (k !== 0 && childData) {
|
|
3735
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3736
|
+
childData.forEach(function (currentData) { mainData_1.push(currentData); });
|
|
3737
|
+
this.treemapLevelData.hierarchyData.splice(k, 1);
|
|
3738
|
+
k -= 1;
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
|
|
3742
|
+
for (var l = 0; l < mainData_1.length; l++) {
|
|
3743
|
+
newData[this.levels[0].groupPath] = mainData_1;
|
|
3744
|
+
mainData_1[l]['parent'] = newData;
|
|
3620
3745
|
}
|
|
3621
|
-
}
|
|
3622
|
-
mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
|
|
3623
|
-
for (var l = 0; l < mainData_1.length; l++) {
|
|
3624
|
-
newData[this.levels[0].groupPath] = mainData_1;
|
|
3625
|
-
mainData_1[l]['parent'] = newData;
|
|
3626
3746
|
}
|
|
3627
3747
|
}
|
|
3628
3748
|
};
|
|
@@ -3998,7 +4118,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3998
4118
|
* @returns {any} - Returns label of the drilled level.
|
|
3999
4119
|
* @private
|
|
4000
4120
|
*/
|
|
4001
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4121
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4002
4122
|
TreeMap.prototype.calculateSelectedTextLevels = function (labelText, item) {
|
|
4003
4123
|
//to find the levels by clicking the particular text both for drillDownView as true / false.
|
|
4004
4124
|
var drillLevel;
|
|
@@ -4024,7 +4144,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4024
4144
|
* @returns {boolean} - check whether it is previous level or not.
|
|
4025
4145
|
* @private
|
|
4026
4146
|
*/
|
|
4027
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4147
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4028
4148
|
TreeMap.prototype.calculatePreviousLevelChildItems = function (drillLevelValues, item, directLevel) {
|
|
4029
4149
|
//By clicking any child items drilldown to the particular level.
|
|
4030
4150
|
//At the time store all the previous drilled level items in drilledItems
|
|
@@ -4066,7 +4186,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4066
4186
|
* @returns {any} - return the new drill down object.
|
|
4067
4187
|
* @private
|
|
4068
4188
|
*/
|
|
4069
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4189
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4070
4190
|
TreeMap.prototype.compareSelectedLabelWithDrillDownItems = function (drillLevelValues, item, i) {
|
|
4071
4191
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4072
4192
|
var drillLevelChild;
|
|
@@ -4105,7 +4225,6 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4105
4225
|
var index;
|
|
4106
4226
|
var newDrillItem = {};
|
|
4107
4227
|
var item;
|
|
4108
|
-
var process = true;
|
|
4109
4228
|
var layoutID = this.element.id + '_TreeMap_' + this.layoutType + '_Layout';
|
|
4110
4229
|
var drillLevel;
|
|
4111
4230
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4220,7 +4339,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4220
4339
|
});
|
|
4221
4340
|
endEvent = { cancel: false, name: drillEnd, treemap: this, renderItems: this.layout.renderItems };
|
|
4222
4341
|
this.trigger(drillEnd, endEvent);
|
|
4223
|
-
|
|
4342
|
+
{
|
|
4224
4343
|
if (!directLevel && isNullOrUndefined(drillLevel)) {
|
|
4225
4344
|
this.drilledItems.push({ name: item['levelOrderName'], data: item });
|
|
4226
4345
|
}
|
|
@@ -4426,163 +4545,163 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4426
4545
|
TreeMap.prototype.getPersistData = function () {
|
|
4427
4546
|
return '';
|
|
4428
4547
|
};
|
|
4429
|
-
__decorate([
|
|
4548
|
+
__decorate$1([
|
|
4430
4549
|
Property(false)
|
|
4431
4550
|
], TreeMap.prototype, "allowPrint", void 0);
|
|
4432
|
-
__decorate([
|
|
4551
|
+
__decorate$1([
|
|
4433
4552
|
Property(false)
|
|
4434
4553
|
], TreeMap.prototype, "allowImageExport", void 0);
|
|
4435
|
-
__decorate([
|
|
4554
|
+
__decorate$1([
|
|
4436
4555
|
Property(false)
|
|
4437
4556
|
], TreeMap.prototype, "allowPdfExport", void 0);
|
|
4438
|
-
__decorate([
|
|
4557
|
+
__decorate$1([
|
|
4439
4558
|
Property(null)
|
|
4440
4559
|
], TreeMap.prototype, "width", void 0);
|
|
4441
|
-
__decorate([
|
|
4560
|
+
__decorate$1([
|
|
4442
4561
|
Property(null)
|
|
4443
4562
|
], TreeMap.prototype, "height", void 0);
|
|
4444
|
-
__decorate([
|
|
4563
|
+
__decorate$1([
|
|
4445
4564
|
Complex({}, Border)
|
|
4446
4565
|
], TreeMap.prototype, "border", void 0);
|
|
4447
|
-
__decorate([
|
|
4566
|
+
__decorate$1([
|
|
4448
4567
|
Complex({}, Margin)
|
|
4449
4568
|
], TreeMap.prototype, "margin", void 0);
|
|
4450
|
-
__decorate([
|
|
4569
|
+
__decorate$1([
|
|
4451
4570
|
Property(null)
|
|
4452
4571
|
], TreeMap.prototype, "background", void 0);
|
|
4453
|
-
__decorate([
|
|
4572
|
+
__decorate$1([
|
|
4454
4573
|
Property('Material')
|
|
4455
4574
|
], TreeMap.prototype, "theme", void 0);
|
|
4456
|
-
__decorate([
|
|
4575
|
+
__decorate$1([
|
|
4457
4576
|
Complex({}, TitleSettings)
|
|
4458
4577
|
], TreeMap.prototype, "titleSettings", void 0);
|
|
4459
|
-
__decorate([
|
|
4578
|
+
__decorate$1([
|
|
4460
4579
|
Property('Squarified')
|
|
4461
4580
|
], TreeMap.prototype, "layoutType", void 0);
|
|
4462
|
-
__decorate([
|
|
4581
|
+
__decorate$1([
|
|
4463
4582
|
Property(null)
|
|
4464
4583
|
], TreeMap.prototype, "dataSource", void 0);
|
|
4465
|
-
__decorate([
|
|
4584
|
+
__decorate$1([
|
|
4466
4585
|
Property(null)
|
|
4467
4586
|
], TreeMap.prototype, "query", void 0);
|
|
4468
|
-
__decorate([
|
|
4587
|
+
__decorate$1([
|
|
4469
4588
|
Property(null)
|
|
4470
4589
|
], TreeMap.prototype, "weightValuePath", void 0);
|
|
4471
|
-
__decorate([
|
|
4590
|
+
__decorate$1([
|
|
4472
4591
|
Property('')
|
|
4473
4592
|
], TreeMap.prototype, "rangeColorValuePath", void 0);
|
|
4474
|
-
__decorate([
|
|
4593
|
+
__decorate$1([
|
|
4475
4594
|
Property('')
|
|
4476
4595
|
], TreeMap.prototype, "equalColorValuePath", void 0);
|
|
4477
|
-
__decorate([
|
|
4596
|
+
__decorate$1([
|
|
4478
4597
|
Property(null)
|
|
4479
4598
|
], TreeMap.prototype, "colorValuePath", void 0);
|
|
4480
|
-
__decorate([
|
|
4599
|
+
__decorate$1([
|
|
4481
4600
|
Property([])
|
|
4482
4601
|
], TreeMap.prototype, "palette", void 0);
|
|
4483
|
-
__decorate([
|
|
4602
|
+
__decorate$1([
|
|
4484
4603
|
Property('TopLeftBottomRight')
|
|
4485
4604
|
], TreeMap.prototype, "renderDirection", void 0);
|
|
4486
|
-
__decorate([
|
|
4605
|
+
__decorate$1([
|
|
4487
4606
|
Property(false)
|
|
4488
4607
|
], TreeMap.prototype, "enableDrillDown", void 0);
|
|
4489
|
-
__decorate([
|
|
4608
|
+
__decorate$1([
|
|
4490
4609
|
Property(false)
|
|
4491
4610
|
], TreeMap.prototype, "enableBreadcrumb", void 0);
|
|
4492
|
-
__decorate([
|
|
4611
|
+
__decorate$1([
|
|
4493
4612
|
Property(' - ')
|
|
4494
4613
|
], TreeMap.prototype, "breadcrumbConnector", void 0);
|
|
4495
|
-
__decorate([
|
|
4614
|
+
__decorate$1([
|
|
4496
4615
|
Property(false)
|
|
4497
4616
|
], TreeMap.prototype, "drillDownView", void 0);
|
|
4498
|
-
__decorate([
|
|
4617
|
+
__decorate$1([
|
|
4499
4618
|
Complex({}, InitialDrillSettings)
|
|
4500
4619
|
], TreeMap.prototype, "initialDrillDown", void 0);
|
|
4501
|
-
__decorate([
|
|
4620
|
+
__decorate$1([
|
|
4502
4621
|
Complex({}, LeafItemSettings)
|
|
4503
4622
|
], TreeMap.prototype, "leafItemSettings", void 0);
|
|
4504
|
-
__decorate([
|
|
4623
|
+
__decorate$1([
|
|
4505
4624
|
Collection([], LevelSettings)
|
|
4506
4625
|
], TreeMap.prototype, "levels", void 0);
|
|
4507
|
-
__decorate([
|
|
4626
|
+
__decorate$1([
|
|
4508
4627
|
Complex({}, HighlightSettings)
|
|
4509
4628
|
], TreeMap.prototype, "highlightSettings", void 0);
|
|
4510
|
-
__decorate([
|
|
4629
|
+
__decorate$1([
|
|
4511
4630
|
Complex({}, SelectionSettings)
|
|
4512
4631
|
], TreeMap.prototype, "selectionSettings", void 0);
|
|
4513
|
-
__decorate([
|
|
4632
|
+
__decorate$1([
|
|
4514
4633
|
Complex({}, TooltipSettings)
|
|
4515
4634
|
], TreeMap.prototype, "tooltipSettings", void 0);
|
|
4516
|
-
__decorate([
|
|
4635
|
+
__decorate$1([
|
|
4517
4636
|
Complex({}, LegendSettings)
|
|
4518
4637
|
], TreeMap.prototype, "legendSettings", void 0);
|
|
4519
|
-
__decorate([
|
|
4638
|
+
__decorate$1([
|
|
4520
4639
|
Property(false)
|
|
4521
4640
|
], TreeMap.prototype, "useGroupingSeparator", void 0);
|
|
4522
|
-
__decorate([
|
|
4641
|
+
__decorate$1([
|
|
4523
4642
|
Property(null)
|
|
4524
4643
|
], TreeMap.prototype, "description", void 0);
|
|
4525
|
-
__decorate([
|
|
4644
|
+
__decorate$1([
|
|
4526
4645
|
Property(0)
|
|
4527
4646
|
], TreeMap.prototype, "tabIndex", void 0);
|
|
4528
|
-
__decorate([
|
|
4647
|
+
__decorate$1([
|
|
4529
4648
|
Property(null)
|
|
4530
4649
|
], TreeMap.prototype, "format", void 0);
|
|
4531
|
-
__decorate([
|
|
4650
|
+
__decorate$1([
|
|
4532
4651
|
Event()
|
|
4533
4652
|
], TreeMap.prototype, "load", void 0);
|
|
4534
|
-
__decorate([
|
|
4653
|
+
__decorate$1([
|
|
4535
4654
|
Event()
|
|
4536
4655
|
], TreeMap.prototype, "beforePrint", void 0);
|
|
4537
|
-
__decorate([
|
|
4656
|
+
__decorate$1([
|
|
4538
4657
|
Event()
|
|
4539
4658
|
], TreeMap.prototype, "loaded", void 0);
|
|
4540
|
-
__decorate([
|
|
4659
|
+
__decorate$1([
|
|
4541
4660
|
Event()
|
|
4542
4661
|
], TreeMap.prototype, "itemRendering", void 0);
|
|
4543
|
-
__decorate([
|
|
4662
|
+
__decorate$1([
|
|
4544
4663
|
Event()
|
|
4545
4664
|
], TreeMap.prototype, "drillStart", void 0);
|
|
4546
|
-
__decorate([
|
|
4665
|
+
__decorate$1([
|
|
4547
4666
|
Event()
|
|
4548
4667
|
], TreeMap.prototype, "drillEnd", void 0);
|
|
4549
|
-
__decorate([
|
|
4668
|
+
__decorate$1([
|
|
4550
4669
|
Event()
|
|
4551
4670
|
], TreeMap.prototype, "itemSelected", void 0);
|
|
4552
|
-
__decorate([
|
|
4671
|
+
__decorate$1([
|
|
4553
4672
|
Event()
|
|
4554
4673
|
], TreeMap.prototype, "itemHighlight", void 0);
|
|
4555
|
-
__decorate([
|
|
4674
|
+
__decorate$1([
|
|
4556
4675
|
Event()
|
|
4557
4676
|
], TreeMap.prototype, "tooltipRendering", void 0);
|
|
4558
|
-
__decorate([
|
|
4677
|
+
__decorate$1([
|
|
4559
4678
|
Event()
|
|
4560
4679
|
], TreeMap.prototype, "itemClick", void 0);
|
|
4561
|
-
__decorate([
|
|
4680
|
+
__decorate$1([
|
|
4562
4681
|
Event()
|
|
4563
4682
|
], TreeMap.prototype, "itemMove", void 0);
|
|
4564
|
-
__decorate([
|
|
4683
|
+
__decorate$1([
|
|
4565
4684
|
Event()
|
|
4566
4685
|
], TreeMap.prototype, "click", void 0);
|
|
4567
|
-
__decorate([
|
|
4686
|
+
__decorate$1([
|
|
4568
4687
|
Event()
|
|
4569
4688
|
], TreeMap.prototype, "doubleClick", void 0);
|
|
4570
|
-
__decorate([
|
|
4689
|
+
__decorate$1([
|
|
4571
4690
|
Event()
|
|
4572
4691
|
], TreeMap.prototype, "rightClick", void 0);
|
|
4573
|
-
__decorate([
|
|
4692
|
+
__decorate$1([
|
|
4574
4693
|
Event()
|
|
4575
4694
|
], TreeMap.prototype, "mouseMove", void 0);
|
|
4576
|
-
__decorate([
|
|
4695
|
+
__decorate$1([
|
|
4577
4696
|
Event()
|
|
4578
4697
|
], TreeMap.prototype, "resize", void 0);
|
|
4579
|
-
__decorate([
|
|
4698
|
+
__decorate$1([
|
|
4580
4699
|
Event()
|
|
4581
4700
|
], TreeMap.prototype, "legendItemRendering", void 0);
|
|
4582
|
-
__decorate([
|
|
4701
|
+
__decorate$1([
|
|
4583
4702
|
Event()
|
|
4584
4703
|
], TreeMap.prototype, "legendRendering", void 0);
|
|
4585
|
-
TreeMap = __decorate([
|
|
4704
|
+
TreeMap = __decorate$1([
|
|
4586
4705
|
NotifyPropertyChanges
|
|
4587
4706
|
], TreeMap);
|
|
4588
4707
|
return TreeMap;
|
|
@@ -4654,7 +4773,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4654
4773
|
var treemap = this.treemap;
|
|
4655
4774
|
var legend = treemap.legendSettings;
|
|
4656
4775
|
this.findColorMappingLegendItems(treemap.treemapLevelData.levelsData[0]);
|
|
4657
|
-
if ((this.treemap.palette.length > 0 || !isNullOrUndefined(treemap.colorValuePath))
|
|
4776
|
+
if (((!isNullOrUndefined(this.treemap.palette) && this.treemap.palette.length > 0) || !isNullOrUndefined(treemap.colorValuePath))
|
|
4658
4777
|
&& this.legendCollections.length === 0) {
|
|
4659
4778
|
this.findPaletteLegendItems(treemap.treemapLevelData.levelsData[0]);
|
|
4660
4779
|
}
|
|
@@ -5005,38 +5124,38 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5005
5124
|
isLeafItem = (this.treemap.levels.length === 0 || groupIndex === this.treemap.levels.length);
|
|
5006
5125
|
colorMapping = isLeafItem ? leaf.colorMapping : levels[groupIndex].colorMapping;
|
|
5007
5126
|
for (var j = 0; j < colorMapping.length; j++) {
|
|
5008
|
-
var colorMap
|
|
5127
|
+
var colorMap = colorMapping[j];
|
|
5009
5128
|
gradientElement = null;
|
|
5010
5129
|
rangeValue = Number(currentData[this.treemap.rangeColorValuePath]);
|
|
5011
5130
|
equalValue = currentData[this.treemap.equalColorValuePath];
|
|
5012
|
-
colorMap
|
|
5013
|
-
if (!isNullOrUndefined(colorMap
|
|
5014
|
-
rangeValue >= colorMap
|
|
5131
|
+
colorMap.value = !isNullOrUndefined(colorMap.value) ? colorMap.value.toString() : colorMap.value;
|
|
5132
|
+
if (!isNullOrUndefined(colorMap.from) && !isNullOrUndefined(colorMap.to) &&
|
|
5133
|
+
rangeValue >= colorMap.from && rangeValue <= colorMap.to && colorMap.showLegend) {
|
|
5015
5134
|
colorMapProcess = true;
|
|
5016
5135
|
isRange = true;
|
|
5017
|
-
actualValue = colorMap
|
|
5018
|
-
legendText = !isNullOrUndefined(colorMap
|
|
5019
|
-
fill = isNullOrUndefined(colorMap
|
|
5136
|
+
actualValue = colorMap.from + ' - ' + colorMap.to;
|
|
5137
|
+
legendText = !isNullOrUndefined(colorMap.label) ? colorMap.label : colorMap.from + ' - ' + colorMap.to;
|
|
5138
|
+
fill = isNullOrUndefined(colorMap.color) ? fill : colorMap.color;
|
|
5020
5139
|
isAddData = this.isAddNewLegendData(actualValue);
|
|
5021
5140
|
}
|
|
5022
|
-
else if (!isNullOrUndefined(colorMap
|
|
5141
|
+
else if (!isNullOrUndefined(colorMap.value) && equalValue === colorMap.value && colorMap.showLegend) {
|
|
5023
5142
|
colorMapProcess = true;
|
|
5024
5143
|
isEqualColor = true;
|
|
5025
|
-
actualValue = colorMap
|
|
5026
|
-
legendText = !isNullOrUndefined(colorMap
|
|
5027
|
-
fill = isNullOrUndefined(colorMap
|
|
5028
|
-
Object.prototype.toString.call(colorMap
|
|
5144
|
+
actualValue = colorMap.value.toString();
|
|
5145
|
+
legendText = !isNullOrUndefined(colorMap.label) ? colorMap.label : colorMap.value.toString();
|
|
5146
|
+
fill = isNullOrUndefined(colorMap.color) ? fill :
|
|
5147
|
+
Object.prototype.toString.call(colorMap.color) === '[object Array]' ? colorMap.color[0] : colorMap.color;
|
|
5029
5148
|
isAddData = this.isAddNewLegendData(actualValue);
|
|
5030
5149
|
}
|
|
5031
|
-
if (colorMapProcess && isNullOrUndefined(colorMap
|
|
5150
|
+
if (colorMapProcess && isNullOrUndefined(colorMap.value) && colorMap.maxOpacity && colorMap.minOpacity
|
|
5032
5151
|
&& this.treemap.legendSettings.mode === 'Interactive') {
|
|
5033
5152
|
var colors = [];
|
|
5034
5153
|
isDesaturation = true;
|
|
5035
|
-
if (Object.prototype.toString.call(colorMap
|
|
5036
|
-
for (var q = 0; q < colorMap
|
|
5037
|
-
var offsetColor = 100 / (colorMap
|
|
5154
|
+
if (Object.prototype.toString.call(colorMap.color) === '[object Array]') {
|
|
5155
|
+
for (var q = 0; q < colorMap.color.length; q++) {
|
|
5156
|
+
var offsetColor = 100 / (colorMap.color.length - 1);
|
|
5038
5157
|
var offsetValue = q * offsetColor + '%';
|
|
5039
|
-
var stop1Color = { colorStop: offsetValue.toString(), color: colorMap
|
|
5158
|
+
var stop1Color = { colorStop: offsetValue.toString(), color: colorMap.color[q] };
|
|
5040
5159
|
colors.push(stop1Color);
|
|
5041
5160
|
}
|
|
5042
5161
|
}
|
|
@@ -5052,9 +5171,9 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5052
5171
|
id: 'groupIndex_' + groupIndex + '_colorIndex_' + this.gradientCount, x1: '0%', y1: '0%', x2: x2, y2: y2
|
|
5053
5172
|
};
|
|
5054
5173
|
gradientElement = this.treemap.renderer.drawGradient('linearGradient', gradient, colors).childNodes[0];
|
|
5055
|
-
if (Object.prototype.toString.call(colorMap
|
|
5056
|
-
gradientElement.childNodes[0].setAttribute('stop-opacity', colorMap
|
|
5057
|
-
gradientElement.childNodes[1].setAttribute('stop-opacity', colorMap
|
|
5174
|
+
if (Object.prototype.toString.call(colorMap.color) !== '[object Array]') {
|
|
5175
|
+
gradientElement.childNodes[0].setAttribute('stop-opacity', colorMap.minOpacity.toString());
|
|
5176
|
+
gradientElement.childNodes[1].setAttribute('stop-opacity', colorMap.maxOpacity.toString());
|
|
5058
5177
|
}
|
|
5059
5178
|
this.defsElement.appendChild(gradientElement);
|
|
5060
5179
|
this.gradientCount++;
|
|
@@ -5063,12 +5182,12 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5063
5182
|
this.removeDuplicates(this.legendCollections, legendText) : false;
|
|
5064
5183
|
if (isAddData && isAddData['process'] && colorMapProcess && !isDuplicate) {
|
|
5065
5184
|
colorMapProcess = false;
|
|
5066
|
-
fill = ((Object.prototype.toString.call(colorMap
|
|
5067
|
-
&& isNullOrUndefined(colorMap
|
|
5185
|
+
fill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]')) && isNullOrUndefined(gradientElement)
|
|
5186
|
+
&& isNullOrUndefined(colorMap.value) ? this.legendGradientColor(colorMap, legendIndex) : fill;
|
|
5068
5187
|
this.legendCollections.push({
|
|
5069
5188
|
actualValue: actualValue, levelIndex: !isLeafItem ? j : -1, leafIndex: isLeafItem ? j : -1,
|
|
5070
5189
|
legendName: legendText, legendFill: fill, legendData: [], groupIndex: !isLeafItem ? groupIndex : -1,
|
|
5071
|
-
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap
|
|
5190
|
+
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap.value)
|
|
5072
5191
|
? this.legendLinearGradient : null, name: data[i]['name'],
|
|
5073
5192
|
opacity: this.treemap.legendSettings.opacity, borderColor: this.treemap.legendSettings.border.color,
|
|
5074
5193
|
borderWidth: this.treemap.legendSettings.border.width
|
|
@@ -5083,13 +5202,13 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5083
5202
|
this.legendCollections[isAddData['value']]['legendData'].push(data[i]);
|
|
5084
5203
|
}
|
|
5085
5204
|
if (!isRange && !isDesaturation && !isEqualColor) {
|
|
5086
|
-
if (isNullOrUndefined(colorMap
|
|
5087
|
-
&& isNullOrUndefined(colorMap
|
|
5088
|
-
isNullOrUndefined(colorMap
|
|
5089
|
-
!isNullOrUndefined(colorMap
|
|
5090
|
-
outfill = ((Object.prototype.toString.call(colorMap
|
|
5091
|
-
? colorMap
|
|
5092
|
-
labelLegend = !isNullOrUndefined(colorMap
|
|
5205
|
+
if (isNullOrUndefined(colorMap.from) && isNullOrUndefined(colorMap.to)
|
|
5206
|
+
&& isNullOrUndefined(colorMap.minOpacity) &&
|
|
5207
|
+
isNullOrUndefined(colorMap.maxOpacity) && isNullOrUndefined(colorMap.value) &&
|
|
5208
|
+
!isNullOrUndefined(colorMap.color)) {
|
|
5209
|
+
outfill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]'))
|
|
5210
|
+
? colorMap.color[0] : colorMap.color;
|
|
5211
|
+
labelLegend = !isNullOrUndefined(colorMap.label) ? colorMap.label : 'Others';
|
|
5093
5212
|
if (isNullOrUndefined(this.outOfRangeLegend)) {
|
|
5094
5213
|
this.legendCollections.push({
|
|
5095
5214
|
actualValue: labelLegend, legendData: [],
|
|
@@ -5331,7 +5450,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5331
5450
|
var textSize = measureText(title, textStyle);
|
|
5332
5451
|
this.legendBorderRect = new Rect((this.legendItemRect.x - spacing), (this.legendItemRect.y - spacing - textSize.height), (this.legendItemRect.width) + (spacing * 2), (this.legendItemRect.height) + (spacing * 2) + textSize.height +
|
|
5333
5452
|
(legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
|
|
5334
|
-
var
|
|
5453
|
+
var borderStyle = {
|
|
5454
|
+
color: legend.border.color || this.treemap.themeStyle.legendBorderColor,
|
|
5455
|
+
width: legend.border.width || this.treemap.themeStyle.legendBorderWidth
|
|
5456
|
+
};
|
|
5457
|
+
var renderOptions = new RectOption(treemap.element.id + '_Legend_Border', legend.background, borderStyle, 1, this.legendBorderRect, '');
|
|
5335
5458
|
var legendBorder = treemap.renderer.drawRectangle(renderOptions);
|
|
5336
5459
|
legendBorder.style.pointerEvents = 'none';
|
|
5337
5460
|
this.legendGroup.appendChild(legendBorder);
|
|
@@ -5618,10 +5741,10 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5618
5741
|
* @returns {string} - Returns the legend color.
|
|
5619
5742
|
* @private
|
|
5620
5743
|
*/
|
|
5621
|
-
TreeMapLegend.prototype.legendGradientColor = function (colorMap
|
|
5744
|
+
TreeMapLegend.prototype.legendGradientColor = function (colorMap, legendIndex) {
|
|
5622
5745
|
var legendFillColor;
|
|
5623
5746
|
var xmlns = 'http://www.w3.org/2000/svg';
|
|
5624
|
-
if (!isNullOrUndefined(colorMap
|
|
5747
|
+
if (!isNullOrUndefined(colorMap.color) && Object.prototype.toString.call(colorMap.color) === '[object Array]') {
|
|
5625
5748
|
var defElement = this.treemap.renderer.createDefs();
|
|
5626
5749
|
var linerGradientEle = document.createElementNS(xmlns, 'linearGradient');
|
|
5627
5750
|
var opacity = 1;
|
|
@@ -5633,11 +5756,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5633
5756
|
linerGradientEle.setAttribute('y1', 0 + '%');
|
|
5634
5757
|
linerGradientEle.setAttribute('x2', x2 + '%');
|
|
5635
5758
|
linerGradientEle.setAttribute('y2', y2 + '%');
|
|
5636
|
-
for (var b = 0; b < colorMap
|
|
5637
|
-
var offsetColor = 100 / (colorMap
|
|
5759
|
+
for (var b = 0; b < colorMap.color.length; b++) {
|
|
5760
|
+
var offsetColor = 100 / (colorMap.color.length - 1);
|
|
5638
5761
|
var stopEle = document.createElementNS(xmlns, 'stop');
|
|
5639
5762
|
stopEle.setAttribute('offset', b * offsetColor + '%');
|
|
5640
|
-
stopEle.setAttribute('stop-color', colorMap
|
|
5763
|
+
stopEle.setAttribute('stop-color', colorMap.color[b]);
|
|
5641
5764
|
stopEle.setAttribute('stop-opacity', opacity.toString());
|
|
5642
5765
|
linerGradientEle.appendChild(stopEle);
|
|
5643
5766
|
}
|
|
@@ -5798,13 +5921,13 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
|
|
|
5798
5921
|
}
|
|
5799
5922
|
else {
|
|
5800
5923
|
if (selectionModule ? this.shapeElement ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true : true) {
|
|
5801
|
-
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement :
|
|
5924
|
+
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : this.treemap.legendSettings.visible) {
|
|
5802
5925
|
removeClassNames(document.getElementsByClassName('treeMapHighLight'), 'treeMapHighLight', treemap);
|
|
5803
5926
|
}
|
|
5804
5927
|
}
|
|
5805
5928
|
if ((this.shapeTarget === 'highlight' || this.target === 'highlight') && this.treemap.legendSettings.visible) {
|
|
5806
5929
|
if (selectionModule ? this.shapeElement ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true : true) {
|
|
5807
|
-
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement :
|
|
5930
|
+
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : selectionModule ?
|
|
5808
5931
|
selectionModule.legendSelect : true) {
|
|
5809
5932
|
removeShape(this.shapeHighlightCollection);
|
|
5810
5933
|
this.shapeHighlightCollection = [];
|
|
@@ -6252,10 +6375,14 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6252
6375
|
|| this.tooltipSettings.textStyle.color;
|
|
6253
6376
|
this.tooltipSettings.textStyle.opacity = this.treemap.themeStyle.tooltipTextOpacity
|
|
6254
6377
|
|| this.tooltipSettings.textStyle.opacity;
|
|
6378
|
+
var border = {
|
|
6379
|
+
width: this.tooltipSettings.border.width || this.treemap.themeStyle.tooltipBorderWidth || 0,
|
|
6380
|
+
color: this.tooltipSettings.border.color || this.treemap.themeStyle.tooltipBorderColor || 'transparent'
|
|
6381
|
+
};
|
|
6255
6382
|
tootipArgs = {
|
|
6256
6383
|
cancel: false, name: tooltipRendering, item: item,
|
|
6257
6384
|
options: {
|
|
6258
|
-
location: location, text: tooltipContent, data: toolTipData,
|
|
6385
|
+
location: location, text: tooltipContent, data: toolTipData, border: border,
|
|
6259
6386
|
textStyle: this.tooltipSettings.textStyle, template: this.tooltipSettings.template
|
|
6260
6387
|
},
|
|
6261
6388
|
treemap: this.treemap,
|
|
@@ -6289,6 +6416,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6289
6416
|
}
|
|
6290
6417
|
if (!cancel) {
|
|
6291
6418
|
this.svgTooltip = new Tooltip({
|
|
6419
|
+
theme: this.treemap.theme,
|
|
6292
6420
|
enable: true,
|
|
6293
6421
|
header: '',
|
|
6294
6422
|
data: args['data'],
|
|
@@ -6301,6 +6429,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6301
6429
|
areaBounds: this.treemap.areaRect,
|
|
6302
6430
|
textStyle: args['textStyle'],
|
|
6303
6431
|
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor,
|
|
6432
|
+
border: args['border'],
|
|
6304
6433
|
enableShadow: true
|
|
6305
6434
|
});
|
|
6306
6435
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -6381,13 +6510,5 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6381
6510
|
return TreeMapTooltip;
|
|
6382
6511
|
}());
|
|
6383
6512
|
|
|
6384
|
-
|
|
6385
|
-
* export all modules from treemap component
|
|
6386
|
-
*/
|
|
6387
|
-
|
|
6388
|
-
/**
|
|
6389
|
-
* exporting all modules from tree map index
|
|
6390
|
-
*/
|
|
6391
|
-
|
|
6392
|
-
export { TreeMap, LevelsData, Border, Margin, Font, CommonTitleSettings, SubTitleSettings, TitleSettings, ColorMapping, LegendSettings, InitialDrillSettings, LeafItemSettings, TooltipSettings, SelectionSettings, HighlightSettings, LevelSettings, load, loaded, beforePrint, itemRendering, drillStart, drillEnd, itemSelected, itemHighlight, tooltipRendering, itemClick, itemMove, click, doubleClick, rightClick, mouseMove, legendItemRendering, legendRendering, resize, defaultFont, Theme, getThemeStyle, Size, stringToNumber, Rect, RectOption, PathOption, measureText, TextOption, textTrim, Location, findPosition, createTextStyle, renderTextElement, setItemTemplateContent, getElement, itemsToOrder, isContainsData, findChildren, findHightLightItems, getTemplateFunction, convertElement, findLabelLocation, measureElement, getArea, getShortestEdge, convertToContainer, convertToRect, getMousePosition, colorMap, deSaturationColor, colorCollections, rgbToHex, getColorByValue, getGradientColor, getPercentageColor, getPercentage, wordWrap, textWrap, hide, orderByArea, maintainSelection, legendMaintain, removeClassNames, applyOptions, textFormatter, formatValue, ColorValue, convertToHexCode, componentToHex, convertHexToColor, colorNameToHex, drawSymbol, renderLegendShape, isParentItem, TreeMapAjax, removeShape, removeLegend, setColor, removeSelectionWithHighlight, getLegendIndex, pushCollection, triggerDownload, removeElement, TreeMapLegend, LayoutPanel, TreeMapHighlight, TreeMapSelection, TreeMapTooltip, ImageExport, PdfExport, Print };
|
|
6513
|
+
export { Border, ColorMapping, ColorValue, CommonTitleSettings, Font, HighlightSettings, ImageExport, InitialDrillSettings, LayoutPanel, LeafItemSettings, LegendSettings, LevelSettings, LevelsData, Location, Margin, PathOption, PdfExport, Print, Rect, RectOption, SelectionSettings, Size, SubTitleSettings, TextOption, Theme, TitleSettings, TooltipSettings, TreeMap, TreeMapAjax, TreeMapHighlight, TreeMapLegend, TreeMapSelection, TreeMapTooltip, applyOptions, beforePrint, click, colorCollections, colorMap, colorNameToHex, componentToHex, convertElement, convertHexToColor, convertToContainer, convertToHexCode, convertToRect, createTextStyle, deSaturationColor, defaultFont, doubleClick, drawSymbol, drillEnd, drillStart, findChildren, findHightLightItems, findLabelLocation, findPosition, formatValue, getArea, getColorByValue, getElement, getGradientColor, getLegendIndex, getMousePosition, getPercentage, getPercentageColor, getShortestEdge, getTemplateFunction, getThemeStyle, hide, isContainsData, isParentItem, itemClick, itemHighlight, itemMove, itemRendering, itemSelected, itemsToOrder, legendItemRendering, legendMaintain, legendRendering, load, loaded, maintainSelection, measureElement, measureText, mouseMove, orderByArea, pushCollection, removeClassNames, removeElement, removeLegend, removeSelectionWithHighlight, removeShape, renderLegendShape, renderTextElement, resize, rgbToHex, rightClick, setColor, setItemTemplateContent, stringToNumber, textFormatter, textTrim, textWrap, tooltipRendering, triggerDownload, wordWrap };
|
|
6393
6514
|
//# sourceMappingURL=ej2-treemap.es5.js.map
|