Toggle navigation
折线图展示
By
s***c
2019-04-25 08:22:31
脚本
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 base = +new Date(1968, 9, 3); var oneDay = 24 * 3600 * 1000; var time = []; var xData= [Math.random() * 300]; var yData=[Math.random() * 300]; var zData=[Math.random() * 300]; for (var i = 1; i < 50000; i++) { var now = new Date(base += oneDay); time.push([now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/')); xData.push(Math.round((Math.random() - 0.5) * 20 + xData[i - 1])); yData.push(Math.round((Math.random() - 0.5) * 20 + yData[i - 1])); zData.push(Math.round((Math.random() - 0.5) * 20 + zData[i - 1])); } option = { tooltip: { trigger: 'axis', }, xAxis: [ { type : 'category', boundaryGap : false, axisLabel: { show: true, textStyle: { color: '#1ef7ff' } }, axisLine: { onZero: false, lineStyle: { color: { type: 'radial', x: 0.5, y: 0.5, r: 0.5, colorStops: [{ offset: 0, color: '#9D96F5' // 0% 处的颜色 }, { offset: 1, color: '#1FF1FE' // 100% 处的颜色 }], global: false // 缺省为 false }, width: 2 } }, data: time }, { gridIndex: 1, type : 'category', boundaryGap : false, axisLabel: { show: true, textStyle: { color: '#F4CBE4' } }, axisLine: { onZero: false, lineStyle: { width: 2, color: { type: 'radial', x: 0.5, y: 0.5, r: 0.5, colorStops: [{ offset: 0, color: '#FF1CC5' // 0% 处的颜色 }, { offset: 1, color: '#F4CBE4' // 100% 处的颜色 }], global: false // 缺省为 false } }, width: 2 }, data: time } ], yAxis:[{ name: '形变速率(mm/min)', nameTextStyle: { color: '#1ef7ff' }, type: 'value', boundaryGap: [0, '100%'], sampling: 'average', splitLine: { show: false }, inverse: false, splitArea: { show: false }, axisLine: { onZero: false, lineStyle: { width: 2, color: { type: 'radial', x: 0.5, y: 0.5, r: 0.5, colorStops: [{ offset: 0, color: '#9D96F5' // 0% 处的颜色 }, { offset: 1, color: '#1FF1FE' // 100% 处的颜色 }], global: false // 缺省为 false } } }, axisLabel: { show: true, textStyle: { color: '#1ef7ff' }, } }, { gridIndex: 1, name: '累计形变量(mm)', inverse: false, nameTextStyle: { color: '#ED8EEA' }, type: 'value', boundaryGap: [0, '100%'], sampling: 'average', splitLine: { show: false }, splitArea: { show: false }, axisLine: { onZero: false, lineStyle: { width: 2, color: { type: 'radial', x: 0.5, y: 0.5, r: 0.5, colorStops: [{ offset: 0, color: '#FF1CC5' // 0% 处的颜色 }, { offset: 1, color: '#F4CBE4' // 100% 处的颜色 }], global: false // 缺省为 false } } }, axisLabel: { show: true, textStyle: { color: '#F4CBE4' }, } }], dataZoom: [{ show: false, realtime: true, start: 0, end: 100, backgroundColor :'rgba(126, 224, 209, 0.5)', fillerColor: 'rgba(255,216,92,0.6)', borderColor: 'rgba(126, 224, 209, 0.75)', handleStyle: { color: '#23c2aa' }, textStyle:{color:'#FFD85C'}, right: '60', left: '80', height: '30px', xAxisIndex: [0, 1] }, { type: 'inside', realtime: true, start: 0, end: 100, xAxisIndex: [0, 1] }], grid: [{ left: 80, right: 60, height: '35%' }, { left: 80, right: 60, top: '55%', height: '35%' }], series: [ { name:'x方向的形变速率', type:'line', smooth:true, sampling: 'average', xAxisIndex: 0, yAxisIndex: 0, data: xData }, { name:'y方向的形变速率', type:'line', smooth:true, sampling: 'average', xAxisIndex: 0, yAxisIndex: 0, data: yData }, { name:'z方向的形变速率', type:'line', smooth:true, xAxisIndex: 0, yAxisIndex: 0, sampling: 'average', data: zData }, { name:'x方向的形变量值', type:'line', smooth:true, sampling: 'average', xAxisIndex: 1, yAxisIndex: 1, data: xData }, { name:'y方向的形变量值', type:'line', smooth:true, sampling: 'average', xAxisIndex: 1, yAxisIndex: 1, data: yData }, { name:'z方向的形变量值', type:'line', smooth:true, xAxisIndex: 1, yAxisIndex: 1, sampling: 'average', data: zData } ] };