cost_company.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. function echarts_1(data) {
  2. const myChart = echarts.init(document.getElementById('main1'))
  3. const option = {
  4. xAxis: {
  5. axisLine: {
  6. show: false // 隐藏轴线
  7. },
  8. axisTick: {
  9. show: false // 隐藏分隔线
  10. },
  11. boundaryGap: false, // 坐标轴两边不留白
  12. // 标签文字样式修改
  13. axisLabel: {
  14. color: '#9DA5AF',
  15. margin: 12,
  16. rich: {
  17. a: {
  18. padding: [0, 0, 0, 10] // 左边距 40
  19. },
  20. b: {
  21. padding: [0, 10, 0, 0] // 右边距 40
  22. }
  23. }
  24. },
  25. type: 'category',
  26. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  27. },
  28. yAxis: {
  29. type: 'value',
  30. //背景线
  31. splitLine: {
  32. lineStyle: {
  33. type: 'dashed',
  34. color: ['#EDEEF1']
  35. }
  36. },
  37. axisLabel: {
  38. color: '#9DA5AF',
  39. margin: 20
  40. }
  41. },
  42. tooltip: {
  43. trigger: 'axis',
  44. formatter: params => {
  45. const title = `<div style="font-weight: bold; margin-bottom: 10px">${params[0].axisValue}</div>`
  46. let content = ''
  47. params.forEach(item => {
  48. content += `
  49. <div style="margin-bottom: 6px">
  50. <span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: #187FDD;"></span>
  51. <span>${item.seriesName}:${item.value}</span>
  52. </div>
  53. `
  54. })
  55. return title + content
  56. }
  57. },
  58. grid: {
  59. left: '3%',
  60. right: '4%',
  61. top: '10%',
  62. bottom: '15%',
  63. containLabel: true
  64. },
  65. // legend: {
  66. // orient: 'horizontal', //设置图例朝向
  67. // bottom: 'bottom',
  68. // color:'red',
  69. // },
  70. series: [
  71. {
  72. name: '项目数量',
  73. type: 'line',
  74. smooth: true,
  75. symbol: 'circle',
  76. symbolSize: 8,
  77. itemStyle: {
  78. color: '#187FDD',
  79. normal: {
  80. color: '#fff',
  81. borderColor: '#187FDD',
  82. }
  83. },
  84. lineStyle: {
  85. // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
  86. color: {
  87. type: 'linear',
  88. x: 0,
  89. y: 0,
  90. x2: 1,
  91. y2: 0,
  92. colorStops: [{
  93. offset: 0, color: 'rgb(72,177,203)' // 0% 处的颜色
  94. }, {
  95. offset: 1, color: 'rgb(72,116,203)' // 100% 处的颜色
  96. }],
  97. globalCoord: false // 缺省为 false
  98. },
  99. width: 4,
  100. },
  101. itemStyle: {
  102. color: '#FFFFFF',
  103. borderColor: {
  104. type: 'linear',
  105. x: 0,
  106. y: 0,
  107. x2: 0,
  108. y2: 1,
  109. colorStops: [
  110. {
  111. offset: 0,
  112. color: 'rgb(72,177,203)', //0%处的颜色
  113. },
  114. {
  115. offset: 1,
  116. color: 'rgb(72,177,203)', //100%处的颜色
  117. },
  118. ],
  119. global: false,
  120. borderWidth: 4,
  121. },
  122. },
  123. areaStyle: {
  124. normal: {
  125. //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
  126. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  127. offset: 0,
  128. color: 'rgba(72,177,203,0.39)'
  129. }, {
  130. offset: .34,
  131. color: 'rgba(56,155,255,0.25)'
  132. }, {
  133. offset: 1,
  134. color: 'rgba(38,197,254,0.00)'
  135. }])
  136. }
  137. },//区域颜色渐变
  138. // color: '#4bc8db',
  139. data: [data['all_sent_review_cost']['1']['project_number'],
  140. data['all_sent_review_cost']['2']['project_number'],
  141. data['all_sent_review_cost']['3']['project_number'],
  142. data['all_sent_review_cost']['4']['project_number'],
  143. data['all_sent_review_cost']['5']['project_number'],
  144. data['all_sent_review_cost']['6']['project_number'],
  145. data['all_sent_review_cost']['7']['project_number'],
  146. data['all_sent_review_cost']['8']['project_number'],
  147. data['all_sent_review_cost']['9']['project_number'],
  148. data['all_sent_review_cost']['10']['project_number'],
  149. data['all_sent_review_cost']['11']['project_number'],
  150. data['all_sent_review_cost']['12']['project_number'],]
  151. }
  152. ]
  153. }
  154. myChart.setOption(option);
  155. //响应式布局
  156. // const resize = _.throttle(() => {
  157. // myChart.resize()
  158. // }, 1000)
  159. // window.addEventListener('resize', resize)
  160. }
  161. function echarts_2(data) {
  162. const myChart = echarts.init(document.getElementById('main2'))
  163. const option = {
  164. legend: {
  165. orient: 'horizontal', //设置图例朝向
  166. bottom: 'bottom',
  167. },
  168. tooltip: {},
  169. grid: {
  170. left: '3%',
  171. right: '4%',
  172. top: '10%',
  173. bottom: '15%',
  174. containLabel: true
  175. },
  176. dataset: {
  177. source: [
  178. ['product', '送审金额', '审定金额'],
  179. ['1月', data['all_sent_review_cost']['1']['all_sent_amount'], data['all_sent_review_cost']['1']['all_authorize_amount']],
  180. ['2月', data['all_sent_review_cost']['2']['all_sent_amount'], data['all_sent_review_cost']['2']['all_authorize_amount']],
  181. ['3月', data['all_sent_review_cost']['3']['all_sent_amount'], data['all_sent_review_cost']['3']['all_authorize_amount']],
  182. ['4月', data['all_sent_review_cost']['4']['all_sent_amount'], data['all_sent_review_cost']['4']['all_authorize_amount']],
  183. ['5月', data['all_sent_review_cost']['5']['all_sent_amount'], data['all_sent_review_cost']['5']['all_authorize_amount']],
  184. ['6月', data['all_sent_review_cost']['6']['all_sent_amount'], data['all_sent_review_cost']['6']['all_authorize_amount']],
  185. ['7月', data['all_sent_review_cost']['7']['all_sent_amount'], data['all_sent_review_cost']['7']['all_authorize_amount']],
  186. ['8月', data['all_sent_review_cost']['8']['all_sent_amount'], data['all_sent_review_cost']['8']['all_authorize_amount']],
  187. ['9月', data['all_sent_review_cost']['9']['all_sent_amount'], data['all_sent_review_cost']['9']['all_authorize_amount']],
  188. ['10月', data['all_sent_review_cost']['10']['all_sent_amount'], data['all_sent_review_cost']['10']['all_authorize_amount']],
  189. ['11月', data['all_sent_review_cost']['11']['all_sent_amount'], data['all_sent_review_cost']['11']['all_authorize_amount']],
  190. ['12月', data['all_sent_review_cost']['12']['all_sent_amount'], data['all_sent_review_cost']['12']['all_authorize_amount']],
  191. ]
  192. },
  193. xAxis: {
  194. type: 'category',
  195. axisLine: {
  196. show: false // 隐藏轴线
  197. },
  198. axisTick: {
  199. show: false // 隐藏分隔线
  200. },
  201. },
  202. yAxis: {},
  203. // Declare several bar series, each will be mapped
  204. // to a column of dataset.source by default.
  205. series: [
  206. {
  207. type: 'bar',
  208. itemStyle: {
  209. barBorderRadius: [7, 7, 0, 0],
  210. },
  211. color: {
  212. type: 'linear',
  213. x: 0,
  214. y: 0,
  215. x2: 0,
  216. y2: 1,
  217. colorStops: [{
  218. offset: 0, color: '#18c1f6' // 0% 处的颜色
  219. }, {
  220. offset: 1, color: '#5199f4' // 100% 处的颜色
  221. }],
  222. global: false // 缺省为 false
  223. },
  224. }, {
  225. type: 'bar',
  226. itemStyle: {
  227. barBorderRadius: [7, 7, 0, 0],
  228. },
  229. color: {
  230. type: 'linear',
  231. x: 0,
  232. y: 0,
  233. x2: 0,
  234. y2: 1,
  235. colorStops: [{
  236. offset: 0, color: 'rgb(251,189,108)' // 0% 处的颜色
  237. }, {
  238. offset: 1, color: 'rgb(251,163,99)' // 100% 处的颜色
  239. }],
  240. global: false // 缺省为 false
  241. },
  242. }
  243. ]
  244. }
  245. myChart.setOption(option);
  246. }
  247. function echarts_3(data) {
  248. const myChart = echarts.init(document.getElementById('main3'))
  249. const option = {
  250. xAxis: {
  251. axisLine: {
  252. show: false // 隐藏轴线
  253. },
  254. axisTick: {
  255. show: false // 隐藏分隔线
  256. },
  257. type: 'category',
  258. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  259. },
  260. yAxis: {
  261. type: 'value'
  262. },
  263. legend: {
  264. orient: 'horizontal', //设置图例朝向
  265. bottom: 'bottom'
  266. },
  267. tooltip: {},
  268. grid: {
  269. left: '3%',
  270. right: '4%',
  271. top: '10%',
  272. bottom: '15%',
  273. containLabel: true
  274. },
  275. series: [
  276. {
  277. name: '送审服务费',
  278. data: [data['all_sent_review_cost']['1']['all_sent_review_cost'],
  279. data['all_sent_review_cost']['2']['all_sent_review_cost'],
  280. data['all_sent_review_cost']['3']['all_sent_review_cost'],
  281. data['all_sent_review_cost']['4']['all_sent_review_cost'],
  282. data['all_sent_review_cost']['5']['all_sent_review_cost'],
  283. data['all_sent_review_cost']['6']['all_sent_review_cost'],
  284. data['all_sent_review_cost']['7']['all_sent_review_cost'],
  285. data['all_sent_review_cost']['8']['all_sent_review_cost'],
  286. data['all_sent_review_cost']['9']['all_sent_review_cost'],
  287. data['all_sent_review_cost']['10']['all_sent_review_cost'],
  288. data['all_sent_review_cost']['11']['all_sent_review_cost'],
  289. data['all_sent_review_cost']['12']['all_sent_review_cost']],
  290. type: 'bar',
  291. // color:'#2452b2',
  292. itemStyle: { // 使用方法二的写法
  293. barBorderRadius: [7, 7, 0, 0],
  294. color: {
  295. type: 'linear',
  296. x: 0, //右
  297. y: 0, //下
  298. x2: 0, //左
  299. y2: 1, //上
  300. colorStops: [
  301. {
  302. offset: 0,
  303. color: 'rgb(73,119,193)' // 0% 处的颜色
  304. },
  305. {
  306. offset: 1,
  307. color: 'rgb(159,175,209)' // 100% 处的颜色
  308. }
  309. ]
  310. },
  311. },
  312. }
  313. ]
  314. }
  315. myChart.setOption(option);
  316. }
  317. function echarts_4(data) {
  318. const myChart = echarts.init(document.getElementById('main4'))
  319. const option = {
  320. tooltip: {
  321. trigger: 'item'
  322. },
  323. legend: {
  324. orient: 'horizontal', //设置图例朝向
  325. bottom: 'bottom'
  326. },
  327. grid: {
  328. left: '3%',
  329. right: '4%',
  330. top: '10%',
  331. bottom: '15%',
  332. containLabel: true
  333. },
  334. series: [
  335. {
  336. name: '送审总额占比分布图',
  337. type: 'pie',
  338. radius: '50%',
  339. data: [
  340. {
  341. value: data['sentAndaAuthorize']['0']['all_amount'],
  342. name: '预算总额',
  343. itemStyle: {
  344. color: 'rgb(116,195,225)'
  345. }
  346. },
  347. {
  348. value: data['sentAndaAuthorize']['1']['all_amount'],
  349. name: '结算总额',
  350. itemStyle: {
  351. color: 'rgb(241,103,106)'
  352. }
  353. },
  354. ],
  355. emphasis: {
  356. itemStyle: {
  357. shadowBlur: 10,
  358. shadowOffsetX: 0,
  359. shadowColor: 'rgba(0, 0, 0, 0.5)'
  360. }
  361. }
  362. }
  363. ]
  364. }
  365. myChart.setOption(option);
  366. }
  367. function echarts_5(data) {
  368. const myChart = echarts.init(document.getElementById('main5'))
  369. let review = data['review_poportion'];
  370. let name = [];
  371. let set = [];
  372. for (let i = 0; i < review.length; i++) {
  373. if (review[i]['project_number'] != 0) {
  374. name.push(review[i]['entrust_unit_name'])
  375. set.push(review[i]['project_number'])
  376. }
  377. }
  378. const option = {
  379. tooltip: {
  380. trigger: 'axis',
  381. axisPointer: {
  382. type: 'shadow'
  383. }
  384. },
  385. legend: {
  386. orient: 'horizontal', //设置图例朝向
  387. bottom: 'bottom',
  388. },
  389. grid: {
  390. left: '3%',
  391. right: '4%',
  392. top: '10%',
  393. bottom: '15%',
  394. containLabel: true
  395. },
  396. xAxis: {
  397. type: 'value',
  398. boundaryGap: [0, 0.01]
  399. },
  400. yAxis: {
  401. axisLine: {
  402. show: false // 隐藏轴线
  403. },
  404. axisTick: {
  405. show: false // 隐藏分隔线
  406. },
  407. type: 'category',
  408. data: name
  409. },
  410. series: [
  411. {
  412. name: '项目数量',
  413. type: 'bar',
  414. data: set,
  415. itemStyle: { // 使用方法二的写法
  416. color: {
  417. type: 'linear',
  418. x: 0, //右
  419. y: 0, //下
  420. x2: 1, //左
  421. y2: 0, //上
  422. colorStops: [
  423. {
  424. offset: 0,
  425. color: 'rgb(254,221,148)' // 0% 处的颜色
  426. },
  427. {
  428. offset: 1,
  429. color: 'rgb(209,230,165)' // 100% 处的颜色
  430. }
  431. ]
  432. },
  433. },
  434. },
  435. ]
  436. };
  437. myChart.setOption(option);
  438. }
  439. function echarts_6(data) {
  440. const myChart = echarts.init(document.getElementById('main6'))
  441. let review = data['sent_review_amount_top'];
  442. let name = [];
  443. let set = [];
  444. for (let i = 0; i < review.length; i++) {
  445. if (review[i]['all_sent_amount'] != 0) {
  446. name.push(review[i]['entrust_unit_name'])
  447. set.push(review[i]['all_sent_amount'])
  448. }
  449. }
  450. const option = {
  451. tooltip: {
  452. trigger: 'axis',
  453. axisPointer: {
  454. type: 'shadow'
  455. }
  456. },
  457. legend: {
  458. orient: 'horizontal', //设置图例朝向
  459. bottom: 'bottom',
  460. },
  461. grid: {
  462. left: '3%',
  463. right: '4%',
  464. top: '10%',
  465. bottom: '15%',
  466. containLabel: true
  467. },
  468. xAxis: {
  469. type: 'value',
  470. boundaryGap: [0, 0.01]
  471. },
  472. yAxis: {
  473. axisLine: {
  474. show: false // 隐藏轴线
  475. },
  476. axisTick: {
  477. show: false // 隐藏分隔线
  478. },
  479. type: 'category',
  480. data: name
  481. },
  482. series: [
  483. {
  484. name: '送审总额',
  485. type: 'bar',
  486. data: set,
  487. itemStyle: { // 使用方法二的写法
  488. color: {
  489. type: 'linear',
  490. x: 0, //右
  491. y: 0, //下
  492. x2: 1, //左
  493. y2: 0, //上
  494. colorStops: [
  495. {
  496. offset: 0,
  497. color: 'rgb(229,221,233)' // 0% 处的颜色
  498. },
  499. {
  500. offset: 1,
  501. color: 'rgb(189,194,232)' // 100% 处的颜色
  502. }
  503. ]
  504. },
  505. },
  506. },
  507. ]
  508. };
  509. myChart.setOption(option);
  510. }
  511. function echarts_7(data) {
  512. console.log(data)
  513. const myChart = echarts.init(document.getElementById('main7'))
  514. let review = data['authorize_amount_top'];
  515. let name = [];
  516. let set = [];
  517. for (let i = 0; i < review.length; i++) {
  518. if (review[i]['all_authorize_amount'] != 0) {
  519. name.push(review[i]['entrust_unit_name'])
  520. set.push(review[i]['all_authorize_amount'])
  521. }
  522. }
  523. const option = {
  524. tooltip: {
  525. trigger: 'axis',
  526. axisPointer: {
  527. type: 'shadow'
  528. }
  529. },
  530. legend: {
  531. orient: 'horizontal', //设置图例朝向
  532. bottom: 'bottom',
  533. },
  534. grid: {
  535. left: '3%',
  536. right: '4%',
  537. top: '10%',
  538. bottom: '15%',
  539. containLabel: true
  540. },
  541. xAxis: {
  542. type: 'value',
  543. boundaryGap: [0, 0.01]
  544. },
  545. yAxis: {
  546. axisLine: {
  547. show: false // 隐藏轴线
  548. },
  549. axisTick: {
  550. show: false // 隐藏分隔线
  551. },
  552. type: 'category',
  553. data: name
  554. },
  555. series: [
  556. {
  557. name: '审定总额',
  558. type: 'bar',
  559. data: set,
  560. itemStyle: { // 使用方法二的写法
  561. color: {
  562. type: 'linear',
  563. x: 0, //右
  564. y: 0, //下
  565. x2: 1, //左
  566. y2: 0, //上
  567. colorStops: [
  568. {
  569. offset: 0,
  570. color: 'rgb(229,221,233)' // 0% 处的颜色
  571. },
  572. {
  573. offset: 1,
  574. color: 'rgb(189,194,232)' // 100% 处的颜色
  575. }
  576. ]
  577. },
  578. },
  579. },
  580. ]
  581. };
  582. myChart.setOption(option);
  583. }
  584. function echarts_8(data) {
  585. const myChart = echarts.init(document.getElementById('main8'))
  586. let review = data['sent_number_top'];
  587. let name = [];
  588. let set = [];
  589. for (let i = 0; i < review.length; i++) {
  590. if (review[i]['project_number'] != 0) {
  591. name.push(review[i]['sent_review_unit_name'])
  592. set.push(review[i]['project_number'])
  593. }
  594. }
  595. const option = {
  596. tooltip: {
  597. trigger: 'axis',
  598. axisPointer: {
  599. type: 'shadow'
  600. }
  601. },
  602. legend: {
  603. orient: 'horizontal', //设置图例朝向
  604. bottom: 'bottom',
  605. },
  606. grid: {
  607. left: '3%',
  608. right: '4%',
  609. top: '10%',
  610. bottom: '15%',
  611. containLabel: true
  612. },
  613. xAxis: {
  614. type: 'value',
  615. boundaryGap: [0, 0.01]
  616. },
  617. yAxis: {
  618. axisLine: {
  619. show: false // 隐藏轴线
  620. },
  621. axisTick: {
  622. show: false // 隐藏分隔线
  623. },
  624. type: 'category',
  625. data: name
  626. },
  627. series: [
  628. {
  629. name: '项目数量',
  630. type: 'bar',
  631. data: set,
  632. itemStyle: { // 使用方法二的写法
  633. color: {
  634. type: 'linear',
  635. x: 0, //右
  636. y: 0, //下
  637. x2: 1, //左
  638. y2: 0, //上
  639. colorStops: [
  640. {
  641. offset: 0,
  642. color: 'rgb(254,221,148)' // 0% 处的颜色
  643. },
  644. {
  645. offset: 1,
  646. color: 'rgb(209,230,165)' // 100% 处的颜色
  647. }
  648. ]
  649. },
  650. },
  651. },
  652. ]
  653. };
  654. myChart.setOption(option);
  655. }
  656. function echarts_9(data) {
  657. const myChart = echarts.init(document.getElementById('main9'))
  658. let review = data['sent_poportion'];
  659. let name = [];
  660. let set = [];
  661. for (let i = 0; i < review.length; i++) {
  662. if (review[i]['all_sent_amount'] != '') {
  663. name.push(review[i]['sent_review_unit_name'])
  664. set.push(review[i]['all_sent_amount'])
  665. }
  666. }
  667. const option = {
  668. tooltip: {
  669. trigger: 'axis',
  670. axisPointer: {
  671. type: 'shadow'
  672. }
  673. },
  674. legend: {
  675. orient: 'horizontal', //设置图例朝向
  676. bottom: 'bottom',
  677. },
  678. grid: {
  679. left: '3%',
  680. right: '4%',
  681. top: '10%',
  682. bottom: '15%',
  683. containLabel: true
  684. },
  685. xAxis: {
  686. type: 'value',
  687. boundaryGap: [0, 0.01]
  688. },
  689. yAxis: {
  690. axisLine: {
  691. show: false // 隐藏轴线
  692. },
  693. axisTick: {
  694. show: false // 隐藏分隔线
  695. },
  696. type: 'category',
  697. data: name
  698. },
  699. series: [
  700. {
  701. name: '送审总额',
  702. type: 'bar',
  703. data: set,
  704. itemStyle: { // 使用方法二的写法
  705. color: {
  706. type: 'linear',
  707. x: 0, //右
  708. y: 0, //下
  709. x2: 1, //左
  710. y2: 0, //上
  711. colorStops: [
  712. {
  713. offset: 0,
  714. color: 'rgb(72,177,203)' // 0% 处的颜色
  715. },
  716. {
  717. offset: 1,
  718. color: 'rgb(72,116,203)' // 100% 处的颜色
  719. }
  720. ]
  721. },
  722. },
  723. },
  724. ]
  725. };
  726. myChart.setOption(option);
  727. }
  728. function echarts_10(data) {
  729. const myChart = echarts.init(document.getElementById('main10'))
  730. let review = data['sent_poportion'];
  731. let set = [];
  732. for (let i = 0; i < review.length; i++) {
  733. if (review[i]['all_sent_amount'] != '') {
  734. set.push({
  735. value: review[i]['all_sent_amount'],
  736. name: review[i]['sent_review_unit_name']
  737. })
  738. }
  739. }
  740. const option = {
  741. tooltip: {
  742. trigger: 'item'
  743. },
  744. legend: {
  745. orient: 'horizontal', //设置图例朝向
  746. bottom: 'bottom'
  747. },
  748. grid: {
  749. left: '3%',
  750. right: '4%',
  751. top: '10%',
  752. bottom: '15%',
  753. containLabel: true
  754. },
  755. series: [
  756. {
  757. name: '送审单位送审总额占比图',
  758. type: 'pie',
  759. radius: '50%',
  760. data: set,
  761. emphasis: {
  762. itemStyle: {
  763. shadowBlur: 10,
  764. shadowOffsetX: 0,
  765. shadowColor: 'rgba(0, 0, 0, 0.5)'
  766. }
  767. }
  768. }
  769. ]
  770. }
  771. myChart.setOption(option);
  772. }