@carbon/charts-vue 0.54.6 → 0.54.10
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 +22 -12
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +22 -12
- 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.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.9...v0.54.10) (2022-01-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.54.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.8...v0.54.9) (2022-01-27)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.54.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.7...v0.54.8) (2022-01-25)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.54.7](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.6...v0.54.7) (2022-01-13)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.54.6](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.5...v0.54.6) (2022-01-13)
|
|
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,
|
|
@@ -16160,10 +16161,11 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16160
16161
|
};
|
|
16161
16162
|
CartesianScales.prototype.getBoundedScaledValues = function (datum, index) {
|
|
16162
16163
|
var bounds = this.model.getOptions().bounds;
|
|
16163
|
-
var
|
|
16164
|
+
var axisPosition = this.getRangeAxisPosition({ datum: datum });
|
|
16165
|
+
var scale = this.scales[axisPosition];
|
|
16164
16166
|
var options = this.model.getOptions();
|
|
16165
16167
|
var axesOptions = tools_Tools.getProperty(options, 'axes');
|
|
16166
|
-
var axisOptions = axesOptions[
|
|
16168
|
+
var axisOptions = axesOptions[axisPosition];
|
|
16167
16169
|
var mapsTo = axisOptions.mapsTo;
|
|
16168
16170
|
var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
|
|
16169
16171
|
var boundedValues = [
|
|
@@ -16440,7 +16442,9 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16440
16442
|
var axesOptions = tools_Tools.getProperty(this.model.getOptions(), 'axes');
|
|
16441
16443
|
var domainAxisPosition = this.getDomainAxisPosition();
|
|
16442
16444
|
var thresholds = axesOptions[domainAxisPosition].thresholds;
|
|
16443
|
-
if
|
|
16445
|
+
// Check if thresholds exist & is not empty
|
|
16446
|
+
if (!Array.isArray(thresholds) ||
|
|
16447
|
+
(Array.isArray(thresholds) && !thresholds.length)) {
|
|
16444
16448
|
return null;
|
|
16445
16449
|
}
|
|
16446
16450
|
var domainScale = this.getDomainScale();
|
|
@@ -16461,7 +16465,9 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16461
16465
|
var axesOptions = tools_Tools.getProperty(this.model.getOptions(), 'axes');
|
|
16462
16466
|
var rangeAxisPosition = this.getRangeAxisPosition();
|
|
16463
16467
|
var thresholds = axesOptions[rangeAxisPosition].thresholds;
|
|
16464
|
-
if
|
|
16468
|
+
// Check if thresholds exist & is not empty
|
|
16469
|
+
if (!Array.isArray(thresholds) ||
|
|
16470
|
+
(Array.isArray(thresholds) && !thresholds.length)) {
|
|
16465
16471
|
return null;
|
|
16466
16472
|
}
|
|
16467
16473
|
var rangeScale = this.getRangeScale();
|
|
@@ -25432,6 +25438,7 @@ var bar_extends = (undefined && undefined.__extends) || (function () {
|
|
|
25432
25438
|
// Internal Imports
|
|
25433
25439
|
|
|
25434
25440
|
|
|
25441
|
+
|
|
25435
25442
|
var bar_Bar = /** @class */ (function (_super) {
|
|
25436
25443
|
bar_extends(Bar, _super);
|
|
25437
25444
|
function Bar() {
|
|
@@ -25449,7 +25456,8 @@ var bar_Bar = /** @class */ (function (_super) {
|
|
|
25449
25456
|
useAttrs: true,
|
|
25450
25457
|
}).width;
|
|
25451
25458
|
if (!mainXScale.step) {
|
|
25452
|
-
|
|
25459
|
+
var spacingFactor = tools_Tools.getProperty(options, 'bars', 'spacingFactor');
|
|
25460
|
+
return Math.min(options.bars.maxWidth, (chartWidth * spacingFactor) / numberOfDatapoints);
|
|
25453
25461
|
}
|
|
25454
25462
|
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
25455
25463
|
};
|
|
@@ -26236,7 +26244,7 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
|
26236
26244
|
};
|
|
26237
26245
|
StackedBar.prototype.getBarWidth = function () {
|
|
26238
26246
|
var options = this.getOptions();
|
|
26239
|
-
if (tools_Tools.getProperty(options,
|
|
26247
|
+
if (tools_Tools.getProperty(options, 'bars', 'width')) {
|
|
26240
26248
|
return options.bars.width;
|
|
26241
26249
|
}
|
|
26242
26250
|
var mainXScale = this.services.cartesianScales.getMainXScale();
|
|
@@ -26244,8 +26252,9 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
|
26244
26252
|
useAttrs: true,
|
|
26245
26253
|
}).width;
|
|
26246
26254
|
var numberOfDomainValues = this.model.getStackKeys().length;
|
|
26255
|
+
var spacingFactor = tools_Tools.getProperty(options, 'bars', 'spacingFactor');
|
|
26247
26256
|
if (!mainXScale.step) {
|
|
26248
|
-
return Math.min(options.bars.maxWidth, (chartWidth *
|
|
26257
|
+
return Math.min(options.bars.maxWidth, (chartWidth * spacingFactor) / numberOfDomainValues);
|
|
26249
26258
|
}
|
|
26250
26259
|
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
26251
26260
|
};
|
|
@@ -32872,18 +32881,19 @@ var radar_Radar = /** @class */ (function (_super) {
|
|
|
32872
32881
|
});
|
|
32873
32882
|
var axisLine = self.parent.select(".x-axes .x-axis-" + tools_Tools.kebabCase(datum));
|
|
32874
32883
|
var dots = self.parent.selectAll(".dots circle." + tools_Tools.kebabCase(datum));
|
|
32884
|
+
var activeDataGroupNames = self.model.getActiveDataGroupNames();
|
|
32885
|
+
var options = self.getOptions();
|
|
32886
|
+
var groupMapsTo = options.data.groupMapsTo;
|
|
32887
|
+
var valueMapsTo = tools_Tools.getProperty(options, 'radar', 'axes', 'value');
|
|
32875
32888
|
// Change style
|
|
32876
32889
|
axisLine
|
|
32877
32890
|
.classed('hovered', true)
|
|
32878
32891
|
.attr('stroke-dasharray', '4 4');
|
|
32879
32892
|
dots.classed('hovered', true)
|
|
32880
|
-
.attr('opacity', 1)
|
|
32893
|
+
.attr('opacity', function (d) { return activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1 ? 1 : 0; })
|
|
32881
32894
|
.attr('r', radar.dotsRadius);
|
|
32882
32895
|
// get the items that should be highlighted
|
|
32883
|
-
var itemsToHighlight = self.fullDataNormalized.filter(function (d) { return d[angle] === datum; });
|
|
32884
|
-
var options = self.getOptions();
|
|
32885
|
-
var groupMapsTo = options.data.groupMapsTo;
|
|
32886
|
-
var valueMapsTo = tools_Tools.getProperty(options, 'radar', 'axes', 'value');
|
|
32896
|
+
var itemsToHighlight = self.fullDataNormalized.filter(function (d) { return d[angle] === datum && activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1; });
|
|
32887
32897
|
// Show tooltip
|
|
32888
32898
|
self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
|
|
32889
32899
|
event: event,
|