Toggle navigation
在武汉买房子有多贵?
By
鈾涒嚁Lmarly鈾
2018-01-19 04:03:51
脚本
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
图表已生成
整理代码
刷新
代码
app.title = '极坐标系下的堆叠柱状图'; var data = [ [4700, 8000, 6292.857], [9300,39000,25772.73], [9800, 15900,12800], [12000,35000,19941.67], [5500, 12000, 6850], [8300, 20000, 12278.57], [8000, 14000, 10263.1], [15500,36000,25936.67], [11000, 36000,17354.55], [6000, 13000, 8819.12], [9300, 27800,15725], [11000, 19000, 15003.33], [4000, 8000,5937.5], [5500, 20000, 12199.74], [12100, 25000,17755.88], [4700, 25000, 8170.588] ]; var cities = ['新洲区', '武昌区', '青山区', '硚口区', '鄂州', '经开区', '江夏区', '江汉区', '江岸区', '黄陂区', '洪山区', '汉阳区', '汉南区', '东西湖区', '东湖高新区', '蔡甸区']; var barHeight = 50; option = { title: { text: '在武汉买房子有多贵?', subtext: '各城区房价(数据来源:https://www.numbeo.com)' }, toolbox: { show: true, feature: { saveAsImage: { show:true, excludeComponents :['toolbox'], pixelRatio: 2 } } }, legend: { show: true, data: ['价格范围', '均值'] }, grid: { top: 100 }, angleAxis: { type: 'category', data: cities }, tooltip: { show: true, formatter: function (params) { var id = params.dataIndex; return cities[id] + '
最低:' + data[id][0] + '
最高:' + data[id][1] + '
平均:' + data[id][2]; } }, radiusAxis: { }, polar: { }, series: [{ type: 'bar', itemStyle: { normal: { color: 'transparent' } }, data: data.map(function (d) { return d[0]; }), coordinateSystem: 'polar', stack: '最大最小值', silent: true }, { type: 'bar', data: data.map(function (d) { return d[1] - d[0]; }), coordinateSystem: 'polar', name: '价格范围', stack: '最大最小值' }, { type: 'bar', itemStyle: { normal: { color: 'transparent' } }, data: data.map(function (d) { return d[2] - barHeight; }), coordinateSystem: 'polar', stack: '均值', silent: true, z: 10 }, { type: 'bar', data: data.map(function (d) { return barHeight * 2 }), coordinateSystem: 'polar', name: '均值', stack: '均值', barGap: '-100%', z: 10 }], legend: { show: true, data: ['A', 'B', 'C'] } };