Chart area boxes receive 0 margin during the final layout process (#9915)

This commit is contained in:
Evert Timberg
2021-11-28 10:25:27 -05:00
committed by GitHub
parent bccb1276f0
commit 7cbc47becc
3 changed files with 36 additions and 1 deletions

View File

@@ -460,7 +460,7 @@ export default {
each(boxes.chartArea, (layout) => {
const box = layout.box;
Object.assign(box, chart.chartArea);
box.update(chartArea.w, chartArea.h);
box.update(chartArea.w, chartArea.h, {left: 0, top: 0, right: 0, bottom: 0});
});
}
};

View File

@@ -0,0 +1,35 @@
{
"config": {
"type": "line",
"data": {
"labels": ["A", "B", "C", "D", "E"],
"datasets": [{
"data": [10, 20, 30, 40, 50],
"backgroundColor": "#00ff00",
"borderWidth": 0,
"label": ""
}]
},
"options": {
"plugins": {
"legend": {
"position": "chartArea"
}
},
"scales": {
"x": {
"display": false
},
"y": {
"display": false
}
}
}
},
"options": {
"canvas": {
"height": 256,
"width": 512
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB