Toggle navigation
各区地方一般公共预算收入完成情况(总量)
By
xbdbdd
2018-06-21 03:02:42
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
option = { title : { text: '各区地方一般公共预算收入完成情况(总量)', textStyle:{ fontFamily:"楷体", fontSize:"21" }, "left": "center", subtext: '扯淡的事情一件接一件', sublink: 'http://fuck.com' }, tooltip : { trigger: 'axis', axisPointer: { type: 'none' } }, grid: [ {bottom: '55%'}, {top: '55%'} ], legend: { top:'8%', itemGap:1, itemWidth:50, right:'1%', orient:'vertical', data:['完成值','拼搏目标','预期目标'] }, toolbox: { show : true, feature : { dataView : {show: true, readOnly: false}, magicType : {show: true, type: ['line', 'bar']}, restore : {show: true}, saveAsImage : {show: true} } }, calculable : true, xAxis : [ { axisLabel: { interval: 0, formatter:function(value) { debugger var ret = "";//拼接加\n返回的类目项 var maxLength = 1;//每项显示文字个数 var valLength = value.length;//X轴类目项的文字个数 var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数 if (rowN > 1)//如果类目项的文字大于3, { for (var i = 0; i < rowN; i++) { var temp = "";//每次截取的字符串 var start = i * maxLength;//开始截取的位置 var end = start + maxLength;//结束截取的位置 //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧 temp = value.substring(start, end) + "\n"; ret += temp; //凭借最终的字符串 } return ret; } else { return value; } } } , type : 'category', data : ['临空港开发区(东西湖区)','江岸区','硚口区','汉阳区','武昌区','青山区','洪山区','蔡甸区','江夏区','黄陂区','新洲区','武汉经'] } ], yAxis : [ { splitLine:{show: false},//去除网格线 type : 'value', "name": "单位: 亿元", "nameTextStyle": { "color": "#7d838b" } } ], series : [ { name:'完成值', type:'bar', data:[46.78, 62.05, 25.87, 58.61, 26.86, 42.01, 12.85, 34.61, 32.61, 20.02, 69.39, 41.82], label: { show: true, position: 'top', distance:10, color:'#fff', backgroundColor:'auto', borderColor:'#2f4554', borderWidth:1, padding:[1,3,1,3], borderRadius:2 }, zlevel:1, stack:"总量", animation:false, barWidth:30, }, { name:'拼搏目标', type:'bar', label: { show: true, position: 'top', distance:10, color:'#fff', backgroundColor:'auto', borderColor:'#2f4554', borderWidth:1, padding:[1,3,1,3], borderRadius:2 }, zlevel:-1, barGap:'-50%', animation:false, barWidth:30, data:[116.42, 126.92, 229.01, 326.42, 428.73, 270.72, 275.61, 282.22, 248.72, 318.82, 186.01, 220.32], }, { name:'预期目标', label: { show: true, position: 'top', distance:10, color:'#fff', backgroundColor:'auto', borderColor:'#2f4554', borderWidth:1, padding:[1,3,1,3], borderRadius:2 }, type:'bar', data:[24.6, 22.9, 31.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 212.31], stack:"总量", } ] };