This commit is contained in:
jhnine 2023-03-07 15:28:54 +08:00
parent bc86e00a5a
commit 805529ed94
4 changed files with 20 additions and 12 deletions

View File

@ -29,6 +29,7 @@ export default {
display: flex;
justify-content: space-between;
.img{
padding-left: 2%;
width: 25%;
}
.text{

View File

@ -99,7 +99,6 @@ export default {
fontFamily: 'Source Han Sans CN'
},
formatter: function(params) {
console.log(params)
switch (params) {
case '2023-04-30':
return params.slice(2).replaceAll('-', '/')
@ -192,6 +191,9 @@ export default {
animationEasing: 'backln'
}
option && this.myChart.setOption(option)
window.addEventListener('resize', function() {
this.myChart.resize()
})
}
}
}

View File

@ -37,9 +37,9 @@ export default {
clearInterval(this.timer)
const TempData = JSON.parse(JSON.stringify(newValue))
if (TempData.xData.length <= 5) {
this.barWidth = 40
this.barWidth = 30
} else {
this.barWidth = 25
this.barWidth = 15
}
Data.xData = TempData.xData
Data.used = TempData.used ? TempData.used : []
@ -104,7 +104,7 @@ export default {
},
padding: [10, 0, 0, 10] //
},
color: ['#1890ff', '#1ee7e7'],
color: ['rgba(135, 189, 245, 1)', 'rgba(62, 223, 252, 1)', 'rgba(5, 155, 252, 1)'],
tooltip: {
trigger: 'axis',
axisPointer: {
@ -122,7 +122,7 @@ export default {
},
grid: {
right: '1%',
bottom: '14%',
bottom: '13%',
top: '12%',
left: '15%'
},
@ -224,11 +224,11 @@ export default {
colorStops: [
{
offset: 0,
color: 'rgba(24, 144, 255,0.5)' // 0%
color: 'rgb(24, 144, 255)' // 0%
},
{
offset: 1,
color: 'rgb(24, 144, 255)' // 100%
color: 'rgba(24, 144, 255,0.5)' // 100%
}
],
global: false // false
@ -302,6 +302,10 @@ export default {
}
option && this.myChart.setOption(option)
window.addEventListener('resize', function() {
this.myChart.resize()
})
},
digit(val) {
let num = Math.trunc(val)

View File

@ -85,11 +85,12 @@ export default {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#283b56'
}
}
type: 'none',
show: false
},
backgroundColor: '#000033',
textStyle: { color: '#fff' },
borderWidth: 0
},
xAxis: {
type: 'category',