@carbon/charts-vue 0.54.11 → 0.54.12

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,14 @@
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
+ ## [0.54.12](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.11...v0.54.12) (2022-02-04)
7
+
8
+ **Note:** Version bump only for package @carbon/charts-vue
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.54.11](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.10...v0.54.11) (2022-02-02)
7
15
 
8
16
  **Note:** Version bump only for package @carbon/charts-vue
@@ -31111,26 +31111,6 @@ function constantZero() {
31111
31111
  return treemap;
31112
31112
  });
31113
31113
 
31114
- // CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/d3-array/src/sum.js
31115
- function sum_sum(values, valueof) {
31116
- let sum = 0;
31117
- if (valueof === undefined) {
31118
- for (let value of values) {
31119
- if (value = +value) {
31120
- sum += value;
31121
- }
31122
- }
31123
- } else {
31124
- let index = -1;
31125
- for (let value of values) {
31126
- if (value = +valueof(value, ++index, values)) {
31127
- sum += value;
31128
- }
31129
- }
31130
- }
31131
- return sum;
31132
- }
31133
-
31134
31114
  // CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/@carbon/colors/es/index.js
31135
31115
  /**
31136
31116
  * Copyright IBM Corp. 2018, 2018
@@ -31756,7 +31736,6 @@ var treemap_extends = (undefined && undefined.__extends) || (function () {
31756
31736
 
31757
31737
 
31758
31738
 
31759
-
31760
31739
  // Carbon colors
31761
31740
 
31762
31741
  var findColorShade = function (hex) {
@@ -31850,9 +31829,6 @@ var treemap_Treemap = /** @class */ (function (_super) {
31850
31829
  })
31851
31830
  .sum(function (d) { return d.value; })
31852
31831
  .sort(function (a, b) { return b.value - a.value; });
31853
- var total = sum_sum(allData, function (d) {
31854
- return sum_sum(d.children, function (child) { return child.value; });
31855
- });
31856
31832
  var root = src_treemap()
31857
31833
  .size([width, height])
31858
31834
  .paddingInner(1)
@@ -33957,7 +33933,7 @@ var wordcloud_WordCloud = /** @class */ (function (_super) {
33957
33933
 
33958
33934
  //# sourceMappingURL=../../../src/components/graphs/wordcloud.js.map
33959
33935
  // CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/d3-sankey/node_modules/d3-array/src/sum.js
33960
- function src_sum_sum(values, valueof) {
33936
+ function sum_sum(values, valueof) {
33961
33937
  let sum = 0;
33962
33938
  if (valueof === undefined) {
33963
33939
  for (let value of values) {
@@ -34204,7 +34180,7 @@ function Sankey() {
34204
34180
  function computeNodeValues({nodes}) {
34205
34181
  for (const node of nodes) {
34206
34182
  node.value = node.fixedValue === undefined
34207
- ? Math.max(src_sum_sum(node.sourceLinks, sankey_value), src_sum_sum(node.targetLinks, sankey_value))
34183
+ ? Math.max(sum_sum(node.sourceLinks, sankey_value), sum_sum(node.targetLinks, sankey_value))
34208
34184
  : node.fixedValue;
34209
34185
  }
34210
34186
  }
@@ -34264,7 +34240,7 @@ function Sankey() {
34264
34240
  }
34265
34241
 
34266
34242
  function initializeNodeBreadths(columns) {
34267
- const ky = src_min_min(columns, c => (y1 - y0 - (c.length - 1) * py) / src_sum_sum(c, sankey_value));
34243
+ const ky = src_min_min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum_sum(c, sankey_value));
34268
34244
  for (const nodes of columns) {
34269
34245
  let y = y0;
34270
34246
  for (const node of nodes) {
@@ -43521,10 +43497,11 @@ var model_treemap_extends = (undefined && undefined.__extends) || (function () {
43521
43497
  })();
43522
43498
  // Internal Imports
43523
43499
 
43500
+
43524
43501
  /**
43525
43502
  * The treemap chart model layer
43526
43503
  */
43527
- var TreemapChartModel = /** @class */ (function (_super) {
43504
+ var treemap_TreemapChartModel = /** @class */ (function (_super) {
43528
43505
  model_treemap_extends(TreemapChartModel, _super);
43529
43506
  function TreemapChartModel(services) {
43530
43507
  return _super.call(this, services) || this;
@@ -43533,9 +43510,15 @@ var TreemapChartModel = /** @class */ (function (_super) {
43533
43510
  var displayData = this.getDisplayData();
43534
43511
  var result = [['Child', 'Group', 'Value']];
43535
43512
  displayData.forEach(function (datum) {
43536
- datum.children.forEach(function (child) {
43537
- result.push([child.name, datum.name, child.value]);
43538
- });
43513
+ if (Array.isArray(datum.children)) {
43514
+ datum.children.forEach(function (child) {
43515
+ result.push([child.name, datum.name, child.value]);
43516
+ });
43517
+ }
43518
+ else if (tools_Tools.getProperty(datum.name) !== null &&
43519
+ tools_Tools.getProperty(datum.value)) {
43520
+ result.push(["–", datum.name, datum.value]);
43521
+ }
43539
43522
  });
43540
43523
  return result;
43541
43524
  };
@@ -43568,7 +43551,7 @@ var treemap_TreemapChart = /** @class */ (function (_super) {
43568
43551
  charts_treemap_extends(TreemapChart, _super);
43569
43552
  function TreemapChart(holder, chartConfigs) {
43570
43553
  var _this = _super.call(this, holder, chartConfigs) || this;
43571
- _this.model = new TreemapChartModel(_this.services);
43554
+ _this.model = new treemap_TreemapChartModel(_this.services);
43572
43555
  // Merge the default options for this chart
43573
43556
  // With the user provided options
43574
43557
  _this.model.setOptions(tools_Tools.mergeDefaultChartOptions(configuration_options.treemapChart, chartConfigs.options));