echarts中 折线图中工具栏设置了却不显示
代码如下
option = {
title: {
text: title,
left:"center",
textStyle: {
color: color
}
},
toolbox: {
feature: {
restore: {},
saveAsImage: {},
dataView:{}
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
snap: true,
label: {
show: true,
textStyle: {
color: "#333"
}
}
},
showContent: true,
triggerOn: 'mousemove'
},
legend: {
left: defaults.legendLeft,
top: defaults.legendTop,
data: caseName,
backgroundColor: 'rgb(251,245,235)',
borderColor: '#d7c8a5',
borderWidth: '1',
width: "80%"
},
grid: {
show: true,
left: defaults.gridLeft,
top: defaults.gridTop,
bottom: defaults.gridBottom,
containLabel: true,
tooltip: {
trigger: "item"
},
backgroundColor: 'rgba(255,255,255,0.1)'
},
toolbox: {
show: false,
feature: {
saveAsImage: {}
}
},
yAxis: {
inverse: true,
axisLabel: {
interval: 0
},
type: 'category',
boundaryGap: true,
data: data.projectList,
axisLine: {
lineStyle: {
color: color
}
}
},
xAxis: {
type: 'value',
name:"单位:"+ unit,
nameLocation :"start",
splitLine:{
show:false
},
axisLine: {
lineStyle: {
color: color
}
},
position: "top"
},
series: series
};
在柱状图和其他图中都能够显示,在折线图中却不显示求解答