<address id="ttjl9"></address>

      <noframes id="ttjl9"><address id="ttjl9"><nobr id="ttjl9"></nobr></address>
      <form id="ttjl9"></form>
        <em id="ttjl9"><span id="ttjl9"></span></em>
        <address id="ttjl9"></address>

          <noframes id="ttjl9"><form id="ttjl9"></form>

          echarts-x軸 y軸配置(字體顏色,線的顏色,分割線,y周單位顏色)

          2021-8-13    前端達人

          
          
          1. //var myChart = this.$echarts.init(document.getElementById("echart-twoline")); //vue
          2. var myChart = echarts.init(document.getElementById("echart-twoline"));//jquery
          3. var option = {
          4. tooltip: {
          5. trigger: 'axis',
          6. axisPointer: {
          7. type: 'shadow'
          8. }
          9. },
          10. legend: {
          11. data: ['計劃勞務資源', "實際勞務資源"],
          12. //align: 'left',
          13. right: 10,
          14. textStyle: {
          15. color: "#fff"
          16. },
          17. itemWidth: 14,
          18. itemHeight: 10,
          19. itemGap: 13,
          20. },
          21. grid: {
          22. left: '3%',
          23. right: '4%',
          24. bottom: '3%',
          25. containLabel: true
          26. },
          27. xAxis: [{
          28. type: 'category',
          29. data: ['1月','2月','3月', '4月'],
          30. axisLine: {/x軸線的顏色以及寬度
          31. show: true,
          32. lineStyle: {
          33. color: "rgba(219,225,255,1)",
          34. width: 0,
          35. type: "solid"
          36. }
          37. },
          38. axisTick: {
          39. show: false,
          40. },
          41. axisLabel: {//x軸文字的配置
          42. show: true,
          43. textStyle: {
          44. color: "rgba(219,225,255,1)",
          45. }
          46. },
          47. splitLine: {//分割線配置
          48. show:false,
          49. lineStyle: {
          50. color: "rgba(219,225,255,1)",
          51. }
          52. }
          53. }],
          54. yAxis: [{
          55. type: 'value',
          56. name:"單位:人",//y軸上方的單位
          57. nameTextStyle:{//y軸上方單位的顏色
          58. color:'#151515'
          59. },
          60. axisLabel: {//y軸文字的配置
          61. textStyle: {
          62. color: "rgba(219,225,255,1)",
          63. margin: 15
          64. },
          65. // formatter: '{value} %'//y軸的每一個刻度值后面加上‘%’號
          66. },
          67. axisTick: {
          68. show: false,
          69. },
          70. axisLine: {//y軸線的顏色以及寬度
          71. show: false,
          72. lineStyle: {
          73. color: "rgba(219,225,255,1)",
          74. width: 1,
          75. type: "solid"
          76. },
          77. },
          78. splitLine: {//分割線配置
          79. show:false,
          80. lineStyle: {
          81. color: "rgba(219,225,255,1)",
          82. }
          83. }
          84. }],
          85. series: [{
          86. name: '計劃勞務資源',
          87. type: 'bar',
          88. data: [38,38,42,48],
          89. barWidth: 10, //柱子寬度
          90. barGap: .5, //柱子之間間距
          91. itemStyle: {
          92. normal: {
          93. color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
          94. offset: 0,
          95. color: 'rgba(0, 153, 239, 0.8)'
          96. }, {
          97. offset: 1,
          98. color: 'rgba(66, 187, 255, 1)'
          99. }]),
          100. opacity: 1,
          101. }
          102. }
          103. }, {
          104. name: '實際勞務資源',
          105. type: 'bar',
          106. data: [40, 30, 42, 50],
          107. barWidth: 10,
          108. barGap: .5,
          109. itemStyle: {
          110. normal: {
          111. color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
          112. offset: 0,
          113. color: 'rgba(0, 242, 159, 1)'
          114. }, {
          115. offset: 1,
          116. color: 'rgba(76, 240, 254, 1)'
          117. }]),
          118. opacity: 1,
          119. }
          120. }
          121. }]
          122. };
          123. myChart.setOption(option);
          124. window.addEventListener("resize", () => {
          125. myChart.resize();
          126. });

           

          藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請掃碼ben_lanlan,報下信息,會請您入群。歡迎您加入噢~~希望得到建議咨詢、商務合作,也請與我們聯系。

          文章來源:csdn + 博客園

          分享此文一切功德,皆悉回向給文章原作者及眾讀者.
          免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。

          藍藍設計www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務


          日歷

          鏈接

          個人資料

          藍藍設計的小編 http://www.syprn.cn

          存檔

          亚洲va欧美va天堂v国产综合