This commit is contained in:
landaiqing 2023-12-24 23:01:35 +08:00
parent b8a53d8d90
commit 29ba707cde

View File

@ -270,90 +270,78 @@ export default {
var myChart = this.$echarts.init( var myChart = this.$echarts.init(
document.getElementById('ManuEchart') document.getElementById('ManuEchart')
); );
var MyOption = { var option = {
tooltip: { tooltip: {
trigger: 'item', trigger: 'axis'
axisPointer: {
type: 'shadow'
}, },
dataZoom: [{ xAxis: [{
type: 'slider', //
show: true, // dataZoom
start: 0, // 0
end: 30, // 100
handleSize: 8, //
handleStyle: {
color: '#DCE2E8' //
},
xAxisIndex: [0], // x
filterMode: 'filter' // filter
}]
,
backgroundColor: '#fff', //
borderColor: '#000', //
borderWidth: 1, //
textStyle: { //
color: '#000',
fontSize: 12
}
},
xAxis: {
type: 'category', type: 'category',
data: xline, data: xline,
axisLine: { axisLine: {
show: true,
lineStyle: { lineStyle: {
color: '#76aaff', color: "#ffffff"
width: 2,
type: "solid"
} }
} }
}, }],
yAxis: { yAxis: [{
type: 'value', type: 'value',
splitNumber: 4,
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#76aaff', type: 'dashed',
color: '#DDD'
} }
}, },
axisLine: { axisLine: {
show: true, show: false,
lineStyle: { lineStyle: {
color: '#76aaff', color: "#ffffff"
width: 2, },
type: "solid" },
nameTextStyle: {
color: "#ffffff"
},
splitArea: {
show: false
} }
}, }],
axisLabel: {//y series: [{
textStyle: { name: '访问量',
color: '#76aaff',
margin: 15
},
// formatter: '{value} %'//y%
}
},
series: [
{
data: yline,
type: 'line', type: 'line',
label: {//
show: true, //
}
},
{
data: yline, data: yline,
type: 'bar' lineStyle: {
normal: {
width: 8,
color: {
type: 'linear',
colorStops: [{
offset: 0,
color: '#A9F387' // 0%
}, {
offset: 1,
color: '#48D8BF' // 100%
}],
globalCoord: false // false
}, },
], shadowColor: 'rgba(72,216,191, 0.3)',
dataZoom: { shadowBlur: 10,
yAxisIndex: [0], shadowOffsetY: 20
type: 'inside',
start: 0,
end: 100,
zoomLock: true,
} }
},
itemStyle: {
normal: {
color: '#fff',
borderWidth: 10,
/*shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 100,*/
borderColor: "#A9F387"
} }
myChart.setOption(MyOption, true); },
smooth: true
}]
};
myChart.setOption(option, true);
}, },
// //
GetNav(id) { GetNav(id) {