This commit is contained in:
2024-01-05 10:49:25 +08:00
parent ae4e88b604
commit 9ce42195cc
5 changed files with 45 additions and 93 deletions

View File

@@ -105,8 +105,8 @@
</template>
<script>
// import { homepageDataLeft } from '@js/mork2.js'
import { homepageDataLeft } from '@js/getData2.js'
import { homepageDataLeft } from '@js/mork2.js'
// import { homepageDataLeft } from '@js/getData2.js'
import symbol1 from '@img/symbol_1.png'
import symbol2 from '@img/symbol_2.png'
import symbol3 from '@img/symbol_3.png'
@@ -648,22 +648,6 @@ export default {
let seriesData = []
this.inventory.forEach(r => {
seriesData.push(r)
seriesData.push({
name: '',
value: 5,
tooltip: { show: false },
itemStyle: {
label: {
show: false
},
labelLine: {
show: false
},
color: 'rgba(0, 0, 0, 0)',
borderColor: 'rgba(0, 0, 0, 0)',
borderWidth: 0
}
})
})
let option = {
color: ['#1980EA', '#67D470', '#B4C9EF', '#BCBF5C', '#EF5252', '#6d5edd', '#bf41bb'],
@@ -706,6 +690,10 @@ export default {
tooltip: {
show: false
},
itemStyle: {
borderColor: 'RGBA(27, 58, 98, .5)',
borderWidth: 2
},
label: {
show: false
},
@@ -750,7 +738,6 @@ export default {
barName.push(el.date)
barData1.push(el.press)
barData2.push(el.sort)
totalDate.push(total)
})
let option = {
grid: {
@@ -776,10 +763,10 @@ export default {
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(254,254,254,0.1)'
color: 'rgba(254,254,254,0)'
}, {
offset: 1,
color: 'rgba(254,254,254,0.8)'
color: 'rgba(254,254,254,0)'
}],
global: false
}
@@ -930,40 +917,11 @@ export default {
},
{
name: '阴影',
type: 'bar',
type: 'pictorialBar',
barWidth: '38px',
itemStyle: {
normal: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0.1,
color: 'rgba(254,254,254,0.1)'
},
{
offset: 1,
color: 'rgba(254,254,254,0.1)'
}
]
}
}
},
symbol: 'image://' + img.imgSrc3,
data: totalDate,
z: -1
// name: '阴影',
// type: 'pictorialBar',
// barWidth: '38px',
// symbol: 'image://' + img.imgSrc3,
// data: totalDate,
// itemStyle: {
// opacity: itemOpacity
// },
// z: -1
}
]
}
@@ -974,11 +932,23 @@ export default {
if (len === barName.length) {
len = 0
}
totalDate[len] = total
echart.setOption({
series: [{
data: barData1
}, {
data: barData2
}, {
data: totalDate
}
]
})
echart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: len
})
totalDate = []
len++
}, 2000)
window.addEventListener('resize', () => {