...
|
...
|
@@ -92,51 +92,24 @@ |
|
|
|
|
|
|
|
|
|
|
|
//虚拟数据
|
|
|
var date = ['21点-7点','17点-12点','12点-17点','17点-21点'];
|
|
|
|
|
|
|
|
|
function my_data(){
|
|
|
var data = [];
|
|
|
for( var i =0; i<5; i++){
|
|
|
data.push(Math.round(Math.random() * (500 - 100) + 100));
|
|
|
};
|
|
|
return data;
|
|
|
}
|
|
|
var num = my_data();
|
|
|
var bl = '30%';
|
|
|
//时间段统计数据
|
|
|
var dateX = ['21点-7点','17点-12点','12点-17点','17点-21点'];
|
|
|
|
|
|
var dateY = [1,2,3,4];
|
|
|
|
|
|
|
|
|
//周统计
|
|
|
//周统计数据
|
|
|
var weekDataX = ["第一周","第二周","第三周","第四周","第五周","第六周", "第七周",
|
|
|
"第八周","第九周","第十周","第十一周","第十二周","第十三周","第十四周","第十五周"];
|
|
|
var weekDataY = {$weekData};
|
|
|
|
|
|
//月统计数据
|
|
|
var monthDataX = ["第一月","第二月","第三月","第四月","第五月","第六月", "第七月",
|
|
|
"第八月","第九月","第十月","第十一月","第十二月","第十三月","第十四月","第十五月",
|
|
|
"第十六月","第十七月","第十八月","第十九月","第二十月","第二十一月","第二十二月","第二十三月","第二十四月"];
|
|
|
var monthDataY = {$monthData};
|
|
|
|
|
|
|
|
|
function GetData(){
|
|
|
var myData = [];
|
|
|
for( var i = 0; i < axisData.length; i++ ){
|
|
|
myData.push( Math.round(Math.random() * 10000) );
|
|
|
};
|
|
|
return myData;
|
|
|
};
|
|
|
|
|
|
function GetDataHg(){
|
|
|
var myData = [];
|
|
|
for( var i = 0; i < axisData.length; i++ ){
|
|
|
myData.push( Math.round(Math.random() * 100) );
|
|
|
};
|
|
|
return myData;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 路径配置
|
|
|
require.config({
|
...
|
...
|
@@ -173,7 +146,7 @@ |
|
|
formatter : function(data){
|
|
|
//console.log(data);
|
|
|
var str = data[0].name ;
|
|
|
str += '</br>总人数:' + data[0].value + ' 占比:' + bl;
|
|
|
str += '</br>总人数:' + data[0].value;
|
|
|
return str;
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -204,7 +177,7 @@ |
|
|
{
|
|
|
type : 'category',
|
|
|
boundaryGap : true,
|
|
|
data : date
|
|
|
data : dateX
|
|
|
}
|
|
|
],
|
|
|
yAxis : [
|
...
|
...
|
@@ -225,7 +198,7 @@ |
|
|
borderWidth : 3
|
|
|
}
|
|
|
},
|
|
|
data:my_data()
|
|
|
data:dateY
|
|
|
}
|
|
|
]
|
|
|
};
|
...
|
...
|
|