echarts中 折线图中工具栏设置了却不显示

学无止境之问道 2017-07-05 02:49:53
代码如下
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
};

在柱状图和其他图中都能够显示,在折线图中却不显示求解答
...全文
1935 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
三都呐 2019-12-27
  • 打赏
  • 举报
回复
如果把show改成true还不显示的话看看是不是没有引用toolbox
三都呐 2019-12-27
  • 打赏
  • 举报
回复 1
toolbox的show你设置成了false所以不显示吧

87,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧