Toggle navigation
恒瑞医药近五年营业收入情况
By
2***5
2020-09-02 03:29:17
脚本
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
图表已生成
整理代码
刷新
代码
let defaultData = [8.09, 9.48, 11.67, 14.03, 16.12] let defaultData1 = [15.41, 18.71, 23.12, 28.78, 32.51] let defaultData2 = [22.85, 27.94, 35.13, 44.58] let defaultData3 = [30.24, 38.08, 45.97, 64.50] let titlename = ['2016', '2017', '2018', '2019', '2020']; option = { title: [{ text: '恒瑞医药近五年营业收入情况', left: 'center', textStyle: { color: '#FFFFFF', align: 'center', } }, { id: 'statistic', text: '单位:亿元', right: '0%', top: '9%', textStyle: { color: '#fff', fontSize: 11 } } ], grid: { // left: '50px', // 如果离左边太远就用这个...... // right: '70px', // bottom: '100px', // top: '90px', containLabel: true, }, backgroundColor: '#0A2E5D', tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, color: [ '#905a3d', '#2a5caa', '#1d953f', '#3bc7ff', ], legend: { left: 'right', top: 40, textStyle: { color: '#CACACA', fontSize: 15, }, icon: 'roundRect', data: ['一季报', '中报', '三季报', '年报'] }, xAxis: { axisLabel: { color: '#CACACA', fontSize: 20, interval: 0, rotate: 45 }, axisLine: { show: true, lineStyle: { color: `#AAAAAA` } }, type: 'category', data: titlename }, yAxis: { axisLabel: { color: '#CACACA', fontSize: 20, }, axisLine: { show: true, lineStyle: { color: `#AAAAAA` } }, type: 'value', }, series: [{ name: '一季报', type: 'bar', barWidth: 18, itemStyle: { normal: { barBorderRadius: 100, shadowColor: 'rgba(255, 255, 255, 1)', shadowBlur: 3, color: (params) => { const color = { type: 'linear', x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 1, color: '#FFAB0C', // 0% 处的颜色 }, { offset: 0, color: '#FCFFBA', // 100% 处的颜色 }], globalCoord: false, // 缺省为 false } return color }, }, }, data: defaultData }, { name: '中报', type: 'bar', barWidth: 18, itemStyle: { normal: { barBorderRadius: 100, shadowColor: 'rgba(255, 255, 255, 1)', shadowBlur: 3, color: (params) => { const color = { type: 'linear', x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 1, color: '#2a5caa', // 0% 处的颜色 }, { offset: 0, color: '#BAF7FF', // 100% 处的颜色 }], globalCoord: false, // 缺省为 false } return color }, }, }, data: defaultData1 }, { name: '三季报', type: 'bar', barWidth: 18, itemStyle: { normal: { barBorderRadius: 100, shadowColor: 'rgba(255, 255, 255, 1)', shadowBlur: 3, color: (params) => { const color = { type: 'linear', x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 1, color: '#1d953f', // 0% 处的颜色 }, { offset: 0, color: '#FCFFBA', // 100% 处的颜色 }], globalCoord: false, // 缺省为 false } return color }, }, }, data: defaultData2 }, { name: '年报', type: 'bar', barWidth: 18, itemStyle: { normal: { barBorderRadius: 100, shadowColor: 'rgba(255, 255, 255, 1)', shadowBlur: 3, color: (params) => { const color = { type: 'linear', x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 1, color: '#3bc7ff', // 0% 处的颜色 }, { offset: 0, color: '#BAF7FF', // 100% 处的颜色 }], globalCoord: false, // 缺省为 false } return color }, }, }, data: defaultData3 } ] };