|
|
@ -60,6 +60,7 @@ export default { |
|
|
|
this.setOptions(this.chartData) |
|
|
|
}, |
|
|
|
setOptions({ returnData, borrowedData } = {}) { |
|
|
|
const time = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00', '24:00'] |
|
|
|
this.chart.setOption({ |
|
|
|
backgroundColor: '#010326', |
|
|
|
tooltip: { |
|
|
@ -86,25 +87,35 @@ export default { |
|
|
|
grid: { |
|
|
|
left: '2%', |
|
|
|
right: '4%', |
|
|
|
bottom: '0', |
|
|
|
bottom: '4%', |
|
|
|
containLabel: true |
|
|
|
}, |
|
|
|
xAxis: [{ |
|
|
|
type: 'category', |
|
|
|
boundaryGap: false, |
|
|
|
// 坐标轴轴线相关设置 |
|
|
|
data: time.map(function(item) { |
|
|
|
return item |
|
|
|
}), |
|
|
|
axisLabel: { |
|
|
|
interval: 5, |
|
|
|
formatter: function(value, idx) { |
|
|
|
return value |
|
|
|
}, |
|
|
|
color: '#fff' |
|
|
|
}, |
|
|
|
axisLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { |
|
|
|
width: '1', |
|
|
|
color: '#113D72', |
|
|
|
type: 'solid' |
|
|
|
} |
|
|
|
}, |
|
|
|
axisLabel: { |
|
|
|
color: '#fff' |
|
|
|
splitLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { |
|
|
|
color: '#333' |
|
|
|
} |
|
|
|
}, |
|
|
|
data: ['04:00', '08:00', '12:00', '16:00', '20:00', '24:00'] |
|
|
|
boundaryGap: false |
|
|
|
}], |
|
|
|
yAxis: [ |
|
|
|
{ |
|
|
|