@carbon/charts-vue 0.54.4 → 0.54.8
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 +38 -20
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +38 -20
- 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.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.7...v0.54.8) (2022-01-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.54.7](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.6...v0.54.7) (2022-01-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.54.6](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.5...v0.54.6) (2022-01-13)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.54.5](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.4...v0.54.5) (2022-01-11)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.54.4](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.3...v0.54.4) (2022-01-10)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/charts-vue.common.js
CHANGED
|
@@ -16160,10 +16160,11 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16160
16160
|
};
|
|
16161
16161
|
CartesianScales.prototype.getBoundedScaledValues = function (datum, index) {
|
|
16162
16162
|
var bounds = this.model.getOptions().bounds;
|
|
16163
|
-
var
|
|
16163
|
+
var axisPosition = this.getRangeAxisPosition({ datum: datum });
|
|
16164
|
+
var scale = this.scales[axisPosition];
|
|
16164
16165
|
var options = this.model.getOptions();
|
|
16165
16166
|
var axesOptions = tools_Tools.getProperty(options, 'axes');
|
|
16166
|
-
var axisOptions = axesOptions[
|
|
16167
|
+
var axisOptions = axesOptions[axisPosition];
|
|
16167
16168
|
var mapsTo = axisOptions.mapsTo;
|
|
16168
16169
|
var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
|
|
16169
16170
|
var boundedValues = [
|
|
@@ -16440,7 +16441,9 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16440
16441
|
var axesOptions = tools_Tools.getProperty(this.model.getOptions(), 'axes');
|
|
16441
16442
|
var domainAxisPosition = this.getDomainAxisPosition();
|
|
16442
16443
|
var thresholds = axesOptions[domainAxisPosition].thresholds;
|
|
16443
|
-
if
|
|
16444
|
+
// Check if thresholds exist & is not empty
|
|
16445
|
+
if (!Array.isArray(thresholds) ||
|
|
16446
|
+
(Array.isArray(thresholds) && !thresholds.length)) {
|
|
16444
16447
|
return null;
|
|
16445
16448
|
}
|
|
16446
16449
|
var domainScale = this.getDomainScale();
|
|
@@ -16461,7 +16464,9 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16461
16464
|
var axesOptions = tools_Tools.getProperty(this.model.getOptions(), 'axes');
|
|
16462
16465
|
var rangeAxisPosition = this.getRangeAxisPosition();
|
|
16463
16466
|
var thresholds = axesOptions[rangeAxisPosition].thresholds;
|
|
16464
|
-
if
|
|
16467
|
+
// Check if thresholds exist & is not empty
|
|
16468
|
+
if (!Array.isArray(thresholds) ||
|
|
16469
|
+
(Array.isArray(thresholds) && !thresholds.length)) {
|
|
16465
16470
|
return null;
|
|
16466
16471
|
}
|
|
16467
16472
|
var rangeScale = this.getRangeScale();
|
|
@@ -24368,15 +24373,21 @@ var tooltip_axis_AxisChartsTooltip = /** @class */ (function (_super) {
|
|
|
24368
24373
|
},
|
|
24369
24374
|
];
|
|
24370
24375
|
items = items.concat(data
|
|
24371
|
-
.map(function (datum) {
|
|
24372
|
-
|
|
24373
|
-
value
|
|
24374
|
-
|
|
24375
|
-
|
|
24376
|
-
|
|
24377
|
-
|
|
24378
|
-
|
|
24379
|
-
|
|
24376
|
+
.map(function (datum) {
|
|
24377
|
+
// Format value if is array
|
|
24378
|
+
var value = datum[cartesianScales.getRangeIdentifier(datum)];
|
|
24379
|
+
return {
|
|
24380
|
+
label: datum[groupMapsTo],
|
|
24381
|
+
value: Array.isArray(value) && value.length === 2
|
|
24382
|
+
? value[0] + " - " + value[1]
|
|
24383
|
+
: value,
|
|
24384
|
+
color: _this.model.getFillColor(datum[groupMapsTo]),
|
|
24385
|
+
class: _this.model.getColorClassName({
|
|
24386
|
+
classNameTypes: [ColorClassNameTypes.TOOLTIP],
|
|
24387
|
+
dataGroupName: datum[groupMapsTo],
|
|
24388
|
+
}),
|
|
24389
|
+
};
|
|
24390
|
+
})
|
|
24380
24391
|
.sort(function (a, b) { return b.value - a.value; }));
|
|
24381
24392
|
if (!dualAxes &&
|
|
24382
24393
|
tools_Tools.getProperty(options, 'tooltip', 'showTotal') === true) {
|
|
@@ -26230,7 +26241,7 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
|
26230
26241
|
};
|
|
26231
26242
|
StackedBar.prototype.getBarWidth = function () {
|
|
26232
26243
|
var options = this.getOptions();
|
|
26233
|
-
if (tools_Tools.getProperty(options,
|
|
26244
|
+
if (tools_Tools.getProperty(options, 'bars', 'width')) {
|
|
26234
26245
|
return options.bars.width;
|
|
26235
26246
|
}
|
|
26236
26247
|
var mainXScale = this.services.cartesianScales.getMainXScale();
|
|
@@ -32592,6 +32603,13 @@ var radar_Radar = /** @class */ (function (_super) {
|
|
|
32592
32603
|
})
|
|
32593
32604
|
.attr('y', function (key) {
|
|
32594
32605
|
return polarToCartesianCoords(xScale(key), yScale.range()[1] + xLabelPadding, c).y;
|
|
32606
|
+
})
|
|
32607
|
+
.end()
|
|
32608
|
+
.finally(function () {
|
|
32609
|
+
// Align chart horizontally after x-axies has finished rendering
|
|
32610
|
+
var alignment = tools_Tools.getProperty(options, 'radar', 'alignment');
|
|
32611
|
+
var alignmentXOffset = _this.getAlignmentXOffset(alignment, svg, _this.getParent());
|
|
32612
|
+
svg.attr('x', alignmentXOffset);
|
|
32595
32613
|
});
|
|
32596
32614
|
});
|
|
32597
32615
|
}, function (exit) {
|
|
@@ -32812,9 +32830,6 @@ var radar_Radar = /** @class */ (function (_super) {
|
|
|
32812
32830
|
.remove();
|
|
32813
32831
|
});
|
|
32814
32832
|
});
|
|
32815
|
-
var alignment = tools_Tools.getProperty(options, 'radar', 'alignment');
|
|
32816
|
-
var alignmentXOffset = this.getAlignmentXOffset(alignment, svg, this.getParent());
|
|
32817
|
-
svg.attr('x', alignmentXOffset);
|
|
32818
32833
|
// Add event listeners
|
|
32819
32834
|
this.addEventListeners();
|
|
32820
32835
|
};
|
|
@@ -33616,8 +33631,8 @@ var circle_pack_CirclePack = /** @class */ (function (_super) {
|
|
|
33616
33631
|
.on('click', function (event, datum) {
|
|
33617
33632
|
var hoveredElement = src_select(this);
|
|
33618
33633
|
var disabled = hoveredElement.classed('non-focal');
|
|
33619
|
-
var
|
|
33620
|
-
if (
|
|
33634
|
+
var canvasZoomEnabled = tools_Tools.getProperty(self.model.getOptions(), 'canvasZoom', 'enabled');
|
|
33635
|
+
if (canvasZoomEnabled && self.model.getHierarchyLevel() > 2) {
|
|
33621
33636
|
var canvasSelection = self.parent.selectAll('circle.node');
|
|
33622
33637
|
var chartSvg = src_select(self.services.domUtils.getMainContainer());
|
|
33623
33638
|
chartSvg.classed('zoomed-in', false);
|
|
@@ -33626,7 +33641,10 @@ var circle_pack_CirclePack = /** @class */ (function (_super) {
|
|
|
33626
33641
|
self.services.canvasZoom.zoomOut(canvasSelection, canvasZoomSettings);
|
|
33627
33642
|
}
|
|
33628
33643
|
// zoom if chart has zoom enabled and if its a depth 2 circle that has children
|
|
33629
|
-
else if (datum.depth === 2 &&
|
|
33644
|
+
else if (datum.depth === 2 &&
|
|
33645
|
+
datum.children &&
|
|
33646
|
+
!disabled &&
|
|
33647
|
+
canvasZoomEnabled) {
|
|
33630
33648
|
var canvasSelection = self.parent.selectAll('circle.node');
|
|
33631
33649
|
var chartSvg = src_select(self.services.domUtils.getMainContainer());
|
|
33632
33650
|
chartSvg.classed('zoomed-in', true);
|