测试地址   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. 线段树set,add基础

    UVA11992 Fast Matrix Operations https://www.luogu.org/problem/UVA11992 此类模板题建议随便打打就行了233....

  2. 初学Python几个小程序练习

    使用格式化输出的三种方式实现以下输出(name换成自己的名字,既得修改身高体重,不要厚颜无耻) name = 'ABDMLBM' height = 175 weight = 140 # "M ...

  3. (转)cube-ui后编译

    转载地址:https://www.jianshu.com/p/189755f9ce43 1. 后编译介绍 目前大部分的前端项目开发都是使用es6+的代码并且使用babel进行编译,而传统的对代码包的引 ...

  4. Ubuntu环境下打开Firefox报错: Firefox is already running, but is not responding.

    在ubuntu下启动firefox可能会报错 Firefox is already running, but is not responding. To open a new window, you ...

  5. Python Dataframe 分组排序和 Modin

    Python Dataframe 分组排序和 Modin 1.按照其中一列进行排序 在dataframe中,按照其中的一列排序:比如q值倒排 (1)rank方法 data['new_rank'] = ...

  6. QDialog 设置成圆角

    void paintEvent(QPaintEvent *event) { Q_UNUSED(event); QBitmap bmp(this->size()); bmp.fill(); QPa ...

  7. spring cloud 与spring boot 版本不匹配引发的问题总结

    为了将前期项目慢慢转移到微服务上,今天开始搭建eureka服务时,出现以下错误: org.springframework.context.ApplicationContextException: Un ...

  8. Exercises for IN1900

    Exercises for IN1900October 14, 2019PrefaceThis document contains a number of programming exercises ...

  9. linux jconsole的远程配置--实测可用

    工作上,经常要对tomcat的java内存配置.tomcat线程池等进行调(luan)优(gao). jconsole 是一个最基础用到的jdk自带的JVM性能查看工具. 最近进行linux测试. 所 ...

  10. EF Core 根据已有的数据库来生成 EF 领域模型

    1. 如图: 2. 命令 <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrame ...