Toggle navigation
堆叠数据展示-总数处理
By
沉鱼落雁惹人爱
2018-07-19 04:14:41
脚本
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 a = '{"time":"2017年05月26日","lgName":["优酷","土豆","爱奇艺","搜狐","腾讯","乐视","芒果"],"caName":["俺爹是卧底","职场是个技术活","远征远征","卧底归来","龙珠传奇之无间道","人民的名义","思美人","白鹿原","择天记","欢乐颂2"],"data":[{"name":"优酷","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#e4393c"}},"data":[473.66,656.62,383.94,"--",4101.46,2409.66,"--","--",5465.73,"--"]},{"name":"土豆","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#ff8400"}},"data":["--","--","--","--","--","--","--","--","--","--"]},{"name":"爱奇艺","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#ffd200"}},"data":[1110.17,1209.75,1742.01,5560.04,"--",1676.52,3563.15,"--",15330.82,26753.6]},{"name":"搜狐","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#29c729"}},"data":[191.14,"--",261.51,"--","--",215.14,"--","--",1320.68,5324.97]},{"name":"腾讯","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#00eaff"}},"data":[1108.97,1834.5,1180.16,"--",3659.56,1293.18,2330.42,"--",14812.36,28405.5]},{"name":"乐视","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#1d9bff"}},"data":[449.26,"--",458.64,"--","--","--",9879.95,22748.74,14161.93,13779.83]},{"name":"芒果","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":false,"position":"insideRight"},"color":"#0866e5"}},"data":["--","--","--","--","--",4010.68,1140.1,"--",10740.1,"--"]},{"name":"总数","type":"bar","stack":"总量","itemStyle":{"normal":{"label":{"show":true,"position":"insideBottomLeft","textStyle":{"color":"#e4e4e4"}},"color":"#1D222A"}},"data":["3333.20","3700.87","4026.26","5560.04","7761.02","9605.18","16913.62","22748.74","61831.62","74263.90"]}],"max":74263}'; c = JSON.parse(a); console.log(c) option = { title: { text: c.time + "电视剧网络日播放量", x: "center", y: 20, textStyle: { color: "#d8d8d8", fontSize: 16, fontFamily: "Microsoft YaHei" } }, tooltip: { trigger: "axis", axisPointer: { type: "shadow" } }, toolbox: { show: !0, orient: "vertical", right: 5, itemSize: 22, feature: {} }, grid: { right: "15%", left: "16%", borderWidth: 0 }, legend: { data: c.lgName, y: "bottom", x: 80, textStyle: { color: "#e4e4e4", fontFamily: "Microsoft YaHei" } }, calculable: !1, backgroundColor: "#1D222A", xAxis: [{ type: "value", axisLine: { lineStyle: { color: "#4a4a4a", width: 1 } }, axisTick: { show: !0 }, name: "单位:万次", nameTextStyle: { color: "#e4e4e4" }, axisLabel: { textStyle: { color: "#e4e4e4", fontFamily: "Microsoft yahei" } }, max: c.max, splitArea: { show: !1 }, splitLine: { show: !1 } }], yAxis: [{ type: "category", axisLine: { lineStyle: { color: "#4a4a4a", width: 1 } }, axisLabel: { formatter: function(a) { for (i in a) return a.length > 5 ? a.substring(0, 4) + ".." : a }, textStyle: { color: "#e4e4e4", fontFamily: "Microsoft yahei" } }, axisTick: { show: !1 }, splitArea: { show: !1 }, splitLine: { show: !1 }, data: c.caName }], series: c.data, noDataLoadingOption: { text: "暂无数据", effect: "whirling" } }