Toggle navigation
grid-dotted-line
By
待***事
2020-10-23 01:43:46
脚本
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
图表已生成
整理代码
刷新
代码
/** @type {V2ViewType} */ var ctx = this||{}; var showData={ dataY:[20, 400, 1000, 1500, 2000], dataX:["7:00", "10:00", "12:00", "14:00", "16:00"], data: [920, 1101, 124, 1190, 1623, 1820], legend:'每小时客户数', danWei:'单位:户', name:"每小时客户数", } ctx.showData=ctx.showData||showData; var datax =ctx.showData.dataX; var datay =ctx.showData.dataY; var max = ctx.showData.maxValue; var min = ctx.showData.minValue; var splitNumber = ctx.showData.splitNumber; var data = ctx.showData.data; var legend = ctx.showData.legend; var danWei = ctx.showData.danWei; var name = ctx.showData.name; option = { // title: { // text: '堆叠区域图' // }, tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } }, legend: { data: [legend], // bottom: 10, itemHeight: 7, //修改icon图形大小 textStyle: { padding: [30, -350, 30, 10], fontSize: 14, fontWeight: 400, fontFamily: 'Microsoft YaHei', color: '#CCE6FF' } }, // toolbox: { // feature: { // saveAsImage: {} // } // }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: [ { type: 'category', boundaryGap: false, axisTick: { show: false }, axisLabel: { textStyle: { fontSize: 14, color: '#CCE6FF' }, // lineStyle:{ // color:'red' // } }, axisLine: { lineStyle: { color: '#CCE6FF', width: 2,//这里是为了突出显示加上的 } }, data: datax } ], yAxis: [ { // splitNumber:splitNumber, // max:max, // min:min, // show:false, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { textStyle: { fontSize: 14, color: '#CCE6FF' } }, name: danWei, nameTextStyle: { fontSize: 14, color: '#CCE6FF' }, splitLine: { // show:false, lineStyle: { type: 'dashed' } }, type: 'value', data: datay } ], series: [ { name: name, type: 'line', stack: '总量', areaStyle: {}, data: data, lineStyle: { normal: { color: '#FFE980',//折线的颜色 width: '2'//折线粗细 }, }, areaStyle: { normal: { //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上 color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(255,233,128,0.6)' }, { offset: 1, color: 'rgba(255,233,128,0.01)' }]) } }, itemStyle: { normal: { color: '#FFE980',//拐点颜色 borderColor: '#FFE980',//拐点边框颜色 borderWidth: 6//拐点边框大小 }, emphasis: { color: '#000000'//hover拐点颜色定义 } } }, ] }; // return option;