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:
snipe 2021-10-28 17:14:14 -07:00 committed by GitHub
commit 636dc6877b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -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