@carbon/charts-vue 0.54.2 → 0.54.3
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 +8 -0
- package/charts-vue.common.js +17 -1
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +17 -1
- 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
|
@@ -9722,7 +9722,7 @@ var model_ChartModel = /** @class */ (function () {
|
|
|
9722
9722
|
};
|
|
9723
9723
|
ChartModel.prototype.getStackKeys = function (_a) {
|
|
9724
9724
|
var _this = this;
|
|
9725
|
-
var _b = _a.bins, bins =
|
|
9725
|
+
var _b = _a === void 0 ? { bins: null, groups: null } : _a, _c = _b.bins, bins = _c === void 0 ? null : _c, _d = _b.groups, groups = _d === void 0 ? null : _d;
|
|
9726
9726
|
var options = this.getOptions();
|
|
9727
9727
|
var displayData = this.getDisplayData(groups);
|
|
9728
9728
|
var stackKeys;
|
|
@@ -25991,6 +25991,7 @@ var bar_stacked_extends = (undefined && undefined.__extends) || (function () {
|
|
|
25991
25991
|
|
|
25992
25992
|
|
|
25993
25993
|
|
|
25994
|
+
|
|
25994
25995
|
// D3 Imports
|
|
25995
25996
|
|
|
25996
25997
|
var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
@@ -26222,6 +26223,21 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
|
26222
26223
|
});
|
|
26223
26224
|
});
|
|
26224
26225
|
};
|
|
26226
|
+
StackedBar.prototype.getBarWidth = function () {
|
|
26227
|
+
var options = this.getOptions();
|
|
26228
|
+
if (tools_Tools.getProperty(options, "bars", "width")) {
|
|
26229
|
+
return options.bars.width;
|
|
26230
|
+
}
|
|
26231
|
+
var mainXScale = this.services.cartesianScales.getMainXScale();
|
|
26232
|
+
var chartWidth = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
|
|
26233
|
+
useAttrs: true,
|
|
26234
|
+
}).width;
|
|
26235
|
+
var numberOfDomainValues = this.model.getStackKeys().length;
|
|
26236
|
+
if (!mainXScale.step) {
|
|
26237
|
+
return Math.min(options.bars.maxWidth, (chartWidth * 0.25) / numberOfDomainValues);
|
|
26238
|
+
}
|
|
26239
|
+
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
26240
|
+
};
|
|
26225
26241
|
StackedBar.prototype.destroy = function () {
|
|
26226
26242
|
// Remove event listeners
|
|
26227
26243
|
this.parent
|