echarts链接:http://gallery.echartsjs.com/editor.html?c=xB1Sfo5JbX

代码:

var xData = ['a', 'b', 'c', 'd', 'e'];
var yData = [80, 87, 51, 81, 23];
option = {
backgroundColor: 'black',
color: ['#3398DB'],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
lineStyle: {
width: 5 //显示提示线
}
},
/* axisPointer: { //不显示提示线
type: 'line',//none
lineStyle: {
opacity: 0
}
},*/
formatter: function(prams) {
return "数量:" + prams[0].data
}
//formatter: "{a} <br/>{b} : {c} "
},
grid: {
left: '0%',
right: '0%',
bottom: '0%',
top: '7%',
containLabel: true,
z: 22
},
xAxis: [{
type: 'category',
gridIndex: 0,
data: xData,
axisTick: {
alignWithLabel: true
},
axisLine: {
lineStyle: {
color: 'white',
}
},
axisLabel: {
show: true,
color: 'white',
textStyle: {
fontSize: 18
}
}
}],
yAxis: [{
type: 'value',
gridIndex: 0,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'white',
}
},
axisLabel: {
color: 'white',
formatter: '{value}',
textStyle: {
fontSize: 18
}
}
}],
series: [{
name: '数量',
type: 'bar',
barWidth: '30%',
xAxisIndex: 0,
yAxisIndex: 0,
label: {
normal: {
show: true,
position: "top",
textStyle: {
color: "#ffc72b",
fontSize: 20
}
}
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{
offset: 0,
color: '#00feff'
},
{
offset: 0.5,
color: '#027eff'
},
{
offset: 1,
color: '#0286ff'
}
]
)
}
},
data: yData,
zlevel: 11 }, ]
};

最新文章

  1. 7-RandomAccessFile 随机流
  2. Camelot_floyd&amp;&amp;DP
  3. kettle插入/更新
  4. leanchat-android
  5. 机器学习&mdash;&mdash;Logistic回归
  6. java三种工厂模式
  7. frameset和iframe--框架对象及元素标签对象
  8. 使用for循环嵌套实现乘法口诀表
  9. 人工手动冷备不完全恢复介绍(purge表不完全恢复)
  10. WebStorm 自定义字体+颜色+语法高亮+导入导出用户设置
  11. OI黑科技:读入优化
  12. 安装Androidsdudio时
  13. linux服务器挂掉自动重启脚本(转)
  14. 办公室的远程传文件 的命令三种方式linux
  15. 修复PLSQL Developer 与 Office 2010的集成导出Excel 功能
  16. vue-8-组件
  17. MacBook如何用Parallels Desktop安装windows7/8
  18. csv到mysql数据库如何分割
  19. attempt to write a readonly database错误的解决(C#,SQLite)
  20. [错误记录_C] 还未给指针变量正确赋值的情况下,就使用它的值

热门文章

  1. 2018SDIBT_国庆个人第六场
  2. ACM__容器之vector
  3. YCSB性能测试工具使用(转)
  4. map和hasmap的区别
  5. C++随记
  6. [jQ/PHP]再谈使用JS数组储值的运用(提交PHP处理)
  7. Matlab实现单层感知机网络识别字母
  8. 关于 私有变量的访问问题【 java python]
  9. Oracle 监听器日志解析
  10. 安装 protoc 的各种坑