mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Merge pull request #2343 from nnnick/fix/2152
Only update the size of boxes that are not full width
This commit is contained in:
commit
ae33b1ee54
@ -53,10 +53,6 @@ module.exports = function(Chart) {
|
||||
return box.options.position === "chartArea";
|
||||
});
|
||||
|
||||
function fullWidthSorter(a, b) {
|
||||
|
||||
}
|
||||
|
||||
// Ensure that full width boxes are at the very top / bottom
|
||||
topBoxes.sort(function(a, b) {
|
||||
return (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0);
|
||||
@ -253,11 +249,15 @@ module.exports = function(Chart) {
|
||||
});
|
||||
|
||||
helpers.each(topBoxes, function(box) {
|
||||
box.width = newMaxChartAreaWidth;
|
||||
if (!box.options.fullWidth) {
|
||||
box.width = newMaxChartAreaWidth;
|
||||
}
|
||||
});
|
||||
|
||||
helpers.each(bottomBoxes, function(box) {
|
||||
box.width = newMaxChartAreaWidth;
|
||||
if (!box.options.fullWidth) {
|
||||
box.width = newMaxChartAreaWidth;
|
||||
}
|
||||
});
|
||||
|
||||
maxChartAreaHeight = newMaxChartAreaHeight;
|
||||
|
||||
@ -99,7 +99,6 @@ module.exports = function(Chart) {
|
||||
this.afterUpdate();
|
||||
|
||||
return this.minSize;
|
||||
|
||||
},
|
||||
afterUpdate: helpers.noop,
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user