mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Dashboard - Add text color settings (#6950)
* Dashboard - Add text color setting
This commit is contained in:
@@ -124,7 +124,7 @@
|
||||
echo " '".$text['label-call_forward'].": ".$stats['call_forward']."',\n";
|
||||
}
|
||||
echo " '".$text['label-active'].": ".$stats['active']."',\n";
|
||||
echo " ],\n";
|
||||
echo " ],\n";
|
||||
echo " datasets: [{\n";
|
||||
echo " data: [\n";
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
echo " '".$stats['active']."',\n";
|
||||
echo " 0.00001,\n";
|
||||
echo " ],\n";
|
||||
echo " ],\n";
|
||||
echo " backgroundColor: [\n";
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " '".$_SESSION['dashboard']['call_forward_chart_color_do_not_disturb']['text']."',\n";
|
||||
@@ -154,31 +154,41 @@
|
||||
echo " ],\n";
|
||||
echo " borderColor: '".$_SESSION['dashboard']['call_forward_chart_border_color']['text']."',\n";
|
||||
echo " borderWidth: '".$_SESSION['dashboard']['call_forward_chart_border_width']['text']."',\n";
|
||||
echo " cutout: chart_cutout,\n";
|
||||
echo " }]\n";
|
||||
echo " },\n";
|
||||
echo " options: {\n";
|
||||
echo " responsive: true,\n";
|
||||
echo " maintainAspectRatio: false,\n";
|
||||
echo " plugins: {\n";
|
||||
echo " chart_counter: {\n";
|
||||
echo " chart_text: '".$stats['call_forward']."'\n";
|
||||
echo " chart_number: {\n";
|
||||
echo " text: '".$stats['call_forward']."'\n";
|
||||
echo " },\n";
|
||||
echo " legend: {\n";
|
||||
echo " display: true,\n";
|
||||
echo " position: 'right',\n";
|
||||
echo " reverse: true,\n";
|
||||
echo " labels: {\n";
|
||||
echo " usePointStyle: true,\n";
|
||||
echo " pointStyle: 'rect'\n";
|
||||
echo " pointStyle: 'rect',\n";
|
||||
echo " color: '".$dashboard_heading_text_color."'\n";
|
||||
echo " }\n";
|
||||
echo " },\n";
|
||||
echo " title: {\n";
|
||||
echo " display: true,\n";
|
||||
echo " text: '".$text['header-call_forward']."'\n";
|
||||
echo " text: '".$text['header-call_forward']."',\n";
|
||||
echo " color: '".$dashboard_heading_text_color."'\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " },\n";
|
||||
echo " plugins: [chart_counter],\n";
|
||||
echo " plugins: [{\n";
|
||||
echo " id: 'chart_number',\n";
|
||||
echo " beforeDraw(chart, args, options){\n";
|
||||
echo " const {ctx, chartArea: {top, right, bottom, left, width, height} } = chart;\n";
|
||||
echo " ctx.font = chart_text_size + 'px ' + chart_text_font;\n";
|
||||
echo " ctx.textBaseline = 'middle';\n";
|
||||
echo " ctx.textAlign = 'center';\n";
|
||||
echo " ctx.fillStyle = '".$dashboard_number_text_color."';\n";
|
||||
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
|
||||
echo " ctx.save();\n";
|
||||
echo " }\n";
|
||||
echo " }]\n";
|
||||
echo " }\n";
|
||||
echo " );\n";
|
||||
echo "</script>\n";
|
||||
|
||||
Reference in New Issue
Block a user