Przeglądaj źródła

调整统计图字体颜色大小

tags/6.2.8
叙述、别离 1 rok temu
rodzic
commit
0a05745087
1 zmienionych plików z 42 dodań i 40 usunięć
  1. +42
    -40
      src/admin/js/body.js

+ 42
- 40
src/admin/js/body.js Wyświetl plik

@@ -108,13 +108,13 @@ function LoadServer() {
}
Date.prototype.Format = function (fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
"M+" : this.getMonth() + 1, //月份
"d+" : this.getDate(), //日
"h+" : this.getHours(), //小时
"m+" : this.getMinutes(), //分
"s+" : this.getSeconds(), //秒
"q+" : Math.floor((this.getMonth() + 3) / 3), //季度
"S" : this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
@@ -167,6 +167,8 @@ function LoadStat() {
});
}
async function LoadStatChart() {
Chart.defaults.font.size = 14;
Chart.defaults.color = '#545b62';
const ctx = document.getElementById('statChart').getContext('2d');
let labels = [];
let dates = [];
@@ -193,46 +195,46 @@ async function LoadStatChart() {
});
}
const myChart = new Chart(ctx, {
type:'line',
options:{
responsive:true,
plugins:{
legend:{
position:'right',
type: 'line',
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
}
}
},
data:{
labels:labels,
datasets:[
data: {
labels: labels,
datasets: [
{
label:'PV',
data:pvs,
lineTension:.5,
borderColor:'rgba(54, 162, 235, 1)',
backgroundColor:'rgba(54, 162, 235, 0.2)',
borderWidth:2
label: 'PV',
data: pvs,
lineTension: .5,
borderColor: 'rgba(54, 162, 235, 1)',
backgroundColor: 'rgba(54, 162, 235, 0.2)',
borderWidth: 2
}, {
label:'UV',
data:uvs,
lineTension:.5,
borderColor:'rgba(255, 206, 86, 1)',
backgroundColor:'rgba(255, 206, 86, 0.2)',
borderWidth:2
label: 'UV',
data: uvs,
lineTension: .5,
borderColor: 'rgba(255, 206, 86, 1)',
backgroundColor: 'rgba(255, 206, 86, 0.2)',
borderWidth: 2
}, {
label:'IP',
data:ips,
lineTension:.5,
borderColor:'rgba(255, 99, 132, 1)',
backgroundColor:'rgba(255, 99, 132, 0.2)',
borderWidth:2
label: 'IP',
data: ips,
lineTension: .5,
borderColor: 'rgba(255, 99, 132, 1)',
backgroundColor: 'rgba(255, 99, 132, 0.2)',
borderWidth: 2
}, {
label:'VV',
data:vvs,
lineTension:.5,
borderColor:'rgba(75, 192, 192, 1)',
backgroundColor:'rgba(75, 192, 192, 0.2)',
borderWidth:2
label: 'VV',
data: vvs,
lineTension: .5,
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderWidth: 2
}
]
},


Ładowanie…
Anuluj
Zapisz