@carbon/charts-vue 0.41.27 → 0.41.32
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 +14 -14
- package/charts-vue.common.js +60 -15
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +60 -15
- 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 +112 -110
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.41.
|
|
6
|
+
## [0.41.32](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.31...v0.41.32) (2021-02-12)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @carbon/charts-vue
|
|
9
9
|
|
|
@@ -11,46 +11,46 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [0.41.
|
|
14
|
+
## [0.41.31](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.30...v0.41.31) (2021-02-05)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
17
|
|
|
18
|
+
## [0.41.30](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.29...v0.41.30) (2021-02-01)
|
|
18
19
|
|
|
20
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [0.41.25](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.24...v0.41.25) (2021-01-18)
|
|
22
|
+
## [0.41.29](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.28...v0.41.29) (2021-01-29)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @carbon/charts-vue
|
|
25
25
|
|
|
26
|
+
## [0.41.28](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.27...v0.41.28) (2021-01-26)
|
|
26
27
|
|
|
28
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
27
29
|
|
|
30
|
+
## [0.41.27](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.26...v0.41.27) (2021-01-20)
|
|
28
31
|
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
29
33
|
|
|
30
|
-
## [0.41.
|
|
34
|
+
## [0.41.26](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.25...v0.41.26) (2021-01-19)
|
|
31
35
|
|
|
32
36
|
**Note:** Version bump only for package @carbon/charts-vue
|
|
33
37
|
|
|
38
|
+
## [0.41.25](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.24...v0.41.25) (2021-01-18)
|
|
34
39
|
|
|
40
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
35
41
|
|
|
42
|
+
## [0.41.24](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.23...v0.41.24) (2021-01-15)
|
|
36
43
|
|
|
44
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
37
45
|
|
|
38
46
|
## [0.41.23](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.22...v0.41.23) (2021-01-15)
|
|
39
47
|
|
|
40
48
|
**Note:** Version bump only for package @carbon/charts-vue
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
50
|
## [0.41.22](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.21...v0.41.22) (2021-01-15)
|
|
47
51
|
|
|
48
52
|
**Note:** Version bump only for package @carbon/charts-vue
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
54
|
## [0.41.21](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.20...v0.41.21) (2021-01-13)
|
|
55
55
|
|
|
56
56
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/charts-vue.common.js
CHANGED
|
@@ -7751,6 +7751,10 @@ var configuration_non_customizable_lines = {
|
|
|
7751
7751
|
unselected: 0.3,
|
|
7752
7752
|
selected: 1,
|
|
7753
7753
|
},
|
|
7754
|
+
weight: {
|
|
7755
|
+
selected: 2,
|
|
7756
|
+
unselected: 1,
|
|
7757
|
+
},
|
|
7754
7758
|
};
|
|
7755
7759
|
var meter = {
|
|
7756
7760
|
statusBar: {
|
|
@@ -8067,11 +8071,11 @@ var bubbleChart = tools_Tools.merge({}, axisChart, {
|
|
|
8067
8071
|
];
|
|
8068
8072
|
},
|
|
8069
8073
|
fillOpacity: 0.2,
|
|
8070
|
-
enabled: true
|
|
8074
|
+
enabled: true,
|
|
8071
8075
|
},
|
|
8072
8076
|
points: {
|
|
8073
|
-
filled: true
|
|
8074
|
-
}
|
|
8077
|
+
filled: true,
|
|
8078
|
+
},
|
|
8075
8079
|
});
|
|
8076
8080
|
/**
|
|
8077
8081
|
* options specific to pie charts
|
|
@@ -23129,7 +23133,7 @@ var area_Area = /** @class */ (function (_super) {
|
|
|
23129
23133
|
if (boundsEnabled) {
|
|
23130
23134
|
enteringAreas
|
|
23131
23135
|
.attr('fill-opacity', configuration_non_customizable_area.opacity.selected)
|
|
23132
|
-
.
|
|
23136
|
+
.style('stroke', function (group) {
|
|
23133
23137
|
return self.model.getStrokeColor(group.name);
|
|
23134
23138
|
})
|
|
23135
23139
|
.style('stroke-dasharray', '2, 2')
|
|
@@ -23247,7 +23251,7 @@ var area_stacked_StackedArea = /** @class */ (function (_super) {
|
|
|
23247
23251
|
originalClassName: 'area',
|
|
23248
23252
|
});
|
|
23249
23253
|
})
|
|
23250
|
-
.
|
|
23254
|
+
.style('fill', function (d) { return self.model.getFillColor(d[0][groupMapsTo]); })
|
|
23251
23255
|
.attr('role', Roles.GRAPHICS_SYMBOL)
|
|
23252
23256
|
.attr('aria-roledescription', 'area')
|
|
23253
23257
|
.transition(this.services.transitions.getTransition('area-update-enter', animate))
|
|
@@ -24258,9 +24262,11 @@ var scatter_Scatter = /** @class */ (function (_super) {
|
|
|
24258
24262
|
var domainIdentifier_1 = self.services.cartesianScales.getDomainIdentifier(datum);
|
|
24259
24263
|
hoveredElement
|
|
24260
24264
|
.classed('unfilled', !self.model.getIsFilled(datum[groupMapsTo], datum[domainIdentifier_1], datum, filled_1))
|
|
24261
|
-
.style(
|
|
24262
|
-
|
|
24263
|
-
|
|
24265
|
+
.style('fill', function (d) {
|
|
24266
|
+
return filled_1
|
|
24267
|
+
? self.model.getFillColor(d[groupMapsTo], d[domainIdentifier_1], d)
|
|
24268
|
+
: null;
|
|
24269
|
+
});
|
|
24264
24270
|
}
|
|
24265
24271
|
// Dispatch mouse event
|
|
24266
24272
|
self.services.events.dispatchEvent(Events.Scatter.SCATTER_MOUSEOUT, {
|
|
@@ -24570,6 +24576,25 @@ var lollipop_Lollipop = /** @class */ (function (_super) {
|
|
|
24570
24576
|
function Lollipop() {
|
|
24571
24577
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24572
24578
|
_this.type = 'lollipop';
|
|
24579
|
+
// on hover, bolden the line associated with the scatter
|
|
24580
|
+
_this.handleScatterOnHover = function (event) {
|
|
24581
|
+
var hoveredElement = event.detail;
|
|
24582
|
+
var options = _this.getOptions();
|
|
24583
|
+
var groupMapsTo = options.data.groupMapsTo;
|
|
24584
|
+
_this.parent.selectAll('line.line').attr('stroke-width', function (d) {
|
|
24585
|
+
if (d[groupMapsTo] !== hoveredElement.datum[groupMapsTo]) {
|
|
24586
|
+
return configuration_non_customizable_lines.weight.unselected;
|
|
24587
|
+
}
|
|
24588
|
+
// apply selected weight
|
|
24589
|
+
return configuration_non_customizable_lines.weight.selected;
|
|
24590
|
+
});
|
|
24591
|
+
};
|
|
24592
|
+
// on mouse out remove the stroke width assertion
|
|
24593
|
+
_this.handleScatterOnMouseOut = function (event) {
|
|
24594
|
+
_this.parent
|
|
24595
|
+
.selectAll('line.line')
|
|
24596
|
+
.attr('stroke-width', configuration_non_customizable_lines.weight.unselected);
|
|
24597
|
+
};
|
|
24573
24598
|
_this.handleLegendOnHover = function (event) {
|
|
24574
24599
|
var hoveredElement = event.detail.hoveredElement;
|
|
24575
24600
|
var options = _this.getOptions();
|
|
@@ -24632,7 +24657,7 @@ var lollipop_Lollipop = /** @class */ (function (_super) {
|
|
|
24632
24657
|
});
|
|
24633
24658
|
})
|
|
24634
24659
|
.transition(this.services.transitions.getTransition('lollipop-line-update-enter', animate))
|
|
24635
|
-
.
|
|
24660
|
+
.style('stroke', function (d) {
|
|
24636
24661
|
return _this.model.getFillColor(d[groupMapsTo], d[domainIdentifier], d);
|
|
24637
24662
|
})
|
|
24638
24663
|
.attr('opacity', 1);
|
|
@@ -24650,6 +24675,14 @@ var lollipop_Lollipop = /** @class */ (function (_super) {
|
|
|
24650
24675
|
.attr('y1', mainYScale.range()[0])
|
|
24651
24676
|
.attr('y2', function (d, i) { return getYValue(d, i) + options.points.radius; });
|
|
24652
24677
|
}
|
|
24678
|
+
this.addScatterPointEventListeners();
|
|
24679
|
+
};
|
|
24680
|
+
// listen for when individual datapoints are hovered
|
|
24681
|
+
Lollipop.prototype.addScatterPointEventListeners = function () {
|
|
24682
|
+
// Highlight correct line associated when hovering on a scatter point
|
|
24683
|
+
this.services.events.addEventListener(Events.Scatter.SCATTER_MOUSEOVER, this.handleScatterOnHover);
|
|
24684
|
+
// unbolden the line when not hovered on the lollipop scatter point
|
|
24685
|
+
this.services.events.addEventListener(Events.Scatter.SCATTER_MOUSEOUT, this.handleScatterOnMouseOut);
|
|
24653
24686
|
};
|
|
24654
24687
|
Lollipop.prototype.destroy = function () {
|
|
24655
24688
|
// Remove event listeners
|
|
@@ -24661,6 +24694,9 @@ var lollipop_Lollipop = /** @class */ (function (_super) {
|
|
|
24661
24694
|
var eventsFragment = this.services.events;
|
|
24662
24695
|
eventsFragment.removeEventListener(Events.Legend.ITEM_HOVER, this.handleLegendOnHover);
|
|
24663
24696
|
eventsFragment.removeEventListener(Events.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
|
|
24697
|
+
// remove scatter listeners
|
|
24698
|
+
eventsFragment.removeEventListener(Events.Scatter.SCATTER_MOUSEOVER, this.handleScatterOnHover);
|
|
24699
|
+
eventsFragment.removeEventListener(Events.Scatter.SCATTER_MOUSEOUT, this.handleScatterOnMouseOut);
|
|
24664
24700
|
};
|
|
24665
24701
|
return Lollipop;
|
|
24666
24702
|
}(scatter_Scatter));
|
|
@@ -25234,7 +25270,8 @@ var pie_Pie = /** @class */ (function (_super) {
|
|
|
25234
25270
|
var self = this;
|
|
25235
25271
|
var svg = this.getContainerSVG();
|
|
25236
25272
|
// remove any slices that are valued at 0 because they dont need to be rendered and will create extra padding
|
|
25237
|
-
var displayData = this.model
|
|
25273
|
+
var displayData = this.model
|
|
25274
|
+
.getDisplayData()
|
|
25238
25275
|
.filter(function (data) { return data.value > 0; });
|
|
25239
25276
|
var options = this.getOptions();
|
|
25240
25277
|
var groupMapsTo = options.data.groupMapsTo;
|
|
@@ -25728,8 +25765,9 @@ var gauge_Gauge = /** @class */ (function (_super) {
|
|
|
25728
25765
|
}
|
|
25729
25766
|
// Add the numbers at the center
|
|
25730
25767
|
var numbersGroup = dom_utils_DOMUtils.appendOrSelect(svg, 'g.gauge-numbers').attr('transform', "translate(0, " + numbersYPosition + ")");
|
|
25768
|
+
var fontSize = valueFontSize(radius);
|
|
25731
25769
|
// Add the big number
|
|
25732
|
-
var valueNumberGroup = dom_utils_DOMUtils.appendOrSelect(numbersGroup, 'g.gauge-value-number')
|
|
25770
|
+
var valueNumberGroup = dom_utils_DOMUtils.appendOrSelect(numbersGroup, 'g.gauge-value-number');
|
|
25733
25771
|
var numberFormatter = tools_Tools.getProperty(options, 'gauge', 'numberFormatter');
|
|
25734
25772
|
var valueNumber = valueNumberGroup
|
|
25735
25773
|
.selectAll('text.gauge-value-number')
|
|
@@ -25739,15 +25777,22 @@ var gauge_Gauge = /** @class */ (function (_super) {
|
|
|
25739
25777
|
.append('text')
|
|
25740
25778
|
.attr('class', 'gauge-value-number')
|
|
25741
25779
|
.merge(valueNumber)
|
|
25742
|
-
.style('font-size',
|
|
25780
|
+
.style('font-size', fontSize + "px")
|
|
25743
25781
|
.attr('text-anchor', 'middle')
|
|
25744
25782
|
.text(function (d) { return numberFormatter(d); });
|
|
25745
25783
|
// add the percentage symbol beside the valueNumber
|
|
25746
25784
|
var valueNumberWidth = dom_utils_DOMUtils.getSVGElementSize(dom_utils_DOMUtils.appendOrSelect(svg, 'text.gauge-value-number'), { useBBox: true }).width;
|
|
25747
|
-
|
|
25748
|
-
|
|
25785
|
+
var symbolFontSize = fontSize / 2;
|
|
25786
|
+
var symbol = dom_utils_DOMUtils.appendOrSelect(valueNumberGroup, 'text.gauge-value-symbol')
|
|
25787
|
+
.style('font-size', symbolFontSize + "px")
|
|
25749
25788
|
.attr('x', valueNumberWidth / 2)
|
|
25750
25789
|
.text('%');
|
|
25790
|
+
var _a = dom_utils_DOMUtils.getSVGElementSize(symbol, { useBBox: true }), symbolWidth = _a.width, symbolHeight = _a.height;
|
|
25791
|
+
// adjust the symbol to superscript using the bbox instead of the font-size cause
|
|
25792
|
+
// we want to align the actual character to the value number
|
|
25793
|
+
symbol.attr('y', "-" + symbolHeight / 2 + "px");
|
|
25794
|
+
// move the value group depending on the symbol's drawn size
|
|
25795
|
+
valueNumberGroup.attr('transform', "translate(-" + symbolWidth / 2 + ", 0)"); // Optical centering for the presence of the smaller % symbol
|
|
25751
25796
|
};
|
|
25752
25797
|
/**
|
|
25753
25798
|
* adds the delta number for the gauge
|
|
@@ -31135,7 +31180,7 @@ var zoom_bar_ZoomBar = /** @class */ (function (_super) {
|
|
|
31135
31180
|
initialZoomDomain: tools_Tools.merge([], newInitialZoomDomain),
|
|
31136
31181
|
zoomDomain: newInitialZoomDomain
|
|
31137
31182
|
? tools_Tools.merge([], newInitialZoomDomain)
|
|
31138
|
-
: defaultDomain
|
|
31183
|
+
: defaultDomain,
|
|
31139
31184
|
}, { skipUpdate: true });
|
|
31140
31185
|
}
|
|
31141
31186
|
this.xScale.range([axesLeftMargin, width]).domain(defaultDomain);
|