@syncfusion/ej2-treemap 25.1.35 → 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 +407 -271
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +422 -286
- 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 +10 -10
- package/src/treemap/layout/legend.d.ts +11 -1
- package/src/treemap/layout/legend.js +20 -7
- package/src/treemap/layout/render-panel.js +11 -7
- package/src/treemap/model/base.js +3 -3
- package/src/treemap/model/image-export.js +5 -2
- package/src/treemap/model/interface.d.ts +23 -0
- package/src/treemap/model/interface.js +0 -1
- package/src/treemap/model/pdf-export.js +5 -2
- package/src/treemap/model/print.js +6 -2
- package/src/treemap/model/theme.js +122 -12
- package/src/treemap/treemap.d.ts +4 -0
- package/src/treemap/treemap.js +19 -16
- package/src/treemap/user-interaction/tooltip.d.ts +2 -0
- package/src/treemap/user-interaction/tooltip.js +13 -3
- package/src/treemap/utils/enum.d.ts +8 -1
- package/src/treemap/utils/enum.js +0 -1
- package/src/treemap/utils/helper.d.ts +1 -2
- package/src/treemap/utils/helper.js +1 -2
- 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;
|
|
@@ -1642,11 +1639,10 @@ function colorNameToHex(color) {
|
|
|
1642
1639
|
* @param {Size} size - Specifies the size
|
|
1643
1640
|
* @param {string} url - Specifies the url
|
|
1644
1641
|
* @param {PathOption} options - Specifies the options
|
|
1645
|
-
* @param {string} label - Specifies the label
|
|
1646
1642
|
* @returns {Element} - Returns the element
|
|
1647
1643
|
* @private
|
|
1648
1644
|
*/
|
|
1649
|
-
function drawSymbol(location, shape, size, url, options
|
|
1645
|
+
function drawSymbol(location, shape, size, url, options) {
|
|
1650
1646
|
var svgRenderer = new SvgRenderer('');
|
|
1651
1647
|
var temp = renderLegendShape(location, size, shape, options, url);
|
|
1652
1648
|
var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
|
|
@@ -1836,7 +1832,6 @@ function setColor(element, fill, opacity, borderColor, borderWidth) {
|
|
|
1836
1832
|
*/
|
|
1837
1833
|
function removeSelectionWithHighlight(collection, element, treemap) {
|
|
1838
1834
|
removeShape(collection);
|
|
1839
|
-
element = [];
|
|
1840
1835
|
removeClassNames(document.getElementsByClassName('treeMapHighLight'), 'treeMapHighLight', treemap);
|
|
1841
1836
|
}
|
|
1842
1837
|
/**
|
|
@@ -1984,7 +1979,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
1984
1979
|
}
|
|
1985
1980
|
return drillData;
|
|
1986
1981
|
};
|
|
1987
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1982
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1988
1983
|
LayoutPanel.prototype.calculateLayoutItems = function (data, rect) {
|
|
1989
1984
|
this.renderItems = [];
|
|
1990
1985
|
this.parentData = [];
|
|
@@ -2289,7 +2284,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2289
2284
|
}
|
|
2290
2285
|
return result;
|
|
2291
2286
|
};
|
|
2292
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2293
2288
|
LayoutPanel.prototype.onDemandProcess = function (childItems) {
|
|
2294
2289
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2295
2290
|
var parentItem = {};
|
|
@@ -2429,6 +2424,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2429
2424
|
textStyle = (isLeafItem ? leaf.labelStyle : levels[index].headerStyle);
|
|
2430
2425
|
textStyle.fontFamily = this_1.treemap.themeStyle.labelFontFamily || textStyle.fontFamily;
|
|
2431
2426
|
textStyle.fontWeight = textStyle.fontWeight || this_1.treemap.themeStyle.fontWeight;
|
|
2427
|
+
textStyle.size = textStyle.size || this_1.treemap.themeStyle.labelFontSize;
|
|
2432
2428
|
border = isLeafItem ? leaf.border : levels[index].border;
|
|
2433
2429
|
position = !isLeafItem ? (levels[index].headerAlignment) === 'Near' ? 'TopLeft' : (levels[index].headerAlignment) === 'Center' ?
|
|
2434
2430
|
'TopCenter' : 'TopRight' : leaf.labelPosition;
|
|
@@ -2461,10 +2457,11 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2461
2457
|
}
|
|
2462
2458
|
}
|
|
2463
2459
|
itemGroup.setAttribute('aria-label', item['name']);
|
|
2464
|
-
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable ||
|
|
2460
|
+
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable ||
|
|
2461
|
+
_this.treemap.highlightSettings.enable)) {
|
|
2465
2462
|
itemGroup.setAttribute('role', 'button');
|
|
2466
2463
|
itemGroup.setAttribute('tabindex', _this.treemap.tabIndex.toString());
|
|
2467
|
-
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex']
|
|
2464
|
+
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] === (_this.treemap.levels.length - 1)) ? 'default' :
|
|
2468
2465
|
_this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
|
|
2469
2466
|
}
|
|
2470
2467
|
else {
|
|
@@ -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
|
}
|
|
@@ -2999,15 +3108,19 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
2999
3108
|
}
|
|
3000
3109
|
else {
|
|
3001
3110
|
var exportElement = treeMap.element.cloneNode(true);
|
|
3111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3002
3112
|
var backgroundElement = exportElement.getElementsByTagName('svg')[0];
|
|
3003
3113
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3004
3114
|
backgroundElement = backgroundElement.childNodes[0];
|
|
3005
3115
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3006
3116
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3007
|
-
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')) {
|
|
3008
3119
|
backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3009
3120
|
}
|
|
3010
|
-
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')) {
|
|
3011
3124
|
backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3012
3125
|
}
|
|
3013
3126
|
}
|
|
@@ -3074,10 +3187,13 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
3074
3187
|
var backgroundElement = exportElement.childNodes[0];
|
|
3075
3188
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3076
3189
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3077
|
-
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')) {
|
|
3078
3192
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3079
3193
|
}
|
|
3080
|
-
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')) {
|
|
3081
3197
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3082
3198
|
}
|
|
3083
3199
|
}
|
|
@@ -3173,10 +3289,13 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
3173
3289
|
var backgroundElement = exportElement.childNodes[0];
|
|
3174
3290
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
3175
3291
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
3176
|
-
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')) {
|
|
3177
3294
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
3178
3295
|
}
|
|
3179
|
-
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')) {
|
|
3180
3299
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
3181
3300
|
}
|
|
3182
3301
|
}
|
|
@@ -3221,7 +3340,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
3221
3340
|
/**
|
|
3222
3341
|
* Tree Map Components
|
|
3223
3342
|
*/
|
|
3224
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
3343
|
+
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
3225
3344
|
var extendStatics = function (d, b) {
|
|
3226
3345
|
extendStatics = Object.setPrototypeOf ||
|
|
3227
3346
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -3234,7 +3353,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
3234
3353
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3235
3354
|
};
|
|
3236
3355
|
})();
|
|
3237
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3356
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3238
3357
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3239
3358
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3240
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;
|
|
@@ -3251,7 +3370,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
3251
3370
|
* ```
|
|
3252
3371
|
*/
|
|
3253
3372
|
var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
3254
|
-
__extends(TreeMap, _super);
|
|
3373
|
+
__extends$1(TreeMap, _super);
|
|
3255
3374
|
/**
|
|
3256
3375
|
* Constructor for TreeMap.
|
|
3257
3376
|
*
|
|
@@ -3329,8 +3448,9 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3329
3448
|
fetchApiModule.onSuccess = function (args) {
|
|
3330
3449
|
if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
|
|
3331
3450
|
var reader_1 = new FileReader();
|
|
3451
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
3332
3452
|
var treemap_1 = _this;
|
|
3333
|
-
reader_1.onload = function (
|
|
3453
|
+
reader_1.onload = function () {
|
|
3334
3454
|
args = JSON.parse(reader_1.result.toString());
|
|
3335
3455
|
treemap_1.dataSource = args;
|
|
3336
3456
|
treemap_1.renderTreeMapElements();
|
|
@@ -3608,19 +3728,21 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3608
3728
|
if (dataCount === this.treemapLevelData.hierarchyData.length - 1) {
|
|
3609
3729
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3610
3730
|
var mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
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;
|
|
3618
3745
|
}
|
|
3619
|
-
}
|
|
3620
|
-
mainData_1 = this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];
|
|
3621
|
-
for (var l = 0; l < mainData_1.length; l++) {
|
|
3622
|
-
newData[this.levels[0].groupPath] = mainData_1;
|
|
3623
|
-
mainData_1[l]['parent'] = newData;
|
|
3624
3746
|
}
|
|
3625
3747
|
}
|
|
3626
3748
|
};
|
|
@@ -3996,7 +4118,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3996
4118
|
* @returns {any} - Returns label of the drilled level.
|
|
3997
4119
|
* @private
|
|
3998
4120
|
*/
|
|
3999
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4121
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4000
4122
|
TreeMap.prototype.calculateSelectedTextLevels = function (labelText, item) {
|
|
4001
4123
|
//to find the levels by clicking the particular text both for drillDownView as true / false.
|
|
4002
4124
|
var drillLevel;
|
|
@@ -4022,7 +4144,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4022
4144
|
* @returns {boolean} - check whether it is previous level or not.
|
|
4023
4145
|
* @private
|
|
4024
4146
|
*/
|
|
4025
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4147
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4026
4148
|
TreeMap.prototype.calculatePreviousLevelChildItems = function (drillLevelValues, item, directLevel) {
|
|
4027
4149
|
//By clicking any child items drilldown to the particular level.
|
|
4028
4150
|
//At the time store all the previous drilled level items in drilledItems
|
|
@@ -4064,7 +4186,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4064
4186
|
* @returns {any} - return the new drill down object.
|
|
4065
4187
|
* @private
|
|
4066
4188
|
*/
|
|
4067
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4189
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4068
4190
|
TreeMap.prototype.compareSelectedLabelWithDrillDownItems = function (drillLevelValues, item, i) {
|
|
4069
4191
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4070
4192
|
var drillLevelChild;
|
|
@@ -4103,7 +4225,6 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4103
4225
|
var index;
|
|
4104
4226
|
var newDrillItem = {};
|
|
4105
4227
|
var item;
|
|
4106
|
-
var process = true;
|
|
4107
4228
|
var layoutID = this.element.id + '_TreeMap_' + this.layoutType + '_Layout';
|
|
4108
4229
|
var drillLevel;
|
|
4109
4230
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4218,7 +4339,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4218
4339
|
});
|
|
4219
4340
|
endEvent = { cancel: false, name: drillEnd, treemap: this, renderItems: this.layout.renderItems };
|
|
4220
4341
|
this.trigger(drillEnd, endEvent);
|
|
4221
|
-
|
|
4342
|
+
{
|
|
4222
4343
|
if (!directLevel && isNullOrUndefined(drillLevel)) {
|
|
4223
4344
|
this.drilledItems.push({ name: item['levelOrderName'], data: item });
|
|
4224
4345
|
}
|
|
@@ -4424,163 +4545,163 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4424
4545
|
TreeMap.prototype.getPersistData = function () {
|
|
4425
4546
|
return '';
|
|
4426
4547
|
};
|
|
4427
|
-
__decorate([
|
|
4548
|
+
__decorate$1([
|
|
4428
4549
|
Property(false)
|
|
4429
4550
|
], TreeMap.prototype, "allowPrint", void 0);
|
|
4430
|
-
__decorate([
|
|
4551
|
+
__decorate$1([
|
|
4431
4552
|
Property(false)
|
|
4432
4553
|
], TreeMap.prototype, "allowImageExport", void 0);
|
|
4433
|
-
__decorate([
|
|
4554
|
+
__decorate$1([
|
|
4434
4555
|
Property(false)
|
|
4435
4556
|
], TreeMap.prototype, "allowPdfExport", void 0);
|
|
4436
|
-
__decorate([
|
|
4557
|
+
__decorate$1([
|
|
4437
4558
|
Property(null)
|
|
4438
4559
|
], TreeMap.prototype, "width", void 0);
|
|
4439
|
-
__decorate([
|
|
4560
|
+
__decorate$1([
|
|
4440
4561
|
Property(null)
|
|
4441
4562
|
], TreeMap.prototype, "height", void 0);
|
|
4442
|
-
__decorate([
|
|
4563
|
+
__decorate$1([
|
|
4443
4564
|
Complex({}, Border)
|
|
4444
4565
|
], TreeMap.prototype, "border", void 0);
|
|
4445
|
-
__decorate([
|
|
4566
|
+
__decorate$1([
|
|
4446
4567
|
Complex({}, Margin)
|
|
4447
4568
|
], TreeMap.prototype, "margin", void 0);
|
|
4448
|
-
__decorate([
|
|
4569
|
+
__decorate$1([
|
|
4449
4570
|
Property(null)
|
|
4450
4571
|
], TreeMap.prototype, "background", void 0);
|
|
4451
|
-
__decorate([
|
|
4572
|
+
__decorate$1([
|
|
4452
4573
|
Property('Material')
|
|
4453
4574
|
], TreeMap.prototype, "theme", void 0);
|
|
4454
|
-
__decorate([
|
|
4575
|
+
__decorate$1([
|
|
4455
4576
|
Complex({}, TitleSettings)
|
|
4456
4577
|
], TreeMap.prototype, "titleSettings", void 0);
|
|
4457
|
-
__decorate([
|
|
4578
|
+
__decorate$1([
|
|
4458
4579
|
Property('Squarified')
|
|
4459
4580
|
], TreeMap.prototype, "layoutType", void 0);
|
|
4460
|
-
__decorate([
|
|
4581
|
+
__decorate$1([
|
|
4461
4582
|
Property(null)
|
|
4462
4583
|
], TreeMap.prototype, "dataSource", void 0);
|
|
4463
|
-
__decorate([
|
|
4584
|
+
__decorate$1([
|
|
4464
4585
|
Property(null)
|
|
4465
4586
|
], TreeMap.prototype, "query", void 0);
|
|
4466
|
-
__decorate([
|
|
4587
|
+
__decorate$1([
|
|
4467
4588
|
Property(null)
|
|
4468
4589
|
], TreeMap.prototype, "weightValuePath", void 0);
|
|
4469
|
-
__decorate([
|
|
4590
|
+
__decorate$1([
|
|
4470
4591
|
Property('')
|
|
4471
4592
|
], TreeMap.prototype, "rangeColorValuePath", void 0);
|
|
4472
|
-
__decorate([
|
|
4593
|
+
__decorate$1([
|
|
4473
4594
|
Property('')
|
|
4474
4595
|
], TreeMap.prototype, "equalColorValuePath", void 0);
|
|
4475
|
-
__decorate([
|
|
4596
|
+
__decorate$1([
|
|
4476
4597
|
Property(null)
|
|
4477
4598
|
], TreeMap.prototype, "colorValuePath", void 0);
|
|
4478
|
-
__decorate([
|
|
4599
|
+
__decorate$1([
|
|
4479
4600
|
Property([])
|
|
4480
4601
|
], TreeMap.prototype, "palette", void 0);
|
|
4481
|
-
__decorate([
|
|
4602
|
+
__decorate$1([
|
|
4482
4603
|
Property('TopLeftBottomRight')
|
|
4483
4604
|
], TreeMap.prototype, "renderDirection", void 0);
|
|
4484
|
-
__decorate([
|
|
4605
|
+
__decorate$1([
|
|
4485
4606
|
Property(false)
|
|
4486
4607
|
], TreeMap.prototype, "enableDrillDown", void 0);
|
|
4487
|
-
__decorate([
|
|
4608
|
+
__decorate$1([
|
|
4488
4609
|
Property(false)
|
|
4489
4610
|
], TreeMap.prototype, "enableBreadcrumb", void 0);
|
|
4490
|
-
__decorate([
|
|
4611
|
+
__decorate$1([
|
|
4491
4612
|
Property(' - ')
|
|
4492
4613
|
], TreeMap.prototype, "breadcrumbConnector", void 0);
|
|
4493
|
-
__decorate([
|
|
4614
|
+
__decorate$1([
|
|
4494
4615
|
Property(false)
|
|
4495
4616
|
], TreeMap.prototype, "drillDownView", void 0);
|
|
4496
|
-
__decorate([
|
|
4617
|
+
__decorate$1([
|
|
4497
4618
|
Complex({}, InitialDrillSettings)
|
|
4498
4619
|
], TreeMap.prototype, "initialDrillDown", void 0);
|
|
4499
|
-
__decorate([
|
|
4620
|
+
__decorate$1([
|
|
4500
4621
|
Complex({}, LeafItemSettings)
|
|
4501
4622
|
], TreeMap.prototype, "leafItemSettings", void 0);
|
|
4502
|
-
__decorate([
|
|
4623
|
+
__decorate$1([
|
|
4503
4624
|
Collection([], LevelSettings)
|
|
4504
4625
|
], TreeMap.prototype, "levels", void 0);
|
|
4505
|
-
__decorate([
|
|
4626
|
+
__decorate$1([
|
|
4506
4627
|
Complex({}, HighlightSettings)
|
|
4507
4628
|
], TreeMap.prototype, "highlightSettings", void 0);
|
|
4508
|
-
__decorate([
|
|
4629
|
+
__decorate$1([
|
|
4509
4630
|
Complex({}, SelectionSettings)
|
|
4510
4631
|
], TreeMap.prototype, "selectionSettings", void 0);
|
|
4511
|
-
__decorate([
|
|
4632
|
+
__decorate$1([
|
|
4512
4633
|
Complex({}, TooltipSettings)
|
|
4513
4634
|
], TreeMap.prototype, "tooltipSettings", void 0);
|
|
4514
|
-
__decorate([
|
|
4635
|
+
__decorate$1([
|
|
4515
4636
|
Complex({}, LegendSettings)
|
|
4516
4637
|
], TreeMap.prototype, "legendSettings", void 0);
|
|
4517
|
-
__decorate([
|
|
4638
|
+
__decorate$1([
|
|
4518
4639
|
Property(false)
|
|
4519
4640
|
], TreeMap.prototype, "useGroupingSeparator", void 0);
|
|
4520
|
-
__decorate([
|
|
4641
|
+
__decorate$1([
|
|
4521
4642
|
Property(null)
|
|
4522
4643
|
], TreeMap.prototype, "description", void 0);
|
|
4523
|
-
__decorate([
|
|
4644
|
+
__decorate$1([
|
|
4524
4645
|
Property(0)
|
|
4525
4646
|
], TreeMap.prototype, "tabIndex", void 0);
|
|
4526
|
-
__decorate([
|
|
4647
|
+
__decorate$1([
|
|
4527
4648
|
Property(null)
|
|
4528
4649
|
], TreeMap.prototype, "format", void 0);
|
|
4529
|
-
__decorate([
|
|
4650
|
+
__decorate$1([
|
|
4530
4651
|
Event()
|
|
4531
4652
|
], TreeMap.prototype, "load", void 0);
|
|
4532
|
-
__decorate([
|
|
4653
|
+
__decorate$1([
|
|
4533
4654
|
Event()
|
|
4534
4655
|
], TreeMap.prototype, "beforePrint", void 0);
|
|
4535
|
-
__decorate([
|
|
4656
|
+
__decorate$1([
|
|
4536
4657
|
Event()
|
|
4537
4658
|
], TreeMap.prototype, "loaded", void 0);
|
|
4538
|
-
__decorate([
|
|
4659
|
+
__decorate$1([
|
|
4539
4660
|
Event()
|
|
4540
4661
|
], TreeMap.prototype, "itemRendering", void 0);
|
|
4541
|
-
__decorate([
|
|
4662
|
+
__decorate$1([
|
|
4542
4663
|
Event()
|
|
4543
4664
|
], TreeMap.prototype, "drillStart", void 0);
|
|
4544
|
-
__decorate([
|
|
4665
|
+
__decorate$1([
|
|
4545
4666
|
Event()
|
|
4546
4667
|
], TreeMap.prototype, "drillEnd", void 0);
|
|
4547
|
-
__decorate([
|
|
4668
|
+
__decorate$1([
|
|
4548
4669
|
Event()
|
|
4549
4670
|
], TreeMap.prototype, "itemSelected", void 0);
|
|
4550
|
-
__decorate([
|
|
4671
|
+
__decorate$1([
|
|
4551
4672
|
Event()
|
|
4552
4673
|
], TreeMap.prototype, "itemHighlight", void 0);
|
|
4553
|
-
__decorate([
|
|
4674
|
+
__decorate$1([
|
|
4554
4675
|
Event()
|
|
4555
4676
|
], TreeMap.prototype, "tooltipRendering", void 0);
|
|
4556
|
-
__decorate([
|
|
4677
|
+
__decorate$1([
|
|
4557
4678
|
Event()
|
|
4558
4679
|
], TreeMap.prototype, "itemClick", void 0);
|
|
4559
|
-
__decorate([
|
|
4680
|
+
__decorate$1([
|
|
4560
4681
|
Event()
|
|
4561
4682
|
], TreeMap.prototype, "itemMove", void 0);
|
|
4562
|
-
__decorate([
|
|
4683
|
+
__decorate$1([
|
|
4563
4684
|
Event()
|
|
4564
4685
|
], TreeMap.prototype, "click", void 0);
|
|
4565
|
-
__decorate([
|
|
4686
|
+
__decorate$1([
|
|
4566
4687
|
Event()
|
|
4567
4688
|
], TreeMap.prototype, "doubleClick", void 0);
|
|
4568
|
-
__decorate([
|
|
4689
|
+
__decorate$1([
|
|
4569
4690
|
Event()
|
|
4570
4691
|
], TreeMap.prototype, "rightClick", void 0);
|
|
4571
|
-
__decorate([
|
|
4692
|
+
__decorate$1([
|
|
4572
4693
|
Event()
|
|
4573
4694
|
], TreeMap.prototype, "mouseMove", void 0);
|
|
4574
|
-
__decorate([
|
|
4695
|
+
__decorate$1([
|
|
4575
4696
|
Event()
|
|
4576
4697
|
], TreeMap.prototype, "resize", void 0);
|
|
4577
|
-
__decorate([
|
|
4698
|
+
__decorate$1([
|
|
4578
4699
|
Event()
|
|
4579
4700
|
], TreeMap.prototype, "legendItemRendering", void 0);
|
|
4580
|
-
__decorate([
|
|
4701
|
+
__decorate$1([
|
|
4581
4702
|
Event()
|
|
4582
4703
|
], TreeMap.prototype, "legendRendering", void 0);
|
|
4583
|
-
TreeMap = __decorate([
|
|
4704
|
+
TreeMap = __decorate$1([
|
|
4584
4705
|
NotifyPropertyChanges
|
|
4585
4706
|
], TreeMap);
|
|
4586
4707
|
return TreeMap;
|
|
@@ -4613,9 +4734,10 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4613
4734
|
this.treemap = treemap;
|
|
4614
4735
|
this.addEventListener();
|
|
4615
4736
|
}
|
|
4616
|
-
// eslint-disable-next-line valid-jsdoc
|
|
4617
4737
|
/**
|
|
4618
4738
|
* method for legend
|
|
4739
|
+
*
|
|
4740
|
+
* @returns {void}
|
|
4619
4741
|
* @private
|
|
4620
4742
|
*/
|
|
4621
4743
|
TreeMapLegend.prototype.renderLegend = function () {
|
|
@@ -4651,7 +4773,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4651
4773
|
var treemap = this.treemap;
|
|
4652
4774
|
var legend = treemap.legendSettings;
|
|
4653
4775
|
this.findColorMappingLegendItems(treemap.treemapLevelData.levelsData[0]);
|
|
4654
|
-
if ((this.treemap.palette.length > 0 || !isNullOrUndefined(treemap.colorValuePath))
|
|
4776
|
+
if (((!isNullOrUndefined(this.treemap.palette) && this.treemap.palette.length > 0) || !isNullOrUndefined(treemap.colorValuePath))
|
|
4655
4777
|
&& this.legendCollections.length === 0) {
|
|
4656
4778
|
this.findPaletteLegendItems(treemap.treemapLevelData.levelsData[0]);
|
|
4657
4779
|
}
|
|
@@ -5002,38 +5124,38 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5002
5124
|
isLeafItem = (this.treemap.levels.length === 0 || groupIndex === this.treemap.levels.length);
|
|
5003
5125
|
colorMapping = isLeafItem ? leaf.colorMapping : levels[groupIndex].colorMapping;
|
|
5004
5126
|
for (var j = 0; j < colorMapping.length; j++) {
|
|
5005
|
-
var colorMap
|
|
5127
|
+
var colorMap = colorMapping[j];
|
|
5006
5128
|
gradientElement = null;
|
|
5007
5129
|
rangeValue = Number(currentData[this.treemap.rangeColorValuePath]);
|
|
5008
5130
|
equalValue = currentData[this.treemap.equalColorValuePath];
|
|
5009
|
-
colorMap
|
|
5010
|
-
if (!isNullOrUndefined(colorMap
|
|
5011
|
-
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) {
|
|
5012
5134
|
colorMapProcess = true;
|
|
5013
5135
|
isRange = true;
|
|
5014
|
-
actualValue = colorMap
|
|
5015
|
-
legendText = !isNullOrUndefined(colorMap
|
|
5016
|
-
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;
|
|
5017
5139
|
isAddData = this.isAddNewLegendData(actualValue);
|
|
5018
5140
|
}
|
|
5019
|
-
else if (!isNullOrUndefined(colorMap
|
|
5141
|
+
else if (!isNullOrUndefined(colorMap.value) && equalValue === colorMap.value && colorMap.showLegend) {
|
|
5020
5142
|
colorMapProcess = true;
|
|
5021
5143
|
isEqualColor = true;
|
|
5022
|
-
actualValue = colorMap
|
|
5023
|
-
legendText = !isNullOrUndefined(colorMap
|
|
5024
|
-
fill = isNullOrUndefined(colorMap
|
|
5025
|
-
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;
|
|
5026
5148
|
isAddData = this.isAddNewLegendData(actualValue);
|
|
5027
5149
|
}
|
|
5028
|
-
if (colorMapProcess && isNullOrUndefined(colorMap
|
|
5150
|
+
if (colorMapProcess && isNullOrUndefined(colorMap.value) && colorMap.maxOpacity && colorMap.minOpacity
|
|
5029
5151
|
&& this.treemap.legendSettings.mode === 'Interactive') {
|
|
5030
5152
|
var colors = [];
|
|
5031
5153
|
isDesaturation = true;
|
|
5032
|
-
if (Object.prototype.toString.call(colorMap
|
|
5033
|
-
for (var q = 0; q < colorMap
|
|
5034
|
-
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);
|
|
5035
5157
|
var offsetValue = q * offsetColor + '%';
|
|
5036
|
-
var stop1Color = { colorStop: offsetValue.toString(), color: colorMap
|
|
5158
|
+
var stop1Color = { colorStop: offsetValue.toString(), color: colorMap.color[q] };
|
|
5037
5159
|
colors.push(stop1Color);
|
|
5038
5160
|
}
|
|
5039
5161
|
}
|
|
@@ -5049,9 +5171,9 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5049
5171
|
id: 'groupIndex_' + groupIndex + '_colorIndex_' + this.gradientCount, x1: '0%', y1: '0%', x2: x2, y2: y2
|
|
5050
5172
|
};
|
|
5051
5173
|
gradientElement = this.treemap.renderer.drawGradient('linearGradient', gradient, colors).childNodes[0];
|
|
5052
|
-
if (Object.prototype.toString.call(colorMap
|
|
5053
|
-
gradientElement.childNodes[0].setAttribute('stop-opacity', colorMap
|
|
5054
|
-
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());
|
|
5055
5177
|
}
|
|
5056
5178
|
this.defsElement.appendChild(gradientElement);
|
|
5057
5179
|
this.gradientCount++;
|
|
@@ -5060,12 +5182,12 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5060
5182
|
this.removeDuplicates(this.legendCollections, legendText) : false;
|
|
5061
5183
|
if (isAddData && isAddData['process'] && colorMapProcess && !isDuplicate) {
|
|
5062
5184
|
colorMapProcess = false;
|
|
5063
|
-
fill = ((Object.prototype.toString.call(colorMap
|
|
5064
|
-
&& isNullOrUndefined(colorMap
|
|
5185
|
+
fill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]')) && isNullOrUndefined(gradientElement)
|
|
5186
|
+
&& isNullOrUndefined(colorMap.value) ? this.legendGradientColor(colorMap, legendIndex) : fill;
|
|
5065
5187
|
this.legendCollections.push({
|
|
5066
5188
|
actualValue: actualValue, levelIndex: !isLeafItem ? j : -1, leafIndex: isLeafItem ? j : -1,
|
|
5067
5189
|
legendName: legendText, legendFill: fill, legendData: [], groupIndex: !isLeafItem ? groupIndex : -1,
|
|
5068
|
-
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap
|
|
5190
|
+
gradientElement: !isNullOrUndefined(gradientElement) ? gradientElement : isNullOrUndefined(colorMap.value)
|
|
5069
5191
|
? this.legendLinearGradient : null, name: data[i]['name'],
|
|
5070
5192
|
opacity: this.treemap.legendSettings.opacity, borderColor: this.treemap.legendSettings.border.color,
|
|
5071
5193
|
borderWidth: this.treemap.legendSettings.border.width
|
|
@@ -5080,13 +5202,13 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5080
5202
|
this.legendCollections[isAddData['value']]['legendData'].push(data[i]);
|
|
5081
5203
|
}
|
|
5082
5204
|
if (!isRange && !isDesaturation && !isEqualColor) {
|
|
5083
|
-
if (isNullOrUndefined(colorMap
|
|
5084
|
-
&& isNullOrUndefined(colorMap
|
|
5085
|
-
isNullOrUndefined(colorMap
|
|
5086
|
-
!isNullOrUndefined(colorMap
|
|
5087
|
-
outfill = ((Object.prototype.toString.call(colorMap
|
|
5088
|
-
? colorMap
|
|
5089
|
-
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';
|
|
5090
5212
|
if (isNullOrUndefined(this.outOfRangeLegend)) {
|
|
5091
5213
|
this.legendCollections.push({
|
|
5092
5214
|
actualValue: labelLegend, legendData: [],
|
|
@@ -5141,6 +5263,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5141
5263
|
// eslint-disable-next-line valid-jsdoc
|
|
5142
5264
|
/**
|
|
5143
5265
|
* To draw the legend
|
|
5266
|
+
*
|
|
5144
5267
|
* @private
|
|
5145
5268
|
*/
|
|
5146
5269
|
TreeMapLegend.prototype.drawLegend = function () {
|
|
@@ -5253,7 +5376,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5253
5376
|
};
|
|
5254
5377
|
treemap.trigger(legendItemRendering, eventArgs, function (observedArgs) {
|
|
5255
5378
|
var renderOptions = new PathOption(shapeId, observedArgs.fill, strokeWidth_1, isLineShape_1 ? collection['Fill'] : strokeColor_1, legend.opacity, '');
|
|
5256
|
-
legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions
|
|
5379
|
+
legendElement.appendChild(drawSymbol(shapeLocation, observedArgs.shape, shapeSize, observedArgs.imageUrl, renderOptions));
|
|
5257
5380
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
5258
5381
|
renderTextElement(textOptions, legend.textStyle, legend.textStyle.color || treemap.themeStyle.legendTextColor, legendElement);
|
|
5259
5382
|
_this.legendGroup.appendChild(legendElement);
|
|
@@ -5327,7 +5450,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5327
5450
|
var textSize = measureText(title, textStyle);
|
|
5328
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 +
|
|
5329
5452
|
(legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
|
|
5330
|
-
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, '');
|
|
5331
5458
|
var legendBorder = treemap.renderer.drawRectangle(renderOptions);
|
|
5332
5459
|
legendBorder.style.pointerEvents = 'none';
|
|
5333
5460
|
this.legendGroup.appendChild(legendBorder);
|
|
@@ -5346,7 +5473,8 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5346
5473
|
var textSize = measureText(trimTitle, textStyle);
|
|
5347
5474
|
if (legendTitle) {
|
|
5348
5475
|
textOptions = new TextOption(this.treemap.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - (spacing / 2), 'middle', trimTitle, '');
|
|
5349
|
-
var textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
|
|
5476
|
+
var textElement = renderTextElement(textOptions, textStyle, textStyle.color ||
|
|
5477
|
+
this.treemap.themeStyle.legendTitleColor, this.legendGroup);
|
|
5350
5478
|
textElement.setAttribute('role', 'region');
|
|
5351
5479
|
textElement.setAttribute('aria-label', legendTitle);
|
|
5352
5480
|
}
|
|
@@ -5498,8 +5626,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5498
5626
|
this.translate = new Location(x, y);
|
|
5499
5627
|
}
|
|
5500
5628
|
};
|
|
5501
|
-
|
|
5502
|
-
|
|
5629
|
+
/**
|
|
5630
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
5631
|
+
* @returns {void}
|
|
5632
|
+
* @private
|
|
5633
|
+
*/
|
|
5503
5634
|
TreeMapLegend.prototype.mouseUpHandler = function (e) {
|
|
5504
5635
|
this.renderInteractivePointer(e);
|
|
5505
5636
|
clearTimeout(this.clearTimeout);
|
|
@@ -5508,6 +5639,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5508
5639
|
// eslint-disable-next-line valid-jsdoc
|
|
5509
5640
|
/**
|
|
5510
5641
|
* To remove the interactive pointer
|
|
5642
|
+
*
|
|
5511
5643
|
* @private
|
|
5512
5644
|
*/
|
|
5513
5645
|
TreeMapLegend.prototype.removeInteractivePointer = function () {
|
|
@@ -5546,6 +5678,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5546
5678
|
// eslint-disable-next-line valid-jsdoc
|
|
5547
5679
|
/**
|
|
5548
5680
|
* To add the event listener
|
|
5681
|
+
*
|
|
5549
5682
|
* @private
|
|
5550
5683
|
*/
|
|
5551
5684
|
TreeMapLegend.prototype.addEventListener = function () {
|
|
@@ -5558,6 +5691,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5558
5691
|
// eslint-disable-next-line valid-jsdoc
|
|
5559
5692
|
/**
|
|
5560
5693
|
* To remove the event listener
|
|
5694
|
+
*
|
|
5561
5695
|
* @private
|
|
5562
5696
|
*/
|
|
5563
5697
|
TreeMapLegend.prototype.removeEventListener = function () {
|
|
@@ -5607,10 +5741,10 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5607
5741
|
* @returns {string} - Returns the legend color.
|
|
5608
5742
|
* @private
|
|
5609
5743
|
*/
|
|
5610
|
-
TreeMapLegend.prototype.legendGradientColor = function (colorMap
|
|
5744
|
+
TreeMapLegend.prototype.legendGradientColor = function (colorMap, legendIndex) {
|
|
5611
5745
|
var legendFillColor;
|
|
5612
5746
|
var xmlns = 'http://www.w3.org/2000/svg';
|
|
5613
|
-
if (!isNullOrUndefined(colorMap
|
|
5747
|
+
if (!isNullOrUndefined(colorMap.color) && Object.prototype.toString.call(colorMap.color) === '[object Array]') {
|
|
5614
5748
|
var defElement = this.treemap.renderer.createDefs();
|
|
5615
5749
|
var linerGradientEle = document.createElementNS(xmlns, 'linearGradient');
|
|
5616
5750
|
var opacity = 1;
|
|
@@ -5622,11 +5756,11 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5622
5756
|
linerGradientEle.setAttribute('y1', 0 + '%');
|
|
5623
5757
|
linerGradientEle.setAttribute('x2', x2 + '%');
|
|
5624
5758
|
linerGradientEle.setAttribute('y2', y2 + '%');
|
|
5625
|
-
for (var b = 0; b < colorMap
|
|
5626
|
-
var offsetColor = 100 / (colorMap
|
|
5759
|
+
for (var b = 0; b < colorMap.color.length; b++) {
|
|
5760
|
+
var offsetColor = 100 / (colorMap.color.length - 1);
|
|
5627
5761
|
var stopEle = document.createElementNS(xmlns, 'stop');
|
|
5628
5762
|
stopEle.setAttribute('offset', b * offsetColor + '%');
|
|
5629
|
-
stopEle.setAttribute('stop-color', colorMap
|
|
5763
|
+
stopEle.setAttribute('stop-color', colorMap.color[b]);
|
|
5630
5764
|
stopEle.setAttribute('stop-opacity', opacity.toString());
|
|
5631
5765
|
linerGradientEle.appendChild(stopEle);
|
|
5632
5766
|
}
|
|
@@ -5787,13 +5921,13 @@ var TreeMapHighlight = /** @__PURE__ @class */ (function () {
|
|
|
5787
5921
|
}
|
|
5788
5922
|
else {
|
|
5789
5923
|
if (selectionModule ? this.shapeElement ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true : true) {
|
|
5790
|
-
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement :
|
|
5924
|
+
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : this.treemap.legendSettings.visible) {
|
|
5791
5925
|
removeClassNames(document.getElementsByClassName('treeMapHighLight'), 'treeMapHighLight', treemap);
|
|
5792
5926
|
}
|
|
5793
5927
|
}
|
|
5794
5928
|
if ((this.shapeTarget === 'highlight' || this.target === 'highlight') && this.treemap.legendSettings.visible) {
|
|
5795
5929
|
if (selectionModule ? this.shapeElement ? this.shapeElement.getAttribute('id') !== selectionModule.legendSelectId : true : true) {
|
|
5796
|
-
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement :
|
|
5930
|
+
if (selectionModule ? this.shapeElement !== selectionModule.shapeElement : selectionModule ?
|
|
5797
5931
|
selectionModule.legendSelect : true) {
|
|
5798
5932
|
removeShape(this.shapeHighlightCollection);
|
|
5799
5933
|
this.shapeHighlightCollection = [];
|
|
@@ -6211,11 +6345,13 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6211
6345
|
markerFill = item['options']['fill'];
|
|
6212
6346
|
}
|
|
6213
6347
|
if (this.treemap.enableRtl) {
|
|
6214
|
-
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6348
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6349
|
+
textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
6215
6350
|
|| formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
|
|
6216
6351
|
}
|
|
6217
6352
|
else {
|
|
6218
|
-
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6353
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ?
|
|
6354
|
+
textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
6219
6355
|
|| this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
|
|
6220
6356
|
}
|
|
6221
6357
|
if (document.getElementById(this.tooltipId)) {
|
|
@@ -6239,10 +6375,14 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6239
6375
|
|| this.tooltipSettings.textStyle.color;
|
|
6240
6376
|
this.tooltipSettings.textStyle.opacity = this.treemap.themeStyle.tooltipTextOpacity
|
|
6241
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
|
+
};
|
|
6242
6382
|
tootipArgs = {
|
|
6243
6383
|
cancel: false, name: tooltipRendering, item: item,
|
|
6244
6384
|
options: {
|
|
6245
|
-
location: location, text: tooltipContent, data: toolTipData,
|
|
6385
|
+
location: location, text: tooltipContent, data: toolTipData, border: border,
|
|
6246
6386
|
textStyle: this.tooltipSettings.textStyle, template: this.tooltipSettings.template
|
|
6247
6387
|
},
|
|
6248
6388
|
treemap: this.treemap,
|
|
@@ -6276,6 +6416,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6276
6416
|
}
|
|
6277
6417
|
if (!cancel) {
|
|
6278
6418
|
this.svgTooltip = new Tooltip({
|
|
6419
|
+
theme: this.treemap.theme,
|
|
6279
6420
|
enable: true,
|
|
6280
6421
|
header: '',
|
|
6281
6422
|
data: args['data'],
|
|
@@ -6288,6 +6429,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6288
6429
|
areaBounds: this.treemap.areaRect,
|
|
6289
6430
|
textStyle: args['textStyle'],
|
|
6290
6431
|
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor,
|
|
6432
|
+
border: args['border'],
|
|
6291
6433
|
enableShadow: true
|
|
6292
6434
|
});
|
|
6293
6435
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -6319,6 +6461,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6319
6461
|
// eslint-disable-next-line valid-jsdoc
|
|
6320
6462
|
/**
|
|
6321
6463
|
* To bind events for tooltip module
|
|
6464
|
+
*
|
|
6322
6465
|
* @private
|
|
6323
6466
|
*/
|
|
6324
6467
|
TreeMapTooltip.prototype.addEventListener = function () {
|
|
@@ -6331,6 +6474,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6331
6474
|
// eslint-disable-next-line valid-jsdoc
|
|
6332
6475
|
/**
|
|
6333
6476
|
* To unbind events for tooltip module
|
|
6477
|
+
*
|
|
6334
6478
|
* @private
|
|
6335
6479
|
*/
|
|
6336
6480
|
TreeMapTooltip.prototype.removeEventListener = function () {
|
|
@@ -6366,13 +6510,5 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6366
6510
|
return TreeMapTooltip;
|
|
6367
6511
|
}());
|
|
6368
6512
|
|
|
6369
|
-
|
|
6370
|
-
* export all modules from treemap component
|
|
6371
|
-
*/
|
|
6372
|
-
|
|
6373
|
-
/**
|
|
6374
|
-
* exporting all modules from tree map index
|
|
6375
|
-
*/
|
|
6376
|
-
|
|
6377
|
-
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 };
|
|
6378
6514
|
//# sourceMappingURL=ej2-treemap.es5.js.map
|