小小儁爺
2024-10-14 19ae7b374b4a2a356de70dbc61f49ce00d1bd83f
src/utils/myEcharts.js
@@ -329,25 +329,25 @@
    },
    series: [
      {
      name: '时间',
      type: 'line',
      smooth: false,
      showAllSymbol: true,
      symbol: 'emptyCircle',
      symbolSize: 8,
      itemStyle: {
        normal: {
          color: `rgba(42, 197, 137, 1)`
        }
      },
      lineStyle: {
        normal: {
          width: 2,
          color: `rgba(42, 197, 137, 1)`
        }
      },
      data: dataY
    }
        name: '时间',
        type: 'line',
        smooth: false,
        showAllSymbol: true,
        symbol: 'emptyCircle',
        symbolSize: 8,
        itemStyle: {
          normal: {
            color: `rgba(42, 197, 137, 1)`
          }
        },
        lineStyle: {
          normal: {
            width: 2,
            color: `rgba(42, 197, 137, 1)`
          }
        },
        data: dataY
      }
    ]
  }
@@ -356,8 +356,8 @@
// 综合看板图
export function bar02(dataArr, titlenameArr) {
  // const data = [70, 60, 50, 40, 30]
  // const titlename = ['外观划伤', '表面油污', '尺寸', '颜色', '大小']
  // const data = [700, 600, 50, 40, 30]
  // const titlename = ['500ml提手盖咖啡杯 蓝色 喷塑', '500ml提手盖咖啡杯 蓝色 喷塑', '尺寸', '颜色', '大小']
  // const data = val.map(i => i.cont)
  // const titlename = val.map(i => i.name)
  const data = dataArr.filter((item, index) => index < 5)
@@ -371,7 +371,9 @@
    }
  }
  const valdata = [683, 500, 400, 300, 200]
  console.log(titlename, 123)
  // const valdata = [683, 500, 400, 300, 200]
  // const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00']
  // const myColor = ['#0000FF']
  // const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF']
@@ -421,11 +423,16 @@
          show: false
        },
        axisLabel: {
          show: false,
          // color: '#fff',
          color: function(value, index) {
            return value === '0' ? 'transparent' : '#fff'
          },
          verticalAlign: 'bottom',
          // align: 'left',
          // margin: 80,
          fontSize: 20,
          // formatter: function(value, index) {
          //   return [
          //     '{lg|' + (index + 1) + '、   }' + '{title|' + value + '} '
@@ -455,12 +462,12 @@
        }
      },
      {
        show: false,
        show: true,
        inverse: true,
        data: valdata,
        data: data,
        axisLabel: {
          textStyle: {
            fontSize: 12,
            fontSize: 20,
            color: '#fff'
          }
        },
@@ -495,13 +502,24 @@
        },
        label: {
          normal: {
            color: '#fff',
            show: true,
            position: 'right',
            formatter: '{c}',
            fontSize: 20,
            color: '#fff'
            // formatter: '{c}%',
            position: [0, '-20px'],
            textStyle: {
              fontSize: 16
            },
            formatter: function(a, b) {
              return a.name
            }
          }
          // normal: {
          //   show: true,
          //   position: 'right',
          //   formatter: '{c}',
          //   fontSize: 20,
          //   color: '#fff'
          //   // formatter: '{c}%',
          // }
        }
      }
    ]
@@ -1874,7 +1892,7 @@
      containLabel: true
    },
    title: {
      text: '各车间当月订单数/入库数量',
      text: '各车间近两月订单数/入库数量',
      left: '50%',
      top: '0%',
      textAlign: 'center',