@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 CHANGED
@@ -3,6 +3,46 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.5.6](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.5...v1.5.6) (2022-09-14)
7
+
8
+ **Note:** Version bump only for package @carbon/charts-vue
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.5.5](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.4...v1.5.5) (2022-09-14)
15
+
16
+ **Note:** Version bump only for package @carbon/charts-vue
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.5.4](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.3...v1.5.4) (2022-09-14)
23
+
24
+ **Note:** Version bump only for package @carbon/charts-vue
25
+
26
+
27
+
28
+
29
+
30
+ ## [1.5.3](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.2...v1.5.3) (2022-09-06)
31
+
32
+ **Note:** Version bump only for package @carbon/charts-vue
33
+
34
+
35
+
36
+
37
+
38
+ ## [1.5.2](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.1...v1.5.2) (2022-08-15)
39
+
40
+ **Note:** Version bump only for package @carbon/charts-vue
41
+
42
+
43
+
44
+
45
+
6
46
  ## [1.5.1](https://github.com/carbon-design-system/carbon-charts/compare/v1.5.0...v1.5.1) (2022-08-08)
7
47
 
8
48
  **Note:** Version bump only for package @carbon/charts-vue
@@ -35340,25 +35340,41 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
35340
35340
  // Scales
35341
35341
  var mainXScale = _this.services.cartesianScales.getMainXScale();
35342
35342
  var mainYScale = _this.services.cartesianScales.getMainYScale();
35343
- var label = '', sum = 0, minimum = 0, maximum = 0;
35343
+ var label = '', sum = null, minimum = null, maximum = null;
35344
35344
  // Check to see where datum belongs
35345
35345
  if (_this.matrix[datum] !== undefined) {
35346
35346
  label = domainLabel;
35347
35347
  // Iterate through Object and get sum, min, and max
35348
35348
  ranges.forEach(function (element) {
35349
- var value = _this.matrix[datum][element].value || 0;
35350
- sum += value;
35351
- minimum = value < minimum ? value : minimum;
35352
- maximum = value > maximum ? value : maximum;
35349
+ if (typeof _this.matrix[datum][element].value === 'number') {
35350
+ var value = _this.matrix[datum][element].value;
35351
+ if (sum === null) {
35352
+ sum = value;
35353
+ minimum = value;
35354
+ maximum = value;
35355
+ return;
35356
+ }
35357
+ sum += value;
35358
+ minimum = value < minimum ? value : minimum;
35359
+ maximum = value > maximum ? value : maximum;
35360
+ }
35353
35361
  });
35354
35362
  }
35355
35363
  else {
35356
35364
  label = rangeLabel;
35357
35365
  domains.forEach(function (element) {
35358
- var value = _this.matrix[element][datum].value || 0;
35359
- sum += value;
35360
- minimum = value < minimum ? value : minimum;
35361
- maximum = value > maximum ? value : maximum;
35366
+ if (typeof _this.matrix[element][datum].value === 'number') {
35367
+ var value = _this.matrix[element][datum].value;
35368
+ if (sum === null) {
35369
+ sum = value;
35370
+ minimum = value;
35371
+ maximum = value;
35372
+ return;
35373
+ }
35374
+ sum += value;
35375
+ minimum = value < minimum ? value : minimum;
35376
+ maximum = value > maximum ? value : maximum;
35377
+ }
35362
35378
  });
35363
35379
  }
35364
35380
  if (mainXScale(datum) !== undefined) {
@@ -35385,15 +35401,15 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
35385
35401
  },
35386
35402
  {
35387
35403
  label: 'Min',
35388
- value: minimum,
35404
+ value: minimum !== null ? minimum : '-',
35389
35405
  },
35390
35406
  {
35391
35407
  label: 'Max',
35392
- value: maximum,
35408
+ value: maximum !== null ? maximum : '-',
35393
35409
  },
35394
35410
  {
35395
35411
  label: 'Average',
35396
- value: sum / domains.length,
35412
+ value: sum !== null ? sum / domains.length : '-',
35397
35413
  },
35398
35414
  ],
35399
35415
  });
@@ -35572,7 +35588,8 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
35572
35588
  if (!nullState) {
35573
35589
  // Get transformation value of node
35574
35590
  var transform = tools_Tools.getTranformOffsets(cell.attr('transform'));
35575
- src_select('g.cell-highlight')
35591
+ self.parent
35592
+ .select('g.cell-highlight')
35576
35593
  .attr('transform', "translate(" + (transform.x + self.translationUnits.x) + ", " + (transform.y + self.translationUnits.y) + ")")
35577
35594
  .classed('highlighter-hidden', false);
35578
35595
  // Dispatch mouse over event
@@ -35626,7 +35643,9 @@ var heatmap_Heatmap = /** @class */ (function (_super) {
35626
35643
  var cell = src_select(this);
35627
35644
  var hoveredElement = cell.select('rect.heat');
35628
35645
  var nullState = hoveredElement.classed('null-state');
35629
- src_select('g.cell-highlight').classed('highlighter-hidden', true);
35646
+ self.parent
35647
+ .select('g.cell-highlight')
35648
+ .classed('highlighter-hidden', true);
35630
35649
  // Dispatch event and tooltip only if value exists
35631
35650
  if (!nullState) {
35632
35651
  // Dispatch mouse out event
@@ -39933,6 +39952,11 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
39933
39952
  };
39934
39953
  // Calls passed function && dispatches event
39935
39954
  Toolbar.prototype.triggerFunctionAndEvent = function (control, event, element) {
39955
+ // Check if trigger is disabled
39956
+ if (typeof control.shouldBeDisabled === 'function' &&
39957
+ control.shouldBeDisabled()) {
39958
+ return;
39959
+ }
39936
39960
  // Call custom function only if it exists
39937
39961
  if (typeof control.clickFunction === 'function') {
39938
39962
  control.clickFunction(event);