mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-10 10:16:50 +01:00
Chart area boxes receive 0 margin during the final layout process (#9915)
This commit is contained in:
@@ -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});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
35
test/fixtures/plugin.legend/legend-line-chart-area.json
vendored
Normal file
35
test/fixtures/plugin.legend/legend-line-chart-area.json
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
test/fixtures/plugin.legend/legend-line-chart-area.png
vendored
Normal file
BIN
test/fixtures/plugin.legend/legend-line-chart-area.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Reference in New Issue
Block a user