aaa.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <div class="bottom-charts">
  3. <div class="bc-chart-item">
  4. <dv-charts class="lc1-chart" :option="option" />
  5. </div>
  6. <div class="bc-chart-item">
  7. <dv-charts class="lc1-chart" :option="option1" />
  8. </div>
  9. <div class="bc-chart-item">
  10. <dv-charts class="lc1-chart" :option="option2" />
  11. </div>
  12. <div class="bc-chart-item">
  13. <dv-charts class="lc1-chart" :option="option3" />
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import LabelTag from "./LabelTag";
  19. export default {
  20. name: "BottomCharts",
  21. components: {
  22. LabelTag,
  23. },
  24. data() {
  25. return {
  26. option: {
  27. series: [
  28. {
  29. type: "gauge",
  30. startAngle: -Math.PI / 2,
  31. endAngle: Math.PI * 1.5,
  32. arcLineWidth: 7,
  33. data: [
  34. {
  35. name: "itemA",
  36. value: 89,
  37. // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
  38. gradient: ["#01dcdf"],
  39. },
  40. ],
  41. axisLabel: {
  42. show: false,
  43. },
  44. axisTick: {
  45. show: false,
  46. },
  47. pointer: {
  48. show: false,
  49. },
  50. dataItemStyle: {
  51. lineCap: "round",
  52. },
  53. details: {
  54. show: true,
  55. formatter: "{value}",
  56. style: {
  57. fill: "#1ed3e5",
  58. fontSize: 15,
  59. },
  60. },
  61. },
  62. ],
  63. },
  64. option1: {
  65. series: [
  66. {
  67. type: "gauge",
  68. startAngle: -Math.PI / 2,
  69. endAngle: Math.PI * 1.5,
  70. arcLineWidth: 7,
  71. data: [
  72. {
  73. name: "itemA",
  74. value: 34,
  75. // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
  76. gradient: ["#33faaa"],
  77. },
  78. ],
  79. axisLabel: {
  80. show: false,
  81. },
  82. axisTick: {
  83. show: false,
  84. },
  85. pointer: {
  86. show: false,
  87. },
  88. dataItemStyle: {
  89. lineCap: "round",
  90. },
  91. details: {
  92. show: true,
  93. formatter: "{value}",
  94. style: {
  95. fill: "#1ed3e5",
  96. fontSize: 15,
  97. },
  98. },
  99. },
  100. ],
  101. },
  102. option2: {
  103. series: [
  104. {
  105. type: "gauge",
  106. startAngle: -Math.PI / 2,
  107. endAngle: Math.PI * 1.5,
  108. arcLineWidth: 7,
  109. data: [
  110. {
  111. name: "itemA",
  112. value: 55,
  113. // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
  114. gradient: ["#f7ac20"],
  115. },
  116. ],
  117. axisLabel: {
  118. show: false,
  119. },
  120. axisTick: {
  121. show: false,
  122. },
  123. pointer: {
  124. show: false,
  125. },
  126. dataItemStyle: {
  127. lineCap: "round",
  128. },
  129. details: {
  130. show: true,
  131. formatter: "{value}",
  132. style: {
  133. fill: "#1ed3e5",
  134. fontSize: 15,
  135. },
  136. },
  137. },
  138. ],
  139. },
  140. option3: {
  141. series: [
  142. {
  143. type: "gauge",
  144. startAngle: -Math.PI / 2,
  145. endAngle: Math.PI * 1.5,
  146. arcLineWidth: 7,
  147. data: [
  148. {
  149. name: "itemA",
  150. value: 67,
  151. // gradient: ["#03c2fd", "#1ed3e5", "#2fded6"],
  152. gradient: ["#f93496", "#f61967","#f2053e"],
  153. },
  154. ],
  155. axisLabel: {
  156. show: false,
  157. },
  158. axisTick: {
  159. show: false,
  160. },
  161. pointer: {
  162. show: false,
  163. },
  164. dataItemStyle: {
  165. lineCap: "round",
  166. },
  167. details: {
  168. show: true,
  169. formatter: "{value}",
  170. style: {
  171. fill: "#1ed3e5",
  172. fontSize: 15,
  173. },
  174. },
  175. },
  176. ],
  177. },
  178. };
  179. },
  180. };
  181. </script>
  182. <style lang="scss" scoped>
  183. .bottom-charts {
  184. width: 100%;
  185. height: 100%;
  186. display: flex;
  187. position: relative;
  188. .bc-chart-item {
  189. width: 25%;
  190. height: 100%;
  191. box-sizing: border-box;
  192. .lc1-chart {
  193. height: calc(100% - 80px);
  194. position: relative;
  195. }
  196. }
  197. }
  198. </style>