Toggle navigation
柱图文字回显
By
王***1
2019-06-29 09:49:19
脚本
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
图表已生成
整理代码
刷新
代码
var posList = [ 'left', 'right', 'top', 'bottom', 'inside', 'insideTop', 'insideLeft', 'insideRight', 'insideBottom', 'insideTopLeft', 'insideTopRight', 'insideBottomLeft', 'insideBottomRight' ]; app.configParameters = { rotate: { min: -90, max: 90 }, align: { options: { left: 'left', center: 'center', right: 'right' } }, verticalAlign: { options: { top: 'top', middle: 'middle', bottom: 'bottom' } }, position: { options: echarts.util.reduce(posList, function (map, pos) { map[pos] = pos; return map; }, {}) }, distance: { min: 0, max: 100 } }; app.config = { rotate: 90, align: 'left', verticalAlign: 'middle', position: 'insideBottom', distance: 15, onChange: function () { var labelOption = { normal: { rotate: app.config.rotate, align: app.config.align, verticalAlign: app.config.verticalAlign, position: app.config.position, distance: app.config.distance } }; myChart.setOption({ series: [{ label: labelOption }, { label: labelOption }, { label: labelOption }, { label: labelOption }] }); } }; var bw = ""; var labelOption = { normal: { show: true, position: app.config.position, distance: app.config.distance, align: app.config.align, verticalAlign: app.config.verticalAlign, rotate: app.config.rotate, formatter: function(params){ return params.name }, fontSize: 0, rich: { name: { textBorderColor: '#fff' } } } }; option = { color: ['#003366', '#006699', '#4cabce', '#e5323e'], tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { // data: ['Forest', 'Steppe', 'Desert', 'Wetland'] }, toolbox: { show: true, orient: 'vertical', left: 'right', top: 'center', 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', axisTick: {show: false}, data: ['001', '002', '003', '004', '005', '006', '007', '008'] } ], yAxis: [ { type: 'value' } ], series: [ { name: '001', type: 'bar', barGap: 0, barWidth:bw, itemStyle:{ color:'#003366' }, label: labelOption, data: [ {name:'社区办',value:538}, {name:'宣传部',value:5}, {name:'北京亦庄恒达人力资源服务中心',value:3}, {name:'拆迁办',value:15}, {name:'教科文体办',value:15}, {name:'党建办',value:4}, {name:'安全科',value:12}, {name:'工商所',value:9} ] }, { name: '002', type: 'bar', barGap: 0, barWidth:bw, itemStyle:{ color:"green" }, label: labelOption, data: [ {name:'民政',value:62}, null, {name:'劳动监察',value:34}, {name:'拆迁办',value:15}, {name:'食药所',value:15}, null, {name:'城管执法队',value:116}, {name:'经发办',value:19} ] }, { name: '003', type: 'bar', barGap: 0, barWidth:bw, itemStyle:{ color:"orange" }, label: labelOption, data: [ {name:'残联',value:6}, null, {name:'社保所',value:3}, null, {name:'镇教委',value:36}, null, {name:'规划科',value:102}, {name:'经管站',value:15} ] }, { name: '004', type: 'bar', barGap: 0, barWidth:bw, label: labelOption, data: [ null, null, {name:'水务站',value:1}, null, {name:'办公室',value:2}, null, {name:'环整办',value:43}, {name:'亦庄物业',value:3} ] }, { name: '005', type: 'bar', barGap: 0, barWidth:bw, label: labelOption, data: [ null, null, null, null, null, null, {name:'流管办',value:58}, null ] }, { name: '006', type: 'bar', barGap: 0, barWidth:bw, label: labelOption, data: [ null, null, null, null, null, null, {name:'司法所',value:3}, null ] }, { name: '007', type: 'bar', barGap: 0, barWidth:bw, label: labelOption, data: [ null, null, null, null, null, null, {name:'综治办',value:65}, null ] }, { name: '008', type: 'bar', barGap: 0, barWidth:bw, label: labelOption, data: [ null, null, null, null, null, null, null, null ] }, ] };