添加大屏模板

old
xiaoguo 2 years ago
commit 0a40963cc1

Binary file not shown.

@ -0,0 +1,199 @@
@charset "utf-8";
/* CSS Document */
*{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box}
*,body{padding:0px; margin:0px;color: #222;font-family: "微软雅黑";}
body{ background:#000d4a url(../images/bg.jpg) center center; background-size:cover;color:#666; font-size: .1rem; }
li{ list-style-type:none;}
@font-face{font-family:electronicFont;src:url(../font/DS-DIGIT.TTF)}
i{ margin:0px; padding:0px; text-indent:0px;}
img{ border:none; max-width: 100%;}
a{ text-decoration:none; color:#399bff;}
a.active,a:focus{ outline:none!important; text-decoration:none;}
ol,ul,p,h1,h2,h3,h4,h5,h6{ padding:0; margin:0}
a:hover{ color:#06c; text-decoration: none!important}
html,body{height: 100%;}
.clearfix:after, .clearfix:before {
display: table;
content: " "
}
.clearfix:after {
clear: both
}
.pulll_left{float:left;}
.pulll_right{float:right;}
/*谷哥滚动条样式*/
::-webkit-scrollbar {width:5px;height:5px;position:absolute}
::-webkit-scrollbar-thumb {background-color:#5bc0de}
::-webkit-scrollbar-track {background-color:#ddd}
/***/
.loading{position:fixed; left:0; top:0; font-size:.3rem; z-index:100000000;width:100%; height:100%; background:#1a1a1c; text-align:center;}
.loadbox{position:absolute; width:160px;height:150px; color: #324e93; left:50%; top:50%; margin-top:-100px; margin-left:-75px;}
.loadbox img{ margin:10px auto; display:block; width:40px;}
.copyright{ line-height:.5rem; text-align: center; padding-right: 15px; bottom: 0; color:rgba(255,255,255,.5); font-size: .12rem; position: absolute; left: 0; width: 100%;}
.head{ height:1.05rem; background: url(../images/head_bg.png) no-repeat center center; background-size: 100% 100%; position: relative}
.head h1{ color:#fff; text-align: center; font-size: .42rem; line-height:.75rem;}
.head h1 img{ width:1.5rem; display: inline-block; vertical-align: middle; }
.time{ position:absolute; right:.15rem; top:0; line-height: .75rem;color:rgba(255,255,255,.7); font-size: .26rem; padding-right: .1rem;font-family:electronicFont;}
.mainbox{ padding:0 .2rem 0rem .2rem; height:calc(70% - 1.05rem) }
.mainbox>ul{ margin-left:-.1rem; margin-right:-.1rem; height:100%}
.mainbox>ul>li{ float: left; padding: 0 .1rem;height:100%;width: 30%}
.mainbox>ul>li:nth-child(2){ width: 40%}
.mainbox2{ padding:0 .2rem 0rem .2rem; height:calc(30% - .5rem) }
.mainbox2>ul{ margin-left:-.1rem; margin-right:-.1rem; height:100%}
.mainbox2>ul>li{ float: left; padding: 0 .1rem;height:100%;width: 50%}
.boxall{ border: 1px solid rgba(25,186,139,.17); padding:0 .2rem .2rem .2rem; background: rgba(255,255,255,.04) url(../images/line.png); background-size: 100% auto; position: relative; margin-bottom: .15rem; z-index: 10;}
.boxall:before,
.boxall:after{ position:absolute; width: .1rem; height: .1rem; content: ""; border-top: 2px solid #02a6b5; top: 0;}
.boxall:before,.boxfoot:before{border-left: 2px solid #02a6b5;left: 0;}
.boxall:after,.boxfoot:after{border-right: 2px solid #02a6b5; right: 0;}
.alltitle{ font-size:.18rem; color:#fff; line-height: .4rem; border-bottom:1px dotted rgba(255,255,255,.2);}
.boxnav{height: calc(100% - .4rem);}
.boxfoot{ position:absolute; bottom: 0; width: 100%; left: 0;}
.boxfoot:before,
.boxfoot:after{ position:absolute; width: .1rem; height: .1rem; content: "";border-bottom: 2px solid #02a6b5; bottom: 0;}
.barnav{position: absolute; width: 100%; z-index: 100;}
.bar{background:rgba(101,132,226,.1); padding: .15rem; }
.barbox li,.barbox2 li{ width:33.33333%; text-align: center; position: relative;}
.barbox:before,
.barbox:after{ position:absolute; width: .3rem; height: .1rem; content: ""; }
.barbox:before{border-left: 2px solid #02a6b5;left: 0;border-top: 2px solid #02a6b5; }
.barbox:after{border-right: 2px solid #02a6b5; right: 0; bottom: 0;border-bottom: 2px solid #02a6b5; }
.barbox li:before{ position:absolute; content: ""; height:50%; width: 1px; background: rgba(255,255,255,.2); right: 0; top: 25%;}
.barbox{ border: 1px solid rgba(25,186,139,.17); position: relative; }
.barbox li{ font-size: .5rem; color: #ffeb7b; padding: .05rem 0; font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif"; font-weight: bold;font-family: electronicFont;}
.barbox2 li{ font-size: .19rem; color: rgba(255,255,255,.7);}
.mapbox{height: calc(100%); display: flex; align-items: center; justify-content: center; overflow: hidden;}
.map{ position:relative; height: 100%; z-index: 9; width: 100%;}
.map4{ width: 200%; height:100%; position: relative; left: -50%; top: 4%; margin-top: .2rem; z-index: 5;}
.map1{ width:6.43rem; z-index: 2;top:.45rem; left: .66rem; animation: myfirst2 15s infinite linear;}
.map2{ width:5.66rem; top:.85rem; left: 1.03rem; z-index: 3; opacity: 0.2; animation: myfirst 10s infinite linear;}
.map3{ width:5.18rem; top:1.07rem; left: 1.4rem; z-index: 1; transform: scale(.8); opacity: .6}
.map1,.map2,.map3{ position:absolute;}
.wrap{ overflow: hidden;}
.wrap li{ line-height:.42rem; height:.42rem; text-indent: .24rem; margin-bottom: .1rem; }
.wrap li p{border: 1px solid rgba(25,186,139,.17);}
.wrap li p{display: flex; justify-content: space-between;}
.wrap li p{display: flex; align-items: center; height: 80%;}
.wrap li p span{color: rgba(255,255,255,.6); text-align: center; text-overflow: ellipsis; white-space:nowrap; overflow: hidden; width: 20%; font-size: .16rem;}
.wrap li p span:first-child{width: 40%; text-align: left;}
.sycm ul{ padding: .16rem 0; width: 100%;}
.sycm li{ float: left; width: 25%; text-align: center; position: relative}
.sycm li:before{ position:absolute; content: ""; height:30%; width: 1px; background: rgba(255,255,255,.1); right: 0; top: 15%;}
.sycm { height: 80%; display: flex; align-items: center}
.sycm li:last-child:before,.sycm2 li:nth-child(3):before{ width: 0;}
.sycm li h2{ font-size:.3rem; color: #46b8ff; padding-bottom: .2rem;}
.sycm li span{ font-size:.2rem; color: #fff; opacity: .5;}
.sycm2 { height:90%}
.sycm2 li{width: 33.3333%; padding: 10px 0;}
.sycm2 li h2{ color: #2ad08a}
.btbox{ height: 100%}
.btbox li{height:100%; float: left;width: 25%; padding-left:5%;}
@keyframes myfirst2
{
from {transform: rotate(0deg) scale(.8);}
to {transform: rotate(359deg) scale(.8);}
}
@keyframes myfirst
{
from {transform: rotate(0deg) scale(.8);}
to {transform: rotate(-359deg) scale(.8);}
}
/*Plugin CSS*/
.str_wrap {
overflow:hidden;
width:100%;
position:relative;
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
white-space:nowrap;
}
.str_move {
white-space:nowrap;
position:absolute;
top:0;
left:0;
cursor:move;
}
.str_move_clone {
display:inline-block;
vertical-align:top;
position:absolute;
left:100%;
top:0;
}
.str_vertical .str_move_clone {
left:0;
top:100%;
}
.str_down .str_move_clone {
left:0;
bottom:100%;
}
.str_vertical .str_move,
.str_down .str_move {
white-space:normal;
width:100%;
}
.str_static .str_move,
.no_drag .str_move,
.noStop .str_move{
cursor:inherit;
}
.str_wrap img {
max-width:none !important;
}
.alltitle .pulll_right a{color: #fff;}
.alltitle .pulll_right a span{ display: inline-block; background: #58c485; width: .16rem; height: .16rem; vertical-align: middle; border-radius: 50%; margin: 0 .05rem 0 .1rem;}
.alltitle .pulll_right a:nth-child(2) span{ background: #ea7231;}
.alltitle .sebtn a{ opacity: .6; display: inline-block; padding: 0 .1rem}
.alltitle .sebtn a.active{ opacity:1}

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

@ -0,0 +1,225 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>index</title>
<script type="text/javascript" src="js/jquery.js"></script>
<link rel="stylesheet" href="css/comon0.css">
</head>
<body>
<div class="loading">
<div class="loadbox"> <img src="images/loading.gif"> 页面加载中... </div>
</div>
<div class="head">
<h1>大数据可视化系统数据分析通用模版</h1>
<div class="time" id="showTime">2019/11/29 0:12:42</div>
</div>
<div class="mainbox">
<ul class="clearfix">
<li>
<div class="boxall" style="height: calc(40% - .15rem)">
<div class="alltitle">模块标题 </div>
<div class="sycm">
<ul class="clearfix">
<li>
<h2>1824</h2>
<span>华东地区</span>
</li>
<li>
<h2>1920</h2>
<span>华西地区</span>
</li>
<li>
<h2>19%</h2>
<span>华南地区</span>
</li>
<li>
<h2>1824</h2>
<span>华北地区</span>
</li>
</ul>
</div>
<div class="boxfoot"></div>
</div>
<div class="boxall" style="height: calc(60% - .15rem)">
<div class="alltitle">模块标题</div>
<div class="sycm sycm2">
<ul class="clearfix">
<li>
<h2>1824</h2>
<span>字段名称</span>
</li>
<li>
<h2>1920</h2>
<span>字段名称</span>
</li>
<li>
<h2>19%</h2>
<span>字段名称</span>
</li>
<li>
<h2>1824</h2>
<span>字段名称</span>
</li>
<li>
<h2>19%</h2>
<span>字段名称</span>
</li>
<li>
<h2>1824</h2>
<span>字段名称</span>
</li>
</ul>
</div>
<div class="boxfoot"></div>
</div>
</li>
<li>
<div style="position: relative">
<div class="barnav">
<div class="bar">
<div class="barbox">
<ul class="clearfix">
<li class="pulll_left counter">1942</li>
<li class="pulll_left counter">98612</li>
<li class="pulll_left counter">2091</li>
</ul>
</div>
<div class="barbox2">
<ul class="clearfix">
<li class="pulll_left">字段名称</li>
<li class="pulll_left">字段名称</li>
<li class="pulll_left">字段名称</li>
</ul>
</div>
</div>
</div>
</div>
<div class="mapbox">
<div class="map">
<div class="map1"><img src="images/lbx.png"></div>
<div class="map2"><img src="images/jt.png"></div>
<div class="map3"><img src="images/map.png"></div>
<div class="map4" id="map_1"></div>
</div>
</div>
</li>
<li>
<div class="boxall" style="height: calc(50% - .15rem)">
<div class="alltitle">字段名称 <div class="pulll_right">
<a href="#"><span></span>已维修</a>
<a href="#"><span></span>未维修</a>
</div>
</div>
<div class="boxnav" id="echart3"></div>
<div class="boxfoot"></div>
</div>
<div class="boxall" style="height: calc(50% - .15rem)">
<div class="alltitle">字段名称</div>
<div class="wrap boxnav">
<ul>
<li>
<p><span>深圳腾讯科技有限公司</span><span>门禁系统</span><span>在线</span></p>
</li>
<li>
<p><span>网易科技有限公司</span><span>防火系统</span><span>在线</span></p>
</li>
<li>
<p><span>百度科技有限公司</span><span>防火系统</span><span>在线</span></p>
</li>
<li>
<p><span>汽车之家科技有限公司</span><span>定位系统</span><span>在线</span></p>
</li>
<li>
<p><span>小米科技有限公司</span><span>定位系统</span><span>在线</span></p>
</li>
</ul>
</div>
<div class="boxfoot"></div>
</div>
</li>
</ul>
<div class="copyright">版权所有:深圳市深海时代网络科技有限公司 粤ICP备15031517号-4</div>
</div>
<div class="mainbox2">
<ul class="clearfix">
<li>
<div class="boxall" style="height: 100%">
<div class="alltitle">模块标题
<div class="pulll_right">
<a href="#"><span></span>已检点</a>
<a href="#"><span></span>未检点</a>
</div>
</div>
<div class="boxnav">
<ul class="btbox">
<li id="bt01"></li>
<li id="bt02"></li>
<li id="bt03"></li>
<li id="bt04"></li>
</ul>
</div>
<div class="boxfoot"></div>
</div>
</li>
<li>
<div class="boxall" style="height:100%">
<div class="alltitle">模块标题
<div class="pulll_right sebtn">
<a href="#" class="active">近七天</a>
<a href="#">近30天</a>
<a href="#">12月</a>
</div>
</div>
<div class="boxnav" id="echart4"></div>
<div class="boxfoot"></div>
</div>
</li>
</ul>
</div>
<script language="JavaScript" src="js/js.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/area_echarts.js"></script>
<script src="js/jquery.liMarquee.js"></script>
<script>
$('.counter').countUp();
$(function () {
$('.wrap,.adduser').liMarquee({
direction: 'up',//身上滚动
runshort: false,//内容不足时不滚动
scrollamount: 20//速度
});
});
var t = null;
t = setTimeout(time, 1000);//開始运行
function time() {
clearTimeout(t);//清除定时器
dt = new Date();
var y = dt.getFullYear();
var mt = dt.getMonth() + 1;
var day = dt.getDate();
var h = dt.getHours();//获取时
var m = dt.getMinutes();//获取分
var s = dt.getSeconds();//获取秒
var t = null;
document.getElementById("showTime").innerHTML = y + "/" + Appendzero(mt) + "/" + Appendzero(day) + " " + Appendzero(h) + ":" + Appendzero(m) + ":" + Appendzero(s) + "";
function Appendzero(obj) {
if (obj < 10) return "0" + "" + obj;
else return obj;
}
t = setTimeout(time, 1000); //设定定时器,循环运行
}
</script>
</body>
</html>

Binary file not shown.

@ -0,0 +1,209 @@
$(function () {
map();
function map() {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('map_1'));
var data = [
{name: '华南区', value: 290},//广东 value 可控制圆点大小
{name: '华东区', value: 200},//江苏
{name: '华西区', value: 180},//陕西
{name: '华北区', value: 260}//北京
];
var toolTipData = [
{name:"华南区",value:[{name:"公司数量",value:195},{name:"设备数量",value:14},{name:"人员数量",value:754}]},
{name:"华东区",value:[{name:"公司数量",value:75},{name:"设备数量",value:32},{name:"人员数量",value:23}]},
{name:"华西区",value:[{name:"公司数量",value:21},{name:"设备数量",value:65},{name:"人员数量",value:21}]},
{name:"华北区",value:[{name:"公司数量",value:1533},{name:"设备数量",value:14},{name:"人员数量",value:82}]},
];
var geoCoordMap = {
'华南区':[113.263802,23.138215],
'华东区':[118.790825,32.061636],
'华西区':[108.954065,34.3457],
'华北区':[116.383491,39.921771],
};
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value)
});
}
}
return res;
};
option = {
// backgroundColor: '#404a59',
/*** title: {
text: '实时行驶车辆',
subtext: 'data from PM25.in',
sublink: 'http://www.pm25.in',
left: 'center',
textStyle: {
color: '#fff'
}
},**/
tooltip : {
trigger: 'item',
formatter: function(params) {
if (typeof(params.value)[2] == "undefined") {
var toolTiphtml = ''
for(var i = 0;i<toolTipData.length;i++){
if(params.name==toolTipData[i].name){
toolTiphtml += toolTipData[i].name+':<br>'
for(var j = 0;j<toolTipData[i].value.length;j++){
toolTiphtml+=toolTipData[i].value[j].name+':'+toolTipData[i].value[j].value+"<br>"
}
}
}
console.log(toolTiphtml)
// console.log(convertData(data))
return toolTiphtml;
} else {
var toolTiphtml = ''
for(var i = 0;i<toolTipData.length;i++){
if(params.name==toolTipData[i].name){
toolTiphtml += toolTipData[i].name+':<br>'
for(var j = 0;j<toolTipData[i].value.length;j++){
toolTiphtml+=toolTipData[i].value[j].name+':'+toolTipData[i].value[j].value+"<br>"
}
}
}
console.log(toolTiphtml)
// console.log(convertData(data))
return toolTiphtml;
}
}
},
geo: {
map: 'china',
label: {
emphasis: {
show: false
}
},
roam: true,
itemStyle: {
normal: {
areaColor: '#4c60ff',
borderColor: '#002097'
},
emphasis: {
areaColor: '#293fff'
}
}
},
series : [
{
name: '',
type: 'effectScatter',
showEffectOn: 'render',
rippleEffect: {
brushType: 'stroke'
},
coordinateSystem: 'geo',
data: convertData(data),
symbolSize: function (val) {
return val[2] / 15;
},
label: {
normal: {
formatter: '{b}',
position: 'right',
show: true
},
emphasis: {
show: true
}
},
itemStyle: {
normal: {
color: '#ffeb7b'
}
}
}
/**
,
{
name: 'Top 5',
type: 'effectScatter',
coordinateSystem: 'geo',
data: convertData(data.sort(function (a, b) {
return b.value - a.value;
}).slice(0, 6)),
symbolSize: function (val) {
return val[2] / 20;
},
showEffectOn: 'render',
rippleEffect: {
brushType: 'stroke'
},
hoverAnimation: true,
label: {
normal: {
formatter: '{b}',
position: 'right',
show: true
}
},
itemStyle: {
normal: {
color: '#ffd800',
shadowBlur: 10,
shadowColor: 'rgba(0,0,0,.3)'
}
},
zlevel: 1
}
**/
]
};
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
})

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -0,0 +1,638 @@
 $(window).load(function(){
$(".loading").fadeOut()
})
/****/
$(document).ready(function(){
var whei=$(window).width()
$("html").css({fontSize:whei/20})
$(window).resize(function(){
var whei=$(window).width()
$("html").css({fontSize:whei/20})
});
});
$(window).load(function(){$(".loading").fadeOut()})
$(function () {
echarts_3()
echarts_4()
bt01()
bt02()
bt03()
bt04()
function echarts_4() {
var myChart = echarts.init(document.getElementById('echart4'));
option1= {
// backgroundColor: '#00265f',
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['字段名称1', '字段名称2'],
top:'5%',
textStyle: {
color: "#fff",
fontSize: '12',
},
//itemGap: 35
},
grid: {
left: '0%',
top:'40px',
right: '0%',
bottom: '0',
containLabel: true
},
xAxis: [{
type: 'category',
data: ['1', '2', '3', '4', '5', '6', '7'],
axisLine: {
show: true,
lineStyle: {
color: "rgba(255,255,255,.1)",
width: 1,
type: "solid"
},
},
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
// rotate:50,
show: true,
// splitNumber: 2,
textStyle: {
color: "rgba(255,255,255,.6)",
fontSize: '12',
},
},
}],
yAxis: [
{
type: 'value',
axisLabel: {
//formatter: '{value} %'
show:true,
textStyle: {
color: "rgba(255,255,255,.6)",
fontSize: '12',
},
},
axisTick: {
show: false,
},
axisLine: {
show: true,
lineStyle: {
color: "rgba(255,255,255,.1 )",
width: 1,
type: "solid"
},
},
splitLine: {
lineStyle: {
color: "rgba(255,255,255,.1)",
}
}
}],
series: [
{
name: '字段名称1',
type: 'line',
smooth: true,
data: [5, 2, 6, 4, 5, 12,20],
barWidth:'15',
// barGap: 1,
itemStyle: {
normal: {
color:'#62c98d',
opacity: 1,
barBorderRadius: 5,
}
}
},
{
name: '字段名称2',
type: 'line',
smooth: true,
data: [7, 11, 8, 13, 10, 13,10],
itemStyle: {
normal: {
color:'#ffc000',
opacity: 1,
barBorderRadius: 5,
}
}
}
]
};
myChart.setOption(option1);
window.addEventListener("resize",function(){
myChart.resize();
});
$(".sebtn a").click(function(){
$(this).addClass("active").siblings().removeClass("active")
})
$(".sebtn a").eq(0).click(function(){
myChart.setOption(option1);
})
$(".sebtn a").eq(1).click(function(){
myChart.setOption(option2);
})
$(".sebtn a").eq(2).click(function(){
myChart.setOption(option3);
})
}
function echarts_3() {
var myChart = echarts.init(document.getElementById('echart3'));
var spNum = 5,_max=100;
var legendData = ['已完成', '未完成'];
var y_data = ['字段名称1', '字段名称2', '字段名称3', '字段名称4'];
var data1 = [10,15,100,13];
var data2 = [19,50,40,33];
var fomatter_fn = function(v) {
return (v.value / _max * 100).toFixed(0)
}
var _label = {
normal: {
show: true,
position: 'inside',
formatter: fomatter_fn,
textStyle: {
color: '#fff',
fontSize: 12
}
}
};
option = {
grid: {
containLabel: true,
top: 10,
left: 0,
right: 15,
bottom:-10
},
tooltip: {
show: true,
formatter:'{b}<br/>{a}:{c}'
},
xAxis: {
splitNumber: spNum,
// interval: _max / spNum,
//max: _max,
axisLabel: {
show: false,
formatter: function(v) {
var _v = (v / _max * 100).toFixed(0);
return _v == 0 ? _v : _v + '%';
}
},
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
show: false
}
},
yAxis: [{
data: y_data,
axisLabel: {
fontSize: 14,
color: 'rgba(255,255,255,.6)'
},
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
show: false
}
}, {
show: false,
data: y_data,
axisLine: {
show: false
}
}],
series: [{
type: 'bar',
name: '已完成',
stack: '2',
label: _label,
legendHoverLink: false, barWidth: '50%',
itemStyle: {
normal: {
color: '#58c485'
},
emphasis: {
color: '#58c485'
}
},
data: data1
}, {
type: 'bar',
name: '未完成',
stack: '2',
legendHoverLink: false, barWidth: '50%',
label: _label,
itemStyle: {
normal: {
color: '#ea7231'
},
emphasis: {
color: '#ea7231'
}
},
data: data2
}]
};
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
function bt01() {
var myChart = echarts.init(document.getElementById('bt01'));
var data1=104//己完成
var data2=18//未完成
var data3=data1/(data1+data2)*100
option = {
title: [{
text: data3.toFixed(1)+'%',
x: 'center', y: '54%',
textStyle: {
fontSize: 18,
fontWeight: 'bold',
fontStyle: 'normal',
color: '#fff'
}
}, {
text: '己完成',
x: 'center', y: '68%',
textStyle: {
fontSize: 10,
fontWeight: 'normal',
fontStyle: 'normal',
color: 'rgba(255,255,255,.6)'
}
}, {
text: '字段名称4',
x: 'center', y: '20',
textStyle: {
fontSize: 14,
fontWeight: 'bold',
color: '#fff'
}
}],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
color: ['#58c485', '#ea7231'],
series: [
{
name: '检点',
type: 'pie', center: ['50%', '65%'], radius: ['45%', '60%'],
startAngle: 360,
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: false,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data: [{
value: data1,
name: '己完成'
},
{
value: data2,
name: '未完成'
},
]
}]
};
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
function bt02() {
var myChart = echarts.init(document.getElementById('bt02'));
var data1=14//己完成
var data2=18//未完成
var data3=data1/(data1+data2)*100
option = {
title: [{
text: data3.toFixed(1)+'%',
x: 'center', y: '54%',
textStyle: {
fontSize: 18,
fontWeight: 'bold',
fontStyle: 'normal',
color: '#fff'
}
}, {
text: '己完成',
x: 'center', y: '68%',
textStyle: {
fontSize: 10,
fontWeight: 'normal',
fontStyle: 'normal',
color: 'rgba(255,255,255,.6)'
}
}, {
text: '字段名称1',
x: 'center', y: '20',
textStyle: {
fontSize: 14,
fontWeight: 'bold',
color: '#fff'
}
}],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
color: ['#58c485', '#ea7231'],
series: [
{
name: '检点',
type: 'pie', center: ['50%', '65%'], radius: ['45%', '60%'],
startAngle: 360,
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: false,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data: [{
value: data1,
name: '己完成'
},
{
value: data2,
name: '未完成'
},
]
}]
};
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
function bt03() {
var myChart = echarts.init(document.getElementById('bt03'));
var data1=104//己完成
var data2=108//未完成
var data3=data1/(data1+data2)*100
option = {
title: [ {
text: data3.toFixed(1)+'%',
x: 'center', y: '54%',
textStyle: {
fontSize: 18,
fontWeight: 'bold',
fontStyle: 'normal',
color: '#fff'
}
},
{
text: '己完成',
x: 'center', y: '68%',
textStyle: {
fontSize: 10,
fontWeight: 'normal',
fontStyle: 'normal',
color: 'rgba(255,255,255,.6)'
}
}, {
text: '字段名称2',
x: 'center', y: '20',
textStyle: {
fontSize: 14,
fontWeight: 'bold',
color: '#fff'
}
}],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
color: ['#58c485', '#ea7231'],
series: [
{
name: '检点',
type: 'pie', center: ['50%', '65%'], radius: ['45%', '60%'],
startAngle: 360,
avoidLabelOverlap: false,
label: {show: false,
},
labelLine: {
normal: {
show: false
}
},
data: [
{
value: data1,
name: '己完成'
},{
value: data2,
name: '未完成'
},
]
}]
};
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
function bt04() {
var myChart = echarts.init(document.getElementById('bt04'));
var data1=1000//己完成
var data2=552//未完成
var data3=data1/(data1+data2)*100
option = {
title: [{
text: data3.toFixed(1)+'%',
x: 'center', y: '54%',
textStyle: {
fontSize: 18,
fontWeight: 'bold',
fontStyle: 'normal',
color: '#fff'
}
}, {
text: '己完成',
x: 'center', y: '68%',
textStyle: {
fontSize: 10,
fontWeight: 'normal',
fontStyle: 'normal',
color: 'rgba(255,255,255,.6)'
}
}, {
text: '字段名称3',
x: 'center',
y: '20',
textStyle: {
fontSize: 14,
fontWeight: 'bold',
color: '#fff'
}
}],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
color: ['#58c485', '#ea7231'],
series: [
{
name: '检点',
type: 'pie',
center: ['50%', '65%'], radius: ['45%', '60%'],
startAngle: 360,
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: false,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data: [{
value: data1,
name: '己完成'
},
{
value: data2,
name: '未完成'
},
]
}]
};
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
})
Loading…
Cancel
Save