删除目录5.电子商务
@ -1,174 +0,0 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: PingFangSC-Light, 微软雅黑;
|
||||
}
|
||||
body,html{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
color:#333;
|
||||
/* overflow: hidden;*/
|
||||
background: url('../images/bg.jpg') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
/*各浏览器显示不同,去掉蓝色边框*/
|
||||
fieldset, img, input, button {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
outline-style: none;
|
||||
}
|
||||
img {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
ul, li {
|
||||
list-style: none;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
/*清除浮动*/
|
||||
.clear-both:before, .clear-both:after {
|
||||
display: table;
|
||||
content: "";
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
clear: both;
|
||||
}
|
||||
.clearfix {
|
||||
*zoom: 1; /*IE/7/6*/
|
||||
}
|
||||
.fl{
|
||||
float: left;
|
||||
}
|
||||
.fr{
|
||||
float: right;
|
||||
}
|
||||
|
||||
/*header开始*/
|
||||
.header{
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
padding:0 20px;
|
||||
min-width: 1366px;
|
||||
}
|
||||
.bg_header{
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
background: url(../images/title.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.header>.header_logo{
|
||||
padding:18px 10px 10px 0px;
|
||||
}
|
||||
.header>.header_logo>a{
|
||||
display: block;
|
||||
}
|
||||
.header>.header_logo>a>img{
|
||||
width:260px;
|
||||
}
|
||||
|
||||
.header>.header_nav{
|
||||
margin-left: 20px;
|
||||
}
|
||||
.header>.header_nav>ul>li{
|
||||
float: left;
|
||||
margin-right: 6px;
|
||||
position: relative;
|
||||
}
|
||||
.header>.header_nav>ul>li>a{
|
||||
display: block;
|
||||
height: 80px;
|
||||
padding:0 10px 0 30px;
|
||||
line-height: 80px;
|
||||
color:#fff;
|
||||
}
|
||||
.header>.header_nav>ul>li>a:hover{
|
||||
border-bottom: 4px solid #4b8df8;
|
||||
}
|
||||
.header>.header_nav>ul>li>img{
|
||||
float: left;
|
||||
position: absolute;
|
||||
top: 33px;
|
||||
left:10px;
|
||||
}
|
||||
.header>.header_nav>ul>li>a.nav_current{
|
||||
border-bottom: 4px solid #4b8df8;
|
||||
}
|
||||
|
||||
.header>.header_myself{
|
||||
width: 90px;
|
||||
text-align: center;
|
||||
}
|
||||
.header>.header_myself>p{
|
||||
color:#fff;
|
||||
font-size: 13px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.header>.header_myself>a{
|
||||
color:#fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/*content 开始*/
|
||||
|
||||
.content{
|
||||
margin: 20px;
|
||||
width: calc(100% - 40px);
|
||||
min-width: 1366px;
|
||||
}
|
||||
.content>.content_title{
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background-color: #4b8df8;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.content>.content_title>p{
|
||||
color:#fff;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.content>.content_title>img{
|
||||
margin: 10px 10px 0px 10px;
|
||||
}
|
||||
.content>.content_main{
|
||||
min-width: 1366px;
|
||||
}
|
||||
.content>.content_main>.content_search>div{
|
||||
margin-right: 25px;
|
||||
}
|
||||
.content>.content_main>.content_search>div>label{
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
.content>.content_main>.content_search>div>select,
|
||||
.content>.content_main>.content_search>div>input
|
||||
{
|
||||
width: 200px;
|
||||
}
|
||||
.content>.content_main>.content_table{
|
||||
margin-top: 30px;
|
||||
}
|
||||
.content>.content_main>.content_table>table{
|
||||
margin-top: 15px;
|
||||
}
|
||||
.content>.content_main>.content_table>table th:nth-child(1),
|
||||
.content>.content_main>.content_table>table td:nth-child(1){
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content>.content_main>.content_page>span {
|
||||
font-size: 12.8px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
.content>.content_main>.content_page>select{
|
||||
width: 70px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
/*content 结束*/
|
6757
5.电子商务/css/bootstrap(1).css
vendored
@ -1,439 +0,0 @@
|
||||
.data_content{
|
||||
/*overflow-x: hidden;*/
|
||||
min-width: 1366px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.data_content .data_time{
|
||||
width: 340px;
|
||||
height: 35px;
|
||||
background-color: #2C58A6;
|
||||
line-height: 35px;
|
||||
color: #fff;
|
||||
font-size: 12.8px;
|
||||
position: relative;
|
||||
margin-bottom: 25px;
|
||||
margin-left: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.data_content .data_time img{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 15px;
|
||||
}
|
||||
.data_content .data_info{
|
||||
width: calc(100% - 40px);
|
||||
margin-bottom: 40px;
|
||||
height: 110px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.data_content .data_info .info_1{
|
||||
width: 40%;
|
||||
height: 110px;
|
||||
}
|
||||
.data_content .data_info .info_1>.text_1{
|
||||
width: calc(100% - 25px);
|
||||
background-color: #034c6a;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.data_content .data_info .info_2{
|
||||
width: 31%;
|
||||
height: 110px;
|
||||
}
|
||||
.data_content .data_info .info_2>.text_2{
|
||||
width: calc(100% - 25px);
|
||||
background-color: #034c6a;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.data_content .data_info .info_3{
|
||||
width: 29%;
|
||||
height: 110px;
|
||||
}
|
||||
.data_content .data_info .info_3>.text_3{
|
||||
width:100%;
|
||||
background-color: #034c6a;
|
||||
height: 110px;
|
||||
|
||||
}
|
||||
|
||||
.data_content .data_info>div.info_1>.text_1>div{
|
||||
width: 33.333%;
|
||||
position: relative;
|
||||
}
|
||||
.data_content .data_info>div.info_2>div>div,
|
||||
.data_content .data_info>div.info_3>div>div{
|
||||
width: 50%;
|
||||
position: relative;
|
||||
}
|
||||
.data_content .data_info img{
|
||||
position: absolute;
|
||||
top: 35px;
|
||||
left: 15px;
|
||||
}
|
||||
.data_content .data_info>div>div>div>div{
|
||||
margin-left:65px;
|
||||
margin-top: 23px;
|
||||
}
|
||||
.data_content .data_info>div.info_2>div>div>div{
|
||||
margin-left: 70px;
|
||||
margin-top: 23px;
|
||||
}
|
||||
.data_content .data_info p:nth-child(1){
|
||||
color:#fff;
|
||||
font-size: 12.8px;
|
||||
}
|
||||
.data_content .data_info p:nth-child(2){
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
color:#ffff43;
|
||||
}
|
||||
.data_content .data_info>div.info_2 p:nth-child(2){
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
color:#25f3e6;
|
||||
}
|
||||
.data_content .data_info>div.info_3 p:nth-child(2){
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
color:#ff4e4e;
|
||||
}
|
||||
|
||||
.data_content .data_main{
|
||||
width: calc(100% - 40px);
|
||||
margin-bottom: 40px;
|
||||
height: 615px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.data_content .data_main .main_left{
|
||||
width: 24%;
|
||||
}
|
||||
.data_content .data_main .main_left>div{
|
||||
width: 100%;
|
||||
height: 280px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
position: relative;
|
||||
box-shadow: 0 0 10px #2C58A6;
|
||||
}
|
||||
.data_content .data_main .main_left div.left_1{
|
||||
/*background: url("../images/chart_1.png") no-repeat center;*/
|
||||
}
|
||||
|
||||
.data_content .data_main .main_left div.left_2{
|
||||
/*background: url("../images/chart_2.png") no-repeat center;*/
|
||||
}
|
||||
.data_content .data_main .main_left div:nth-child(1){
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.data_content .data_main .main_left div .main_title{
|
||||
width: 245px;
|
||||
height: 35px;
|
||||
line-height: 33px;
|
||||
background-color: #2C58A6;
|
||||
border-radius: 18px;
|
||||
position: absolute;
|
||||
top: -17px;
|
||||
left: 40%;
|
||||
margin-left: -90px;
|
||||
color:#fff;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
padding-left: 45px;
|
||||
z-index: 1000;
|
||||
text-align: center;
|
||||
}
|
||||
.data_content .data_main .main_left div .main_title img{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.data_content .data_main .main_center{
|
||||
width: 52%;
|
||||
height: 610px;
|
||||
|
||||
}
|
||||
.data_content .data_main .main_center .center_text{
|
||||
width: calc(100% - 50px);
|
||||
height: 610px;
|
||||
margin-left: 25px;
|
||||
margin-right: 25px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
box-shadow: 0px 0px 6px #2C58A6;
|
||||
position: relative;
|
||||
}
|
||||
.l_t_line{
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
left: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
.t_l_line{
|
||||
height: 5px;
|
||||
width: 26px;
|
||||
left: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
.t_line_box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.t_line_box i{
|
||||
background-color: #4788fb;
|
||||
box-shadow: 0px 0px 10px #4788fb;
|
||||
position: absolute;
|
||||
}
|
||||
.t_r_line{
|
||||
height: 5px;
|
||||
width: 26px;
|
||||
right: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
.r_t_line{
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
right: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
.l_b_line{
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
left: -3px;
|
||||
bottom: -3px;
|
||||
}
|
||||
.b_l_line{
|
||||
height: 5px;
|
||||
width: 26px;
|
||||
left: -3px;
|
||||
bottom: -3px;
|
||||
}
|
||||
.r_b_line{
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
right: -3px;
|
||||
bottom: -3px;
|
||||
}
|
||||
.b_r_line{
|
||||
height: 5px;
|
||||
width: 26px;
|
||||
right: -3px;
|
||||
bottom: -3px;
|
||||
}
|
||||
.data_content .data_main .main_center .main_title{
|
||||
width: 180px;
|
||||
height: 35px;
|
||||
line-height: 33px;
|
||||
background-color: #2C58A6;
|
||||
border-radius: 18px;
|
||||
position: absolute;
|
||||
top: -17px;
|
||||
left:50%;
|
||||
margin-left: -90px;
|
||||
color:#fff;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
padding-left: 45px;
|
||||
z-index: 1000;
|
||||
}
|
||||
.data_content .data_main .main_center .main_title img{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.data_content .data_main .main_right{
|
||||
width: 24%;
|
||||
}
|
||||
.data_content .data_main .main_right>div{
|
||||
width: 100%;
|
||||
height: 280px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
position: relative;
|
||||
box-shadow: 0 0 10px #2C58A6;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_1 .choice{
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
right: 30px;
|
||||
z-index: 1000;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_1 .choice label{
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.data_content .data_main .main_right div.right_2{
|
||||
/*background: url("../images/chart_4.png") no-repeat center;*/
|
||||
}
|
||||
.data_content .data_main .main_right div.right_2 .chart_text {
|
||||
width: 18%;
|
||||
color:#fff;
|
||||
text-align: center;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_2 .chart_text p{
|
||||
margin-top: 21px;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_2 .chart_text p img{
|
||||
margin-right: 5px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_2 .chart_text p:nth-child(1){
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_2 .text_sum{
|
||||
text-align: center;
|
||||
color:#ffff43;
|
||||
font-weight: 600;
|
||||
}
|
||||
.data_content .data_main .main_right div.right_2 .text_sum div:nth-child(2){
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.data_content .data_main .main_right div:nth-child(1){
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.data_content .data_main .main_right div .main_title{
|
||||
width: 180px;
|
||||
height: 35px;
|
||||
line-height: 33px;
|
||||
background-color: #2C58A6;
|
||||
border-radius: 18px;
|
||||
position: absolute;
|
||||
top: -17px;
|
||||
left:50%;
|
||||
margin-left: -90px;
|
||||
color:#fff;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
padding-left: 45px;
|
||||
}
|
||||
.data_content .data_main .main_right div .main_title img{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.data_content .data_bottom{
|
||||
width: calc(100% - 40px);
|
||||
height: 280px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.data_content .data_bottom div{
|
||||
|
||||
}
|
||||
.data_content .data_bottom .bottom_1{
|
||||
width: 24%;
|
||||
height: 280px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
box-shadow: 0 0 10px #2C58A6;
|
||||
}
|
||||
.data_content .data_bottom .bottom_center{
|
||||
width: 52%;
|
||||
height: 280px;
|
||||
}
|
||||
.data_content .data_bottom .bottom_2{
|
||||
width: calc(50% - 35px);
|
||||
height: 280px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
margin-left: 25px;
|
||||
box-shadow: 0 0 10px #2C58A6;
|
||||
}
|
||||
.data_content .data_bottom .bottom_3{
|
||||
width: calc(50% - 40px);
|
||||
height: 280px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
margin-left:25px;
|
||||
box-shadow: 0 0 10px #2C58A6;
|
||||
}
|
||||
.data_content .data_bottom .bottom_4{
|
||||
width: 24%;
|
||||
height: 280px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #2C58A6;
|
||||
box-shadow: 0 0 10px #2C58A6;
|
||||
}
|
||||
.data_content .data_bottom div .main_title{
|
||||
width: 220px;
|
||||
height: 35px;
|
||||
line-height: 33px;
|
||||
background-color: #2C58A6;
|
||||
border-radius: 18px;
|
||||
position: absolute;
|
||||
top: -17px;
|
||||
left:50%;
|
||||
margin-left: -110px;
|
||||
color:#fff;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
padding-left: 45px;
|
||||
}
|
||||
.data_content .data_bottom div .main_title img{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.data_content .data_bottom div .main_table tr{
|
||||
height: 42px;
|
||||
}
|
||||
.data_content .data_bottom div .main_table{
|
||||
width: 100%;
|
||||
margin-top: 25px;
|
||||
}
|
||||
.data_content .data_bottom div .main_table table{
|
||||
width: 100%;
|
||||
}
|
||||
.data_content .data_bottom div .main_table thead tr{
|
||||
height: 42px;
|
||||
}
|
||||
.data_content .data_bottom div .main_table th{
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color:#61d2f7;
|
||||
text-align: center;
|
||||
}
|
||||
.data_content .data_bottom div .main_table th:nth-child(1){
|
||||
|
||||
}
|
||||
.data_content .data_bottom div .main_table th:nth-child(2){
|
||||
|
||||
}
|
||||
.data_content .data_bottom div .main_table td{
|
||||
color:#fff;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.data_content .data_bottom div .main_table tbody tr:nth-child(1),
|
||||
.data_content .data_bottom div .main_table tbody tr:nth-child(3),
|
||||
.data_content .data_bottom div .main_table tbody tr:nth-child(5){
|
||||
background-color: #072951;
|
||||
box-shadow:-10px 0px 15px #2C58A6 inset, /*左边阴影*/
|
||||
10px 0px 15px #2C58A6 inset; /*右边阴影*/
|
||||
}
|
||||
.t_btn8,.t_btn2,.t_btn3{
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
cursor: pointer;
|
||||
}
|
||||
.table_zdy a{
|
||||
color: #fff;
|
||||
}
|
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 77 KiB |
@ -1,632 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>广西电子商务公共服务平台大数据中心</title>
|
||||
<link href="css/bootstrap.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/base.css">
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
|
||||
<style>
|
||||
.t_title{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
font-size: 2.5em;
|
||||
line-height: 80px;
|
||||
color: #fff;
|
||||
}
|
||||
#chart_map{
|
||||
cursor: pointer;
|
||||
}
|
||||
.t_show{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-radius: 2px;
|
||||
background: #2C58A6;
|
||||
padding: 2px 5px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--header-->
|
||||
<div class="header">
|
||||
<div class="bg_header">
|
||||
<div class="header_nav fl t_title">
|
||||
广西电子商务公共服务平台大数据中心
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--main-->
|
||||
<div class="data_content">
|
||||
<!-- <div class="data_time">
|
||||
温馨提示: 点击模块后跳转至详情页面。
|
||||
</div> -->
|
||||
|
||||
<div class="data_main">
|
||||
<div class="main_left fl">
|
||||
<div class="left_1 t_btn6" style="cursor: pointer;">
|
||||
<!--左上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<!--右上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<!--左下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<!--右下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title">
|
||||
<img src="picture/t_1.png" alt="">
|
||||
全区快递企业月寄递量
|
||||
</div>
|
||||
<div id="chart_1" class="chart" style="width:100%;height: 280px;"></div>
|
||||
</div>
|
||||
<div class="left_2" style="cursor: pointer;">
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title">
|
||||
<img src="picture/t_2.png" alt="">
|
||||
电子商务销售额、订单数
|
||||
</div>
|
||||
<div id="chart_2" class="chart t_btn9" style="width:100%;height: 280px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_center fl">
|
||||
<div class="center_text" style="position: relative;">
|
||||
<!--左上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<!--右上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<!--左下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<!--右下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title" style="width: 230px;">
|
||||
<img src="picture/t_3.png" alt="">
|
||||
广西电子商务进农村
|
||||
</div>
|
||||
<div id="chart_map" style="width:100%;height:610px;">
|
||||
</div>
|
||||
<div class="linshi_zdy">
|
||||
<ul>
|
||||
<li><span></span>2015批(8个)</li>
|
||||
<li><span></span>2016批(15个)</li>
|
||||
<li><span></span>2017批(13个)</li>
|
||||
<li><span></span>2018批(11个)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.linshi_zdy{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 450px;
|
||||
}
|
||||
.linshi_zdy li{
|
||||
width: 150px;
|
||||
font-size: 16px;
|
||||
padding: 3px 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.linshi_zdy span{
|
||||
display: block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
float: left;
|
||||
border-radius: 50%;
|
||||
margin-top: 3px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.linshi_zdy li:first-child{
|
||||
color: #ff0000;
|
||||
}
|
||||
.linshi_zdy li:first-child span{
|
||||
background: #ff0000;
|
||||
}
|
||||
.linshi_zdy li:nth-child(2){
|
||||
color: #9cff00;
|
||||
}
|
||||
.linshi_zdy li:nth-child(2) span{
|
||||
background: #9cff00;
|
||||
}
|
||||
.linshi_zdy li:nth-child(3){
|
||||
color: #fff;
|
||||
}
|
||||
.linshi_zdy li:nth-child(3) span{
|
||||
background: #fff;
|
||||
}
|
||||
.linshi_zdy li:nth-child(4){
|
||||
color: #f4a100;
|
||||
}
|
||||
.linshi_zdy li:nth-child(4) span{
|
||||
background: #f4a100;
|
||||
}
|
||||
</style>
|
||||
<div class="main_right fr">
|
||||
<div class="right_1">
|
||||
<!--左上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<!--右上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<!--左下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<!--右下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title" style="width:220px;">
|
||||
<img src="picture/t_4.png" alt="">
|
||||
全区快递月寄递数量
|
||||
</div>
|
||||
<div id="chart_3" class="echart t_btn7" style="width:100%;height: 280px;"></div>
|
||||
</div>
|
||||
<div class="right_2">
|
||||
<!--左上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<!--右上边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<!--左下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<!--右下边框-->
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title" style="width:200px;">
|
||||
<img src="picture/t_5.png" alt="">
|
||||
电商企业入驻情况
|
||||
</div>
|
||||
<div id="chart_4" class="echart fl t_btn4" style="width:100%;height: 280px;cursor: pointer;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data_bottom">
|
||||
<div class="bottom_1 fl t_btn5" style="cursor: pointer;">
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title">
|
||||
<img src="picture/t_7.png" alt="">
|
||||
农村电商交易概况
|
||||
</div>
|
||||
<div class="main_table t_btn8">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>概况名称</th>
|
||||
<th>详情</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>累计交易总金额</td>
|
||||
<td>4058.56 万元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计交易订单数量</td>
|
||||
<td>437753 件</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计产品SKU数量</td>
|
||||
<td>360 个</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>本月交易总额</td>
|
||||
<td>242.42 万元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>本月交易订单数量</td>
|
||||
<td>5283 件</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_center fl">
|
||||
<div class="bottom_2 fl">
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title" style="width:300px;left:40%;">
|
||||
<img src="picture/t_7.png" alt="">
|
||||
广西电子商务热销产品排行榜
|
||||
</div>
|
||||
<div class="main_table t_btn8">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>产品名称</th>
|
||||
<th>品种</th>
|
||||
<th>产地</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>荔浦百香果</td>
|
||||
<td>百香果</td>
|
||||
<td>荔浦</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>荔浦砂糖桔</td>
|
||||
<td>砂糖桔</td>
|
||||
<td>荔浦</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>90g将军峰小方盒绿茶</td>
|
||||
<td>中小叶种</td>
|
||||
<td>广西贺州</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>珍珠糯玉米</td>
|
||||
<td>粮食</td>
|
||||
<td>忻城县</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>桂花红糖</td>
|
||||
<td>桂花红糖</td>
|
||||
<td>大新县</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_3 fl">
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title" style="width:260px;left:45%;">
|
||||
<img src="picture/t_7.png" alt="">
|
||||
电子商务热销店铺排行榜
|
||||
</div>
|
||||
<div class="main_table t_btn2">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>店铺名称</th>
|
||||
<th>产品</th>
|
||||
<th>销售额(月销)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>鲜迪食品专营店</td>
|
||||
<td>海鸭蛋</td>
|
||||
<td>2.8万</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>中鼎水果专营店</td>
|
||||
<td>红心芭乐番石榴</td>
|
||||
<td>2.5万</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>中闽飘香旗舰店</td>
|
||||
<td>广西桂林罗汉果</td>
|
||||
<td>2.4万</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>芋小妹旗舰店</td>
|
||||
<td>广西荔浦大芋头</td>
|
||||
<td>1.3万</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>桂甄堂旗舰店</td>
|
||||
<td>柳州螺狮粉</td>
|
||||
<td>1.1万</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_4 fr">
|
||||
<div class="t_line_box">
|
||||
<i class="t_l_line"></i>
|
||||
<i class="l_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="t_r_line"></i>
|
||||
<i class="r_t_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="l_b_line"></i>
|
||||
<i class="b_l_line"></i>
|
||||
</div>
|
||||
<div class="t_line_box">
|
||||
<i class="r_b_line"></i>
|
||||
<i class="b_r_line"></i>
|
||||
</div>
|
||||
<div class="main_title">
|
||||
<img src="picture/t_7.png" alt="">
|
||||
平台活动案例
|
||||
</div>
|
||||
<div class="main_table t_btn3 table_zdy">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>活动主题</th>
|
||||
<th>活动举办地</th>
|
||||
<th>日期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a target="blank" href="http://www.gxitps.org/zhanhui/detail/id/20.html">2018广西特产行销全国</a></td>
|
||||
<td>南宁</td>
|
||||
<td>2018年</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a target="blank" href="http://www.gxitps.org/zhanhui/detail/id/16.html">2018壮族三月三电商节</a></td>
|
||||
<td>南宁</td>
|
||||
<td>2018年</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a target="blank" href="http://www.gxitps.org/zhanhui/detail/id/17.html">2018灵山荔枝节</a></td>
|
||||
<td>灵山县</td>
|
||||
<td>2018年</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2018年货节</td>
|
||||
<td>广西</td>
|
||||
<td>2018年</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2017好讲师大赛</td>
|
||||
<td>南宁</td>
|
||||
<td>2017年</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="scripts/jquery-2.2.1.min.js"></script>
|
||||
<script src="scripts/bootstrap.min.js"></script>
|
||||
<script src="scripts/common.js"></script>
|
||||
<script src="scripts/echarts.min.js"></script>
|
||||
<script src="scripts/datatool.js"></script>
|
||||
<script src="scripts/index.js"></script>
|
||||
<!-- <script src="scripts/china.js"></script> -->
|
||||
<script src="scripts/guangxi.js"></script>
|
||||
<script type="text/javascript">
|
||||
var dianshang = [];
|
||||
function get_shuju(){
|
||||
$.ajax({
|
||||
type : "post",
|
||||
async:false,
|
||||
url:"/record/dianshang",
|
||||
data:{},
|
||||
dataType:"json",
|
||||
success:function(res){
|
||||
// console.log(res);
|
||||
// if (res) {
|
||||
// for (var i = 0; i < res.length; i++) {
|
||||
dianshang.push(res);
|
||||
// };
|
||||
// };
|
||||
}
|
||||
})
|
||||
return dianshang;
|
||||
}
|
||||
|
||||
//电商企业入驻情况
|
||||
dianshang = get_shuju();
|
||||
|
||||
var changedetail = echarts.init(document.getElementById('chart_4'));
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
// formatter: '{b}</br>{a}: {c}</br>{a1}: {c1}'
|
||||
},
|
||||
toolbox: {
|
||||
show:false,
|
||||
feature: {
|
||||
dataView: {show: true, readOnly: false},
|
||||
magicType: {show: true, type: ['line', 'bar']},
|
||||
restore: {show: true},
|
||||
saveAsImage: {show: true}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data:['',''],
|
||||
show:false
|
||||
},
|
||||
grid:{
|
||||
top:'18%',
|
||||
right:'5%',
|
||||
bottom:'8%',
|
||||
left:'5%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['名优企业','技术服务','技术开发','电子商务','网络推广','涉互联网企业'],
|
||||
splitLine:{
|
||||
show:false,
|
||||
lineStyle:{
|
||||
color: '#3c4452'
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel:{
|
||||
textStyle:{
|
||||
color:"#fff"
|
||||
},
|
||||
lineStyle:{
|
||||
color: '#519cff'
|
||||
},
|
||||
alignWithLabel: true,
|
||||
interval:0
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '入驻数据',
|
||||
nameTextStyle:{
|
||||
color:'#fff'
|
||||
},
|
||||
interval: 100000,
|
||||
min: 0,
|
||||
splitLine:{
|
||||
show:true,
|
||||
lineStyle:{
|
||||
color: '#23303f'
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show:false,
|
||||
lineStyle: {
|
||||
color: '#115372'
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel:{
|
||||
textStyle:{
|
||||
color:"#fff"
|
||||
},
|
||||
alignWithLabel: true,
|
||||
interval:0
|
||||
|
||||
}
|
||||
}
|
||||
],
|
||||
color:"yellow",
|
||||
series: [
|
||||
{
|
||||
name:'电商企业入驻',
|
||||
type:'bar',
|
||||
data: [dianshang[0][0],dianshang[0][1],dianshang[0][2],dianshang[0][3],dianshang[0][4],dianshang[0][5]],
|
||||
boundaryGap: '45%',
|
||||
barWidth:'40%',
|
||||
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function(params) {
|
||||
var colorList = [
|
||||
'#6bc0fb','#7fec9d','#fedd8b','#ffa597','#84e4dd','#6bc0fb'
|
||||
];
|
||||
return colorList[params.dataIndex]
|
||||
},label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
formatter: '{c}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
changedetail.setOption(option);
|
||||
</script>
|
||||
</html>
|
Before Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 290 B |
7
5.电子商务/scripts/bootstrap.min.js
vendored
@ -1,36 +0,0 @@
|
||||
$(function () {
|
||||
$(".header_nav>ul>li>a").on("click",function () {
|
||||
$(this).addClass("nav_current").parent("li").siblings("li").children("a").removeClass("nav_current");
|
||||
})
|
||||
|
||||
$(".header_nav>ul>li").hover(function () {
|
||||
$(this).children("ul").toggle();
|
||||
})
|
||||
|
||||
$(".header>.header_nav>ul>li>ul>li").hover(function () {
|
||||
$(this).children("ul").toggle();
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
$("#add_ipt").on("click",function () {
|
||||
$('#modal_add').modal();
|
||||
})
|
||||
|
||||
|
||||
$("#date_ipt").on("click",function () {
|
||||
$('#myModal').modal();
|
||||
})
|
||||
|
||||
$("#video_ipt").on("click",function () {
|
||||
$('#Modal').modal();
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
@ -1,867 +0,0 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
|
||||
(factory((global.dataTool = {}),global.echarts));
|
||||
}(this, (function (exports,echarts) { 'use strict';
|
||||
|
||||
/**
|
||||
* @module zrender/core/util
|
||||
*/
|
||||
|
||||
// 用于处理merge时无法遍历Date等对象的问题
|
||||
var arrayProto = Array.prototype;
|
||||
var nativeMap = arrayProto.map;
|
||||
|
||||
|
||||
/**
|
||||
* Those data types can be cloned:
|
||||
* Plain object, Array, TypedArray, number, string, null, undefined.
|
||||
* Those data types will be assgined using the orginal data:
|
||||
* BUILTIN_OBJECT
|
||||
* Instance of user defined class will be cloned to a plain object, without
|
||||
* properties in prototype.
|
||||
* Other data types is not supported (not sure what will happen).
|
||||
*
|
||||
* Caution: do not support clone Date, for performance consideration.
|
||||
* (There might be a large number of date in `series.data`).
|
||||
* So date should not be modified in and out of echarts.
|
||||
*
|
||||
* @param {*} source
|
||||
* @return {*} new
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} target
|
||||
* @param {*} source
|
||||
* @param {boolean} [overwrite=false]
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array} targetAndSources The first item is target, and the rests are source.
|
||||
* @param {boolean} [overwrite=false]
|
||||
* @return {*} target
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {*} target
|
||||
* @param {*} source
|
||||
* @memberOf module:zrender/core/util
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {*} target
|
||||
* @param {*} source
|
||||
* @param {boolean} [overlay=false]
|
||||
* @memberOf module:zrender/core/util
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询数组中元素的index
|
||||
* @memberOf module:zrender/core/util
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 构造类继承关系
|
||||
*
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Function} clazz 源类
|
||||
* @param {Function} baseClazz 基类
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Object|Function} target
|
||||
* @param {Object|Function} sorce
|
||||
* @param {boolean} overlay
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Consider typed array.
|
||||
* @param {Array|TypedArray} data
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 数组或对象遍历
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Object|Array} obj
|
||||
* @param {Function} cb
|
||||
* @param {*} [context]
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 数组映射
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Array} obj
|
||||
* @param {Function} cb
|
||||
* @param {*} [context]
|
||||
* @return {Array}
|
||||
*/
|
||||
function map(obj, cb, context) {
|
||||
if (!(obj && cb)) {
|
||||
return;
|
||||
}
|
||||
if (obj.map && obj.map === nativeMap) {
|
||||
return obj.map(cb, context);
|
||||
}
|
||||
else {
|
||||
var result = [];
|
||||
for (var i = 0, len = obj.length; i < len; i++) {
|
||||
result.push(cb.call(context, obj[i], i, obj));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Array} obj
|
||||
* @param {Function} cb
|
||||
* @param {Object} [memo]
|
||||
* @param {*} [context]
|
||||
* @return {Array}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 数组过滤
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Array} obj
|
||||
* @param {Function} cb
|
||||
* @param {*} [context]
|
||||
* @return {Array}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 数组项查找
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Array} obj
|
||||
* @param {Function} cb
|
||||
* @param {*} [context]
|
||||
* @return {*}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Function} func
|
||||
* @param {*} context
|
||||
* @return {Function}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Function} func
|
||||
* @return {Function}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Whether is exactly NaN. Notice isNaN('a') returns true.
|
||||
* @param {*} value
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* If value1 is not null, then return value1, otherwise judget rest of values.
|
||||
* Low performance.
|
||||
* @memberOf module:zrender/core/util
|
||||
* @return {*} Final value
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {Array} arr
|
||||
* @param {number} startIndex
|
||||
* @param {number} endIndex
|
||||
* @return {Array}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Normalize css liked array configuration
|
||||
* e.g.
|
||||
* 3 => [3, 3, 3, 3]
|
||||
* [4, 2] => [4, 2, 4, 2]
|
||||
* [4, 3, 2] => [4, 3, 2, 3]
|
||||
* @param {number|Array.<number>} val
|
||||
* @return {Array.<number>}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {boolean} condition
|
||||
* @param {string} message
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @memberOf module:zrender/core/util
|
||||
* @param {string} str string to be trimed
|
||||
* @return {string} trimed string
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Set an object as primitive to be ignored traversing children in clone or merge
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// GEXF File Parser
|
||||
// http://gexf.net/1.2draft/gexf-12draft-primer.pdf
|
||||
|
||||
function parse(xml) {
|
||||
var doc;
|
||||
if (typeof xml === 'string') {
|
||||
var parser = new DOMParser();
|
||||
doc = parser.parseFromString(xml, 'text/xml');
|
||||
}
|
||||
else {
|
||||
doc = xml;
|
||||
}
|
||||
if (!doc || doc.getElementsByTagName('parsererror').length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var gexfRoot = getChildByTagName(doc, 'gexf');
|
||||
|
||||
if (!gexfRoot) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var graphRoot = getChildByTagName(gexfRoot, 'graph');
|
||||
|
||||
var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
|
||||
var attributesMap = {};
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
attributesMap[attributes[i].id] = attributes[i];
|
||||
}
|
||||
|
||||
return {
|
||||
nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
|
||||
links: parseEdges(getChildByTagName(graphRoot, 'edges'))
|
||||
};
|
||||
}
|
||||
|
||||
function parseAttributes(parent) {
|
||||
return parent ? map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
|
||||
return {
|
||||
id: getAttr(attribDom, 'id'),
|
||||
title: getAttr(attribDom, 'title'),
|
||||
type: getAttr(attribDom, 'type')
|
||||
};
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseNodes(parent, attributesMap) {
|
||||
return parent ? map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
|
||||
|
||||
var id = getAttr(nodeDom, 'id');
|
||||
var label = getAttr(nodeDom, 'label');
|
||||
|
||||
var node = {
|
||||
id: id,
|
||||
name: label,
|
||||
itemStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
|
||||
var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
|
||||
var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
|
||||
var vizColorDom = getChildByTagName(nodeDom, 'viz:color');
|
||||
// var vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
|
||||
|
||||
var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
|
||||
|
||||
if (vizSizeDom) {
|
||||
node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
|
||||
}
|
||||
if (vizPosDom) {
|
||||
node.x = parseFloat(getAttr(vizPosDom, 'x'));
|
||||
node.y = parseFloat(getAttr(vizPosDom, 'y'));
|
||||
// z
|
||||
}
|
||||
if (vizColorDom) {
|
||||
node.itemStyle.normal.color = 'rgb(' +[
|
||||
getAttr(vizColorDom, 'r') | 0,
|
||||
getAttr(vizColorDom, 'g') | 0,
|
||||
getAttr(vizColorDom, 'b') | 0
|
||||
].join(',') + ')';
|
||||
}
|
||||
// if (vizShapeDom) {
|
||||
// node.shape = getAttr(vizShapeDom, 'shape');
|
||||
// }
|
||||
if (attvaluesDom) {
|
||||
var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
|
||||
|
||||
node.attributes = {};
|
||||
|
||||
for (var j = 0; j < attvalueDomList.length; j++) {
|
||||
var attvalueDom = attvalueDomList[j];
|
||||
var attId = getAttr(attvalueDom, 'for');
|
||||
var attValue = getAttr(attvalueDom, 'value');
|
||||
var attribute = attributesMap[attId];
|
||||
|
||||
if (attribute) {
|
||||
switch (attribute.type) {
|
||||
case 'integer':
|
||||
case 'long':
|
||||
attValue = parseInt(attValue, 10);
|
||||
break;
|
||||
case 'float':
|
||||
case 'double':
|
||||
attValue = parseFloat(attValue);
|
||||
break;
|
||||
case 'boolean':
|
||||
attValue = attValue.toLowerCase() == 'true';
|
||||
break;
|
||||
default:
|
||||
}
|
||||
node.attributes[attId] = attValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseEdges(parent) {
|
||||
return parent ? map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
|
||||
var id = getAttr(edgeDom, 'id');
|
||||
var label = getAttr(edgeDom, 'label');
|
||||
|
||||
var sourceId = getAttr(edgeDom, 'source');
|
||||
var targetId = getAttr(edgeDom, 'target');
|
||||
|
||||
var edge = {
|
||||
id: id,
|
||||
name: label,
|
||||
source: sourceId,
|
||||
target: targetId,
|
||||
lineStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
|
||||
var lineStyle = edge.lineStyle.normal;
|
||||
|
||||
var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
|
||||
var vizColorDom = getChildByTagName(edgeDom, 'viz:color');
|
||||
// var vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
|
||||
|
||||
if (vizThicknessDom) {
|
||||
lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
|
||||
}
|
||||
if (vizColorDom) {
|
||||
lineStyle.color = 'rgb(' + [
|
||||
getAttr(vizColorDom, 'r') | 0,
|
||||
getAttr(vizColorDom, 'g') | 0,
|
||||
getAttr(vizColorDom, 'b') | 0
|
||||
].join(',') + ')';
|
||||
}
|
||||
// if (vizShapeDom) {
|
||||
// edge.shape = vizShapeDom.getAttribute('shape');
|
||||
// }
|
||||
|
||||
return edge;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function getAttr(el, attrName) {
|
||||
return el.getAttribute(attrName);
|
||||
}
|
||||
|
||||
function getChildByTagName (parent, tagName) {
|
||||
var node = parent.firstChild;
|
||||
|
||||
while (node) {
|
||||
if (
|
||||
node.nodeType != 1 ||
|
||||
node.nodeName.toLowerCase() != tagName.toLowerCase()
|
||||
) {
|
||||
node = node.nextSibling;
|
||||
} else {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function getChildrenByTagName (parent, tagName) {
|
||||
var node = parent.firstChild;
|
||||
var children = [];
|
||||
while (node) {
|
||||
if (node.nodeName.toLowerCase() == tagName.toLowerCase()) {
|
||||
children.push(node);
|
||||
}
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
|
||||
var gexf = (Object.freeze || Object)({
|
||||
parse: parse
|
||||
});
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright (c) 2010-2015, Michael Bostock
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* * The name Michael Bostock may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see <https://github.com/mbostock/d3/blob/master/src/arrays/quantile.js>
|
||||
* @see <http://en.wikipedia.org/wiki/Quantile>
|
||||
* @param {Array.<number>} ascArr
|
||||
*/
|
||||
var quantile = function(ascArr, p) {
|
||||
var H = (ascArr.length - 1) * p + 1,
|
||||
h = Math.floor(H),
|
||||
v = +ascArr[h - 1],
|
||||
e = H - h;
|
||||
return e ? v + e * (ascArr[h] - v) : v;
|
||||
};
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Linear mapping a value from domain to range
|
||||
* @memberOf module:echarts/util/number
|
||||
* @param {(number|Array.<number>)} val
|
||||
* @param {Array.<number>} domain Domain extent domain[0] can be bigger than domain[1]
|
||||
* @param {Array.<number>} range Range extent range[0] can be bigger than range[1]
|
||||
* @param {boolean} clamp
|
||||
* @return {(number|Array.<number>}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Convert a percent string to absolute number.
|
||||
* Returns NaN if percent is not a valid string or number
|
||||
* @memberOf module:echarts/util/number
|
||||
* @param {string|number} percent
|
||||
* @param {number} all
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* (1) Fix rounding error of float numbers.
|
||||
* (2) Support return string to avoid scientific notation like '3.5e-7'.
|
||||
*
|
||||
* @param {number} x
|
||||
* @param {number} [precision]
|
||||
* @param {boolean} [returnStr]
|
||||
* @return {number|string}
|
||||
*/
|
||||
|
||||
|
||||
function asc(arr) {
|
||||
arr.sort(function (a, b) {
|
||||
return a - b;
|
||||
});
|
||||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get precision
|
||||
* @param {number} val
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|number} val
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Minimal dicernible data precisioin according to a single pixel.
|
||||
*
|
||||
* @param {Array.<number>} dataExtent
|
||||
* @param {Array.<number>} pixelExtent
|
||||
* @return {number} precision
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Get a data of given precision, assuring the sum of percentages
|
||||
* in valueList is 1.
|
||||
* The largest remainer method is used.
|
||||
* https://en.wikipedia.org/wiki/Largest_remainder_method
|
||||
*
|
||||
* @param {Array.<number>} valueList a list of all data
|
||||
* @param {number} idx index of the data to be processed in valueList
|
||||
* @param {number} precision integer number showing digits of precision
|
||||
* @return {number} percent ranging from 0 to 100
|
||||
*/
|
||||
|
||||
|
||||
// Number.MAX_SAFE_INTEGER, ie do not support.
|
||||
|
||||
|
||||
/**
|
||||
* To 0 - 2 * PI, considering negative radian.
|
||||
* @param {number} radian
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {type} radian
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|Date|number} value These values can be accepted:
|
||||
* + An instance of Date, represent a time in its own time zone.
|
||||
* + Or string in a subset of ISO 8601, only including:
|
||||
* + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06',
|
||||
* + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123',
|
||||
* + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00',
|
||||
* all of which will be treated as local time if time zone is not specified
|
||||
* (see <https://momentjs.com/>).
|
||||
* + Or other string format, including (all of which will be treated as loacal time):
|
||||
* '2012', '2012-3-1', '2012/3/1', '2012/03/01',
|
||||
* '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123'
|
||||
* + a timestamp, which represent a time in UTC.
|
||||
* @return {Date} date
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Quantity of a number. e.g. 0.1, 1, 10, 100
|
||||
*
|
||||
* @param {number} val
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* find a “nice” number approximately equal to x. Round the number if round = true,
|
||||
* take ceiling if round = false. The primary observation is that the “nicest”
|
||||
* numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers.
|
||||
*
|
||||
* See "Nice Numbers for Graph Labels" of Graphic Gems.
|
||||
*
|
||||
* @param {number} val Non-negative value.
|
||||
* @param {boolean} round
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Order intervals asc, and split them when overlap.
|
||||
* expect(numberUtil.reformIntervals([
|
||||
* {interval: [18, 62], close: [1, 1]},
|
||||
* {interval: [-Infinity, -70], close: [0, 0]},
|
||||
* {interval: [-70, -26], close: [1, 1]},
|
||||
* {interval: [-26, 18], close: [1, 1]},
|
||||
* {interval: [62, 150], close: [1, 1]},
|
||||
* {interval: [106, 150], close: [1, 1]},
|
||||
* {interval: [150, Infinity], close: [0, 0]}
|
||||
* ])).toEqual([
|
||||
* {interval: [-Infinity, -70], close: [0, 0]},
|
||||
* {interval: [-70, -26], close: [1, 1]},
|
||||
* {interval: [-26, 18], close: [0, 1]},
|
||||
* {interval: [18, 62], close: [0, 1]},
|
||||
* {interval: [62, 150], close: [0, 1]},
|
||||
* {interval: [150, Infinity], close: [0, 0]}
|
||||
* ]);
|
||||
* @param {Array.<Object>} list, where `close` mean open or close
|
||||
* of the interval, and Infinity can be used.
|
||||
* @return {Array.<Object>} The origin list, which has been reformed.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
||||
* ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
||||
* subtraction forces infinities to NaN
|
||||
*
|
||||
* @param {*} v
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* See:
|
||||
* <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
|
||||
* <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
|
||||
*
|
||||
* Helper method for preparing data.
|
||||
*
|
||||
* @param {Array.<number>} rawData like
|
||||
* [
|
||||
* [12,232,443], (raw data set for the first box)
|
||||
* [3843,5545,1232], (raw datat set for the second box)
|
||||
* ...
|
||||
* ]
|
||||
* @param {Object} [opt]
|
||||
*
|
||||
* @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
|
||||
* default 1.5, means Q1 - 1.5 * (Q3 - Q1).
|
||||
* If 'none'/0 passed, min bound will not be used.
|
||||
* @param {(number|string)} [opt.layout='horizontal']
|
||||
* Box plot layout, can be 'horizontal' or 'vertical'
|
||||
* @return {Object} {
|
||||
* boxData: Array.<Array.<number>>
|
||||
* outliers: Array.<Array.<number>>
|
||||
* axisData: Array.<string>
|
||||
* }
|
||||
*/
|
||||
var prepareBoxplotData = function (rawData, opt) {
|
||||
opt = opt || [];
|
||||
var boxData = [];
|
||||
var outliers = [];
|
||||
var axisData = [];
|
||||
var boundIQR = opt.boundIQR;
|
||||
var useExtreme = boundIQR === 'none' || boundIQR === 0;
|
||||
|
||||
for (var i = 0; i < rawData.length; i++) {
|
||||
axisData.push(i + '');
|
||||
var ascList = asc(rawData[i].slice());
|
||||
|
||||
var Q1 = quantile(ascList, 0.25);
|
||||
var Q2 = quantile(ascList, 0.5);
|
||||
var Q3 = quantile(ascList, 0.75);
|
||||
var min = ascList[0];
|
||||
var max = ascList[ascList.length - 1];
|
||||
|
||||
var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
|
||||
|
||||
var low = useExtreme
|
||||
? min
|
||||
: Math.max(min, Q1 - bound);
|
||||
var high = useExtreme
|
||||
? max
|
||||
: Math.min(max, Q3 + bound);
|
||||
|
||||
boxData.push([low, Q1, Q2, Q3, high]);
|
||||
|
||||
for (var j = 0; j < ascList.length; j++) {
|
||||
var dataItem = ascList[j];
|
||||
if (dataItem < low || dataItem > high) {
|
||||
var outlier = [i, dataItem];
|
||||
opt.layout === 'vertical' && outlier.reverse();
|
||||
outliers.push(outlier);
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
boxData: boxData,
|
||||
outliers: outliers,
|
||||
axisData: axisData
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
var version = '1.0.0';
|
||||
|
||||
// For backward compatibility, where the namespace `dataTool` will
|
||||
// be mounted on `echarts` is the extension `dataTool` is imported.
|
||||
// But the old version of echarts do not have `dataTool` namespace,
|
||||
// so check it before mounting.
|
||||
if (echarts.dataTool) {
|
||||
echarts.dataTool.version = version;
|
||||
echarts.dataTool.gexf = gexf;
|
||||
echarts.dataTool.prepareBoxplotData = prepareBoxplotData;
|
||||
}
|
||||
|
||||
exports.version = version;
|
||||
exports.gexf = gexf;
|
||||
exports.prepareBoxplotData = prepareBoxplotData;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=dataTool.js.map
|