mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add chart variables (#6107)
This commit is contained in:
@@ -96,6 +96,29 @@
|
||||
//include chart.js
|
||||
echo "<script src='/resources/chartjs/chart.min.js'></script>";
|
||||
|
||||
//chart variables
|
||||
?>
|
||||
<script>
|
||||
var chart_font_family = 'Arial';
|
||||
var chart_font_size = '30';
|
||||
var chart_font_color = '#444';
|
||||
var chart_cutout = '75%';
|
||||
|
||||
const chart_counter = {
|
||||
id: 'chart_counter',
|
||||
beforeDraw(chart, args, options){
|
||||
const {ctx, chartArea: {top, right, bottom, left, width, height} } = chart;
|
||||
ctx.font = chart_font_size + 'px ' + chart_font_family;
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.fillStyle = chart_font_color;
|
||||
ctx.fillText(options.chart_text, width / 2, top + (height / 2));
|
||||
ctx.save();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<?php
|
||||
|
||||
//start the content
|
||||
/*
|
||||
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
||||
|
||||
Reference in New Issue
Block a user