lazhang.html 31 KB

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