lazhang.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  6. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  7. <title>流水线管理页</title>
  8. <!-- Favicon-->
  9. <link rel="icon" href="favicon.ico" type="image/x-icon">
  10. <!-- Google Fonts -->
  11. <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
  12. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
  13. <!-- Bootstrap Core Css -->
  14. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  15. <!-- Waves Effect Css -->
  16. <link href="plugins/node-waves/waves.css" rel="stylesheet" />
  17. <!-- Animation Css -->
  18. <link href="plugins/animate-css/animate.css" rel="stylesheet" />
  19. <!-- Morris Chart Css-->
  20. <link href="plugins/morrisjs/morris.css" rel="stylesheet" />
  21. <!-- Custom Css -->
  22. <link href="css/style.css" rel="stylesheet">
  23. <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
  24. <link href="css/themes/all-themes.css" rel="stylesheet" />
  25. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  26. <script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  27. <script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  28. <link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
  29. <meta name="viewport" content="width=device-width, initial-scale=1">
  30. <style>
  31. /* css 代码 */
  32. </style>
  33. <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
  34. <script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
  35. <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
  36. <script>
  37. var timer=null;
  38. function displayClock(num){//num是传入的startClock中的动态值
  39. if(num<10){
  40. return "0"+num;
  41. }
  42. else{
  43. return num;
  44. }
  45. }
  46. //停止计时
  47. function stopClock(){
  48. clearTimeout(timer);
  49. }
  50. //开始计时
  51. function startClock(){
  52. var time =new Date();
  53. var hours=displayClock(time.getHours())+":";
  54. var minutes=displayClock(time.getMinutes())+":";
  55. var seconds=displayClock(time.getSeconds());
  56. //显示时间
  57. show.innerHTML=hours+minutes+seconds;//在id为show的块区域显示
  58. timer=setTimeout("startClock()",1000);//延时器
  59. }
  60. </script>
  61. </head>
  62. <style>
  63. #show{
  64. font-size: 30px;
  65. color:#black;
  66. text-align:center;
  67. }
  68. </style>
  69. <body onload="startClock()" onunload="stopClock()">
  70. <nav class="navbar navbar-expand-lg navbar-light bg-light" style="margin-bottom: 1em">
  71. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  72. <span class="navbar-toggler-icon"></span>
  73. </button>
  74. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  75. <ul class="navbar-nav mr-auto">
  76. <li class="nav-item active">
  77. <div class="navbar-brand" href="#" style="font-size: 25px">生产线<span>1</span>号
  78. </li>
  79. <li class="nav-item">
  80. <div class="" id="show"></div>
  81. </li>
  82. </ul>
  83. <ul style="margin: 0">
  84. <button type="button" class="btn btn-danger btn-lg" style="width:100% ;background: red;font-size: 1em">
  85. 下班
  86. </button>
  87. </ul>
  88. <div class="dropdown" style="font-size: 2em">
  89. <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size: 0.5em">
  90. <div class="row">
  91. <div class="col-4">
  92. 拉长
  93. </div>
  94. <div class="col-5">
  95. 张三
  96. </div>
  97. </div>
  98. </button>
  99. <ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
  100. <li><a href="#">更改密码</a></li>
  101. <li><a href="#">退出登录</a></li>
  102. </ul>
  103. </div>
  104. </div>
  105. </nav>
  106. <script>
  107. function addContent(name){
  108. console.log( $(name));
  109. $(name).tab('show');
  110. }
  111. </script>
  112. <section class="content" style="margin: 0 auto;padding-top: 2em;">
  113. <div class="container-fluid " style="padding-bottom: 0.2em">
  114. <div class="row text-center" >
  115. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  116. <div class="info-box bg-green hover-expand-effect" style="margin: 0;height: 70px">
  117. <div class="icon">
  118. <i class="material-icons">equalizer</i>
  119. </div>
  120. <div class="content">
  121. <div class="row text-center" style="margin: 0 auto">
  122. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">合格数:</div>
  123. <div class="number" style="font-size: 3em">555</div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  129. <div class="info-box bg-red hover-expand-effect" style="margin: 0;height: 70px">
  130. <div class="icon">
  131. <i class="material-icons">equalizer</i>
  132. </div>
  133. <div class="content">
  134. <div class="row text-center" style="margin: 0 auto">
  135. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">不合格数:</div>
  136. <div class="number" style="font-size: 3em">5255</div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  142. <div class="info-box bg-lime hover-expand-effect" style="margin: 0;height: 70px">
  143. <div class="icon">
  144. <i class="material-icons">brightness_low</i>
  145. </div>
  146. <div class="content">
  147. <div class="row text-center" style="margin: 0 auto">
  148. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">合格率:</div>
  149. <div class="number" style="font-size: 3em">55%</div>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  155. <div class="info-box bg-cyan hover-zoom-effect" style="margin: 0;height: 70px ">
  156. <div class="icon">
  157. <i class="material-icons">access_alarm</i>
  158. </div>
  159. <div class="content">
  160. <div class="row text-center" style="margin: 0 auto">
  161. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">堆积数:</div>
  162. <div class="number" style="font-size: 3em">235</div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <div class="container-fluid" style="margin-top: 0.5em">
  170. <div id="container10" style="min-width:400px;height:400px"></div>
  171. <div class="card">
  172. <div>
  173. <div class="" style="">
  174. <div class="table-responsive" style="width: 30%;float: left" >
  175. <table class="table table-hover dashboard-task-infos">
  176. <thead >
  177. <tr style="border-bottom:3px solid black;">
  178. <th>姓名(工号)</th>
  179. <th>合格数</th>
  180. <th>不合格数</th>
  181. </tr>
  182. </thead>
  183. <tbody id="rank-one">
  184. <tr>
  185. <td>1</td>
  186. <td>Task A</td>
  187. <td><span class="label bg-green">Doing</span></td>
  188. </tr>
  189. <tr>
  190. <td>2</td>
  191. <td>Task B</td>
  192. <td><span class="label bg-blue">To Do</span></td>
  193. </tr>
  194. <tr>
  195. <td>3</td>
  196. <td>Task C</td>
  197. <td><span class="label bg-light-blue">On Hold</span></td>
  198. </tr>
  199. <tr>
  200. <td>4</td>
  201. <td>Task D</td>
  202. <td><span class="label bg-orange">Wait Approvel</span></td>
  203. </tr>
  204. </tbody>
  205. </table>
  206. </div>
  207. <div class="table-responsive" style="width: 30%;float: left;padding-left: 5em" >
  208. <table class="table table-hover dashboard-task-infos">
  209. <thead>
  210. <tr style="border-bottom:3px solid black;">
  211. <th>姓名(工号)</th>
  212. <th>合格数</th>
  213. <th>不合格数</th>
  214. </tr>
  215. </thead>
  216. <tbody id="rank-two">
  217. <tr>
  218. <td>1</td>
  219. <td>Task A</td>
  220. <td><span class="label bg-green">Doing</span></td>
  221. </tr>
  222. <tr>
  223. <td>2</td>
  224. <td>Task B</td>
  225. <td><span class="label bg-blue">To Do</span></td>
  226. </tr>
  227. <tr>
  228. <td>3</td>
  229. <td>Task C</td>
  230. <td><span class="label bg-light-blue">On Hold</span></td>
  231. </tr>
  232. <tr>
  233. <td>4</td>
  234. <td>Task D</td>
  235. <td><span class="label bg-orange">Wait Approvel</span></td>
  236. </tr>
  237. </tbody>
  238. </table>
  239. </div>
  240. <div class="table-responsive" style="width: 30%;float: right" >
  241. <table class="table table-hover dashboard-task-infos">
  242. <thead>
  243. <tr style="border-bottom:3px solid black;">
  244. <th>姓名(工号)</th>
  245. <th>合格数</th>
  246. <th>不合格数</th>
  247. </tr>
  248. </thead>
  249. <tbody id="rank-three">
  250. <tr>
  251. <td>1</td>
  252. <td>Task A</td>
  253. <td><span class="label bg-green">Doing</span></td>
  254. </tr>
  255. <tr>
  256. <td>2</td>
  257. <td>Task B</td>
  258. <td><span class="label bg-blue">To Do</span></td>
  259. </tr>
  260. <tr>
  261. <td>3</td>
  262. <td>Task C</td>
  263. <td><span class="label bg-light-blue">On Hold</span></td>
  264. </tr>
  265. <tr>
  266. <td>4</td>
  267. <td>Task D</td>
  268. <td><span class="label bg-orange">Wait Approvel</span></td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <!-- #END# Answered Tickets -->
  277. </div>
  278. </section>
  279. <!-- Jquery Core Js -->
  280. <script src="plugins/jquery/jquery.min.js"></script>
  281. <!-- Bootstrap Core Js -->
  282. <script src="plugins/bootstrap/js/bootstrap.js"></script>
  283. <!-- Select Plugin Js -->
  284. <script src="plugins/bootstrap-select/js/bootstrap-select.js"></script>
  285. <!-- Slimscroll Plugin Js -->
  286. <script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
  287. <!-- Waves Effect Plugin Js -->
  288. <script src="plugins/node-waves/waves.js"></script>
  289. <!-- Jquery CountTo Plugin Js -->
  290. <script src="plugins/jquery-countto/jquery.countTo.js"></script>
  291. <!-- Morris Plugin Js -->
  292. <script src="plugins/raphael/raphael.min.js"></script>
  293. <script src="plugins/morrisjs/morris.js"></script>
  294. <!-- ChartJs -->
  295. <script src="plugins/chartjs/Chart.bundle.js"></script>
  296. <!-- Flot Charts Plugin Js -->
  297. <script src="plugins/flot-charts/jquery.flot.js"></script>
  298. <script src="plugins/flot-charts/jquery.flot.resize.js"></script>
  299. <script src="plugins/flot-charts/jquery.flot.pie.js"></script>
  300. <script src="plugins/flot-charts/jquery.flot.categories.js"></script>
  301. <script src="plugins/flot-charts/jquery.flot.time.js"></script>
  302. <!-- Sparkline Chart Plugin Js -->
  303. <script src="plugins/jquery-sparkline/jquery.sparkline.js"></script>
  304. <!-- Custom Js -->
  305. <script src="js/admin.js"></script>
  306. <script src="js/pages/index.js"></script>
  307. <!-- Demo Js -->
  308. <script src="js/demo.js"></script>
  309. <script>
  310. function get_data(url, callback){
  311. if(url=="la.anyone.alldata"){
  312. callback([
  313. {name:"张三", id:133, approve:300, decline:400, Accumulate:1000,worktime:1},
  314. {name:"李四", id:133, approve:300, decline:400, Accumulate:1000,worktime:2},
  315. ]);
  316. return;
  317. }
  318. }
  319. get_data("la.anyone.alldata", showAllData);
  320. function showAllData(shuju){
  321. var htmlbody = "";
  322. var i = 0;
  323. for(i=0; i < shuju.length; i++){
  324. var one_person = shuju[i];
  325. htmlbody += "<tr>";
  326. htmlbody += " <tr>\n" +
  327. " <td>"+one_person.name+"("+one_person.id+")</td>\n" +
  328. " <td>"+one_person.approve+"</td>\n" +
  329. " <td>"+one_person.decline+"</td>\n" +
  330. " </tr>";
  331. htmlbody += "</tr>";
  332. }
  333. $("#rank-two").html(htmlbody);
  334. }
  335. </script>
  336. <script>
  337. function get_data(url, callback){
  338. if(url=="la.anyone.alldata"){
  339. callback([
  340. {name:"张三", id:133, approve:300, decline:400, Accumulate:1000,worktime:1},
  341. {name:"李四", id:133, approve:300, decline:400, Accumulate:1000,worktime:2},
  342. ]);
  343. return;
  344. }
  345. }
  346. get_data("la.anyone.alldata", showAllData);
  347. function showAllData(shuju){
  348. var htmlbody = "";
  349. var i = 0;
  350. for(i=0; i < shuju.length; i++){
  351. var one_person = shuju[i];
  352. htmlbody += "<tr>";
  353. htmlbody += " <tr>\n" +
  354. " <td>"+one_person.name+"("+one_person.id+")</td>\n" +
  355. " <td>"+one_person.approve+"</td>\n" +
  356. " <td>"+one_person.decline+"</td>\n" +
  357. " </tr>";
  358. htmlbody += "</tr>";
  359. }
  360. $("#rank-three").html(htmlbody);
  361. }
  362. </script>
  363. <script>
  364. function get_data(url, callback){
  365. if(url=="la.anyone.alldata"){
  366. callback([
  367. {name:"张三", id:133, approve:300, decline:400, Accumulate:1000,worktime:1},
  368. {name:"李四", id:133, approve:300, decline:400, Accumulate:1000,worktime:2},
  369. ]);
  370. return;
  371. }
  372. }
  373. get_data("la.anyone.alldata", showAllData);
  374. function showAllData(shuju){
  375. var htmlbody = "";
  376. var i = 0;
  377. for(i=0; i < shuju.length; i++){
  378. var one_person = shuju[i];
  379. htmlbody += "<tr>";
  380. htmlbody += " <tr>\n" +
  381. " <td>"+one_person.name+"("+one_person.id+")</td>\n" +
  382. " <td>"+one_person.approve+"</td>\n" +
  383. " <td>"+one_person.decline+"</td>\n" +
  384. " </tr>";
  385. htmlbody += "</tr>";
  386. }
  387. $("#rank-one").html(htmlbody);
  388. }
  389. </script>
  390. <script>
  391. /*function get_data(url, callback){
  392. if(url=="la.anyone.alldata"){
  393. callback([
  394. {name:"张三", id:133, approve:300, decline:400, Accumulate:1000,worktime:1},
  395. {name:"李四", id:133, approve:300, decline:400, Accumulate:1000,worktime:2},
  396. ]);
  397. return;
  398. }
  399. callback([{x:1527957798468,y:3000},{x:1527957799468,y:3000},{x:1527957800468,y:3000.5},{x:1527957801468,y:3001}]);
  400. }
  401. get_data('la.acceptedCount.3600',mmm);
  402. function mmm(shuju) {
  403. console.log("------ getting la.acceptedCount.3000 -------")
  404. console.log(shuju);
  405. var chart = Highcharts.chart('container1',{
  406. chart: {
  407. type: 'spline'
  408. },
  409. title: {
  410. text: '月平均降雨量'
  411. },
  412. subtitle: {
  413. text: '数据来源: WorldClimate.com'
  414. },
  415. xAxis: {
  416. tickInterval: 1000, // 坐标轴刻度间隔为一星期
  417. tickWidth: 0,
  418. gridLineWidth: 1,
  419. // 时间格式化字符
  420. // 默认会根据当前的刻度间隔取对应的值,即当刻度间隔为一周时,取 week 值
  421. dateTimeLabelFormats: {
  422. week: '%Y-%m-%d'
  423. }
  424. },
  425. yAxis: {
  426. // min: 0,
  427. // title: {
  428. // text: '降雨量 (mm)'
  429. // }
  430. },
  431. tooltip: {
  432. // head + 每个 point + footer 拼接成完整的 table
  433. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  434. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  435. '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
  436. footerFormat: '</table>',
  437. shared: true,
  438. useHTML: true
  439. },
  440. plotOptions: {
  441. column: {
  442. borderWidth: 0
  443. }
  444. },
  445. series: [{
  446. name: '东京',
  447. data: shuju
  448. }]
  449. });
  450. }
  451. setInterval(lll,100);
  452. function lll() {
  453. }
  454. get_data("la.anyone.alldata", showAllData);
  455. function showAllData(shuju){
  456. var htmlbody = "";
  457. var i = 0;
  458. for(i=0; i < shuju.length; i++){
  459. var one_person = shuju[i];
  460. htmlbody += "<tr>";
  461. htmlbody += " <tr>\n" +
  462. " <td>"+one_person.name+"("+one_person.id+")</td>\n" +
  463. " <td>"+one_person.approve+"</td>\n" +
  464. " <td>"+one_person.decline+"</td>\n" +
  465. " </tr>";
  466. htmlbody += "</tr>";
  467. }
  468. $("#rank-one").html(htmlbody);
  469. }*/
  470. </script>
  471. <script>
  472. var chart = Highcharts.chart('container1', {
  473. title: {
  474. text: '合格数'
  475. },
  476. /*subtitle: {
  477. text: '数据来源:thesolarfoundation.com'
  478. },*/
  479. xAxis: {
  480. title: {
  481. text: '员工'
  482. }
  483. },
  484. yAxis: {
  485. title: {
  486. text: '就业人数'
  487. }
  488. },
  489. legend: {
  490. layout: 'vertical',
  491. align: 'right',
  492. verticalAlign: 'middle'
  493. },
  494. plotOptions: {
  495. series: {
  496. label: {
  497. connectorAllowed: false
  498. },
  499. pointStart: 2010
  500. }
  501. },
  502. series: [{
  503. name: '安装,实施人员',
  504. data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
  505. }, {
  506. name: '工人',
  507. data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
  508. }, {
  509. name: '销售',
  510. data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
  511. }, {
  512. name: '项目开发',
  513. data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
  514. }, {
  515. name: '其他',
  516. data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
  517. }],
  518. responsive: {
  519. rules: [{
  520. condition: {
  521. maxWidth: 500
  522. },
  523. chartOptions: {
  524. legend: {
  525. layout: 'horizontal',
  526. align: 'center',
  527. verticalAlign: 'bottom'
  528. }
  529. }
  530. }]
  531. }
  532. });
  533. </script>
  534. <script>
  535. var chart = Highcharts.chart('container2', {
  536. chart: {
  537. type: 'bar'
  538. },
  539. title: {
  540. text: '不合格数'
  541. },
  542. xAxis: {
  543. categories: ['苹果', '橘子', '梨', '葡萄', '香蕉']
  544. },
  545. yAxis: {
  546. min: 0,
  547. title: {
  548. text: '员工'
  549. }
  550. },
  551. legend: {
  552. /* 图例显示顺序反转
  553. * 这是因为堆叠的顺序默认是反转的,可以设置
  554. * yAxis.reversedStacks = false 来达到类似的效果
  555. */
  556. reversed: true
  557. },
  558. plotOptions: {
  559. series: {
  560. stacking: 'normal'
  561. }
  562. },
  563. series: [{
  564. name: '小张',
  565. data: [5, 3, 4, 7, 2]
  566. }, {
  567. name: '小彭',
  568. data: [2, 2, 3, 2, 1]
  569. }, {
  570. name: '小潘',
  571. data: [3, 4, 4, 2, 5]
  572. }]
  573. });
  574. </script>
  575. <script>
  576. var chart = Highcharts.chart('container3', {
  577. chart: {
  578. type: 'column'
  579. },
  580. title: {
  581. text: '堆积数'
  582. },
  583. /*subtitle: {
  584. text: '数据截止 2017-03,来源: <a href="https://en.wikipedia.org/wiki/List_of_cities_proper_by_population">Wikipedia</a>'
  585. },*/
  586. xAxis: {
  587. type: 'category',
  588. /* labels: {
  589. rotation: -45 // 设置轴标签旋转角度
  590. }*/
  591. title: {
  592. text: '员工'
  593. }
  594. },
  595. yAxis: {
  596. min: 0,
  597. title: {
  598. text: '人口 (百万)'
  599. }
  600. },
  601. legend: {
  602. enabled: false
  603. },
  604. tooltip: {
  605. pointFormat: '人口总量: <b>{point.y:.1f} 百万</b>'
  606. },
  607. series: [{
  608. name: '总人口',
  609. data: [
  610. ['上海', 24.25],
  611. ['卡拉奇', 23.50],
  612. ['北京', 21.51],
  613. ['德里', 16.78],
  614. ['拉各斯', 16.06],
  615. ['天津', 15.20],
  616. ['伊斯坦布尔', 14.16],
  617. ['东京', 13.51],
  618. ['广州', 13.08],
  619. ['孟买', 12.44],
  620. ['莫斯科', 12.19],
  621. ['圣保罗', 12.03],
  622. ['深圳', 10.46],
  623. ['雅加达', 10.07],
  624. ['拉合尔', 10.05],
  625. ['首尔', 9.99],
  626. ['武汉', 9.78],
  627. ['金沙萨', 9.73],
  628. ['开罗', 9.27],
  629. ['墨西哥', 8.87]
  630. ],
  631. dataLabels: {
  632. enabled: true,
  633. rotation: -90,
  634. color: '#FFFFFF',
  635. align: 'right',
  636. format: '{point.y:.1f}', // :.1f 为保留 1 位小数
  637. y: 10
  638. }
  639. }]
  640. });
  641. </script>
  642. <script>
  643. var chart = Highcharts.chart('container4', {
  644. chart: {
  645. type: 'line'
  646. },
  647. title: {
  648. text: '工作时长'
  649. },
  650. /*subtitle: {
  651. text: '数据来源: WorldClimate.com'
  652. },*/
  653. xAxis: {
  654. title: {
  655. text: '员工'
  656. }
  657. },
  658. yAxis: {
  659. title: {
  660. text: '气温 (°C)'
  661. }
  662. },
  663. plotOptions: {
  664. line: {
  665. dataLabels: {
  666. // 开启数据标签
  667. enabled: true
  668. },
  669. // 关闭鼠标跟踪,对应的提示框、点击事件会失效
  670. enableMouseTracking: false
  671. }
  672. },
  673. series: [{
  674. name: '东京',
  675. data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
  676. }, {
  677. name: '伦敦',
  678. data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  679. }]
  680. });
  681. </script>
  682. <script>
  683. var chart = Highcharts.chart('container5', {
  684. chart: {
  685. type: 'column'
  686. },
  687. title: {
  688. text: '不良率'
  689. },
  690. xAxis: {
  691. /*categories: ['苹果', '橘子', '梨', '葡萄', '香蕉']*/
  692. title: {
  693. text: '员工'
  694. }
  695. },
  696. yAxis: {
  697. min: 0,
  698. title: {
  699. text: '水果消费总量'
  700. }
  701. },
  702. tooltip: {
  703. pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>' +
  704. '({point.percentage:.0f}%)<br/>',
  705. //:.0f 表示保留 0 位小数,详见教程:https://www.hcharts.cn/docs/basic-labels-string-formatting
  706. shared: true
  707. },
  708. plotOptions: {
  709. column: {
  710. stacking: 'percent'
  711. }
  712. },
  713. series: [{
  714. name: '小张',
  715. data: [5, 3, 4, 7, 2]
  716. }, {
  717. name: '小彭',
  718. data: [2, 2, 3, 2, 1]
  719. }, {
  720. name: '小潘',
  721. data: [3, 4, 4, 2, 5]
  722. }]
  723. });
  724. </script>
  725. <script>
  726. var chart = Highcharts.chart('container10', {
  727. chart: {
  728. zoomType: 'xy'
  729. },
  730. title: {
  731. text: null
  732. },
  733. credits:{
  734. enabled: false // 禁用版权信息
  735. },
  736. exporting: {
  737. enabled: false
  738. },
  739. xAxis: [{
  740. categories: ['张三', '李四', '王五', 'Apr', 'May', 'Jun',
  741. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
  742. crosshair: true,
  743. title: {
  744. text: '员工',
  745. }
  746. }],
  747. yAxis: [{ // Primary yAxis
  748. labels: {
  749. format: '{value}',
  750. style: {
  751. color: Highcharts.getOptions().colors[0],
  752. fontSize:'15px'
  753. }
  754. },
  755. title: {
  756. text: '堆积数',
  757. style: {
  758. color: Highcharts.getOptions().colors[0],
  759. fontSize:'15px'
  760. }
  761. }
  762. }, { // Secondary yAxis
  763. title: {
  764. text: '不良率',
  765. style: {
  766. color: 'red',
  767. fontSize:'15px'
  768. }
  769. },
  770. labels: {
  771. format: '{value} %',
  772. style: {
  773. color: 'red',
  774. fontSize:'15px'
  775. }
  776. },
  777. opposite: true
  778. }],
  779. tooltip: {
  780. shared: true
  781. },
  782. legend: {
  783. layout: 'vertical',
  784. align: 'left',
  785. x: 120,
  786. verticalAlign: 'top',
  787. y: 100,
  788. floating: true,
  789. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
  790. },
  791. series: [{
  792. name: '堆积数',
  793. type: 'column',
  794. yAxis: 1,
  795. data: [200, 150, 135, 122, 111, 75, 65, 63.2, 50, 45, 22, 11],
  796. tooltip: {
  797. valueSuffix: ' mm'
  798. }
  799. }, {
  800. name: '不良率',
  801. type: 'spline',
  802. data: [55, 53, 52.5, 41.5, 44.2, 45.5, 35.2, 26.5, 23.3, 18.3, 13.9, 9.6],
  803. color:'red',
  804. tooltip: {
  805. valueSuffix: '%'
  806. }
  807. }]
  808. });
  809. </script>
  810. </body>
  811. </html>