正在显示
1 个修改的文件
包含
8 行增加
和
35 行删除
@@ -92,51 +92,24 @@ | @@ -92,51 +92,24 @@ | ||
92 | 92 | ||
93 | 93 | ||
94 | 94 | ||
95 | - //虚拟数据 | ||
96 | - var date = ['21点-7点','17点-12点','12点-17点','17点-21点']; | ||
97 | - | ||
98 | - | ||
99 | - function my_data(){ | ||
100 | - var data = []; | ||
101 | - for( var i =0; i<5; i++){ | ||
102 | - data.push(Math.round(Math.random() * (500 - 100) + 100)); | ||
103 | - }; | ||
104 | - return data; | ||
105 | - } | ||
106 | - var num = my_data(); | ||
107 | - var bl = '30%'; | 95 | + //时间段统计数据 |
96 | + var dateX = ['21点-7点','17点-12点','12点-17点','17点-21点']; | ||
108 | 97 | ||
98 | + var dateY = [1,2,3,4]; | ||
109 | 99 | ||
110 | 100 | ||
111 | - //周统计 | 101 | + //周统计数据 |
112 | var weekDataX = ["第一周","第二周","第三周","第四周","第五周","第六周", "第七周", | 102 | var weekDataX = ["第一周","第二周","第三周","第四周","第五周","第六周", "第七周", |
113 | "第八周","第九周","第十周","第十一周","第十二周","第十三周","第十四周","第十五周"]; | 103 | "第八周","第九周","第十周","第十一周","第十二周","第十三周","第十四周","第十五周"]; |
114 | var weekDataY = {$weekData}; | 104 | var weekDataY = {$weekData}; |
115 | 105 | ||
106 | + //月统计数据 | ||
116 | var monthDataX = ["第一月","第二月","第三月","第四月","第五月","第六月", "第七月", | 107 | var monthDataX = ["第一月","第二月","第三月","第四月","第五月","第六月", "第七月", |
117 | "第八月","第九月","第十月","第十一月","第十二月","第十三月","第十四月","第十五月", | 108 | "第八月","第九月","第十月","第十一月","第十二月","第十三月","第十四月","第十五月", |
118 | "第十六月","第十七月","第十八月","第十九月","第二十月","第二十一月","第二十二月","第二十三月","第二十四月"]; | 109 | "第十六月","第十七月","第十八月","第十九月","第二十月","第二十一月","第二十二月","第二十三月","第二十四月"]; |
119 | var monthDataY = {$monthData}; | 110 | var monthDataY = {$monthData}; |
120 | 111 | ||
121 | 112 | ||
122 | - function GetData(){ | ||
123 | - var myData = []; | ||
124 | - for( var i = 0; i < axisData.length; i++ ){ | ||
125 | - myData.push( Math.round(Math.random() * 10000) ); | ||
126 | - }; | ||
127 | - return myData; | ||
128 | - }; | ||
129 | - | ||
130 | - function GetDataHg(){ | ||
131 | - var myData = []; | ||
132 | - for( var i = 0; i < axisData.length; i++ ){ | ||
133 | - myData.push( Math.round(Math.random() * 100) ); | ||
134 | - }; | ||
135 | - return myData; | ||
136 | - }; | ||
137 | - | ||
138 | - | ||
139 | - | ||
140 | 113 | ||
141 | // 路径配置 | 114 | // 路径配置 |
142 | require.config({ | 115 | require.config({ |
@@ -173,7 +146,7 @@ | @@ -173,7 +146,7 @@ | ||
173 | formatter : function(data){ | 146 | formatter : function(data){ |
174 | //console.log(data); | 147 | //console.log(data); |
175 | var str = data[0].name ; | 148 | var str = data[0].name ; |
176 | - str += '</br>总人数:' + data[0].value + ' 占比:' + bl; | 149 | + str += '</br>总人数:' + data[0].value; |
177 | return str; | 150 | return str; |
178 | } | 151 | } |
179 | }, | 152 | }, |
@@ -204,7 +177,7 @@ | @@ -204,7 +177,7 @@ | ||
204 | { | 177 | { |
205 | type : 'category', | 178 | type : 'category', |
206 | boundaryGap : true, | 179 | boundaryGap : true, |
207 | - data : date | 180 | + data : dateX |
208 | } | 181 | } |
209 | ], | 182 | ], |
210 | yAxis : [ | 183 | yAxis : [ |
@@ -225,7 +198,7 @@ | @@ -225,7 +198,7 @@ | ||
225 | borderWidth : 3 | 198 | borderWidth : 3 |
226 | } | 199 | } |
227 | }, | 200 | }, |
228 | - data:my_data() | 201 | + data:dateY |
229 | } | 202 | } |
230 | ] | 203 | ] |
231 | }; | 204 | }; |
-
请 注册 或 登录 后发表评论