mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -08:00
Merge pull request #10113 from Godmartinz/bug/sc-17129/v6-integration-pie-chart-disappears-if-you
Fixed #sc17129 - Pie chart disappears when window resizes
This commit is contained in:
commit
636dc6877b
Binary file not shown.
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
|
@ -424,7 +424,7 @@
|
||||||
var pieOptions = {
|
var pieOptions = {
|
||||||
legend: {
|
legend: {
|
||||||
position: 'top',
|
position: 'top',
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: true,
|
maintainAspectRatio: true,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -446,7 +446,13 @@
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
// window.location.reload(true);
|
// window.location.reload(true);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
var last = document.getElementById('statusPieChart').clientWidth;
|
||||||
|
addEventListener('resize', function() {
|
||||||
|
var current = document.getElementById('statusPieChart').clientWidth;
|
||||||
|
if (current != last) location.reload();
|
||||||
|
last = current;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
Loading…
Reference in a new issue