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 9 additions and 3 deletions

View file

@ -554,6 +554,7 @@ th.css-accessory > .th-inner::before {
.form-group.has-error label {
color: #a94442;
}
.select2-container--default .select2-selection--multiple {
border-radius: 0px;
}

View file

@ -20465,7 +20465,6 @@ th.css-accessory > .th-inner::before {
border-radius: 0px;
}
.select2-container {
box-sizing: border-box;
display: inline-block;

View file

@ -424,7 +424,7 @@
var pieOptions = {
legend: {
position: 'top',
responsive: true,
responsive: true,
maintainAspectRatio: true,
}
};
@ -446,7 +446,13 @@
},
error: function (data) {
// 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>
@endpush