@carbon/charts-vue 0.54.8 → 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 +32 -0
- package/charts-vue.common.js +68 -60
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +68 -60
- 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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
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
|
+
|
|
14
|
+
## [0.54.11](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.10...v0.54.11) (2022-02-02)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.54.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.9...v0.54.10) (2022-01-27)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.54.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.8...v0.54.9) (2022-01-27)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.54.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.7...v0.54.8) (2022-01-25)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/charts-vue.common.js
CHANGED
|
@@ -8535,6 +8535,7 @@ var axisChart = tools_Tools.merge({}, chart, {
|
|
|
8535
8535
|
var baseBarChart = tools_Tools.merge({}, axisChart, {
|
|
8536
8536
|
bars: {
|
|
8537
8537
|
maxWidth: 16,
|
|
8538
|
+
spacingFactor: 0.25
|
|
8538
8539
|
},
|
|
8539
8540
|
timeScale: tools_Tools.merge(timeScale, {
|
|
8540
8541
|
addSpaceOnEdges: 1,
|
|
@@ -8758,6 +8759,7 @@ var meterChart = tools_Tools.merge({}, chart, {
|
|
|
8758
8759
|
clickable: false,
|
|
8759
8760
|
},
|
|
8760
8761
|
meter: {
|
|
8762
|
+
showLabels: true,
|
|
8761
8763
|
proportional: null,
|
|
8762
8764
|
statusBar: {
|
|
8763
8765
|
percentageIndicator: {
|
|
@@ -25437,6 +25439,7 @@ var bar_extends = (undefined && undefined.__extends) || (function () {
|
|
|
25437
25439
|
// Internal Imports
|
|
25438
25440
|
|
|
25439
25441
|
|
|
25442
|
+
|
|
25440
25443
|
var bar_Bar = /** @class */ (function (_super) {
|
|
25441
25444
|
bar_extends(Bar, _super);
|
|
25442
25445
|
function Bar() {
|
|
@@ -25454,7 +25457,8 @@ var bar_Bar = /** @class */ (function (_super) {
|
|
|
25454
25457
|
useAttrs: true,
|
|
25455
25458
|
}).width;
|
|
25456
25459
|
if (!mainXScale.step) {
|
|
25457
|
-
|
|
25460
|
+
var spacingFactor = tools_Tools.getProperty(options, 'bars', 'spacingFactor');
|
|
25461
|
+
return Math.min(options.bars.maxWidth, (chartWidth * spacingFactor) / numberOfDatapoints);
|
|
25458
25462
|
}
|
|
25459
25463
|
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
25460
25464
|
};
|
|
@@ -26249,8 +26253,9 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
|
26249
26253
|
useAttrs: true,
|
|
26250
26254
|
}).width;
|
|
26251
26255
|
var numberOfDomainValues = this.model.getStackKeys().length;
|
|
26256
|
+
var spacingFactor = tools_Tools.getProperty(options, 'bars', 'spacingFactor');
|
|
26252
26257
|
if (!mainXScale.step) {
|
|
26253
|
-
return Math.min(options.bars.maxWidth, (chartWidth *
|
|
26258
|
+
return Math.min(options.bars.maxWidth, (chartWidth * spacingFactor) / numberOfDomainValues);
|
|
26254
26259
|
}
|
|
26255
26260
|
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
26256
26261
|
};
|
|
@@ -31106,26 +31111,6 @@ function constantZero() {
|
|
|
31106
31111
|
return treemap;
|
|
31107
31112
|
});
|
|
31108
31113
|
|
|
31109
|
-
// CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/d3-array/src/sum.js
|
|
31110
|
-
function sum_sum(values, valueof) {
|
|
31111
|
-
let sum = 0;
|
|
31112
|
-
if (valueof === undefined) {
|
|
31113
|
-
for (let value of values) {
|
|
31114
|
-
if (value = +value) {
|
|
31115
|
-
sum += value;
|
|
31116
|
-
}
|
|
31117
|
-
}
|
|
31118
|
-
} else {
|
|
31119
|
-
let index = -1;
|
|
31120
|
-
for (let value of values) {
|
|
31121
|
-
if (value = +valueof(value, ++index, values)) {
|
|
31122
|
-
sum += value;
|
|
31123
|
-
}
|
|
31124
|
-
}
|
|
31125
|
-
}
|
|
31126
|
-
return sum;
|
|
31127
|
-
}
|
|
31128
|
-
|
|
31129
31114
|
// CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/@carbon/colors/es/index.js
|
|
31130
31115
|
/**
|
|
31131
31116
|
* Copyright IBM Corp. 2018, 2018
|
|
@@ -31751,7 +31736,6 @@ var treemap_extends = (undefined && undefined.__extends) || (function () {
|
|
|
31751
31736
|
|
|
31752
31737
|
|
|
31753
31738
|
|
|
31754
|
-
|
|
31755
31739
|
// Carbon colors
|
|
31756
31740
|
|
|
31757
31741
|
var findColorShade = function (hex) {
|
|
@@ -31845,9 +31829,6 @@ var treemap_Treemap = /** @class */ (function (_super) {
|
|
|
31845
31829
|
})
|
|
31846
31830
|
.sum(function (d) { return d.value; })
|
|
31847
31831
|
.sort(function (a, b) { return b.value - a.value; });
|
|
31848
|
-
var total = sum_sum(allData, function (d) {
|
|
31849
|
-
return sum_sum(d.children, function (child) { return child.value; });
|
|
31850
|
-
});
|
|
31851
31832
|
var root = src_treemap()
|
|
31852
31833
|
.size([width, height])
|
|
31853
31834
|
.paddingInner(1)
|
|
@@ -32877,18 +32858,19 @@ var radar_Radar = /** @class */ (function (_super) {
|
|
|
32877
32858
|
});
|
|
32878
32859
|
var axisLine = self.parent.select(".x-axes .x-axis-" + tools_Tools.kebabCase(datum));
|
|
32879
32860
|
var dots = self.parent.selectAll(".dots circle." + tools_Tools.kebabCase(datum));
|
|
32861
|
+
var activeDataGroupNames = self.model.getActiveDataGroupNames();
|
|
32862
|
+
var options = self.getOptions();
|
|
32863
|
+
var groupMapsTo = options.data.groupMapsTo;
|
|
32864
|
+
var valueMapsTo = tools_Tools.getProperty(options, 'radar', 'axes', 'value');
|
|
32880
32865
|
// Change style
|
|
32881
32866
|
axisLine
|
|
32882
32867
|
.classed('hovered', true)
|
|
32883
32868
|
.attr('stroke-dasharray', '4 4');
|
|
32884
32869
|
dots.classed('hovered', true)
|
|
32885
|
-
.attr('opacity', 1)
|
|
32870
|
+
.attr('opacity', function (d) { return activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1 ? 1 : 0; })
|
|
32886
32871
|
.attr('r', radar.dotsRadius);
|
|
32887
32872
|
// get the items that should be highlighted
|
|
32888
|
-
var itemsToHighlight = self.fullDataNormalized.filter(function (d) { return d[angle] === datum; });
|
|
32889
|
-
var options = self.getOptions();
|
|
32890
|
-
var groupMapsTo = options.data.groupMapsTo;
|
|
32891
|
-
var valueMapsTo = tools_Tools.getProperty(options, 'radar', 'axes', 'value');
|
|
32873
|
+
var itemsToHighlight = self.fullDataNormalized.filter(function (d) { return d[angle] === datum && activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1; });
|
|
32892
32874
|
// Show tooltip
|
|
32893
32875
|
self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
|
|
32894
32876
|
event: event,
|
|
@@ -33951,7 +33933,7 @@ var wordcloud_WordCloud = /** @class */ (function (_super) {
|
|
|
33951
33933
|
|
|
33952
33934
|
//# sourceMappingURL=../../../src/components/graphs/wordcloud.js.map
|
|
33953
33935
|
// CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/d3-sankey/node_modules/d3-array/src/sum.js
|
|
33954
|
-
function
|
|
33936
|
+
function sum_sum(values, valueof) {
|
|
33955
33937
|
let sum = 0;
|
|
33956
33938
|
if (valueof === undefined) {
|
|
33957
33939
|
for (let value of values) {
|
|
@@ -34198,7 +34180,7 @@ function Sankey() {
|
|
|
34198
34180
|
function computeNodeValues({nodes}) {
|
|
34199
34181
|
for (const node of nodes) {
|
|
34200
34182
|
node.value = node.fixedValue === undefined
|
|
34201
|
-
? Math.max(
|
|
34183
|
+
? Math.max(sum_sum(node.sourceLinks, sankey_value), sum_sum(node.targetLinks, sankey_value))
|
|
34202
34184
|
: node.fixedValue;
|
|
34203
34185
|
}
|
|
34204
34186
|
}
|
|
@@ -34258,7 +34240,7 @@ function Sankey() {
|
|
|
34258
34240
|
}
|
|
34259
34241
|
|
|
34260
34242
|
function initializeNodeBreadths(columns) {
|
|
34261
|
-
const ky = src_min_min(columns, c => (y1 - y0 - (c.length - 1) * py) /
|
|
34243
|
+
const ky = src_min_min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum_sum(c, sankey_value));
|
|
34262
34244
|
for (const nodes of columns) {
|
|
34263
34245
|
let y = y0;
|
|
34264
34246
|
for (const node of nodes) {
|
|
@@ -42987,6 +42969,13 @@ var charts_meter_extends = (undefined && undefined.__extends) || (function () {
|
|
|
42987
42969
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
42988
42970
|
};
|
|
42989
42971
|
})();
|
|
42972
|
+
var charts_meter_spreadArrays = (undefined && undefined.__spreadArrays) || function () {
|
|
42973
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
42974
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
42975
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
42976
|
+
r[k] = a[j];
|
|
42977
|
+
return r;
|
|
42978
|
+
};
|
|
42990
42979
|
// Internal Imports
|
|
42991
42980
|
|
|
42992
42981
|
|
|
@@ -43013,29 +43002,41 @@ var meter_MeterChart = /** @class */ (function (_super) {
|
|
|
43013
43002
|
return _this;
|
|
43014
43003
|
}
|
|
43015
43004
|
MeterChart.prototype.getComponents = function () {
|
|
43016
|
-
|
|
43017
|
-
var
|
|
43018
|
-
|
|
43019
|
-
|
|
43020
|
-
|
|
43021
|
-
|
|
43022
|
-
|
|
43023
|
-
|
|
43024
|
-
|
|
43025
|
-
|
|
43026
|
-
|
|
43027
|
-
|
|
43028
|
-
|
|
43029
|
-
|
|
43030
|
-
|
|
43031
|
-
|
|
43032
|
-
|
|
43033
|
-
|
|
43034
|
-
|
|
43035
|
-
|
|
43005
|
+
var showLabels = tools_Tools.getProperty(this.model.getOptions(), 'meter', 'showLabels');
|
|
43006
|
+
var meterComponents = charts_meter_spreadArrays((showLabels
|
|
43007
|
+
? [
|
|
43008
|
+
// Meter has a unique dataset title within the graph
|
|
43009
|
+
{
|
|
43010
|
+
id: 'meter-title',
|
|
43011
|
+
components: [
|
|
43012
|
+
new title_meter_MeterTitle(this.model, this.services),
|
|
43013
|
+
],
|
|
43014
|
+
growth: LayoutGrowth.STRETCH,
|
|
43015
|
+
renderType: RenderTypes.SVG,
|
|
43016
|
+
},
|
|
43017
|
+
// Create the title spacer
|
|
43018
|
+
{
|
|
43019
|
+
id: 'spacer',
|
|
43020
|
+
components: [
|
|
43021
|
+
new spacer_Spacer(this.model, this.services, {
|
|
43022
|
+
size: 8,
|
|
43023
|
+
}),
|
|
43024
|
+
],
|
|
43025
|
+
growth: LayoutGrowth.STRETCH,
|
|
43026
|
+
},
|
|
43027
|
+
]
|
|
43028
|
+
: []), [
|
|
43029
|
+
// Specify what to render inside the graph only
|
|
43030
|
+
{
|
|
43031
|
+
id: 'meter-graph',
|
|
43032
|
+
components: [new meter_Meter(this.model, this.services)],
|
|
43033
|
+
growth: LayoutGrowth.STRETCH,
|
|
43034
|
+
renderType: RenderTypes.SVG,
|
|
43035
|
+
},
|
|
43036
|
+
]);
|
|
43036
43037
|
// the graph frame for meter includes the custom title (and spacer)
|
|
43037
43038
|
var graphFrame = [
|
|
43038
|
-
new layout_LayoutComponent(this.model, this.services,
|
|
43039
|
+
new layout_LayoutComponent(this.model, this.services, meterComponents, {
|
|
43039
43040
|
direction: LayoutDirection.COLUMN,
|
|
43040
43041
|
}),
|
|
43041
43042
|
];
|
|
@@ -43496,10 +43497,11 @@ var model_treemap_extends = (undefined && undefined.__extends) || (function () {
|
|
|
43496
43497
|
})();
|
|
43497
43498
|
// Internal Imports
|
|
43498
43499
|
|
|
43500
|
+
|
|
43499
43501
|
/**
|
|
43500
43502
|
* The treemap chart model layer
|
|
43501
43503
|
*/
|
|
43502
|
-
var
|
|
43504
|
+
var treemap_TreemapChartModel = /** @class */ (function (_super) {
|
|
43503
43505
|
model_treemap_extends(TreemapChartModel, _super);
|
|
43504
43506
|
function TreemapChartModel(services) {
|
|
43505
43507
|
return _super.call(this, services) || this;
|
|
@@ -43508,9 +43510,15 @@ var TreemapChartModel = /** @class */ (function (_super) {
|
|
|
43508
43510
|
var displayData = this.getDisplayData();
|
|
43509
43511
|
var result = [['Child', 'Group', 'Value']];
|
|
43510
43512
|
displayData.forEach(function (datum) {
|
|
43511
|
-
datum.children
|
|
43512
|
-
|
|
43513
|
-
|
|
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
|
+
}
|
|
43514
43522
|
});
|
|
43515
43523
|
return result;
|
|
43516
43524
|
};
|
|
@@ -43543,7 +43551,7 @@ var treemap_TreemapChart = /** @class */ (function (_super) {
|
|
|
43543
43551
|
charts_treemap_extends(TreemapChart, _super);
|
|
43544
43552
|
function TreemapChart(holder, chartConfigs) {
|
|
43545
43553
|
var _this = _super.call(this, holder, chartConfigs) || this;
|
|
43546
|
-
_this.model = new
|
|
43554
|
+
_this.model = new treemap_TreemapChartModel(_this.services);
|
|
43547
43555
|
// Merge the default options for this chart
|
|
43548
43556
|
// With the user provided options
|
|
43549
43557
|
_this.model.setOptions(tools_Tools.mergeDefaultChartOptions(configuration_options.treemapChart, chartConfigs.options));
|