|
@@ -65,11 +65,8 @@
|
|
|
data: [],
|
|
|
axisLabel: {
|
|
|
formatter: function(value) {
|
|
|
- const result = value.replaceAll('-', '').substring(0,
|
|
|
- 9);
|
|
|
- return result
|
|
|
+ return value.substring(0, 10).split('-').join('')
|
|
|
}
|
|
|
- // formatter: '{value}'
|
|
|
}
|
|
|
},
|
|
|
yAxis: {
|
|
@@ -86,17 +83,18 @@
|
|
|
lineStyle: {
|
|
|
type: 'dashed'
|
|
|
},
|
|
|
- label:{
|
|
|
- show:false
|
|
|
+ label: {
|
|
|
+ show: false
|
|
|
}
|
|
|
},
|
|
|
- backgroundColor: 'rgba(50,50,50,0.5)',
|
|
|
+ position: [0, 20],
|
|
|
formatter: function(params) {
|
|
|
+ console.log(params);
|
|
|
let result = ''
|
|
|
for (let i in params) {
|
|
|
if (i == 0) {
|
|
|
result += params[i].axisValueLabel
|
|
|
- .substring(9, 17)
|
|
|
+ .substring(11, 19)
|
|
|
}
|
|
|
let value = '--'
|
|
|
if (params[i].data !== null) {
|
|
@@ -105,6 +103,7 @@
|
|
|
result += '\n' + params[i].seriesName + ':' +
|
|
|
value
|
|
|
}
|
|
|
+ console.log(result);
|
|
|
return result
|
|
|
}
|
|
|
},
|
|
@@ -141,6 +140,8 @@
|
|
|
beforeSend: function(xhr) {
|
|
|
this.url =
|
|
|
`http://192.168.0.40:8081/chart/getChartById?id=${id}&startTime=${startTime}&endTime=${endTime}`
|
|
|
+ // this.url = window.location.origin +
|
|
|
+ // `/chart/getChartById?id=${id}&startTime=${startTime}&endTime=${endTime}`
|
|
|
xhr.setRequestHeader("Authorization", "Bearer " +
|
|
|
token);
|
|
|
xhr.setRequestHeader("token", token);
|