@carbon/charts-vue 0.54.10 → 0.54.13
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 +24 -0
- package/charts-vue.common.js +56 -53
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +56 -53
- 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
|
@@ -8768,6 +8768,7 @@ var meterChart = tools_Tools.merge({}, chart, {
|
|
|
8768
8768
|
clickable: false,
|
|
8769
8769
|
},
|
|
8770
8770
|
meter: {
|
|
8771
|
+
showLabels: true,
|
|
8771
8772
|
proportional: null,
|
|
8772
8773
|
statusBar: {
|
|
8773
8774
|
percentageIndicator: {
|
|
@@ -31119,26 +31120,6 @@ function constantZero() {
|
|
|
31119
31120
|
return treemap;
|
|
31120
31121
|
});
|
|
31121
31122
|
|
|
31122
|
-
// CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/d3-array/src/sum.js
|
|
31123
|
-
function sum_sum(values, valueof) {
|
|
31124
|
-
let sum = 0;
|
|
31125
|
-
if (valueof === undefined) {
|
|
31126
|
-
for (let value of values) {
|
|
31127
|
-
if (value = +value) {
|
|
31128
|
-
sum += value;
|
|
31129
|
-
}
|
|
31130
|
-
}
|
|
31131
|
-
} else {
|
|
31132
|
-
let index = -1;
|
|
31133
|
-
for (let value of values) {
|
|
31134
|
-
if (value = +valueof(value, ++index, values)) {
|
|
31135
|
-
sum += value;
|
|
31136
|
-
}
|
|
31137
|
-
}
|
|
31138
|
-
}
|
|
31139
|
-
return sum;
|
|
31140
|
-
}
|
|
31141
|
-
|
|
31142
31123
|
// CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/@carbon/colors/es/index.js
|
|
31143
31124
|
/**
|
|
31144
31125
|
* Copyright IBM Corp. 2018, 2018
|
|
@@ -31764,7 +31745,6 @@ var treemap_extends = (undefined && undefined.__extends) || (function () {
|
|
|
31764
31745
|
|
|
31765
31746
|
|
|
31766
31747
|
|
|
31767
|
-
|
|
31768
31748
|
// Carbon colors
|
|
31769
31749
|
|
|
31770
31750
|
var findColorShade = function (hex) {
|
|
@@ -31858,9 +31838,6 @@ var treemap_Treemap = /** @class */ (function (_super) {
|
|
|
31858
31838
|
})
|
|
31859
31839
|
.sum(function (d) { return d.value; })
|
|
31860
31840
|
.sort(function (a, b) { return b.value - a.value; });
|
|
31861
|
-
var total = sum_sum(allData, function (d) {
|
|
31862
|
-
return sum_sum(d.children, function (child) { return child.value; });
|
|
31863
|
-
});
|
|
31864
31841
|
var root = src_treemap()
|
|
31865
31842
|
.size([width, height])
|
|
31866
31843
|
.paddingInner(1)
|
|
@@ -33965,7 +33942,7 @@ var wordcloud_WordCloud = /** @class */ (function (_super) {
|
|
|
33965
33942
|
|
|
33966
33943
|
//# sourceMappingURL=../../../src/components/graphs/wordcloud.js.map
|
|
33967
33944
|
// CONCATENATED MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/d3-sankey/node_modules/d3-array/src/sum.js
|
|
33968
|
-
function
|
|
33945
|
+
function sum_sum(values, valueof) {
|
|
33969
33946
|
let sum = 0;
|
|
33970
33947
|
if (valueof === undefined) {
|
|
33971
33948
|
for (let value of values) {
|
|
@@ -34212,7 +34189,7 @@ function Sankey() {
|
|
|
34212
34189
|
function computeNodeValues({nodes}) {
|
|
34213
34190
|
for (const node of nodes) {
|
|
34214
34191
|
node.value = node.fixedValue === undefined
|
|
34215
|
-
? Math.max(
|
|
34192
|
+
? Math.max(sum_sum(node.sourceLinks, sankey_value), sum_sum(node.targetLinks, sankey_value))
|
|
34216
34193
|
: node.fixedValue;
|
|
34217
34194
|
}
|
|
34218
34195
|
}
|
|
@@ -34272,7 +34249,7 @@ function Sankey() {
|
|
|
34272
34249
|
}
|
|
34273
34250
|
|
|
34274
34251
|
function initializeNodeBreadths(columns) {
|
|
34275
|
-
const ky = src_min_min(columns, c => (y1 - y0 - (c.length - 1) * py) /
|
|
34252
|
+
const ky = src_min_min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum_sum(c, sankey_value));
|
|
34276
34253
|
for (const nodes of columns) {
|
|
34277
34254
|
let y = y0;
|
|
34278
34255
|
for (const node of nodes) {
|
|
@@ -43001,6 +42978,13 @@ var charts_meter_extends = (undefined && undefined.__extends) || (function () {
|
|
|
43001
42978
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43002
42979
|
};
|
|
43003
42980
|
})();
|
|
42981
|
+
var charts_meter_spreadArrays = (undefined && undefined.__spreadArrays) || function () {
|
|
42982
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
42983
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
42984
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
42985
|
+
r[k] = a[j];
|
|
42986
|
+
return r;
|
|
42987
|
+
};
|
|
43004
42988
|
// Internal Imports
|
|
43005
42989
|
|
|
43006
42990
|
|
|
@@ -43027,29 +43011,41 @@ var meter_MeterChart = /** @class */ (function (_super) {
|
|
|
43027
43011
|
return _this;
|
|
43028
43012
|
}
|
|
43029
43013
|
MeterChart.prototype.getComponents = function () {
|
|
43030
|
-
|
|
43031
|
-
var
|
|
43032
|
-
|
|
43033
|
-
|
|
43034
|
-
|
|
43035
|
-
|
|
43036
|
-
|
|
43037
|
-
|
|
43038
|
-
|
|
43039
|
-
|
|
43040
|
-
|
|
43041
|
-
|
|
43042
|
-
|
|
43043
|
-
|
|
43044
|
-
|
|
43045
|
-
|
|
43046
|
-
|
|
43047
|
-
|
|
43048
|
-
|
|
43049
|
-
|
|
43014
|
+
var showLabels = tools_Tools.getProperty(this.model.getOptions(), 'meter', 'showLabels');
|
|
43015
|
+
var meterComponents = charts_meter_spreadArrays((showLabels
|
|
43016
|
+
? [
|
|
43017
|
+
// Meter has a unique dataset title within the graph
|
|
43018
|
+
{
|
|
43019
|
+
id: 'meter-title',
|
|
43020
|
+
components: [
|
|
43021
|
+
new title_meter_MeterTitle(this.model, this.services),
|
|
43022
|
+
],
|
|
43023
|
+
growth: LayoutGrowth.STRETCH,
|
|
43024
|
+
renderType: RenderTypes.SVG,
|
|
43025
|
+
},
|
|
43026
|
+
// Create the title spacer
|
|
43027
|
+
{
|
|
43028
|
+
id: 'spacer',
|
|
43029
|
+
components: [
|
|
43030
|
+
new spacer_Spacer(this.model, this.services, {
|
|
43031
|
+
size: 8,
|
|
43032
|
+
}),
|
|
43033
|
+
],
|
|
43034
|
+
growth: LayoutGrowth.STRETCH,
|
|
43035
|
+
},
|
|
43036
|
+
]
|
|
43037
|
+
: []), [
|
|
43038
|
+
// Specify what to render inside the graph only
|
|
43039
|
+
{
|
|
43040
|
+
id: 'meter-graph',
|
|
43041
|
+
components: [new meter_Meter(this.model, this.services)],
|
|
43042
|
+
growth: LayoutGrowth.STRETCH,
|
|
43043
|
+
renderType: RenderTypes.SVG,
|
|
43044
|
+
},
|
|
43045
|
+
]);
|
|
43050
43046
|
// the graph frame for meter includes the custom title (and spacer)
|
|
43051
43047
|
var graphFrame = [
|
|
43052
|
-
new layout_LayoutComponent(this.model, this.services,
|
|
43048
|
+
new layout_LayoutComponent(this.model, this.services, meterComponents, {
|
|
43053
43049
|
direction: LayoutDirection.COLUMN,
|
|
43054
43050
|
}),
|
|
43055
43051
|
];
|
|
@@ -43510,10 +43506,11 @@ var model_treemap_extends = (undefined && undefined.__extends) || (function () {
|
|
|
43510
43506
|
})();
|
|
43511
43507
|
// Internal Imports
|
|
43512
43508
|
|
|
43509
|
+
|
|
43513
43510
|
/**
|
|
43514
43511
|
* The treemap chart model layer
|
|
43515
43512
|
*/
|
|
43516
|
-
var
|
|
43513
|
+
var treemap_TreemapChartModel = /** @class */ (function (_super) {
|
|
43517
43514
|
model_treemap_extends(TreemapChartModel, _super);
|
|
43518
43515
|
function TreemapChartModel(services) {
|
|
43519
43516
|
return _super.call(this, services) || this;
|
|
@@ -43522,9 +43519,15 @@ var TreemapChartModel = /** @class */ (function (_super) {
|
|
|
43522
43519
|
var displayData = this.getDisplayData();
|
|
43523
43520
|
var result = [['Child', 'Group', 'Value']];
|
|
43524
43521
|
displayData.forEach(function (datum) {
|
|
43525
|
-
datum.children
|
|
43526
|
-
|
|
43527
|
-
|
|
43522
|
+
if (Array.isArray(datum.children)) {
|
|
43523
|
+
datum.children.forEach(function (child) {
|
|
43524
|
+
result.push([child.name, datum.name, child.value]);
|
|
43525
|
+
});
|
|
43526
|
+
}
|
|
43527
|
+
else if (tools_Tools.getProperty(datum.name) !== null &&
|
|
43528
|
+
tools_Tools.getProperty(datum.value)) {
|
|
43529
|
+
result.push(["–", datum.name, datum.value]);
|
|
43530
|
+
}
|
|
43528
43531
|
});
|
|
43529
43532
|
return result;
|
|
43530
43533
|
};
|
|
@@ -43557,7 +43560,7 @@ var treemap_TreemapChart = /** @class */ (function (_super) {
|
|
|
43557
43560
|
charts_treemap_extends(TreemapChart, _super);
|
|
43558
43561
|
function TreemapChart(holder, chartConfigs) {
|
|
43559
43562
|
var _this = _super.call(this, holder, chartConfigs) || this;
|
|
43560
|
-
_this.model = new
|
|
43563
|
+
_this.model = new treemap_TreemapChartModel(_this.services);
|
|
43561
43564
|
// Merge the default options for this chart
|
|
43562
43565
|
// With the user provided options
|
|
43563
43566
|
_this.model.setOptions(tools_Tools.mergeDefaultChartOptions(configuration_options.treemapChart, chartConfigs.options));
|