<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
阳光成单系统
</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="./css/x-admin.css" media="all">
<link rel="stylesheet" href="https://www.jq22.com/jquery/bootstrap-3.3.4.css">
<!--<link rel="stylesheet" href="./lib/bootstrap/js/bootstrap.min.js" media="all">-->
</head>
<body style="height:1150px;">
<div class="x-nav">
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="container-fluid ygyd-wrapper">
<!--相关统计-->
<div class="row">
<div class="col-sm-6">
<section class="panel">
<div class="panel-heading">文章类型</div>
<div class="panel-body">
<div class="echarts" id="area" style="height:300px; height:350px"></div>
</div>
</section>
</div>
<div class="col-sm-6">
<section class="panel">
<div class="panel-heading">数据统计</div>
<div class="panel-body">
<div class="echarts" id="map" style="height:300px; height:350px"></div>
</div>
</section>
</div>
<div class="col-sm-6">
<section class="panel">
<div class="panel-body">
<div class="echarts" id="years" style="height:300px; height:350px"></div>
</div>
</section>
</div>
<div class="col-sm-6">
<section class="panel">
<div class="panel-body">
<div class="echarts" id="product" style="height:300px; height:350px"></div>
</div>
</section>
</div>
</div>
</div>
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script src="https://www.jq22.com/jquery/echarts-4.2.1.min.js"></script>
<script type="text/javascript">
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
var option = {
title: {
text: '产品订单比例',
},
tooltip: {
trigger: 'axis'
},
legend: {
data:['车贷','房贷','信用贷']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一','周二','周三','周四','周五','周六','周日']
},
yAxis: {
type: 'value'
},
series: [
{
name:'车贷',
type:'line',
stack: '总量',
data:[120, 132, 101, 134, 90, 230, 210]
},
{
name:'房贷',
type:'line',
stack: '总量',
data:[220, 182, 191, 234, 290, 330, 310]
},
{
name:'信用贷',
type:'line',
stack: '总量',
data:[150, 232, 201, 154, 190, 330, 410]
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
<script type="text/javascript">
// 指定图表的配置项和数据
var myChart = echarts.init(document.getElementById('area'));
// 指定图表的配置项和数据
var option = {
title: {
text: '分类文章数据统计',
subtext: '文章总数',
x: 'center'
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
itemStyle: {
normal: {
//好,这里就是重头戏了,定义一个list,然后根据所以取得不同的值,这样就实现了,
color: function(params) {
// build a color map as your need.
var colorList = [
'#60c0dd','#B5C334','#FCCE10','#E87C25','#27727B',
'#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
'#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
];
return colorList[params.dataIndex]
},
//以下为是否显示,显示位置和显示格式的设置了
label: {
show: true,
position: 'top',
// formatter: '{c}'
formatter: '{b}\n{c}'
}
}
},
legend: {
orient: 'vertical',
left: 'left',
data: ['PHP', 'JavaScript', 'MySQL', 'jQuery', 'CSS', 'MUI', ]
},
series: [{
name: '文章总数',
type: 'pie',
radius: '55%',
center: ['50%', '60%'],
data: [
{value: 19, name: 'PHP'} ,
{value: 5, name: 'JavaScript'} ,
{value: 0, name: 'MySQL'} ,
{value: 0, name: 'jQuery'} ,
{value: 0, name: 'CSS'} ,
{value: 2, name: 'MUI'} ,
/*{ value: 4310, name: 'MySQL' },
{ value: 2310, name: 'JavaScript' },
{ value: 3310, name: 'JQuery' },
{ value: 9310, name: 'CSS' }*/
],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
<script type="text/javascript">
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('years'));
// 指定图表的配置项和数据
// 指定图表的配置项和数据
var option = {
title: {
text: '文章年度统计',
subtext: '纯属虚构',
x: 'center'
},
//color: ['#3398DB'],
tooltip: {
trigger: 'axis',
axisPo