测试地址   https://gallery.echartsjs.com/editor.html?c=x6p5SsIEzt

var listN = '高温';
var unit = '°C'; //单位
var timeArray = ["20:00", "20:05", "20:10", "20:15", "20:20", "20:25", "20:30", "20:35", "20:40", "20:45", "20:50", "20:55", "21:00", "21:05", "21:10", "21:15", "21:20", "21:25", "21:30", "21:35", "21:40", "21:45", "21:50", "21:55", "22:00", "22:05", "22:10", "22:15", "22:20", "22:25", "22:30", "22:35", "22:40", "22:45", "22:50", "22:55", "23:00", "23:05", "23:10", "23:15", "23:20", "23:25", "23:30", "23:35", "23:40", "23:45", "23:50", "23:55", "00:00", "00:05", "00:10", "00:15", "00:20", "00:25", "00:30", "00:35", "00:40", "00:45", "00:50", "00:55", "01:00", "01:05", "01:10", "01:15", "01:20", "01:25", "01:30", "01:35", "01:40", "01:45", "01:50", "01:55", "02:00", "02:05", "02:10", "02:15", "02:20", "02:25", "02:30", "02:35", "02:40", "02:45", "02:50", "02:55", "03:00", "03:05", "03:10", "03:15", "03:20", "03:25", "03:30", "03:35", "03:40", "03:45", "03:50", "03:55", "04:00", "04:05", "04:10", "04:15"]; //时间
var dataArray = ["7.2", "7.6", "7.4", "7.1", "6.7", "6.4", "6.3", "6.3", "6.0", "6.0", "6.0", "6.0", "6.0", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.8", "6.7", "6.7", "6.6", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.5", "6.4", "6.4", "6.4", "6.4", "6.3", "6.0", "5.8", "5.5", "5.3", "5.1", "5.1", "5.1", "5.1", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.2", "5.3", "5.2", "4.9", "4.8", "4.4", "4.0", "3.9", "3.9", "3.9", "3.9", "3.9", "3.9", "3.5", "3.2", "2.9", "2.5", "2.1", "1.9", "1.8", "1.6", "1.5", "1.4", "1.4", "1.4", "1.4", "1.3", "1.1", "1.1", "1.0", "0.8", "0.5", "0.4", "0.4", "0.4", "0.4", "0.4", "0.6", "0.6", "0.6"]; //data option = {
backgroundColor: '#000',//背景颜色 title: {
left: 'center',
text: '工作机器人数',
textStyle: {
color: '#fff' //标题颜色
}
}, tooltip: {
trigger: 'axis',
formatter: ('{b}<br />{a}:{c}'+unit),
}, dataZoom: {
bottom: '0',
start: 10, //数据窗口范围的起始百分比
end: 30, //数据窗口范围的结束百分比
handleSize: "50%",
dataBackground: {
lineStyle: {
color: '#02C2FF'
},
areaStyle: {
color: 'rgba(2,194,255,1)'
}
},
borderColor: 'rgba(2,194,255,0.2)',
textStyle: {
color: '#02C2FF',
}
}, xAxis: [{
type: 'category',
boundaryGap: false, axisLine: {
show: true,
lineStyle: {
color: 'rgba(2,194,255,0.2)' //横坐标那一条线的颜色
},
}, axisLabel: {
textStyle: {
color: '#02C2FF', //横坐标 字段名的颜色
// color:"red",
fontSize: 12,
margin:15,
},
},
axisTick: { show: false,},
data: timeArray
}], yAxis: [{
type: 'value', splitLine: {
show: true,
lineStyle: {
color: 'rgba(2,194,255,0.2)', //横坐标 分割线颜色 }
}, axisLine: {show: false,},
axisLabel: {
margin:6,
textStyle: {
color: '#02C2FF'
},
formatter: ('{value} '+unit)
},
axisTick: { show: false,},
data:['0','4','8','12','16','20']
}], series: [{
name: listN,
type: 'line',
symbol:'circle',
symbolSize:4,
lineStyle: {
normal: {
opacity:0
}
}, itemStyle:{
color:'#FFFFFF'
}, areaStyle: { //区域填充样式
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(2,194,255,1)'}, //上边区域
{ offset: 0.7, color: 'rgba(2,194,255,0.6)'} //下边的区域
], false)
}
}, data: dataArray
}]
};

echarts-带面积的折线图的更多相关文章

  1. HighCharts之2D带Label的折线图

    HighCharts之2D带Label的折线图 1.HighCharts之2D带Label的折线图源码 LineLabel.html: <!DOCTYPE html> <html&g ...

  2. 解决echarts的叠堆折线图数据出现坐标和值对不上的问题

    原文:https://blog.csdn.net/qq_36538012/article/details/88889545 ------------------------------- 说一个小bu ...

  3. ECharts问题--柱状图和折线图中xAxis.data为空时报错问题解决

    1. 我们在日常的开发中使用Echarts时,不像在学习的过程中是自己在option中的配置项填写图表需要的参数,而是通过ajax请求后台,获取数据后,使用javascript来动态的修改数据,但是有 ...

  4. echarts双y轴折线图柱状图混合实时更新图

    先看下效果,自己用ps做了张gif图,发现很好玩啊..不喜勿喷 自己下载个echarts.min.js 直接上代码: <!DOCTYPE html><html><head ...

  5. echarts模拟highcharts实现折线图的虚实转换

    多的不说直接上代码: <html><html lang="en"><head> <meta charset="utf-8&quo ...

  6. HighCharts中的无主题的2D折线图

    HighCharts中的无主题的2D折线图 1.设计源码 <!DOCTYPE html> <html> <head> <meta charset=" ...

  7. HighCharts中的Ajax请求的2D折线图

    HighCharts中的Ajax请求的2D折线图 设计源码: <!DOCTYPE html> <html> <head> <meta charset=&quo ...

  8. 又快又好!巧用ChartJS打造你的实用折线图

    又快又好!巧用ChartJS打造你的实用折线图 最终效果 本示例利用官方示例改造而成,生成带图示的折线图,标出各折线的名称,可以筛选想要显示的折线. 要实现最终效果,我们要分三步走: 生成折线图: 生 ...

  9. 第四篇:R语言数据可视化之折线图、堆积图、堆积面积图

    折线图简介 折线图通常用来对两个连续变量的依存关系进行可视化,其中横轴很多时候是时间轴. 但横轴也不一定是连续型变量,可以是有序的离散型变量. 绘制基本折线图 本例选用如下测试数据集: 绘制方法是首先 ...

随机推荐

  1. django update_or_create

    update_or_create question.votes.update_or_create(user=request.user, defaults={"value": val ...

  2. Spring配置文件中的那些标签

    1. context:annotation-config 它的作用是隐式地向Spring容器注册AutowiredAnnotationBeanPostProcessor,CommonAnnotatio ...

  3. luoguP4585 [FJOI2015]火星商店问题

    题意 显然商店编号的限制能用可持久化trie解决. 特殊的商品预先判掉就好了,现在只考虑普通的商品. 发现商品的时间是单点,询问时一段时间,于是将询问区间在线段树上拆成\(log\)个区间,分别放上该 ...

  4. 安卓模拟器可访问电脑ip配置

    开发的时候,发现安卓模拟器没办法访问调用开发的接口,因为安卓模拟器没有绑定配置hosts,所以需要在模拟器上配置hosts 首先配置环境变量,用户变量的path和系统变量 我的路径 C:\Users\ ...

  5. JAVA基础系列:Object类

    1. 万物皆对象 1. JVM在编译源代码时,在遇到没有继承Object的对象的时候,编译器会默认指定一个默认的父类Object 2. Object 和接口的关系,接口是否继承Object?接口没有继 ...

  6. csps2019记

    Day0: 上午疯狂颓板子(树状数组,KMP)屁都没考,感觉海星. 上午坐大巴去了德州,中午和skyh凑钱吃饭(其实是我请他)rp++. 下午在火车上和侯神打扑克,拉火车之神Get. 到燕大试机,敲了 ...

  7. 十二、深入理解Java内存模型

    深入理解Java内存模型 [1]CPU和缓存的一致性 ​ 我们应该都知道,计算机在执行程序的时候,每条指令都是在CPU中执行的,而执行的时候,又免不了要和数据打交道.而计算机上面的数据,是存放在主存当 ...

  8. 【UOJ#62】【UR #5】怎样跑得更快(莫比乌斯反演)

    [UOJ#62][UR #5]怎样跑得更快(莫比乌斯反演) 题面 UOJ 题解 众所周知,\(lcm(i,j)=\frac{ij}{gcd(i,j)}\),于是原式就变成了: \[\sum_{j=1} ...

  9. Installing on Kubernetes with NATS Operator

    https://github.com/nats-io/nats-operator https://hub.helm.sh/charts/bitnami/nats https://github.com/ ...

  10. 使用AvalonEdit实现WPF的Lua编辑器

    原文发布于:https://www.chenxublog.com/2019/07/14/use-avalonedit-make-wpf-lua-editor.html 由于LLCOM里面内置了Lua代 ...