Toggle navigation
宠物产品消费归类
By
landerson
2017-02-13 11:37:38
脚本
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
图表已生成
整理代码
刷新
代码
//颜色:坐标柚,柱1,线1,柱/轴标文字 var colors = ['#6c6c6c', '#44b7d3', '#e42b6d', '#393939']; var fontFamilys = ['微软雅黑']; options = [{ backgroundColor: '#fff', title: { text: '宠物产品消费归类', x: 'center', textStyle: { fontSize: 14 } }, series: [{ type: 'pie', radius: [10, 80], label: { normal: { textStyle: { color: '#484848', fontSize: 12 }, formatter: function(param) { return param.name + ': \n' + param.value + '%'; } } }, color: ['#44b7d3', '#69b4c6', '#45fb9f', '#7cdcac', '#999795', '#e2503d', '#e06656'], data: [{ value: 22.02, name: '医疗' }, { value: 12.08, name: '保健品' }, { value: 10.04, name: '零食' }, { value: 7.57, name: '智能设备' }, { value: 5.8, name: '日用品' }, { value: 7.33, name: '其它服务' }, { value: 35.16, name: '主粮' }] }] }, { title: { text: '用户对智能用户的消费态度', x: 'center', textStyle: { fontSize: 14 } }, backgroundColor: '#fff', xAxis: [{ type: "category", splitLine: { show: false }, axisLabel: { interval: 0, show: true, textStyle: { fontFamily: fontFamilys[0], fontSize: 12 } }, axisLine: { lineStyle: { color: colors[0] } }, data: ['定位器', '玩具', '项圈', '监测器', '碗', '喂食器', '电子围栏'] }], yAxis: [{ type: 'category', data: ['没买过/\n不感兴趣', '已买过', '没买过/\n但感兴趣'], axisLine: { lineStyle: { color: colors[0] } }, }, { type: "value", splitLine: { show: false }, axisTick: { show: false }, axisLine: { show: false, }, axisLabel: { show: false, }, }], series: [{ name: "Y2", type: "bar", stack: "占比", barMaxWidth: 50, barGap: "10%", yAxisIndex: 1, itemStyle: { normal: { color: '#e06656', label: { show: true, textStyle: { color: '#000' }, position: "insideTop", formatter: function(p) { return p.value + '%'; } } } }, data: [ 15.5, 17.4, 30.9, 21.4, 29.3, 27.6, 39.8 ], }, { name: "Y1", type: "bar", stack: "占比", yAxisIndex: 1, itemStyle: { normal: { color: '#44b7d3', label: { show: true, textStyle: { color: '#000' }, position: "insideTop", formatter: function(p) { return p.value + '%'; } } } }, data: [ 14.8, 27.8, 15.2, 11.5, 17.5, 19.6, 10.5 ] }, { name: "Y0", type: "bar", stack: "占比", yAxisIndex: 1, itemStyle: { normal: { color: '#45fb9f', label: { show: true, textStyle: { color: '#000' }, position: "insideTop", formatter: function(p) { return p.value + '%'; } } } }, data: [ 69.7, 54.8, 53.9, 67.1, 53.2, 52.8, 49.7 ] }] }];