update
This commit is contained in:
parent
b8a53d8d90
commit
29ba707cde
@ -270,90 +270,78 @@ export default {
|
||||
var myChart = this.$echarts.init(
|
||||
document.getElementById('ManuEchart')
|
||||
);
|
||||
var MyOption = {
|
||||
var option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
dataZoom: [{
|
||||
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
|
||||
}
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
data: xline,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#76aaff',
|
||||
width: 2,
|
||||
type: "solid"
|
||||
color: "#ffffff"
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
splitNumber: 4,
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#76aaff',
|
||||
type: 'dashed',
|
||||
color: '#DDD'
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: '#76aaff',
|
||||
width: 2,
|
||||
type: "solid"
|
||||
}
|
||||
},
|
||||
axisLabel: {//y轴文字的配置
|
||||
textStyle: {
|
||||
color: '#76aaff',
|
||||
margin: 15
|
||||
color: "#ffffff"
|
||||
},
|
||||
// formatter: '{value} %'//y轴的每一个刻度值后面加上‘%’号
|
||||
},
|
||||
nameTextStyle: {
|
||||
color: "#ffffff"
|
||||
},
|
||||
splitArea: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yline,
|
||||
type: 'line',
|
||||
label: {//文字的显示
|
||||
show: true, //默认 显示文字
|
||||
}],
|
||||
series: [{
|
||||
name: '访问量',
|
||||
type: 'line',
|
||||
data: yline,
|
||||
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)',
|
||||
shadowBlur: 10,
|
||||
shadowOffsetY: 20
|
||||
}
|
||||
},
|
||||
{
|
||||
data: yline,
|
||||
type: 'bar'
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#fff',
|
||||
borderWidth: 10,
|
||||
/*shadowColor: 'rgba(72,216,191, 0.3)',
|
||||
shadowBlur: 100,*/
|
||||
borderColor: "#A9F387"
|
||||
}
|
||||
},
|
||||
],
|
||||
dataZoom: {
|
||||
yAxisIndex: [0],
|
||||
type: 'inside',
|
||||
start: 0,
|
||||
end: 100,
|
||||
zoomLock: true,
|
||||
}
|
||||
}
|
||||
myChart.setOption(MyOption, true);
|
||||
smooth: true
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option, true);
|
||||
},
|
||||
// 获取标签对象
|
||||
GetNav(id) {
|
||||
|
Loading…
Reference in New Issue
Block a user