option2
2023-11-28 14:01:35
option = { tooltip : { show: true, trigger: 'item' }, legend: { data:['邮件营销','联盟广告','直接访问','搜索引擎'] }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']}, restore : {show: true}, saveAsImage : {show: true} } }, calculable : true, xAxis : [ { type : 'category', data : ['周一','周二','周三','周四','周五','周六','周日'] } ], yAxis : [ { type : 'value' } ], series : [ { name:'邮件营销', type:'bar', itemStyle: { // 系列级个性化样式,纵向渐变填充 normal: { barBorderColor:'red', barBorderWidth: 5, color : (function (){ var zrColor = require('zrender/tool/color'); return zrColor.getLinearGradient( 0, 400, 0, 300, [[0, 'green'],[1, 'yellow']] ) })() }, emphasis: { barBorderWidth: 5, barBorderColor:'green', color: (function (){ var zrColor = require('zrender/tool/color'); return zrColor.getLinearGradient( 0, 400, 0, 300, [[0, 'red'],[1, 'orange']] ) })(), label : { show : true, position : 'top', formatter : "{a} {b} {c}", textStyle : { color: 'blue' } } } }, data:[220, 232, 101, 234, 190, 330, 210] }, { name:'联盟广告', type:'bar', stack: '总量', data:[120, '-', 451, 134, 190, 230, 110] }, { name:'直接访问', type:'bar', stack: '总量', itemStyle: { // 系列级个性化 normal: { barBorderWidth: 6, barBorderColor:'tomato', color: 'red' }, emphasis: { barBorderColor:'red', color: 'blue' } }, data:[ 320, 332, 100, 334, { value: 390, symbolSize : 10, // 数据级个性化 itemStyle: { normal: { color :'lime' }, emphasis: { color: 'skyBlue' } } }, 330, 320 ] }, { name:'搜索引擎', type:'bar', barWidth: 40, // 系列级个性化,柱形宽度 itemStyle: { normal: { // 系列级个性化,横向渐变填充 borderRadius: 5, color : (function (){ var zrColor = require('zrender/tool/color'); return zrColor.getLinearGradient( 0, 0, 1000, 0, [[0, 'rgba(30,144,255,0.8)'],[1, 'rgba(138,43,226,0.8)']] ) })(), label : { show : true, textStyle : { fontSize : '20', fontFamily : '微软雅黑', fontWeight : 'bold' } } } }, data:[ 620, 732, { value: 701, itemStyle : { normal: {label : {position: 'inside'}}} }, 734, 890, 930, 820 ], markLine : { data : [ {type : 'average', name : '平均值'}, {type : 'max'}, {type : 'min'} ] } } ] };
最新文章
- Coding List
- Storm Windowing storm滑动窗口简介
- Unity 3D 正交相机(Orthographic)
- WPS添加页码不是从首页开始
- Delphi版本顺序
- [清理页面缓存]asp.net、html
- ArcGIS删除部分数据后全图范围不正确
- 转:Directshow开发的一些例子
- weblogic远程调试
- UEditor使用有感(黄色)
- http请求数据
- 1024: [SCOI2009]生日快乐 - BZOJ
- windows 2003 域控制器(AD)的常规命令行操作以及修复
- php socket客户端及服务器端应用实例
- struts-config.xml的配置
- 基于Spring的Appium配置应用
- (转)举例讲解JAVA中的堆和栈
- Beta冲刺第二天
- [IOI 2011]ricehub
- Python:Day43 抽屉