maxiaoxiao 1 년 전
부모
커밋
cecf282eea
1개의 변경된 파일5개의 추가작업 그리고 88개의 파일을 삭제
  1. 5 88
      src/components/echartsTemplate/pie.vue

+ 5 - 88
src/components/echartsTemplate/pie.vue

@@ -3,6 +3,11 @@
 </template>
 
 <script>
+let colors = [
+  ["#FC8053", "#F2CAA4"],
+  ["#5583e7", "#36dddb"],
+  ["#f888b1", "#fbe6ee"],
+];
 let option = {
   backgroundColor: "rgba(0,0,0,0)",
   title: {
@@ -137,97 +142,9 @@ export default {
         // var dom = document.getElementById("pie_echart");
         this.myChart = echarts.init(this.$refs.echart);
       }
-      let colors = [
-        ["#FC8053", "#F2CAA4"],
-        ["#5583e7", "#36dddb"],
-        ["#f888b1", "#fbe6ee"],
-      ];
-      // var color2 = [
-      //   {
-      //     color: {
-      //       type: "linear",
-      //       x: 0,
-      //       y: 0,
-      //       x2: 1,
-      //       y2: 1,
-      //       colorStops: [
-      //         {
-      //           offset: 0,
-      //           color: "#FC8053",
-      //         },
-      //         {
-      //           offset: 1,
-      //           color: "#F2CAA4",
-      //         },
-      //       ],
-      //       global: false,
-      //     },
-      //   },
-      //   {
-      //     color: {
-      //       type: "linear",
-      //       x: 0,
-      //       y: 0,
-      //       x2: 1,
-      //       y2: 1,
-      //       colorStops: [
-      //         {
-      //           offset: 0,
-      //           color: "#5583e7",
-      //         },
-      //         {
-      //           offset: 1,
-      //           color: "#36dddb",
-      //         },
-      //       ],
-      //       global: false,
-      //     },
-      //   },
-      //   {
-      //     color: {
-      //       type: "linear",
-      //       x: 0,
-      //       y: 0,
-      //       x2: 1,
-      //       y2: 1,
-      //       colorStops: [
-      //         {
-      //           offset: 0,
-      //           color: "#f888b1",
-      //         },
-      //         {
-      //           offset: 1,
-      //           color: "#fbe6ee",
-      //         },
-      //       ],
-      //       global: false,
-      //     },
-      //   },
-      // ];
 
-      // var dataAll = 0;
       dataList.forEach((item, index) => {
         option.legend.data.push(item.name);
-        // item.itemStyle = {
-        //   color: {
-        //     type: "linear",
-        //     x: 0,
-        //     y: 0,
-        //     x2: 1,
-        //     y2: 1,
-        //     colorStops: [
-        //       {
-        //         offset: 0,
-        //         color: colors[index][0],
-        //       },
-        //       {
-        //         offset: 1,
-        //         color: colors[index][1],
-        //       },
-        //     ],
-        //     global: false,
-        //   },
-        // };
         item.itemStyle = {
           color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
             {