Toggle navigation
品类月度销售曲线
By
h***鸦
2021-02-20 08:36:11
脚本
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
图表已生成
整理代码
刷新
代码
option = { title: { text: '品类月度销售曲线', textStyle: { color: '#fff', fontSize: 18, }, x: 'center', }, tooltip: { trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow', // 默认为直线,可选为:'line' | 'shadow' }, }, grid: [{ x: '7%', y: '7%', height: '20%', left: '16%', top: '20%', right: '8%', }, { x: '7%', y2: '7%', height: '40%', left: '16%', right: '8%', bottom: '8%', }, ], xAxis: [{ show: false, type: 'category', gridIndex: 0, axisLabel: { color: '#fff', }, axisLine: { lineStyle: { color: '#fff', }, }, axisTick: { alignWithLabel: true, }, data: [ '2020年2月', '2020年3月', '2020年4月', '2020年5月', '2020年6月', '2020年7月', '2020年8月', '2020年9月', '2020年10月', '2020年11月', '2020年12月', '2021年1月', ], }, { type: 'category', gridIndex: 1, axisLabel: { color: '#fff', }, axisLine: { lineStyle: { color: '#fff', }, }, axisTick: { show: false, alignWithLabel: true, }, data: [ '2020年2月', '2020年3月', '2020年4月', '2020年5月', '2020年6月', '2020年7月', '2020年8月', '2020年9月', '2020年10月', '2020年11月', '2020年12月', '2021年1月', ], }, ], yAxis: [{ type: 'value', gridIndex: 1, name: '销售规模(亿)', nameLocation: 'center', nameRotate: 0, nameGap: 0, nameTextStyle: { color: '#fff', padding: [0, 0, 0, 0], // 四个数字分别为上右下左与原位置距离 }, axisLabel: { show: false, }, axisLine: { show: false, }, axisTick: { show: false, }, splitLine: { show: false, }, }, { type: 'value', gridIndex: 0, name: '销售额环比增速(%)', nameLocation: 'center', nameRotate: 0, nameGap: 0, nameTextStyle: { color: '#fff', padding: [0, 0, 0, 0], // 四个数字分别为上右下左与原位置距离 }, axisLabel: { show: false, }, axisLine: { show: false, }, axisTick: { show: false, }, splitLine: { show: false, }, }, ], series: [{ name: '销售额环比增速', xAxisIndex: 0, yAxisIndex: 1, type: 'line', barWidth: '60%', smooth: true, showSymbol: true, symbol: 'circle', //设定为实心点 symbolSize: 15, //设定实心点的大小 itemStyle: { normal: { color: "#00b8ee", //改变折线点的颜色 lineStyle: { color: "#0887ed", //改变折线颜色 }, label: { show: true, position: 'top', textStyle: { color: '#fff', }, formatter: function(p) { return `${p.value}%`; }, }, }, }, data: ['-', 64.9, -5.9, 19.6, 1.9, -19.8, 14.2, -18.7, -23.3, 86.1, -26.7, 6.6], }, { name: '销售规模', xAxisIndex: 1, yAxisIndex: 0, type: 'bar', barWidth: '60%', itemStyle: { normal: { label: { show: true, position: 'top', textStyle: { color: '#fff' }, formatter: function(p) { return `${p.value.toFixed(1)}`; }, } } }, data: [14.0, 23.1, 21.7, 26.0, 26.5, 21.2, 24.2, 19.7, 15.1, 28.1, 20.6, 22.0], }, ], };