Skip to content

Commit ae33b1e

Browse files
committed
Merge pull request #2343 from nnnick/fix/2152
Only update the size of boxes that are not full width
2 parents 83654fd + 38812cd commit ae33b1e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/core/core.layoutService.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ module.exports = function(Chart) {
5353
return box.options.position === "chartArea";
5454
});
5555

56-
function fullWidthSorter(a, b) {
57-
58-
}
59-
6056
// Ensure that full width boxes are at the very top / bottom
6157
topBoxes.sort(function(a, b) {
6258
return (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0);
@@ -253,11 +249,15 @@ module.exports = function(Chart) {
253249
});
254250

255251
helpers.each(topBoxes, function(box) {
256-
box.width = newMaxChartAreaWidth;
252+
if (!box.options.fullWidth) {
253+
box.width = newMaxChartAreaWidth;
254+
}
257255
});
258256

259257
helpers.each(bottomBoxes, function(box) {
260-
box.width = newMaxChartAreaWidth;
258+
if (!box.options.fullWidth) {
259+
box.width = newMaxChartAreaWidth;
260+
}
261261
});
262262

263263
maxChartAreaHeight = newMaxChartAreaHeight;

src/core/core.legend.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ module.exports = function(Chart) {
9999
this.afterUpdate();
100100

101101
return this.minSize;
102-
103102
},
104103
afterUpdate: helpers.noop,
105104

0 commit comments

Comments
 (0)