🚀 基于 Echarts 实现可视化数据大屏响应式展示效果的源码,,基于html+css+javascript+echarts制作, 可以在此基础上重新开发。
本项目中使用的是echarts图表库,ECharts 提供了常规的折线图、柱状图、散点图、饼图、K线图,用于统计的盒形图,用于地理数据可视化的地图、热力图、线图,用于关系数据可视化的关系图、treemap、旭日图,多维数据可视化的平行坐标,还有用于 BI 的漏斗图,仪表盘,并且支持图与图之间的混搭。
⚽精彩专栏推荐👇🏻👇🏻👇🏻
❤ 【150套 HTML+ Echarts大数据可视化源码 】
ECharts是一个使用 JavaScript 实现的开源可视化库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖矢量图形库 ZRender,提供直观,交互丰富,可高度个性化定制的数据可视化图表。

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<script type="text/javascript" src="js/rem.js">script>
<link rel="stylesheet" href="css/style.css">
<title>大连市突发预警平台数据实时监控title>
<style type="text/css">
/*resize*/
.breathe-zct {
position: relative;
width: 20px;
height: 20px;
top: 2px;
float: left;
border: 1px solid #008000;
border-radius: 20px;
color: #fff;
font-size: 10px;
cursor: pointer;
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
overflow: hidden;
background-image: -webkit-gradient(linear, left top, left bottom, from(#00FF00), to(#00FF00));
background-image: -moz-linear-gradient(#00FF00, #00FF00);
}
.breathe-yct {
position: relative;
width: 20px;
height: 20px;
top: 2px;
float: left;
border: 1px solid #008000;
border-radius: 20px;
color: #fff;
font-size: 20px;
cursor: pointer;
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
overflow: hidden;
background-image: -webkit-gradient(linear, left top, left bottom, from(#FF0000), to(#FF0000));
background-image: -moz-linear-gradient(#FF0000, #FF0000);
}
.breathe-zc {
position: relative;
width: 20px;
height: 20px;
margin: 10px auto;
line-height: 40px;
border: 1px solid #008000;
border-radius: 10px;
color: #fff;
font-size: 20px;
text-align: center;
cursor: pointer;
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
overflow: hidden;
background-image: -webkit-gradient(linear, left top, left bottom, from(#00FF00), to(#00FF00));
background-image: -moz-linear-gradient(#00FF00, #00FF00);
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-name: breathe;
-webkit-animation-duration: 500ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation: ease-in-out breathe 500ms infinite alternate;
}
@keyframes breathe {
0% {
opacity: .2;
box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}
100% {
opacity: 1;
border: 1px solid rgba(59, 235, 235, 1);
box-shadow: 0 1px 30px rgba(59, 255, 255, 1);
}
}
@-webkit-keyframes breathe {
0% {
opacity: .2;
box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}
100% {
opacity: 1;
border: 1px solid rgba(59, 235, 235, 1);
box-shadow: 0 1px 30px rgba(59, 255, 255, 1);
}
}
.breathe-yc {
position: relative;
width: 20px;
height: 20px;
margin: 10px auto;
line-height: 40px;
border: 1px solid #008000;
border-radius: 10px;
color: #fff;
font-size: 20px;
text-align: center;
cursor: pointer;
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
overflow: hidden;
background-image: -webkit-gradient(linear, left top, left bottom, from(#FF0000), to(#FF0000));
background-image: -moz-linear-gradient(#FF0000, #FF0000);
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-name: breathe;
-webkit-animation-duration: 1000ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation: ease-in-out breathe 100ms infinite alternate;
}
@keyframes breathe {
0% {
opacity: .2;
box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}
100% {
opacity: 1;
border: 1px solid rgba(59, 235, 235, 1);
box-shadow: 0 1px 30px rgba(59, 255, 255, 1);
}
}
@-webkit-keyframes breathe {
0% {
opacity: .2;
box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}
100% {
opacity: 1;
border: 1px solid rgba(59, 235, 235, 1);
box-shadow: 0 1px 30px rgba(59, 255, 255, 1);
}
}
style>
head>
<body style="visibility: hidden;">
<div class="container-flex" tabindex="0" hidefocus="true">
<div class="box-left">
<div class="left-top">
<div class="current-num">
<table class="table3" style="border:0px; width:96%">
<thead>
<tr>
<th>
<h6 style="font-size:0.2rem;color: #cdddf7;">渠道状态h6>
th>
<th style="text-align:left;">
<div class="breathe-zct">div> 正常th>
<th style="text-align:left">
<div class="breathe-yct">div> 异常th>
tr>
thead>
<tbody style="border:0px;">
<tr style="border:0px;">
<td style="border:0px;">
<div id="dx" class="breathe-zc">div>
td>
<td style="border:0px;">
<div id="cz" class="breathe-zc">
td>
<td style="border:0px;">
<div id="dmt" class="breathe-yc">
td>
tr>
<tr style="border:0px;">
<td style="border:0px;">短信渠道td>
<td style="border:0px;">传真td>
<td style="border:0px;">多媒体td>
tr>
tbody>
table>
div>
div>
<div class="left-center">
<div class="title-box">
<h6>按渠道发布预警统计h6>
div>
<div class="chart-box pie-chart" style="top:0px;">
<div id="qdtj" style="width:100%;">div>
div>
div>
<div class="left-bottom" class="select">
<div class="title-box">
<h6>按级别发布预警统计h6>
div>
<div class="chart-box pie-chart" style="top:0px;">
<div id="jbtj" style="width:100%;">div>
div>
div>
div>
<div class="box-center">
<div class="center-top">
<h1 style="margin-top:15px">市突发预警平台实时监控h1>
div>
<div class="center-center">
<div class="weather-box">
<div class="data">
<p class="time" id="time">00:00:00p>
<p id="date">p>
div>
<div>
<div>
<p style="font-size:18px;color:#cdddf7">当前有效预警p>
<p class="ss" style="font-size:18px;color:#cc4125;text-align:center"><span id="youxiao">22span>(条)p>
div>
div>
div>
<img src="images/line_bg.png" alt="">
<div class="select-box" style="height: 0.3rem;top:-11px;">
<div data-type="2">
<div class="select" tabindex="0" hidefocus="true" style="width: 100%;">
<p style="color:#DEA919;font-weight:bold;font-size:16px;">市局发布的预警:<span>3289span>(条)p>
<p style="color:#96E114;font-weight:bold;font-size:16px;padding-top:3px">区县发布的预警:<span> 5690span>(条)p>
<p style="color:#6099cc;font-weight:bold;font-size:16px;padding-top:3px">其它委办局(含通知): <span>456span>(条)p>
div>
div>
div>
div>
<div class="center-bottom">
<div class="chart-box" style="margin-top:0px">
<div class="map_wk">
<div class="center_map_zhs"><img src="images/11B063.png" />div>
<div class="center_map_pld"><img src="images/11B063.png" />div>
<div class="center_map_wfd"><img src="images/11B063.png" />div>
<div class="clear">div>
div>
div>
div>
<div class="center-bottom-two">
<div class="chart-box pie-chart" style="top:8px;">
<div id="areatj" style="width:100%;">div>
div>
div>
div>
<div class="box-right">
<div class="right-top">
<div class="title-box">
<h6 id="barTitle">最新发布预警h6>
div>
<div class="data-box" style="padding:15px ;">
<table class="table1" style="border:0px;width:100%">
<tbody>
<tr class="bg-color">
<td style="text-align:center"><img src="images/test.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data9">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr>
<td style="text-align:center"><img src="images/1.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data4">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr class="bg-color">
<td style="text-align:center"><img src="images/2.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data9">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr>
<td style="text-align:center"><img src="images/6.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data4">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr class="bg-color">
<td style="text-align:center"><img src="images/4.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data9">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr>
<td style="text-align:center"><img src="images/5.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data4">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr class="bg-color">
<td style="text-align:center"><img src="images/6.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data9">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr>
<td style="text-align:center"><img src="images/1.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data4">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr class="bg-color">
<td style="text-align:center"><img src="images/2.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data9">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr>
<td style="text-align:center"><img src="images/6.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data4">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
<tr class="bg-color">
<td style="text-align:center"><img src="images/4.jpg" style="width:45px;height:0.4rem;">td>
<td colspan="3" class="table-data dph-data9">金普新区气象台2019年04月09日15时50分发布大风蓝色预警信号td>
tr>
tbody>
table>
div>
<div class="right-bottom">
<div class="title-box">
<p id="switchBtn"><span class="active" data-dataType="income">本月发布预警统计span>p>
div>
<div id="line_time" style="width:90%;height:160px;margin-left:10px;">div>
div>
div>
div>
body>
<script type="text/javascript" src="js/jquery-3.3.1.min.js">script>
<script type="text/javascript" src="js/layer/layer.min.js">script>
<script type="text/javascript" src="js/layer/laydate/laydate.js">script>
<script type="text/javascript" src="js/echarts.min.js">script>
<script type="text/javascript" src="js/china.js">script>
<script type="text/javascript" src="js/infographic.js">script>
<script type="text/javascript" src="js/macarons.js">script>
<script type="text/javascript" src="js/shine.js">script>
<script type="text/javascript" src="js/base.js">script>
<script type="text/javascript">
$('document').ready(function() {
$("body").css('visibility', 'visible');
var localData = [$('#teacher').val(), $('#start').val() + '/' + $('#end').val(), $('#leader').val()]
localStorage.setItem("data", localData);
//设置渠道状态
qdzt();
})
//设置渠道状态
function qdzt() {
//breathe-zc 绿灯;breathe-yc 红灯
$("#dx").removeClass("breathe-yc");
$("#dx").addClass("breathe-zc");
$("#cz").removeClass("breathe-zc");
$("#cz").addClass("breathe-yc");
$("#dmt").removeClass("breathe-yc");
$("#dmt").addClass("breathe-zc");
}
script>
html>
input,
button,
textarea,
select,
optgroup,
option {
font-family: inherit;
font-size: inherit;
font-style: inherit;
font-weight: inherit;
outline: 0;
}
pre {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
/** æ»šåŠ¨æ¡ **/
::-webkit-scrollbar {
width: 5px;
height: 10px;
}
::-webkit-scrollbar-button:vertical {
display: none;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
background-color: rgba(14, 148, 234, 0.2);
}
::-webkit-scrollbar-thumb {
border-radius: 0;
background-color: rgba(0, 0, 0, .3);
}
::-webkit-scrollbar-thumb:vertical:hover {
background-color: rgba(0, 0, 0, .35);
}
::-webkit-scrollbar-thumb:vertical:active {
background-color: rgba(0, 0, 0, .38);
}
/*下拉框*/
.select {
width: 2.1rem;
height: 0.8rem;
position: relative;
font-size: 0.18rem;
color: #cdddf7;
outline: none;
}
.select p {}
.select-div {
box-sizing: border-box;
width: 1.6rem;
height: 0.4rem;
line-height: 0.4rem;
border: 1px solid #0E94EA;
background: url(../images/arrow.png) 95% center no-repeat;
padding-left: 10px;
cursor: default;
position: absolute;
top: 0;
left: 0;
color: #cdddf7;
}
.select-ul {
position: absolute;
width: 1.6rem;
top: 0.5rem;
left: 0;
z-index: 10;
display: none;
}
.select-ul.company {
height: 1.2rem;
overflow-y: auto;
}
.select-ul>li {
height: 0.4rem;
line-height: 0.4rem;
padding-left: 10px;
box-sizing: border-box;
background-color: rgba(14, 148, 234, 0.2);
cursor: default;
color: #cdddf7;
}
.select-ul>li.active,
.select-ul>li:hover {
color: white;
background: #0e94eb;
}
.select-ul>li {
width: 1.6rem;
}
.data-box {
width: 4.9rem;
margin: auto;
top: 0.42rem;
bottom: 0;
left: 0;
right: 0;
}
.chart-box {
position: absolute;
top: 0.42rem;
bottom: 0;
width: 90%;
margin: auto;
left: 0;
right: 0;
height: auto;
}
.container-flex {
width: 100%;
height: 100%;
background: url(../images/index_bg.png) left top no-repeat;
background-size: 100% 100%;
display: flex;
flex-flow: row nowrap;
justify-content: center;
outline: none;
}
.box-left {
width: 28%;
height: 100%;
background: url(../images/line_img.png) top right repeat-y;
}
.left-top {
width: 100%;
height: 20.4%;
position: relative;
}
.left-top>.current-num {
width: 4.9rem;
height: 1.8rem;
position: absolute;
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: url(../images/border_bg01.png) top left no-repeat;
background-size: 100% 100%;
}
.current-num>div {
width: 100%;
height: 0.8rem;
line-height: 0.8rem;
text-align: center;
background: url(../images/title_bg01.png) center center no-repeat;
font-size: 0.2rem;
color: #0e94ea;
background-size: 1.8rem 0.25rem;
font-weight: 900;
}
.current-num>p {
font-size: 0.46rem;
text-align: center;
color: white;
}
.left-center {
width: 100%;
height: 37%;
position: relative;
}
.pie-chart>div {
float: left;
width: 50%;
height: 100%;
position: relative;
}
.pie-data {
height: 2.25rem;
position: absolute;
margin: auto;
top: 0;
left: 0;
width: 100%;
bottom: 0;
display: flex;
align-items: center;
flex-flow: row wrap;
overflow-y: auto;
padding-right: 5px;
}
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
}
}(this, function(exports, echarts) {
var log = function(msg) {
if (typeof console !== 'undefined') {
console && console.error && console.error(msg);
}
};
if (!echarts) {
log('ECharts is not Loaded');
return;
}
var colorPalette = [
'#C1232B', '#27727B', '#FCCE10', '#E87C25', '#B5C334',
'#FE8463', '#9BCA63', '#FAD860', '#F3A43B', '#60C0DD',
'#D7504B', '#C6E579', '#F4E001', '#F0805A', '#26C0C0'
];
var theme = {
color: colorPalette,
title: {
textStyle: {
fontWeight: 'normal',
color: '#27727B'
}
},
visualMap: {
color: ['#C1232B', '#FCCE10']
},
toolbox: {
iconStyle: {
normal: {
borderColor: colorPalette[0]
}
}
},
tooltip: {
backgroundColor: 'rgba(50,50,50,0.5)',
axisPointer: {
type: 'line',
lineStyle: {
color: '#27727B',
type: 'dashed'
},
crossStyle: {
color: '#27727B'
},
shadowStyle: {
color: 'rgba(200,200,200,0.3)'
}
}
},
dataZoom: {
dataBackgroundColor: 'rgba(181,195,52,0.3)',
fillerColor: 'rgba(181,195,52,0.2)',
handleColor: '#27727B'
},
categoryAxis: {
axisLine: {
lineStyle: {
color: '#27727B'
}
},
splitLine: {
show: false
}
},
valueAxis: {
axisLine: {
show: false
},
splitArea: {
show: false
},
splitLine: {
lineStyle: {
color: ['#ccc'],
type: 'dashed'
}
}
},
timeline: {
lineStyle: {
color: '#27727B'
},
controlStyle: {
normal: {
color: '#27727B',
borderColor: '#27727B'
}
},
symbol: 'emptyCircle',
symbolSize: 3
},
line: {
itemStyle: {
normal: {
borderWidth: 2,
borderColor: '#fff',
lineStyle: {
width: 3
}
},
emphasis: {
borderWidth: 0
}
},
symbol: 'circle',
symbolSize: 3.5
},
candlestick: {
itemStyle: {
normal: {
color: '#C1232B',
color0: '#B5C334',
lineStyle: {
width: 1,
color: '#C1232B',
color0: '#B5C334'
}
}
}
},
graph: {
color: colorPalette
},
map: {
label: {
normal: {
textStyle: {
color: '#C1232B'
}
},
emphasis: {
textStyle: {
color: 'rgb(100,0,0)'
}
}
},
itemStyle: {
normal: {
areaColor: '#ddd',
borderColor: '#eee'
},
emphasis: {
areaColor: '#fe994e'
}
}
},
gauge: {
axisLine: {
lineStyle: {
color: [
[0.2, '#B5C334'],
[0.8, '#27727B'],
[1, '#C1232B']
]
}
},
axisTick: {
splitNumber: 2,
length: 5,
lineStyle: {
color: '#fff'
}
},
axisLabel: {
textStyle: {
color: '#fff'
}
},
splitLine: {
length: '5%',
lineStyle: {
color: '#fff'
}
},
title: {
offsetCenter: [0, -20]
}
}
};
echarts.registerTheme('infographic', theme);
}));
1.如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!
2.【👇🏻👇🏻👇🏻关注我| 获取更多源码 | 优质文章】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、期末大作业模板 、Echarts大数据可视化, 等! 「一起探讨 web前端 ,Node ,Java 知识,互相学习」!
3.以上内容技术相关问题😈欢迎一起交流学习👇🏻👇🏻👇🏻🔥