zhaowei
昨天 54d11f9a2f395e021486e6a31912616274b3feda
src/views/mdc/base/modules/WorkshopSignage/ClassUtilizationRateChart.vue
@@ -1,7 +1,5 @@
<template>
  <div id="class-utilizationRate">
  </div>
  <div id="class-utilizationRate"></div>
</template>
<script>
@@ -12,8 +10,8 @@
    components: {},
    props: {
      dataSource: {
        type: Array,
      },
        type: Array
      }
    },
    watch: {
      dataSource: {
@@ -35,7 +33,8 @@
        this.chartContainer = this.$echarts.init(document.getElementById('class-utilizationRate'))
        const option = {
          tooltip: {
            fontSize: this.fontSize(0.12)
            trigger: 'axis',
            fontSize: this.fontSize(0.16)
          },
          xAxis: [
            {
@@ -55,7 +54,6 @@
              axisLine: {
                lineStyle: {
                  color: '#eee'
                  // width:fontSize(0.02)
                }
              }
            }
@@ -63,7 +61,6 @@
          yAxis: [
            {
              type: 'value',
              // name:'上周开机率',
              axisTick: {
                show: true
              },
@@ -102,7 +99,6 @@
          legend: {
            pageTextStyle: {
              color: '#eee',
              // fontSize:'100%'
              fontSize: this.fontSize(0.12)
            },
            top: '2%',
@@ -133,60 +129,22 @@
                }
              },
              symbolSize: this.fontSize(0.16),
              // data: [38, 30, 44, 65, 23, 42],
              data: this.dataSource,
              itemStyle: {
                normal: {
                  // barBorderRadius:[20,20,0,0],
                  color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                    offset: 0,
                    color: '#96ceff'
                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                  offset: 0,
                  color: '#96ceff'
                },
                  {
                    offset: 0.6,
                    color: '#67c2ff'
                  },
                    {
                      offset: 0.6,
                      color: '#67c2ff'
                    },
                    {
                      offset: 1,
                      color: '#1195ff'
                    }], false)
                }
                  {
                    offset: 1,
                    color: '#1195ff'
                  }], false)
              }
            }
            // {
            //   name: '产业园厂区',
            //   type: 'bar',
            //   axisLabel: {
            //     show: true,
            //     interval: 'auto',
            //     formatter: '{value}%',
            //     textStyle: {
            //       color: '#eee',
            //       fontSize: this.fontSize(0.16),
            //       fontWeight: 'bold'
            //     }
            //   },
            //   symbolSize: this.fontSize(0.16),
            //   // data: [52, 44, 65, 59, 43, 21],
            //   data: this.dataSource,
            //   itemStyle: {
            //     normal: {
            //       // barBorderRadius:[20,20,0,0],
            //       color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
            //         offset: 0,
            //         color: '#ffe9cc'
            //       },
            //         {
            //           offset: 0.6,
            //           color: '#ffd46b'
            //         },
            //         {
            //           offset: 1,
            //           color: '#ffb530'
            //         }], false)
            //     }
            //   }
            // }
          ]
        }
        this.chartContainer.setOption(option, true)