Toggle navigation
2018年阅读“最XX”分析
By
j***g
2018-12-29 08:40:05
脚本
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 colors = [ "#2ec7c9", "#b6a2de", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d", "#dc69aa", "#07a2a4", "#9a7fd1", "#588dd5", "#f5994e", "#c05050", "#59678c", "#c9ab00", "#7eb00a", "#6f5553", "#c14089" ]; var bgColor = { type: 'radial', x: 0.5, y: 0.5, r: 0.7, colorStops: [{ offset: 0, color: '#b6a2de' // 0% 处的颜色 }, { offset: .4, color: '#9a7fd1' // 100% 处的颜色 }, { offset: 1, color: '#59678c' // 100% 处的颜色 }], globalCoord: false // 缺省为 false }; var titleFontSize = 18; var subTitleFontSize = 18; var textStyle = { fontSize: titleFontSize, align: 'center', fontStyle: 'bold', color: '#DDD', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, rich: { r: { //color: 'rgba(100,220,200,1)', color:colors[2], fontWeight: 'bold', fontSize: titleFontSize + 5, textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, }, } }; var subtextStyle = { fontSize: subTitleFontSize, color: '#DDD', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, fontWeight: 'bold', rich: { r: { //xcvvvvvvvcolor: 'rgba(100,220,200,1)', color:colors[2], fontWeight: 'bold', fontSize: subTitleFontSize + 3, textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, }, } }; options = [ ////// 作家 { backgroundColor: bgColor, title: { //text: '2018年阅读量统计', text: '2018年阅读“最XX”分析', subtext: '{r|东野圭吾}的小说读得最多', subtextStyle: subtextStyle, textStyle : { fontSize:23, //align: 'center', fontStyle: 'bold', textBorderWidth:5, textBorderColor:"#FFF", textShadowColor: 'rgba(0,0,0,0.5)', textShadowBlur: 5, textShadowOffsetX:1, textShadowOffsetY:1, }, left:'65', top:5, }, graphic: { zlevel:20, elements: [{ type: 'image', style: { image: "/asset/get/s/data-1513425570601-HyoscFffz.png", width: 60, height: 60 }, left: '5', top: '5' }] }, tooltip: { trigger: 'axis', formatter: '{a}:{c}本' }, grid: { top: '20%', left: '3%', right: '3%', bottom: '10%', show: false }, toolbox: { show: true, feature: { saveAsImage: { show: true } } }, calculable: true, yAxis: [{ position:'right', type: 'category', inverse:false, data: ['西蒙·普利德摩尔', '乔治.奥威尔', '周国平', '刘慈欣', '东野圭吾'], axisLabel: { fontSize: 18, color: '#FFF', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, interval: 0, show:false }, axisLine: { lineStyle: { color: '#FFF' } }, }], xAxis: [{ type: 'value', inverse:'true', //max: 12, axisLabel: { //fontSize: fontSize, show: false, }, axisLine: { show:false, }, }], series: [{ name: '每月', type: 'bar', //barWidth:'40%', data: [2,2,3, 3, 12], itemStyle: { normal: { color: function(params) { // build a color map as your need. return colors[params.dataIndex] }, shadowBlur: 5, shadowColor: 'rgba(0,0,0,0.3)', shadowOffsetX: 1, shadowOffsetY: 1, barWidth: 5, label: { fontSize: 18, color: '#FFF', show: true, position: 'insideRight', formatter: '{b} {c}本', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, textShadowOffsetY: 1, textShadowOffsetX: 1, } } }, }] }, ////// 国家 { backgroundColor: bgColor, title: { //text: '2018年阅读量统计', //text: '2018年阅读综合分析', subtext: '{r|日本}作家的书读得最多', subtextStyle: subtextStyle, textStyle : { fontSize:23, //align: 'center', fontStyle: 'bold', textBorderWidth:5, textBorderColor:"#FFF", textShadowColor: 'rgba(0,0,0,0.5)', textShadowBlur: 5, textShadowOffsetX:1, textShadowOffsetY:1, }, top:'2%' }, tooltip: { trigger: 'axis', formatter: '{a}:{c}本' }, grid: { top: '20%', left: '3%', right: '3%', bottom: '10%', show: false }, toolbox: { show: true, feature: { saveAsImage: { show: true } } }, calculable: true, yAxis: [{ type: 'category', data: ['台湾','英国','大陆', '美国', '日本'], axisLabel: { fontSize: 18, color: '#FFF', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, interval: 0, show:false }, }], xAxis: [{ type: 'value', //max: 12, axisLabel: { //fontSize: fontSize, show: false, }, axisLine: { show:false, }, }], series: [{ name: '每月', type: 'bar', //barWidth:'40%', data: [4, 10,14, 14,20], //barWidth: 20, itemStyle: { normal: { color: function(params) { // build a color map as your need. return colors[params.dataIndex] }, shadowBlur: 5, shadowColor: 'rgba(0,0,0,0.3)', shadowOffsetX: 1, shadowOffsetY: 1, label: { fontSize: 18, color: '#FFF', show: true, position: 'insideLeft', formatter: '{b} {c}本', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, textShadowOffsetY: 1, textShadowOffsetX: 1, } } }, }] }, ////// 最慢 { backgroundColor: bgColor, title: { //text: '2018年阅读量统计', //text: '2018年阅读综合分析', subtext: '{r|《三体》}读得最慢:{r|48}天', subtextStyle: subtextStyle, textStyle : { fontSize:23, //align: 'center', fontStyle: 'bold', textBorderWidth:5, textBorderColor:"#FFF", textShadowColor: 'rgba(0,0,0,0.5)', textShadowBlur: 5, textShadowOffsetX:1, textShadowOffsetY:1, }, top:'2%' }, tooltip: { trigger: 'axis', formatter: '{a}:{c}本' }, grid: { top: '20%', left: '3%', right: '3%', bottom: '10%', show: false }, toolbox: { show: true, feature: { saveAsImage: { show: true } } }, calculable: true, yAxis: [{ type: 'category', position:'right', data: ['禅与心理分析', '禅与摩托车修理艺术', '花园里的科学与艺术', '瓦尔登湖', '三体'], axisLabel: { show:false, fontSize: 18, color: '#FFF', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, interval: 0 }, axisLine: { lineStyle: { color: '#FFF' } }, }], xAxis: [{ type: 'value', inverse:'true', //max: 60, axisLabel: { //fontSize: fontSize, show: false, }, axisLine: { show:false, }, }], series: [{ name: '每月', type: 'bar', //barWidth:'40%', data:[12, 13, 15, 22, 48], itemStyle: { normal: { color: function(params) { // build a color map as your need. return colors[params.dataIndex] }, shadowBlur: 5, shadowColor: 'rgba(0,0,0,0.3)', shadowOffsetX: 1, shadowOffsetY: 1, barWidth: 5, label: { fontSize: 18, color: '#FFF', show: true, position: 'insideRight', formatter: '《{b}》{c}天', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, textShadowOffsetY: 1, textShadowOffsetX: 1, } } }, }] }, ////// 最快 { backgroundColor: bgColor, title: { //text: '2018年阅读量统计', //text: '2018年阅读综合分析', subtext: '{r|《京都山居生活》}读得最快:{r|半天}', subtextStyle: subtextStyle, textStyle : { fontSize:23, //align: 'center', fontStyle: 'bold', textBorderWidth:5, textBorderColor:"#FFF", textShadowColor: 'rgba(0,0,0,0.5)', textShadowBlur: 5, textShadowOffsetX:1, textShadowOffsetY:1, }, top:'2%' }, tooltip: { trigger: 'axis', formatter: '{a}:{c}本' }, grid: { top: '20%', left: '3%', right: '3%', bottom: '10%', show: false }, toolbox: { show: true, feature: { saveAsImage: { show: true } } }, calculable: true, yAxis: [{ type: 'category', data: ['京都山居生活', '塔莎的世界', '从小读到大', '去山里盖一座小屋吧', '隐居的愿望'], axisLabel: { fontSize: 18, color: '#FFF', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, interval: 0, show:false }, inverse:true }], xAxis: [{ type: 'value', //max: 12, axisLabel: { //fontSize: fontSize, show: false, }, axisLine: { show:false, }, }], series: [{ name: '每月', type: 'bar', //barWidth:'40%', data: [0.5, 0.6, 1, 1, 1], //barWidth: 20, itemStyle: { normal: { color: function(params) { // build a color map as your need. return colors[params.dataIndex] }, shadowBlur: 5, shadowColor: 'rgba(0,0,0,0.3)', shadowOffsetX: 1, shadowOffsetY: 1, label: { fontSize: 18, color: '#FFF', show: true, position: 'insideLeft', formatter: '《{b}》 {c}天', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, textShadowOffsetY: 1, textShadowOffsetX: 1, } } }, }] }, ////// 标签 { backgroundColor: bgColor, title: { //text: '2018年阅读量统计', //text: '2018年阅读综合分析', subtext: '涉及到{r|“爱”}的书最多{r|22}本', subtextStyle: subtextStyle, textStyle : { fontSize:23, //align: 'center', fontStyle: 'bold', textBorderWidth:5, textBorderColor:"#FFF", textShadowColor: 'rgba(0,0,0,0.5)', textShadowBlur: 5, textShadowOffsetX:1, textShadowOffsetY:1, }, top:'2%' }, tooltip: { trigger: 'axis', formatter: '{a}:{c}本' }, grid: { top: '20%', left: '3%', right: '3%', bottom: '10%', show: false }, toolbox: { show: true, feature: { saveAsImage: { show: true } } }, calculable: true, yAxis: [{ type: 'category', position:'right', data:['爱', '生活方式', '孤独', '教育', '艺术', '自然', '价值观', '哲学', '死亡', '隐居'], inverse:true, axisLabel: { show:false, fontSize: 18, color: '#FFF', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, interval: 0 }, axisLine: { lineStyle: { color: '#FFF' } }, }], xAxis: [{ type: 'value', inverse:'true', //max: 60, axisLabel: { //fontSize: fontSize, show: false, }, axisLine: { show:false, }, }], series: [{ name: '每月', type: 'bar', //barWidth:'40%', data:[22, 21, 20, 17, 16, 14, 14, 12, 11, 10], itemStyle: { normal: { color: function(params) { // build a color map as your need. return colors[params.dataIndex] }, shadowBlur: 5, shadowColor: 'rgba(0,0,0,0.3)', shadowOffsetX: 1, shadowOffsetY: 1, barWidth: 5, label: { fontSize: 18, color: '#FFF', show: true, position: 'insideRight', formatter: '“{b}”{c}本', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, textShadowOffsetY: 1, textShadowOffsetX: 1, } } }, }] }, ////// 被打标签最多的书 { backgroundColor: bgColor, title: { //text: '2018年阅读量统计', //text: '2018年阅读综合分析', subtext: '{r|《瓦尔登湖》}被打标签{r|63}次', subtextStyle: subtextStyle, textStyle : { fontSize:23, //align: 'center', fontStyle: 'bold', textBorderWidth:5, textBorderColor:"#FFF", textShadowColor: 'rgba(0,0,0,0.5)', textShadowBlur: 5, textShadowOffsetX:1, textShadowOffsetY:1, }, top:'2%' }, tooltip: { trigger: 'axis', formatter: '{a}:{c}本' }, grid: { top: '20%', left: '3%', right: '3%', bottom: '10%', show: false }, toolbox: { show: true, feature: { saveAsImage: { show: true } } }, calculable: true, yAxis: [{ type: 'category', data: ['瓦尔登湖', '月亮与六便士', '半农半X的生活', '不思八九 常想一二', '三体1', '三体3 死神永生', '塔莎的世界', '三体2 黑暗森林', '禅与摩托车修理艺术', '1984'], axisLabel: { fontSize: 18, color: '#FFF', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, interval: 0, show:false }, inverse:true }], xAxis: [{ type: 'value', //max: 12, axisLabel: { //fontSize: fontSize, show: false, }, axisLine: { show:false, }, }], series: [{ name: '每月', type: 'bar', //barWidth:'40%', data:[63, 31, 30, 30, 25, 24, 21, 21, 21, 19], //barWidth: 20, itemStyle: { normal: { color: function(params) { // build a color map as your need. return colors[params.dataIndex] }, shadowBlur: 5, shadowColor: 'rgba(0,0,0,0.3)', shadowOffsetX: 1, shadowOffsetY: 1, label: { fontSize: 18, color: '#FFF', show: true, position: 'insideLeft', formatter: '《{b}》 {c}次', textShadowColor: 'rgba(0,0,0,0.3)', textShadowBlur: 5, textShadowOffsetY: 1, textShadowOffsetX: 1, } } }, }] }, ];