js.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1.  $(window).load(function(){$(".loading").fadeOut()})
  2. $(function () {
  3. echarts_1();
  4. echarts_2();
  5. echarts_3();
  6. echarts_4();
  7. // echarts_5();
  8. echarts_6();
  9. zb1();
  10. zb2();
  11. zb3();
  12. zb4();
  13. function echarts_1() {
  14. /* 青 岛 研 锦 网 络 科 技 有限公司 版权所有*/
  15. // 基于准备好的dom,初始化echarts实例
  16. var myChart = echarts.init(document.getElementById('echart1'));
  17. option = {
  18. tooltip : {
  19. trigger: 'item',
  20. formatter: "{b} : {c} ({d}%)"
  21. },
  22. legend: {
  23. right:10,
  24. top:30,
  25. height:140,
  26. itemWidth:10,
  27. itemHeight:10,
  28. itemGap:10,
  29. textStyle:{
  30. color: 'rgba(255,255,255,.6)',
  31. fontSize:12
  32. },
  33. orient:'vertical',
  34. data:['图例1','图例2','图例3','图例4']
  35. },
  36. calculable : true,
  37. series : [
  38. {
  39. name:' ',
  40. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#53b666', '#62c98d', '#205acf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  41. type:'pie',
  42. radius : [30, 70],
  43. center : ['35%', '50%'],
  44. roseType : 'radius',
  45. label: {
  46. normal: {
  47. show: true
  48. },
  49. emphasis: {
  50. show: true
  51. }
  52. },
  53. lableLine: {
  54. normal: {
  55. show: false
  56. },
  57. emphasis: {
  58. show: true
  59. }
  60. },
  61. data:[
  62. {value:10, name:'图例1'},
  63. {value:15, name:'图例2'},
  64. {value:25, name:'图例3'},
  65. {value:30, name:'图例4'}
  66. ]
  67. },
  68. ]
  69. };
  70. // 使用刚指定的配置项和数据显示图表。
  71. myChart.setOption(option);
  72. window.addEventListener("resize",function(){
  73. myChart.resize();
  74. });
  75. }
  76. function echarts_2() {
  77. // 基于准备好的dom,初始化echarts实例
  78. var myChart = echarts.init(document.getElementById('echart2'));
  79. option = {
  80. tooltip : {
  81. trigger: 'item',
  82. formatter: "{b} : {c} ({d}%)"
  83. },
  84. legend: {
  85. right:10,
  86. top:30,
  87. height:140,
  88. itemWidth:10,
  89. itemHeight:10,
  90. itemGap:10,
  91. textStyle:{
  92. color: 'rgba(255,255,255,.6)',
  93. fontSize:12
  94. },
  95. orient:'vertical',
  96. data:['图例1','图例2','图例3','图例4']
  97. },
  98. calculable : true,
  99. series : [
  100. {
  101. name:' ',
  102. color: ['#62c98d', '#205acf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  103. type:'pie',
  104. radius : [30, 70],
  105. center : ['35%', '50%'],
  106. roseType : 'radius',
  107. label: {
  108. normal: {
  109. show: true
  110. },
  111. emphasis: {
  112. show: true
  113. }
  114. },
  115. lableLine: {
  116. normal: {
  117. show: true
  118. },
  119. emphasis: {
  120. show: true
  121. }
  122. },
  123. data:[
  124. {value:50, name:'图例1'},
  125. {value:45, name:'图例2'},
  126. {value:35, name:'图例3'},
  127. {value:30, name:'图例4'}
  128. ]
  129. },
  130. ]
  131. };
  132. // 使用刚指定的配置项和数据显示图表。
  133. myChart.setOption(option);
  134. window.addEventListener("resize",function(){
  135. myChart.resize();
  136. });
  137. }
  138. function echarts_3() {
  139. /* 青岛研锦网络科技有限公司 版权所有*/
  140. // 基于准备好的dom,初始化echarts实例
  141. var myChart = echarts.init(document.getElementById('echart3'));
  142. option = {
  143. tooltip: {
  144. trigger: 'axis',
  145. axisPointer: {
  146. lineStyle: {
  147. color: '#dddc6b'
  148. }
  149. }
  150. },
  151. grid: {
  152. left: '10',
  153. top: '20',
  154. right: '30',
  155. bottom: '10',
  156. containLabel: true
  157. },
  158. xAxis: [{
  159. type: 'category',
  160. boundaryGap: false,
  161. axisLabel: {
  162. textStyle: {
  163. color: "rgba(255,255,255,.6)",
  164. fontSize:16,
  165. },
  166. },
  167. axisLine: {
  168. lineStyle: {
  169. color: 'rgba(255,255,255,.1)'
  170. }
  171. },
  172. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  173. }, {
  174. axisPointer: {show: false},
  175. axisLine: { show: false},
  176. position: 'bottom',
  177. offset: 20,
  178. }],
  179. yAxis: [{
  180. type: 'value',
  181. axisTick: {show: false},
  182. axisLine: {
  183. lineStyle: {
  184. color: 'rgba(255,255,255,.1)'
  185. }
  186. },
  187. axisLabel: {
  188. textStyle: {
  189. color: "rgba(255,255,255,.6)",
  190. fontSize:16,
  191. },
  192. },
  193. splitLine: {
  194. lineStyle: {
  195. color: 'rgba(255,255,255,.1)'
  196. }
  197. }
  198. }],
  199. series: [
  200. {
  201. name: '结算率',
  202. type: 'line',
  203. smooth: true,
  204. symbol: 'circle',
  205. symbolSize: 5,
  206. showSymbol: false,
  207. lineStyle: {
  208. normal: {
  209. color: '#dddc6b',
  210. width: 4
  211. }
  212. },
  213. areaStyle: {
  214. normal: {
  215. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  216. offset: 0,
  217. color: 'rgba(221, 220, 107, 0.4)'
  218. }, {
  219. offset: 0.8,
  220. color: 'rgba(221, 220, 107, 0.1)'
  221. }], false),
  222. shadowColor: 'rgba(0, 0, 0, 0.1)',
  223. }
  224. },
  225. itemStyle: {
  226. normal: {
  227. color: '#dddc6b',
  228. borderColor: 'rgba(221, 220, 107, .1)',
  229. borderWidth: 12
  230. }
  231. },
  232. data: [3, 4, 3, 4, 3, 4, 3, 6, 2, 4, 2, 4]
  233. },
  234. ]
  235. };
  236. // 使用刚指定的配置项和数据显示图表。
  237. myChart.setOption(option);
  238. window.addEventListener("resize",function(){
  239. myChart.resize();
  240. });
  241. }
  242. function echarts_4() {
  243. // 基于准备好的dom,初始化echarts实例
  244. var myChart = echarts.init(document.getElementById('echart4'));
  245. option = {
  246. tooltip: {
  247. trigger: 'axis',
  248. axisPointer: {
  249. type: 'shadow'
  250. }
  251. },
  252. legend: {
  253. data: ['2017年', '2018年'],
  254. align: 'right',
  255. right: '40%',
  256. top:'0%',
  257. textStyle: {
  258. color: "#fff",
  259. fontSize: '16',
  260. },
  261. itemWidth: 16,
  262. itemHeight: 16,
  263. itemGap: 35
  264. },
  265. grid: {
  266. left: '0%',
  267. top:'40px',
  268. right: '0%',
  269. bottom: '2%',
  270. containLabel: true
  271. },
  272. xAxis: [{
  273. type: 'category',
  274. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  275. axisLine: {
  276. show: true,
  277. lineStyle: {
  278. color: "rgba(255,255,255,.1)",
  279. width: 1,
  280. type: "solid"
  281. },
  282. },
  283. axisTick: {
  284. show: false,
  285. },
  286. axisLabel: {
  287. interval: 0,
  288. // rotate:50,
  289. show: true,
  290. splitNumber: 15,
  291. textStyle: {
  292. color: "rgba(255,255,255,.6)",
  293. fontSize: '16',
  294. },
  295. },
  296. }],
  297. yAxis: [{
  298. type: 'value',
  299. axisLabel: {
  300. //formatter: '{value} %'
  301. show:true,
  302. textStyle: {
  303. color: "rgba(255,255,255,.6)",
  304. fontSize: '16',
  305. },
  306. },
  307. axisTick: {
  308. show: false,
  309. },
  310. axisLine: {
  311. show: true,
  312. lineStyle: {
  313. color: "rgba(255,255,255,.1 )",
  314. width: 1,
  315. type: "solid"
  316. },
  317. },
  318. splitLine: {
  319. lineStyle: {
  320. color: "rgba(255,255,255,.1)",
  321. }
  322. }
  323. }],
  324. series: [{
  325. name: '2017年',
  326. type: 'bar',
  327. data: [2, 3, 3, 9, 15, 12, 6, 4, 6, 7, 4, 10],
  328. barWidth:'15', //柱子宽度
  329. // barGap: 1, //柱子之间间距
  330. itemStyle: {
  331. normal: {
  332. color:'#2f89cf',
  333. opacity: 1,
  334. barBorderRadius: 5,
  335. }
  336. }
  337. }, {
  338. name: '2018年',
  339. type: 'bar',
  340. data: [1, 4, 5, 11, 12, 9, 5, 6, 5, 6, 3, 9],
  341. barWidth:'15',
  342. // barGap: 1,
  343. itemStyle: {
  344. normal: {
  345. color:'#62c98d',
  346. opacity: 1,
  347. barBorderRadius: 5,
  348. }
  349. }
  350. },
  351. ]
  352. };
  353. /* 青岛研锦网络科技有限公司 版权所有*/
  354. // 使用刚指定的配置项和数据显示图表。
  355. myChart.setOption(option);
  356. window.addEventListener("resize",function(){
  357. myChart.resize();
  358. });
  359. }
  360. // function echarts_5() {
  361. // // 基于准备好的dom,初始化echarts实例
  362. // var myChart = echarts.init(document.getElementById('echart5'));
  363. // option = {
  364. // // backgroundColor: '#00265f',
  365. // tooltip: {
  366. // trigger: 'axis',
  367. // axisPointer: {
  368. // type: 'shadow'
  369. // }
  370. // },
  371. // legend: {
  372. // data: ['2017年', '2018年'],
  373. // align: 'right',
  374. // right: '40%',
  375. // top:'0%',
  376. // textStyle: {
  377. // color: "#fff",
  378. // fontSize: '16',
  379. //
  380. // },
  381. //
  382. // itemGap: 35
  383. // },
  384. // grid: {
  385. // left: '0%',
  386. // top:'40px',
  387. // right: '0%',
  388. // bottom: '2%',
  389. // containLabel: true
  390. // },
  391. // xAxis: [{
  392. // type: 'category',
  393. // data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  394. // axisLine: {
  395. // show: true,
  396. // lineStyle: {
  397. // color: "rgba(255,255,255,.1)",
  398. // width: 1,
  399. // type: "solid"
  400. // },
  401. // },
  402. // axisTick: {
  403. // show: false,
  404. // },
  405. // axisLabel: {
  406. // interval: 0,
  407. // // rotate:50,
  408. // show: true,
  409. // splitNumber: 15,
  410. // textStyle: {
  411. // color: "rgba(255,255,255,.6)",
  412. // fontSize: '16',
  413. // },
  414. // },
  415. // }],
  416. // yAxis: [{
  417. // type: 'value',
  418. // axisLabel: {
  419. // //formatter: '{value} %'
  420. // show:true,
  421. // textStyle: {
  422. // color: "rgba(255,255,255,.6)",
  423. // fontSize: '16',
  424. // },
  425. // },
  426. // axisTick: {
  427. // show: false,
  428. // },
  429. // axisLine: {
  430. // show: true,
  431. // lineStyle: {
  432. // color: "rgba(255,255,255,.1 )",
  433. // width: 1,
  434. // type: "solid"
  435. // },
  436. // },
  437. // splitLine: {
  438. // lineStyle: {
  439. // color: "rgba(255,255,255,.1)",
  440. // }
  441. // }
  442. // }],
  443. // series: [{
  444. // name: '2017年',
  445. // type: 'line',
  446. //
  447. // data: [2, 6, 3, 8, 5, 8, 10, 13, 8, 5, 6, 9],
  448. //
  449. // itemStyle: {
  450. // normal: {
  451. // color:'#2f89cf',
  452. // opacity: 1,
  453. //
  454. // barBorderRadius: 5,
  455. // }
  456. // }
  457. // }, {
  458. // name: '2018年',
  459. // type: 'line',
  460. // data: [5, 2, 6, 4, 5, 12, 5, 17, 9, 2, 6, 3],
  461. // barWidth:'15',
  462. // // barGap: 1,
  463. // itemStyle: {
  464. // normal: {
  465. // color:'#62c98d',
  466. // opacity: 1,
  467. // barBorderRadius: 5,
  468. // }
  469. // }
  470. // },
  471. // ]
  472. // };
  473. //
  474. //
  475. // // 使用刚指定的配置项和数据显示图表。
  476. // myChart.setOption(option);
  477. // window.addEventListener("resize",function(){
  478. // myChart.resize();
  479. // });
  480. // }
  481. function echarts_6() {
  482. // 基于准备好的dom,初始化echarts实例
  483. var myChart = echarts.init(document.getElementById('echart6'));
  484. option = {
  485. tooltip : {
  486. trigger: 'item',
  487. formatter: "{b} : {c} ({d}%)"
  488. },
  489. legend: {
  490. right:10,
  491. top:30,
  492. height:140,
  493. itemWidth:10,
  494. itemHeight:10,
  495. itemGap:10,
  496. textStyle:{
  497. color: 'rgba(255,255,255,.6)',
  498. fontSize:12
  499. },
  500. orient:'vertical',
  501. data:['图例1','图例2','图例3','图例4']
  502. },
  503. calculable : true,
  504. series : [
  505. {
  506. name:' ',
  507. color: ['#62c98d', '#205acf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  508. type:'pie',
  509. radius : [30, 70],
  510. center : ['35%', '50%'],
  511. roseType : 'radius',
  512. label: {
  513. normal: {
  514. show: true
  515. },
  516. emphasis: {
  517. show: true
  518. }
  519. },
  520. lableLine: {
  521. normal: {
  522. show: true
  523. },
  524. emphasis: {
  525. show: true
  526. }
  527. },
  528. data:[
  529. {value:50, name:'图例1'},
  530. {value:45, name:'图例2'},
  531. {value:35, name:'图例3'},
  532. {value:30, name:'图例4'}
  533. ]
  534. },
  535. ]
  536. };
  537. // 使用刚指定的配置项和数据显示图表。
  538. myChart.setOption(option);
  539. window.addEventListener("resize",function(){
  540. myChart.resize();
  541. });
  542. }
  543. function zb1() {
  544. // 基于准备好的dom,初始化echarts实例
  545. var myChart = echarts.init(document.getElementById('zb1'));
  546. var v1=60//结算数
  547. var v2=40//未结算数
  548. var v3=v1+v2//总订单数
  549. option = {
  550. series: [{
  551. type: 'pie',
  552. radius: ['60%', '70%'],
  553. color:'#49bcf7',
  554. label: {
  555. normal: {
  556. position: 'center'
  557. }
  558. },
  559. data: [{
  560. value: v1,
  561. name: '最高分',
  562. label: {
  563. normal: {
  564. formatter:Math.round( v1/v3*100)+ '%',
  565. textStyle: {
  566. fontSize: 30,
  567. color:'#fff',
  568. }
  569. }
  570. }
  571. },
  572. {
  573. value: v2,
  574. label: {
  575. normal: {
  576. formatter : function (params){
  577. return '最高分';
  578. },
  579. textStyle: {
  580. color: '#aaa',
  581. fontSize: 16
  582. }
  583. }
  584. },
  585. itemStyle: {
  586. normal: {
  587. color: 'rgba(255,255,255,.2)'
  588. },
  589. emphasis: {
  590. color: '#fff'
  591. }
  592. },
  593. }]
  594. }]
  595. };
  596. myChart.setOption(option);
  597. window.addEventListener("resize",function(){
  598. myChart.resize();
  599. });
  600. }
  601. function zb2() {
  602. // 基于准备好的dom,初始化echarts实例
  603. var myChart = echarts.init(document.getElementById('zb2'));
  604. var v1=80//结算数
  605. var v2=20//未结算数
  606. var v3=v1+v2//总订单数
  607. option = {
  608. //animation: false,
  609. series: [{
  610. type: 'pie',
  611. radius: ['60%', '70%'],
  612. color:'#49bcf7',
  613. label: {
  614. normal: {
  615. position: 'center'
  616. }
  617. },
  618. data: [{
  619. value: v1,
  620. name: '最低分',
  621. label: {
  622. normal: {
  623. formatter:Math.round( v1/v3*100)+ '%',
  624. textStyle: {
  625. fontSize: 24,
  626. color:'#fff',
  627. }
  628. }
  629. }
  630. }, {
  631. value: v2,
  632. label: {
  633. normal: {
  634. formatter : function (params){
  635. return '最低分';
  636. },
  637. textStyle: {
  638. color: '#aaa',
  639. fontSize: 16
  640. }
  641. }
  642. },
  643. itemStyle: {
  644. normal: {
  645. color: 'rgba(255,255,255,.2)'
  646. },
  647. emphasis: {
  648. color: '#fff'
  649. }
  650. },
  651. }]
  652. }]
  653. };
  654. myChart.setOption(option);
  655. window.addEventListener("resize",function(){
  656. myChart.resize();
  657. });
  658. }
  659. function zb3() {
  660. // 基于准备好的dom,初始化echarts实例
  661. var myChart = echarts.init(document.getElementById('zb3'));
  662. var v1=30//结算金额
  663. var v2=70//未结算
  664. var v3=v1+v2
  665. option = {
  666. series: [{
  667. type: 'pie',
  668. radius: ['60%', '70%'],
  669. color:'#62c98d',
  670. label: {
  671. normal: {
  672. position: 'center'
  673. }
  674. },
  675. data: [{
  676. value: v1,
  677. name: '平均分',
  678. label: {
  679. normal: {
  680. formatter:Math.round( v1/v3*100)+ '%',
  681. textStyle: {
  682. fontSize: 24,
  683. color:'#fff',
  684. }
  685. }
  686. }
  687. }, {
  688. value: v2,
  689. label: {
  690. normal: {
  691. formatter : function (params){
  692. return '平均分';
  693. },
  694. textStyle: {
  695. color: '#aaa',
  696. fontSize: 16
  697. }
  698. }
  699. },
  700. itemStyle: {
  701. normal: {
  702. color: 'rgba(255,255,255,.2)'
  703. },
  704. emphasis: {
  705. color: '#fff'
  706. }
  707. },
  708. }]
  709. }]
  710. };
  711. myChart.setOption(option);
  712. window.addEventListener("resize",function(){
  713. myChart.resize();
  714. });
  715. }
  716. function zb4() {
  717. // 基于准备好的dom,初始化echarts实例
  718. var myChart = echarts.init(document.getElementById('zb4'));
  719. var v1=90//结算金额
  720. var v2=10//未结算
  721. var v3=v1+v2
  722. option = {
  723. series: [{
  724. type: 'pie',
  725. radius: ['60%', '70%'],
  726. color:'#29d08a',
  727. label: {
  728. normal: {
  729. position: 'center'
  730. }
  731. },
  732. data: [{
  733. value: v1,
  734. name: '平均时长',
  735. label: {
  736. normal: {
  737. formatter:Math.round( v1/v3*100)+ '%',
  738. textStyle: {
  739. fontSize: 24,
  740. color:'#fff',
  741. }
  742. }
  743. }
  744. }, {
  745. value: v2,
  746. label: {
  747. normal: {
  748. formatter : function (params){
  749. return '平均时长';
  750. },
  751. textStyle: {
  752. color: '#aaa',
  753. fontSize: 16
  754. }
  755. }
  756. },
  757. itemStyle: {
  758. normal: {
  759. color: 'rgba(255,255,255,.2)'
  760. },
  761. emphasis: {
  762. color: '#fff'
  763. }
  764. },
  765. }]
  766. }]
  767. };
  768. myChart.setOption(option);
  769. window.addEventListener("resize",function(){
  770. myChart.resize();
  771. });
  772. }
  773. })