Update chart.js v3 to v4 (#6529)
* Update chart.min.js * Update missed_calls.php * Update recent_calls.php * Update system_counts.php * Update system_cpu_status.php * Update system_status.php * Update domain_limits.php * Update voicemails.php
This commit is contained in:
@@ -80,48 +80,42 @@
|
||||
//add doughnut chart
|
||||
?>
|
||||
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;'>
|
||||
<div style='width: 175px; height: 175px;'><canvas id='switch_status_chart'></canvas></div>
|
||||
<canvas id='switch_status_chart' width='175px' height='175px'></canvas>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var switch_status_chart_context = document.getElementById('switch_status_chart').getContext('2d');
|
||||
|
||||
const switch_status_chart_data = {
|
||||
datasets: [{
|
||||
data: ['<?php echo $registrations; ?>', 0.00001],
|
||||
backgroundColor: ['<?php echo $_SESSION['dashboard']['switch_status_chart_main_background_color']['text']; ?>',
|
||||
'<?php echo $_SESSION['dashboard']['switch_status_chart_sub_background_color']['text']; ?>'],
|
||||
borderColor: '<?php echo $_SESSION['dashboard']['switch_status_chart_border_color']['text']; ?>',
|
||||
borderWidth: '<?php echo $_SESSION['dashboard']['switch_status_chart_border_width']['text']; ?>',
|
||||
cutout: chart_cutout
|
||||
}]
|
||||
};
|
||||
|
||||
const switch_status_chart_config = {
|
||||
type: 'doughnut',
|
||||
data: switch_status_chart_data,
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
chart_counter: {
|
||||
chart_text: '<?php echo $registrations; ?>'
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: '<?php echo $text['label-switch_status']; ?>'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [chart_counter],
|
||||
};
|
||||
|
||||
const switch_status_chart = new Chart(
|
||||
switch_status_chart_context,
|
||||
switch_status_chart_config
|
||||
document.getElementById('switch_status_chart').getContext('2d'),
|
||||
{
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: ['<?php echo $registrations; ?>', 0.00001],
|
||||
backgroundColor: ['<?php echo $_SESSION['dashboard']['switch_status_chart_main_background_color']['text']; ?>',
|
||||
'<?php echo $_SESSION['dashboard']['switch_status_chart_sub_background_color']['text']; ?>'],
|
||||
borderColor: '<?php echo $_SESSION['dashboard']['switch_status_chart_border_color']['text']; ?>',
|
||||
borderWidth: '<?php echo $_SESSION['dashboard']['switch_status_chart_border_width']['text']; ?>',
|
||||
cutout: chart_cutout
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
chart_counter: {
|
||||
chart_text: '<?php echo $registrations; ?>'
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: '<?php echo $text['label-switch_status']; ?>'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [chart_counter],
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user