@carbon/charts-vue 1.5.1 → 1.5.6
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/CHANGELOG.md +40 -0
- package/charts-vue.common.js +38 -14
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +38 -14
- package/charts-vue.umd.js.map +1 -1
- package/charts-vue.umd.min.js +1 -1
- package/charts-vue.umd.min.js.map +1 -1
- package/package.json +2 -2
package/charts-vue.umd.js
CHANGED
|
@@ -35349,25 +35349,41 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
|
|
|
35349
35349
|
// Scales
|
|
35350
35350
|
var mainXScale = _this.services.cartesianScales.getMainXScale();
|
|
35351
35351
|
var mainYScale = _this.services.cartesianScales.getMainYScale();
|
|
35352
|
-
var label = '', sum =
|
|
35352
|
+
var label = '', sum = null, minimum = null, maximum = null;
|
|
35353
35353
|
// Check to see where datum belongs
|
|
35354
35354
|
if (_this.matrix[datum] !== undefined) {
|
|
35355
35355
|
label = domainLabel;
|
|
35356
35356
|
// Iterate through Object and get sum, min, and max
|
|
35357
35357
|
ranges.forEach(function (element) {
|
|
35358
|
-
|
|
35359
|
-
|
|
35360
|
-
|
|
35361
|
-
|
|
35358
|
+
if (typeof _this.matrix[datum][element].value === 'number') {
|
|
35359
|
+
var value = _this.matrix[datum][element].value;
|
|
35360
|
+
if (sum === null) {
|
|
35361
|
+
sum = value;
|
|
35362
|
+
minimum = value;
|
|
35363
|
+
maximum = value;
|
|
35364
|
+
return;
|
|
35365
|
+
}
|
|
35366
|
+
sum += value;
|
|
35367
|
+
minimum = value < minimum ? value : minimum;
|
|
35368
|
+
maximum = value > maximum ? value : maximum;
|
|
35369
|
+
}
|
|
35362
35370
|
});
|
|
35363
35371
|
}
|
|
35364
35372
|
else {
|
|
35365
35373
|
label = rangeLabel;
|
|
35366
35374
|
domains.forEach(function (element) {
|
|
35367
|
-
|
|
35368
|
-
|
|
35369
|
-
|
|
35370
|
-
|
|
35375
|
+
if (typeof _this.matrix[element][datum].value === 'number') {
|
|
35376
|
+
var value = _this.matrix[element][datum].value;
|
|
35377
|
+
if (sum === null) {
|
|
35378
|
+
sum = value;
|
|
35379
|
+
minimum = value;
|
|
35380
|
+
maximum = value;
|
|
35381
|
+
return;
|
|
35382
|
+
}
|
|
35383
|
+
sum += value;
|
|
35384
|
+
minimum = value < minimum ? value : minimum;
|
|
35385
|
+
maximum = value > maximum ? value : maximum;
|
|
35386
|
+
}
|
|
35371
35387
|
});
|
|
35372
35388
|
}
|
|
35373
35389
|
if (mainXScale(datum) !== undefined) {
|
|
@@ -35394,15 +35410,15 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
|
|
|
35394
35410
|
},
|
|
35395
35411
|
{
|
|
35396
35412
|
label: 'Min',
|
|
35397
|
-
value: minimum,
|
|
35413
|
+
value: minimum !== null ? minimum : '-',
|
|
35398
35414
|
},
|
|
35399
35415
|
{
|
|
35400
35416
|
label: 'Max',
|
|
35401
|
-
value: maximum,
|
|
35417
|
+
value: maximum !== null ? maximum : '-',
|
|
35402
35418
|
},
|
|
35403
35419
|
{
|
|
35404
35420
|
label: 'Average',
|
|
35405
|
-
value: sum / domains.length,
|
|
35421
|
+
value: sum !== null ? sum / domains.length : '-',
|
|
35406
35422
|
},
|
|
35407
35423
|
],
|
|
35408
35424
|
});
|
|
@@ -35581,7 +35597,8 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
|
|
|
35581
35597
|
if (!nullState) {
|
|
35582
35598
|
// Get transformation value of node
|
|
35583
35599
|
var transform = tools_Tools.getTranformOffsets(cell.attr('transform'));
|
|
35584
|
-
|
|
35600
|
+
self.parent
|
|
35601
|
+
.select('g.cell-highlight')
|
|
35585
35602
|
.attr('transform', "translate(" + (transform.x + self.translationUnits.x) + ", " + (transform.y + self.translationUnits.y) + ")")
|
|
35586
35603
|
.classed('highlighter-hidden', false);
|
|
35587
35604
|
// Dispatch mouse over event
|
|
@@ -35635,7 +35652,9 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
|
|
|
35635
35652
|
var cell = src_select(this);
|
|
35636
35653
|
var hoveredElement = cell.select('rect.heat');
|
|
35637
35654
|
var nullState = hoveredElement.classed('null-state');
|
|
35638
|
-
|
|
35655
|
+
self.parent
|
|
35656
|
+
.select('g.cell-highlight')
|
|
35657
|
+
.classed('highlighter-hidden', true);
|
|
35639
35658
|
// Dispatch event and tooltip only if value exists
|
|
35640
35659
|
if (!nullState) {
|
|
35641
35660
|
// Dispatch mouse out event
|
|
@@ -39942,6 +39961,11 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39942
39961
|
};
|
|
39943
39962
|
// Calls passed function && dispatches event
|
|
39944
39963
|
Toolbar.prototype.triggerFunctionAndEvent = function (control, event, element) {
|
|
39964
|
+
// Check if trigger is disabled
|
|
39965
|
+
if (typeof control.shouldBeDisabled === 'function' &&
|
|
39966
|
+
control.shouldBeDisabled()) {
|
|
39967
|
+
return;
|
|
39968
|
+
}
|
|
39945
39969
|
// Call custom function only if it exists
|
|
39946
39970
|
if (typeof control.clickFunction === 'function') {
|
|
39947
39971
|
control.clickFunction(event);
|