index01.js 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714
  1. // 营销分析
  2. // 24小时购买时间分析
  3. $(function(){
  4. var myChart = echarts.init($("#buyTime")[0]);
  5. var option = {
  6. tooltip: { //提示框,鼠标悬浮交互时的信息提示
  7. show: true,
  8. trigger: 'axis'
  9. },
  10. grid: {
  11. x: 46,
  12. y:30,
  13. x2:30,
  14. y2:40,
  15. borderWidth: 0
  16. },
  17. legend: {
  18. data: [],
  19. orient: 'vertical',
  20. textStyle: { fontWeight: 'bold', color: '#a4a7ab' }
  21. },
  22. calculable: false,
  23. xAxis: [
  24. {
  25. type: 'category',
  26. boundaryGap: false,
  27. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12','13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24'],
  28. splitLine: {
  29. show: false
  30. },
  31. axisLabel: {
  32. show: true,
  33. textStyle: {
  34. color: '#a4a7ab',
  35. align: 'center'
  36. }
  37. }
  38. }
  39. ],
  40. yAxis: [
  41. {
  42. type: 'value',
  43. splitLine: {
  44. show: false
  45. },
  46. axisLabel: {
  47. show: true,
  48. textStyle: {
  49. color: '#a4a7ab',
  50. align: 'right'
  51. }
  52. }
  53. }
  54. ],
  55. series: [
  56. {
  57. name: '',
  58. type: 'line',
  59. stack: '24小时购买时间',
  60. data: [120, 132, 101, 146, 199, 230, 210, 230, 240, 256, 278, 300,120, 132, 101, 146, 199, 230, 210, 230, 240, 256, 278, 300],
  61. itemStyle: {
  62. normal: {
  63. color: '#02bcbc'
  64. }
  65. }
  66. }
  67. ]
  68. };
  69. myChart.setOption(option);
  70. });
  71. // 套餐类型分析
  72. $(function(){
  73. var myChart = echarts.init($("#Package01")[0]);
  74. option = {
  75. legend: {
  76. orient : 'vertical',
  77. x : 'left',
  78. data:['套餐A','套餐B','套餐C','套餐D','套餐E'], textStyle:{
  79. color:"#e9ebee"
  80. }
  81. },
  82. toolbox: {
  83. show : true,
  84. feature : {
  85. mark : {show: true},
  86. dataView : {show: true, readOnly: false},
  87. magicType : {
  88. show: true,
  89. type: ['pie', 'funnel'],
  90. option: {
  91. funnel: {
  92. x: '25%',
  93. width: '50%',
  94. funnelAlign: 'left',
  95. max: 1548
  96. }
  97. }
  98. },
  99. restore : {show: true},
  100. saveAsImage : {show: true}
  101. }
  102. },
  103. calculable : false,
  104. series : [
  105. {
  106. name:'套餐',
  107. type:'pie',
  108. radius : '55%',
  109. center: ['50%', '60%'],
  110. data:[
  111. {value:335, name:'套餐A'},
  112. {value:310, name:'套餐B'},
  113. {value:234, name:'套餐C'},
  114. {value:135, name:'套餐D'},
  115. {value:1548, name:'套餐E'}
  116. ]
  117. }
  118. ]
  119. };
  120. myChart.setOption(option);
  121. });
  122. // 渠道分析
  123. $(function(){
  124. var myChart = echarts.init($("#rode01")[0]);
  125. option = {
  126. legend: {
  127. orient : 'vertical',
  128. x : 'left',
  129. data:['套餐A','套餐B','套餐C','套餐D','套餐E','套餐F','套餐G','套餐H'], textStyle:{
  130. color:"#e9ebee"
  131. }
  132. },
  133. calculable : false,
  134. series : [
  135. {
  136. name:'面积模式',
  137. type:'pie',
  138. radius : '60%',
  139. center: ['50%', '60%'],
  140. roseType : 'area',
  141. x: '50%', // for funnel
  142. max: 40, // for funnel
  143. sort : 'ascending', // for funnel
  144. data:[
  145. {value:10, name:'套餐A'},
  146. {value:5, name:'套餐B'},
  147. {value:15, name:'套餐C'},
  148. {value:25, name:'套餐D'},
  149. {value:20, name:'套餐E'},
  150. {value:35, name:'套餐F'},
  151. {value:30, name:'套餐H'},
  152. {value:40, name:'套餐G'}
  153. ]
  154. }
  155. ]
  156. };
  157. myChart.setOption(option);
  158. });
  159. // 订退分析
  160. $(function(){
  161. var myChart = echarts.init($("#bookAret")[0]);
  162. option = {
  163. tooltip : {
  164. trigger: 'axis'
  165. },
  166. grid: {
  167. x: 46,
  168. y:30,
  169. x2:30,
  170. y2:40,
  171. borderWidth: 0
  172. },
  173. legend: {
  174. data:['退订数','订单数'],
  175. textStyle:{
  176. color:"#e9ebee"
  177. }
  178. },
  179. calculable : false,
  180. xAxis : [
  181. {
  182. type : 'category',
  183. data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],axisLabel: {
  184. show: true,
  185. textStyle: {
  186. color: '#a4a7ab',
  187. align: 'center'
  188. }
  189. }
  190. },
  191. ],
  192. yAxis : [
  193. {
  194. type : 'value',
  195. axisLabel: {
  196. show: true,
  197. textStyle: {
  198. color: '#a4a7ab',
  199. align: 'right'
  200. }
  201. }
  202. }
  203. ],
  204. series : [
  205. {
  206. name:'退订数',
  207. type:'bar',
  208. data:[100, 80, 136, 150, 120, 56, 200, 162, 105, 63, 169, 236],
  209. markPoint : {
  210. data : [
  211. {type : 'max', name: '最大值'},
  212. {type : 'min', name: '最小值'}
  213. ]
  214. },
  215. markLine : {
  216. data : [
  217. {type : 'average', name: '平均值'}
  218. ]
  219. }
  220. },
  221. {
  222. name:'订单数',
  223. type:'bar',
  224. data:[983, 820, 1236, 930, 1600, 1032, 890, 1300, 1921, 984, 1960, 2630],
  225. markPoint : {
  226. data : [
  227. {name : '月最高', value : 2630, xAxis: 12, yAxis: 2630, symbolSize:18},
  228. {name : '月最低', value : 820, xAxis: 2, yAxis: 830}
  229. ]
  230. },
  231. markLine : {
  232. data : [
  233. {type : 'average', name : '平均值'}
  234. ]
  235. }
  236. }
  237. ]
  238. };
  239. myChart.setOption(option);
  240. });
  241. // 按月进行趋势分析
  242. $(function(){
  243. var myChart = echarts.init($("#bookBmonth")[0]);
  244. var option = {
  245. tooltip: { //提示框,鼠标悬浮交互时的信息提示
  246. show: true,
  247. trigger: 'axis'
  248. },
  249. grid: {
  250. x: 46,
  251. y:30,
  252. x2:30,
  253. y2:40,
  254. borderWidth: 0
  255. },
  256. legend: {
  257. data: [],
  258. orient: 'vertical',
  259. textStyle: { fontWeight: 'bold', color: '#a4a7ab' }
  260. },
  261. calculable: false,
  262. xAxis: [
  263. {
  264. type: 'category',
  265. boundaryGap: false,
  266. data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
  267. splitLine: {
  268. show: false
  269. },
  270. axisLabel: {
  271. show: true,
  272. textStyle: {
  273. color: '#a4a7ab',
  274. align: 'center'
  275. }
  276. }
  277. }
  278. ],
  279. yAxis: [
  280. {
  281. type: 'value',
  282. splitLine: {
  283. show: false
  284. },
  285. axisLabel: {
  286. show: true,
  287. textStyle: {
  288. color: '#a4a7ab',
  289. align: 'right'
  290. }
  291. }
  292. }
  293. ],
  294. series: [
  295. {
  296. name: '',
  297. type: 'line',
  298. stack: '订单数',
  299. data:[983, 820, 1236, 930, 1600, 1032, 890, 1300, 1921, 984, 1960, 2630],
  300. itemStyle: {
  301. normal: {
  302. color: '#02bcbc'
  303. }
  304. }
  305. }
  306. ]
  307. };
  308. myChart.setOption(option);
  309. });
  310. // 气候与订单分析
  311. $(function(){
  312. var myChart = echarts.init($("#whearAbook")[0]);
  313. option = {
  314. tooltip : {
  315. trigger: 'axis'
  316. },
  317. grid: {
  318. x: 46,
  319. y:30,
  320. x2:30,
  321. y2:20,
  322. borderWidth: 0
  323. },
  324. calculable : false,
  325. legend: {
  326. data:['下雨','下雪','晴天','订单量'],
  327. textStyle:{
  328. color:"#e9ebee"
  329. }
  330. },
  331. xAxis : [
  332. {
  333. type : 'category',
  334. data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
  335. splitLine: {
  336. show: false
  337. },
  338. axisLabel: {
  339. show: true,
  340. textStyle: {
  341. color: '#a4a7ab',
  342. align: 'center'
  343. }
  344. }
  345. }
  346. ],
  347. yAxis : [
  348. {
  349. type : 'value',
  350. name : '订单量',
  351. axisLabel : {
  352. formatter: '{value} ',
  353. textStyle: {
  354. color: '#a4a7ab',
  355. align: 'right'
  356. }
  357. }
  358. },
  359. {
  360. type : 'value',
  361. name : '温度',
  362. axisLabel : {
  363. formatter: '{value} °C',
  364. textStyle: {
  365. color: '#a4a7ab',
  366. align: 'right'
  367. }
  368. },
  369. splitLine: {
  370. show: false
  371. },
  372. },
  373. ],
  374. series : [
  375. {
  376. name:'下雨',
  377. type:'bar',
  378. data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
  379. },
  380. {
  381. name:'下雪',
  382. type:'bar',
  383. data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
  384. },
  385. {
  386. name:'晴天',
  387. type:'bar',
  388. data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
  389. },
  390. {
  391. name:'订单量',
  392. type:'line',
  393. yAxisIndex: 1,
  394. data:[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
  395. }
  396. ]
  397. };
  398. myChart.setOption(option);
  399. });
  400. // 交通与订单分析
  401. $(function(){
  402. var myChart = echarts.init($("#rodeAbook")[0]);
  403. option = {
  404. tooltip : {
  405. trigger: 'axis'
  406. },
  407. grid: {
  408. x: 46,
  409. y:30,
  410. x2:30,
  411. y2:20,
  412. borderWidth: 0
  413. },
  414. calculable : false,
  415. legend: {
  416. data:['拥堵','畅通','订单量'],
  417. textStyle:{
  418. color:"#e9ebee"
  419. }
  420. },
  421. xAxis : [
  422. {
  423. type : 'category',
  424. data : ['周一','周二','周三','周四','周五','周六','周日'],
  425. splitLine: {
  426. show: false
  427. },
  428. axisLabel: {
  429. show: true,
  430. textStyle: {
  431. color: '#a4a7ab',
  432. align: 'center'
  433. }
  434. }
  435. }
  436. ],
  437. yAxis : [
  438. {
  439. type : 'value',
  440. name : '订单量',
  441. axisLabel : {
  442. formatter: '{value} ',
  443. textStyle: {
  444. color: '#a4a7ab',
  445. align: 'right'
  446. }
  447. }
  448. },
  449. {
  450. type : 'value',
  451. name : '车流量',
  452. axisLabel : {
  453. formatter: '{value} ',
  454. textStyle: {
  455. color: '#a4a7ab',
  456. align: 'right'
  457. }
  458. },
  459. splitLine: {
  460. show: false
  461. },
  462. },
  463. ],
  464. series : [
  465. {
  466. name:'畅通',
  467. type:'bar',
  468. stack: '车流量',
  469. data:[120, 132, 101, 134, 90, 230, 210]
  470. },
  471. {
  472. name:'拥堵',
  473. type:'bar',
  474. stack: '车流量',
  475. data:[220, 232, 301, 234, 190, 330, 210]
  476. },
  477. {
  478. name:'订单量',
  479. type:'line',
  480. yAxisIndex: 1,
  481. data:[320, 232, 101, 134, 290, 230, 210]
  482. }
  483. ]
  484. };
  485. myChart.setOption(option);
  486. });
  487. // 季节与订单分析
  488. $(function(){
  489. var myChart = echarts.init($("#seaAbook01")[0]);
  490. option = {
  491. legend: {
  492. orient : 'vertical',
  493. x : 'left',
  494. data:['春季','夏季','秋季','冬季'], textStyle:{
  495. color:"#e9ebee"
  496. }
  497. },
  498. calculable : false,
  499. series : [
  500. {
  501. name:'季节与订单关系',
  502. type:'pie',
  503. radius : '70%',
  504. center: ['50%', '60%'],
  505. splitLine:{show: false},
  506. roseType : 'area',
  507. x: '50%', // for funnel
  508. max: 40, // for funnel
  509. sort : 'ascending', // for funnel
  510. data:[
  511. {value:2560, name:'春季'},
  512. {value:3690, name:'夏季'},
  513. {value:5690, name:'秋季'},
  514. {value:6312, name:'冬季'}
  515. ]
  516. }
  517. ]
  518. };
  519. myChart.setOption(option);
  520. });
  521. // 活动与订单分析
  522. $(function(){
  523. var myChart = echarts.init($("#actionBook")[0]);
  524. option = {
  525. tooltip : {
  526. trigger: 'axis'
  527. },
  528. grid: {
  529. x: 46,
  530. y:30,
  531. x2:30,
  532. y2:20,
  533. borderWidth: 0
  534. },
  535. calculable : false,
  536. legend: {
  537. data:['降价活动','买一送一活动','送积分活动','送礼品活动'],
  538. textStyle:{
  539. color:"#e9ebee"
  540. }
  541. },
  542. xAxis : [
  543. {
  544. type : 'category',
  545. splitLine : {show : false},
  546. data : ['周一','周二','周三','周四','周五','周六','周日'],
  547. axisLabel: {
  548. show: true,
  549. textStyle: {
  550. color: '#fff',
  551. align: 'center'
  552. }
  553. }
  554. }
  555. ],
  556. yAxis : [
  557. {
  558. type : 'value',
  559. position: 'right',
  560. splitLine : {show : false},
  561. axisLabel: {
  562. show: true,
  563. textStyle: {
  564. color: '#fff',
  565. align: 'center'
  566. }
  567. }
  568. }
  569. ],
  570. series : [
  571. {
  572. name:'降价活动',
  573. type:'bar',
  574. data:[320, 332, 301, 334, 390, 330, 320]
  575. },
  576. {
  577. name:'买一送一活动',
  578. type:'bar',
  579. tooltip : {trigger: 'item'},
  580. stack: '广告',
  581. data:[120, 132, 101, 134, 90, 230, 210]
  582. },
  583. {
  584. name:'送积分活动',
  585. type:'bar',
  586. tooltip : {trigger: 'item'},
  587. stack: '广告',
  588. data:[220, 182, 191, 234, 290, 330, 310]
  589. },
  590. {
  591. name:'送礼品活动',
  592. type:'bar',
  593. tooltip : {trigger: 'item'},
  594. stack: '广告',
  595. data:[150, 232, 201, 154, 190, 330, 410]
  596. },
  597. {
  598. name:'订单趋势',
  599. type:'line',
  600. data:[862, 1018, 964, 1026, 1679, 1600, 1570]
  601. },
  602. {
  603. name:'订单细分',
  604. type:'pie',
  605. tooltip : {
  606. trigger: 'item',
  607. formatter: '{a} <br/>{b} : {c} ({d}%)'
  608. },
  609. center: [100,80],
  610. radius : [0, 30],
  611. itemStyle : {
  612. normal : {
  613. labelLine : {
  614. length : 20
  615. }
  616. }
  617. },
  618. data:[
  619. {value:1048, name:'订单一'},
  620. {value:251, name:'订单二'},
  621. {value:147, name:'订单三'},
  622. {value:102, name:'订单四'}
  623. ]
  624. }
  625. ]
  626. };
  627. myChart.setOption(option);
  628. });
  629. // 特殊时间点与订单分析
  630. $(function(){
  631. var myChart = echarts.init($("#sperceBook01")[0]);
  632. option = {
  633. tooltip : {
  634. trigger: 'axis',
  635. formatter: function (params) {
  636. var res = params[0].seriesName + ' ' + params[0].name;
  637. res += '<br/> 0-05 : ' + params[0].value[0] + ' 06-12 : ' + params[0].value[3];
  638. res += '<br/> 13-18: ' + params[0].value[1] + ' 19-24 : ' + params[0].value[2];
  639. return res;
  640. }
  641. },
  642. grid: {
  643. x: 46,
  644. y:30,
  645. x2:30,
  646. y2:20,
  647. borderWidth: 0
  648. },
  649. legend: {
  650. data:['订单数'],
  651. textStyle:{
  652. color:"#e9ebee"
  653. }
  654. },
  655. dataZoom : {
  656. show : true,
  657. realtime: true,
  658. start : 50,
  659. end : 100
  660. },
  661. xAxis : [
  662. {
  663. type : 'category',
  664. textStyle: {
  665. color: '#a4a7ab',
  666. },
  667. boundaryGap : true,
  668. axisTick: {onGap:false},
  669. splitLine: {show:false},
  670. data : [
  671. "2013/1/24", "2013/1/25", "2013/1/28", "2013/1/29", "2013/1/30",
  672. "2013/1/31", "2013/2/1", "2013/2/4", "2013/2/5", "2013/2/6",
  673. "2013/2/7", "2013/2/8", "2013/2/18", "2013/2/19", "2013/2/20",
  674. "2013/2/21", "2013/2/22", "2013/2/25", "2013/2/26", "2013/2/27",
  675. "2013/2/28", "2013/3/1", "2013/3/4", "2013/3/5", "2013/3/6",
  676. "2013/3/7", "2013/3/8", "2013/3/11", "2013/3/12", "2013/3/13",
  677. "2013/3/14", "2013/3/15", "2013/3/18", "2013/3/19", "2013/3/20",
  678. "2013/3/21", "2013/3/22", "2013/3/25", "2013/3/26", "2013/3/27",
  679. "2013/3/28", "2013/3/29", "2013/4/1", "2013/4/2", "2013/4/3",
  680. "2013/4/8", "2013/4/9", "2013/4/10", "2013/4/11", "2013/4/12",
  681. "2013/4/15", "2013/4/16", "2013/4/17", "2013/4/18", "2013/4/19",
  682. "2013/4/22", "2013/4/23", "2013/4/24", "2013/4/25", "2013/4/26",
  683. "2013/5/2", "2013/5/3", "2013/5/6", "2013/5/7", "2013/5/8",
  684. "2013/5/9", "2013/5/10", "2013/5/13", "2013/5/14", "2013/5/15",
  685. "2013/5/16", "2013/5/17", "2013/5/20", "2013/5/21", "2013/5/22",
  686. "2013/5/23", "2013/5/24", "2013/5/27", "2013/5/28", "2013/5/29",
  687. "2013/5/30", "2013/5/31", "2013/6/3", "2013/6/4", "2013/6/5",
  688. "2013/6/6", "2013/6/7", "2013/6/13"
  689. ]
  690. }
  691. ],
  692. yAxis : [
  693. {
  694. type : 'value',
  695. textStyle: {
  696. color: '#a4a7ab',
  697. },
  698. scale:true,
  699. boundaryGap: [0.01, 0.01]
  700. }
  701. ],
  702. series : [
  703. {
  704. name:'订单数',
  705. type:'k',
  706. data:[ // 开盘,收盘,最低,最高
  707. [2320.26,2302.6,2287.3,2362.94],
  708. [2300,2291.3,2288.26,2308.38],
  709. [2295.35,2346.5,2295.35,2346.92],
  710. [2347.22,2358.98,2337.35,2363.8],
  711. [2360.75,2382.48,2347.89,2383.76],
  712. [2383.43,2385.42,2371.23,2391.82],
  713. [2377.41,2419.02,2369.57,2421.15],
  714. [2425.92,2428.15,2417.58,2440.38],
  715. [2411,2433.13,2403.3,2437.42],
  716. [2432.68,2434.48,2427.7,2441.73],
  717. [2430.69,2418.53,2394.22,2433.89],
  718. [2416.62,2432.4,2414.4,2443.03],
  719. [2441.91,2421.56,2415.43,2444.8],
  720. [2420.26,2382.91,2373.53,2427.07],
  721. [2383.49,2397.18,2370.61,2397.94],
  722. [2378.82,2325.95,2309.17,2378.82],
  723. [2322.94,2314.16,2308.76,2330.88],
  724. [2320.62,2325.82,2315.01,2338.78],
  725. [2313.74,2293.34,2289.89,2340.71],
  726. [2297.77,2313.22,2292.03,2324.63],
  727. [2322.32,2365.59,2308.92,2366.16],
  728. [2364.54,2359.51,2330.86,2369.65],
  729. [2332.08,2273.4,2259.25,2333.54],
  730. [2274.81,2326.31,2270.1,2328.14],
  731. [2333.61,2347.18,2321.6,2351.44],
  732. [2340.44,2324.29,2304.27,2352.02],
  733. [2326.42,2318.61,2314.59,2333.67],
  734. [2314.68,2310.59,2296.58,2320.96],
  735. [2309.16,2286.6,2264.83,2333.29],
  736. [2282.17,2263.97,2253.25,2286.33],
  737. [2255.77,2270.28,2253.31,2276.22],
  738. [2269.31,2278.4,2250,2312.08],
  739. [2267.29,2240.02,2239.21,2276.05],
  740. [2244.26,2257.43,2232.02,2261.31],
  741. [2257.74,2317.37,2257.42,2317.86],
  742. [2318.21,2324.24,2311.6,2330.81],
  743. [2321.4,2328.28,2314.97,2332],
  744. [2334.74,2326.72,2319.91,2344.89],
  745. [2318.58,2297.67,2281.12,2319.99],
  746. [2299.38,2301.26,2289,2323.48],
  747. [2273.55,2236.3,2232.91,2273.55],
  748. [2238.49,2236.62,2228.81,2246.87],
  749. [2229.46,2234.4,2227.31,2243.95],
  750. [2234.9,2227.74,2220.44,2253.42],
  751. [2232.69,2225.29,2217.25,2241.34],
  752. [2196.24,2211.59,2180.67,2212.59],
  753. [2215.47,2225.77,2215.47,2234.73],
  754. [2224.93,2226.13,2212.56,2233.04],
  755. [2236.98,2219.55,2217.26,2242.48],
  756. [2218.09,2206.78,2204.44,2226.26],
  757. [2199.91,2181.94,2177.39,2204.99],
  758. [2169.63,2194.85,2165.78,2196.43],
  759. [2195.03,2193.8,2178.47,2197.51],
  760. [2181.82,2197.6,2175.44,2206.03],
  761. [2201.12,2244.64,2200.58,2250.11],
  762. [2236.4,2242.17,2232.26,2245.12],
  763. [2242.62,2184.54,2182.81,2242.62],
  764. [2187.35,2218.32,2184.11,2226.12],
  765. [2213.19,2199.31,2191.85,2224.63],
  766. [2203.89,2177.91,2173.86,2210.58],
  767. [2170.78,2174.12,2161.14,2179.65],
  768. [2179.05,2205.5,2179.05,2222.81],
  769. [2212.5,2231.17,2212.5,2236.07],
  770. [2227.86,2235.57,2219.44,2240.26],
  771. [2242.39,2246.3,2235.42,2255.21],
  772. [2246.96,2232.97,2221.38,2247.86],
  773. [2228.82,2246.83,2225.81,2247.67],
  774. [2247.68,2241.92,2231.36,2250.85],
  775. [2238.9,2217.01,2205.87,2239.93],
  776. [2217.09,2224.8,2213.58,2225.19],
  777. [2221.34,2251.81,2210.77,2252.87],
  778. [2249.81,2282.87,2248.41,2288.09],
  779. [2286.33,2299.99,2281.9,2309.39],
  780. [2297.11,2305.11,2290.12,2305.3],
  781. [2303.75,2302.4,2292.43,2314.18],
  782. [2293.81,2275.67,2274.1,2304.95],
  783. [2281.45,2288.53,2270.25,2292.59],
  784. [2286.66,2293.08,2283.94,2301.7],
  785. [2293.4,2321.32,2281.47,2322.1],
  786. [2323.54,2324.02,2321.17,2334.33],
  787. [2316.25,2317.75,2310.49,2325.72],
  788. [2320.74,2300.59,2299.37,2325.53],
  789. [2300.21,2299.25,2294.11,2313.43],
  790. [2297.1,2272.42,2264.76,2297.1],
  791. [2270.71,2270.93,2260.87,2276.86],
  792. [2264.43,2242.11,2240.07,2266.69],
  793. [2242.26,2210.9,2205.07,2250.63],
  794. [2190.1,2148.35,2126.22,2190.1]
  795. ]
  796. }
  797. ]
  798. };
  799. myChart.setOption(option);
  800. });
  801. // 数据汇总
  802. $(function(){
  803. var myChart = echarts.init($("#allchar")[0]);
  804. option = {
  805. tooltip : {
  806. trigger: 'item'
  807. },
  808. polar : [
  809. {
  810. indicator : [
  811. { text : '套餐A' },
  812. { text : '套餐B' },
  813. { text : '套餐C' },
  814. { text : '套餐D' },
  815. { text : '套餐E' }
  816. ],
  817. name:{
  818. textStyle:{color:'#fff'}
  819. },
  820. center: [580, 120],
  821. radius : 60
  822. }
  823. ],
  824. calculable : false,
  825. series : [
  826. {
  827. name:'pie',
  828. type:'pie',
  829. radius : [0, 60],
  830. center: [160, 120],
  831. data: (function (){
  832. var res = [];
  833. var len = 0;
  834. while (len++ < 5) {
  835. res.push({
  836. name: '套餐A' + len,
  837. value: Math.round(Math.random()*10)
  838. });
  839. }
  840. return res;
  841. })()
  842. },
  843. {
  844. name: 'radar',
  845. type: 'radar',
  846. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  847. data: (function (){
  848. var res = [];
  849. var len = 0;
  850. while (len++ < 3) {
  851. res.push({
  852. name: 'data' + len,
  853. value: [
  854. Math.round(Math.random()*100),
  855. Math.round(Math.random()*100),
  856. Math.round(Math.random()*100),
  857. Math.round(Math.random()*100),
  858. Math.round(Math.random()*100)
  859. ]
  860. });
  861. }
  862. return res;
  863. })()
  864. }
  865. ]
  866. };
  867. var lastIndex = 5;
  868. var axisData;
  869. timeTicket = setInterval(function (){
  870. lastIndex += 1;
  871. // 动态数据接口 addData
  872. myChart.addData([
  873. [
  874. 0, // 系列索引
  875. { // 新增数据
  876. name: '套餐' + lastIndex,
  877. value: Math.round(Math.random()*10)
  878. },
  879. false, // 新增数据是否从队列头部插入
  880. false, // 是否增加队列长度,false则自定删除原有数据,队头插入删队尾,队尾插入删队头
  881. '随机数据' + lastIndex
  882. ],
  883. [
  884. 1, // 系列索引
  885. { // 新增数据
  886. name: 'data' + lastIndex,
  887. value: [
  888. Math.round(Math.random()*100),
  889. Math.round(Math.random()*100),
  890. Math.round(Math.random()*100),
  891. Math.round(Math.random()*100),
  892. Math.round(Math.random()*100)
  893. ]
  894. },
  895. false, // 新增数据是否从队列头部插入
  896. false // 是否增加队列长度,false则自定删除原有数据,队头插入删队尾,队尾插入删队头
  897. ]
  898. ]);
  899. }, 2000);
  900. myChart.setOption(option);
  901. });
  902. // 收入支出分析
  903. // 收入渠道分析
  904. $(function(){
  905. var myChart = echarts.init($("#zhanbi02")[0]);
  906. option = {
  907. tooltip : {
  908. trigger: 'axis',
  909. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  910. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  911. },
  912. formatter: function (params) {
  913. var tar = params[0];
  914. return tar.name + '<br/>' + tar.seriesName + ' : ' + tar.value;
  915. }
  916. },
  917. xAxis : [
  918. {
  919. type : 'category',
  920. splitLine: {show:false},
  921. data : ['总收入','渠道A','渠道B','渠道C','渠道D','渠道E'],
  922. axisLabel : {
  923. formatter: '{value} ',
  924. textStyle: {
  925. color: '#a4a7ab',
  926. align: 'right'
  927. }
  928. },
  929. splitLine:{show: false}
  930. }
  931. ],
  932. yAxis : [
  933. {
  934. type : 'value',
  935. axisLabel : {
  936. formatter: '{value} ',
  937. textStyle: {
  938. color: '#a4a7ab',
  939. align: 'right'
  940. }
  941. },
  942. splitLine:{show: false}
  943. }
  944. ],
  945. series : [
  946. {
  947. name:'总收入',
  948. type:'bar',
  949. stack: '总量',
  950. itemStyle:{
  951. normal:{
  952. barBorderColor:'rgba(0,0,0,0)',
  953. color:'rgba(0,0,0,0)'
  954. },
  955. emphasis:{
  956. barBorderColor:'rgba(0,0,0,0)',
  957. color:'rgba(0,0,0,0)'
  958. }
  959. },
  960. data:[0, 1700, 1400, 1200, 300, 0]
  961. },
  962. {
  963. name:'渠道',
  964. type:'bar',
  965. stack: '总量',
  966. itemStyle : { normal: {label : {show: true, position: 'inside'}}},
  967. data:[2900, 1200, 300, 200, 900, 300]
  968. }
  969. ]
  970. };
  971. myChart.setOption(option);
  972. });
  973. // 支出渠道分析
  974. $(function(){
  975. var myChart = echarts.init($("#zhanbi03")[0]);
  976. option = {
  977. tooltip : {
  978. trigger: 'axis',
  979. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  980. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  981. },
  982. formatter: function (params) {
  983. var tar = params[0];
  984. return tar.name + '<br/>' + tar.seriesName + ' : ' + tar.value;
  985. }
  986. },
  987. xAxis : [
  988. {
  989. type : 'category',
  990. splitLine: {show:false},
  991. data : ['总收入','渠道A','渠道B','渠道C','渠道D','渠道E'],
  992. axisLabel : {
  993. formatter: '{value} ',
  994. textStyle: {
  995. color: '#a4a7ab',
  996. align: 'right'
  997. }
  998. },
  999. splitLine:{show: false}
  1000. }
  1001. ],
  1002. yAxis : [
  1003. {
  1004. type : 'value',
  1005. axisLabel : {
  1006. formatter: '{value} ',
  1007. textStyle: {
  1008. color: '#a4a7ab',
  1009. align: 'right'
  1010. }
  1011. },
  1012. splitLine:{show: false}
  1013. }
  1014. ],
  1015. series : [
  1016. {
  1017. name:'总收入',
  1018. type:'bar',
  1019. stack: '总量',
  1020. itemStyle:{
  1021. normal:{
  1022. lineStyle:{
  1023. color:'#b5b5b6'
  1024. }
  1025. }
  1026. },
  1027. data:[0, 1700, 1400, 1200, 300, 0]
  1028. },
  1029. {
  1030. name:'渠道',
  1031. type:'bar',
  1032. stack: '总量',
  1033. itemStyle:{
  1034. normal:{
  1035. lineStyle:{
  1036. color:'#b5b5b6'
  1037. }
  1038. }
  1039. },
  1040. data:[2900, 1200, 300, 200, 900, 300]
  1041. }
  1042. ]
  1043. };
  1044. myChart.setOption(option);
  1045. });
  1046. // 营销投入与销售量分析
  1047. $(function(){
  1048. var myChart = echarts.init($("#allAly01")[0]);
  1049. option = {
  1050. title : {
  1051. text: '销售量组成',
  1052. textStyle:{
  1053. color:"#e9ebee"
  1054. },
  1055. x:'center'
  1056. },
  1057. tooltip : {
  1058. trigger: 'item',
  1059. formatter: "{a} <br/>{b} : {c} ({d}%)"
  1060. },
  1061. legend: {
  1062. orient : 'vertical',
  1063. x : 'left',
  1064. data:['销售A','销售B','销售C','销售D','销售E'],
  1065. textStyle:{
  1066. color:"#e9ebee"
  1067. }
  1068. },
  1069. calculable : false,
  1070. series : [
  1071. {
  1072. name:'销售组成',
  1073. type:'pie',
  1074. radius : '55%',
  1075. center: ['50%', '60%'],
  1076. data:[
  1077. {value:335, name:'销售A'},
  1078. {value:310, name:'销售B'},
  1079. {value:234, name:'销售C'},
  1080. {value:135, name:'销售D'},
  1081. {value:1548, name:'销售E'}
  1082. ]
  1083. }
  1084. ]
  1085. };
  1086. myChart.setOption(option);
  1087. });
  1088. $(function(){
  1089. var myChart = echarts.init($("#allAly02")[0]);
  1090. option = {
  1091. title : {
  1092. text: '营销投入组成',
  1093. textStyle:{
  1094. color:"#e9ebee"
  1095. },
  1096. x:'center'
  1097. },
  1098. tooltip : {
  1099. trigger: 'item',
  1100. formatter: "{a} <br/>{b} : {c} ({d}%)"
  1101. },
  1102. legend: {
  1103. orient : 'vertical',
  1104. x : 'left',
  1105. data:['投入A','投入B','投入C','投入D','投入E','投入F','投入G','投入H','投入J'],
  1106. textStyle:{
  1107. color:"#e9ebee"
  1108. }
  1109. },
  1110. calculable : false,
  1111. series : [
  1112. {
  1113. name:'销售组成',
  1114. type:'pie',
  1115. radius : '55%',
  1116. center: ['50%', '60%'],
  1117. data:[
  1118. {value:335, name:'投入A'},
  1119. {value:310, name:'投入B'},
  1120. {value:234, name:'投入C'},
  1121. {value:135, name:'投入D'},
  1122. {value:1548, name:'投入E'},
  1123. {value:135, name:'投入F'},
  1124. {value:135, name:'投入G'},
  1125. {value:135, name:'投入H'},
  1126. {value:135, name:'投入J'}
  1127. ]
  1128. }
  1129. ]
  1130. };
  1131. myChart.setOption(option);
  1132. });
  1133. $(function(){
  1134. var myChart = echarts.init($("#allAly03")[0]);
  1135. option = {
  1136. title : {
  1137. text: '销售量与投入量分析',
  1138. textStyle:{
  1139. color:"#e9ebee"
  1140. },
  1141. x:'center'
  1142. },
  1143. tooltip : {
  1144. trigger: 'axis'
  1145. },
  1146. legend: {
  1147. orient : 'vertical',
  1148. x : 'left',
  1149. data:['营销投入量','销售量'],
  1150. textStyle:{
  1151. color:"#e9ebee"
  1152. },
  1153. },
  1154. calculable : false,
  1155. xAxis : [
  1156. {
  1157. type : 'category',
  1158. splitLine:{show: false},
  1159. axisLabel : {
  1160. formatter: '{value} ',
  1161. textStyle: {
  1162. color: '#a4a7ab',
  1163. align: 'right'
  1164. }
  1165. },
  1166. data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
  1167. }
  1168. ],
  1169. yAxis : [
  1170. {
  1171. type : 'value',
  1172. splitLine:{show: false},
  1173. axisLabel : {
  1174. formatter: '{value} ',
  1175. textStyle: {
  1176. color: '#a4a7ab',
  1177. align: 'right'
  1178. }
  1179. },
  1180. }
  1181. ],
  1182. series : [
  1183. {
  1184. name:'营销投入量',
  1185. type:'bar',
  1186. data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
  1187. markPoint : {
  1188. data : [
  1189. {type : 'max', name: '最大值'},
  1190. {type : 'min', name: '最小值'}
  1191. ]
  1192. },
  1193. markLine : {
  1194. data : [
  1195. {type : 'average', name: '平均值'}
  1196. ]
  1197. }
  1198. },
  1199. {
  1200. name:'销售量',
  1201. type:'bar',
  1202. data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
  1203. markPoint : {
  1204. data : [
  1205. {name : '最高', value : 182.2, xAxis: 7, yAxis: 183, symbolSize:18},
  1206. {name : '最低', value : 2.3, xAxis: 11, yAxis: 3}
  1207. ]
  1208. },
  1209. markLine : {
  1210. data : [
  1211. {type : 'average', name : '平均值'}
  1212. ]
  1213. }
  1214. }
  1215. ]
  1216. };
  1217. myChart.setOption(option);
  1218. });
  1219. // 安全分析
  1220. // 事件趋势分析
  1221. $(function(){
  1222. var myChart = echarts.init($("#shijian01")[0]);
  1223. option = {
  1224. tooltip: {
  1225. trigger: "item",
  1226. formatter: "{a} <br/>{b} : {c}"
  1227. },
  1228. legend: {
  1229. x: 'center',
  1230. data: ["案件趋势分析"],
  1231. textStyle:{
  1232. color:"#e9ebee"
  1233. }
  1234. },
  1235. xAxis: [
  1236. {
  1237. type: "category",
  1238. name: "x",
  1239. splitLine:{show: false},
  1240. axisLabel : {
  1241. formatter: '{value} ',
  1242. textStyle: {
  1243. color: '#a4a7ab',
  1244. align: 'right'
  1245. }
  1246. },
  1247. data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
  1248. }
  1249. ],
  1250. yAxis: [
  1251. {
  1252. type: "log",
  1253. name: "y",
  1254. splitLine:{show: false},
  1255. data : ['10','30','50','70','90','110','120','130','150','170','190','210','250'],
  1256. axisLabel : {
  1257. textStyle: {
  1258. color: '#a4a7ab',
  1259. align: 'right'
  1260. }
  1261. },
  1262. }
  1263. ],
  1264. calculable: false,
  1265. series: [
  1266. {
  1267. name: "案件趋势分析",
  1268. type: "line",
  1269. data:[26, 59, 90, 26, 28, 70, 175, 182, 48, 188, 60, 23]
  1270. }
  1271. ]
  1272. };
  1273. myChart.setOption(option);
  1274. });
  1275. // 事件级别分析
  1276. $(function(){
  1277. var myChart = echarts.init($("#shijian02")[0]);
  1278. var placeHoledStyle = {
  1279. normal:{
  1280. barBorderColor:'rgba(0,0,0,0)',
  1281. color:'rgba(0,0,0,0)'
  1282. },
  1283. emphasis:{
  1284. barBorderColor:'rgba(0,0,0,0)',
  1285. color:'rgba(0,0,0,0)'
  1286. }
  1287. };
  1288. var dataStyle = {
  1289. normal: {
  1290. label : {
  1291. show: true,
  1292. position: 'insideLeft',
  1293. formatter: '{c}%'
  1294. }
  1295. }
  1296. };
  1297. option = {
  1298. tooltip : {
  1299. trigger: 'axis',
  1300. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  1301. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  1302. },
  1303. formatter : '{b}<br/>{a0}:{c0}%<br/>{a2}:{c2}%<br/>{a4}:{c4}%<br/>{a6}:{c6}%'
  1304. },
  1305. legend: {
  1306. y: 55,
  1307. data:['极重', '严重','一般', '轻微'],
  1308. textStyle:{
  1309. color:"#fff"
  1310. }
  1311. },
  1312. grid: {
  1313. y: 80,
  1314. y2: 30
  1315. },
  1316. xAxis : [
  1317. {
  1318. type : 'value',
  1319. position: 'top',
  1320. splitLine: {show: false},
  1321. axisLabel: {show: false}
  1322. }
  1323. ],
  1324. yAxis : [
  1325. {
  1326. type : 'category',
  1327. splitLine: {show: false},
  1328. axisLabel : {
  1329. textStyle: {
  1330. color: '#fff',
  1331. align: 'right'
  1332. }
  1333. },
  1334. data : ['医疗事件', '消防事件', '民事事件', '刑事事件']
  1335. }
  1336. ],
  1337. series : [
  1338. {
  1339. name:'极重',
  1340. type:'bar',
  1341. stack: '总量',
  1342. itemStyle : dataStyle,
  1343. data:[38, 50, 33, 72]
  1344. },
  1345. {
  1346. name:'极重',
  1347. type:'bar',
  1348. stack: '总量',
  1349. itemStyle: placeHoledStyle,
  1350. data:[62, 50, 67, 28]
  1351. },
  1352. {
  1353. name:'严重',
  1354. type:'bar',
  1355. stack: '总量',
  1356. itemStyle : dataStyle,
  1357. data:[61, 41, 42, 30]
  1358. },
  1359. {
  1360. name:'严重',
  1361. type:'bar',
  1362. stack: '总量',
  1363. itemStyle: placeHoledStyle,
  1364. data:[39, 59, 58, 70]
  1365. },
  1366. {
  1367. name:'一般',
  1368. type:'bar',
  1369. stack: '总量',
  1370. itemStyle : dataStyle,
  1371. data:[37, 35, 44, 60]
  1372. },
  1373. {
  1374. name:'一般',
  1375. type:'bar',
  1376. stack: '总量',
  1377. itemStyle: placeHoledStyle,
  1378. data:[63, 65, 56, 40]
  1379. },
  1380. {
  1381. name:'轻微',
  1382. type:'bar',
  1383. stack: '总量',
  1384. itemStyle : dataStyle,
  1385. data:[71, 50, 31, 39]
  1386. },
  1387. {
  1388. name:'轻微',
  1389. type:'bar',
  1390. stack: '总量',
  1391. itemStyle: placeHoledStyle,
  1392. data:[29, 50, 69, 61]
  1393. }
  1394. ]
  1395. };
  1396. myChart.setOption(option);
  1397. });
  1398. // 事件类型分析
  1399. $(function(){
  1400. var myChart = echarts.init($("#shijian03")[0]);
  1401. var labelTop = {
  1402. normal : {
  1403. label : {
  1404. show : true,
  1405. position : 'center',
  1406. formatter : '{b}',
  1407. textStyle: {
  1408. baseline : 'bottom'
  1409. }
  1410. },
  1411. labelLine : {
  1412. show : false
  1413. }
  1414. }
  1415. };
  1416. var labelFromatter = {
  1417. normal : {
  1418. label : {
  1419. formatter : function (params){
  1420. return 100 - params.value + '%'
  1421. },
  1422. textStyle: {
  1423. baseline : 'top'
  1424. }
  1425. }
  1426. },
  1427. }
  1428. var labelBottom = {
  1429. normal : {
  1430. color: '#ccc',
  1431. label : {
  1432. show : true,
  1433. position : 'center'
  1434. },
  1435. labelLine : {
  1436. show : false
  1437. }
  1438. },
  1439. emphasis: {
  1440. color: 'rgba(0,0,0,0)'
  1441. }
  1442. };
  1443. var radius = [40, 55];
  1444. option = {
  1445. legend: {
  1446. x : 'center',
  1447. textStyle:{
  1448. color:"#fff"
  1449. },
  1450. data:[
  1451. '医疗','消防','民事','刑事','其它'
  1452. ]
  1453. },
  1454. series : [
  1455. {
  1456. type : 'pie',
  1457. center : ['10%', '30%'],
  1458. radius : radius,
  1459. x: '0%', // for funnel
  1460. itemStyle : labelFromatter,
  1461. data : [
  1462. {name:'解决', value:46, itemStyle : labelBottom},
  1463. {name:'医疗', value:54,itemStyle : labelTop}
  1464. ]
  1465. },
  1466. {
  1467. type : 'pie',
  1468. center : ['30%', '30%'],
  1469. radius : radius,
  1470. x:'20%', // for funnel
  1471. itemStyle : labelFromatter,
  1472. data : [
  1473. {name:'解决', value:56, itemStyle : labelBottom},
  1474. {name:'消防', value:44,itemStyle : labelTop}
  1475. ]
  1476. },
  1477. {
  1478. type : 'pie',
  1479. center : ['50%', '30%'],
  1480. radius : radius,
  1481. x:'40%', // for funnel
  1482. itemStyle : labelFromatter,
  1483. data : [
  1484. {name:'解决', value:65, itemStyle : labelBottom},
  1485. {name:'民事', value:35,itemStyle : labelTop}
  1486. ]
  1487. },
  1488. {
  1489. type : 'pie',
  1490. center : ['70%', '30%'],
  1491. radius : radius,
  1492. x:'60%', // for funnel
  1493. itemStyle : labelFromatter,
  1494. data : [
  1495. {name:'解决', value:70, itemStyle : labelBottom},
  1496. {name:'刑事', value:30,itemStyle : labelTop}
  1497. ]
  1498. },
  1499. {
  1500. type : 'pie',
  1501. center : ['90%', '30%'],
  1502. radius : radius,
  1503. // for funnel
  1504. x:'80%', // for funnel
  1505. itemStyle : labelFromatter,
  1506. data : [
  1507. {name:'解决', value:70, itemStyle : labelBottom},
  1508. {name:'其它', value:11,itemStyle : labelTop}
  1509. ]
  1510. }
  1511. ]
  1512. };
  1513. myChart.setOption(option);
  1514. });
  1515. // 事发时间特征分析
  1516. $(function(){
  1517. var myChart = echarts.init($("#shijian04")[0]);
  1518. option = {
  1519. tooltip : {
  1520. trigger: 'axis',
  1521. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  1522. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  1523. }
  1524. },
  1525. legend: {
  1526. data:['医疗事件', '消防事件','刑事','民事','其它'],
  1527. textStyle:{
  1528. color:"#fff"
  1529. },
  1530. },
  1531. calculable : false,
  1532. xAxis : [
  1533. {
  1534. type : 'value',
  1535. splitLine: {show: false},
  1536. axisLabel : {
  1537. textStyle: {
  1538. color: '#fff',
  1539. align: 'right'
  1540. }
  1541. },
  1542. }
  1543. ],
  1544. yAxis : [
  1545. {
  1546. type : 'category',
  1547. splitLine: {show: false},
  1548. axisLabel : {
  1549. textStyle: {
  1550. color: '#fff',
  1551. align: 'right'
  1552. }
  1553. },
  1554. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12','13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']
  1555. }
  1556. ],
  1557. series : [
  1558. {
  1559. name:'医疗事件',
  1560. type:'bar',
  1561. stack: '总量',
  1562. itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
  1563. data: [12, 13, 10, 16, 19, 23, 21, 23, 20, 26, 27, 30,12, 12, 11, 14, 19, 23, 21, 20, 20, 25, 28, 30]
  1564. },
  1565. {
  1566. name:'消防事件',
  1567. type:'bar',
  1568. stack: '总量',
  1569. itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
  1570. data: [1, 13, 0, 16, 19, 23, 21, 23, 20, 26, 27, 30,12, 12, 11, 14, 19, 23, 21, 20, 0, 25, 8, 30]
  1571. },
  1572. {
  1573. name:'刑事',
  1574. type:'bar',
  1575. stack: '总量',
  1576. itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
  1577. data: [12, 13, 10, 16, 19, 3, 2, 3, 0, 6, 9, 30,12, 12, 11, 14, 1, 3, 1, 2, 0, 5, 2, 0]
  1578. },
  1579. {
  1580. name:'民事',
  1581. type:'bar',
  1582. stack: '总量',
  1583. itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
  1584. data: [2, 13, 10, 6, 19, 23, 21, 3, 20, 6, 7, 30,12, 12, 11, 14, 19, 3, 21, 0, 20, 5, 8, 0]
  1585. },
  1586. {
  1587. name:'其它',
  1588. type:'bar',
  1589. stack: '总量',
  1590. itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
  1591. data: [1, 3, 10, 6, 9, 3, 11, 3, 0, 6, 7, 0,2, 2, 1, 4, 9, 3, 1, 0, 0, 5, 8, 3]
  1592. }
  1593. ]
  1594. };
  1595. myChart.setOption(option);
  1596. });