index01.js 50 KB

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