zoukankan      html  css  js  c++  java
  • erchart bar 表格使用

        myEchartsBar(data, id) {
          let legendArr = data.series.map((item) => item.name)
          let option = {
            color: ['#FF6D6D', '#2282FF','#17C388'],
            tooltip: {
              trigger: 'axis',
              axisPointer: {
                type: 'shadow',
              },
            },
            legend: {
              data: legendArr, // 顶部展示的名字数组 [a,b,c]
              right: '10px',
              textStyle: {
                color: '#9f9f9f',
              }
            },
            grid: { // 内容区
              left: '2%',
              right: '20px',
              bottom: '2%',
              containLabel: true,
            },
            xAxis: [
              {
                type: 'category', // 说明轴
                data: data.xAxisData, // 说明的文字说明数组
                axisTick: {
                  show: false, //隐藏刻度线
                },
                axisLine: { // 坐标线样式
                  lineStyle: {
                    color: '#eef3f8',
                  }
                },
                axisLabel: { // 字体样式
                  color: '#999999'
                }
              },
            ],
            yAxis: [
              {
                name: '工单量',
                type: 'value', // 数据轴
                nameTextStyle: {
                  color: "#999999"
                },
                axisTick: {
                  show: false,
                },
                axisLine: {
                  lineStyle: {
                    color: '#eef3f8',
                  }
                },
                axisLabel: {
                  color: '#999999'
                },
                splitLine: { // x 坐标网格线样式
                    show: true,
                    lineStyle:{
                      color: ['#eef3f8'],
                       1,
                      type: 'solid'
                  }
              }
              },
            ],
            series: data.series,
          }
          var myChart = this.$echarts.init(document.getElementById(id))
          myChart.setOption(option)
        },
    

      

  • 相关阅读:
    python项目_mysql开启事务
    python项目_ImageField字段
    linux基础_常用命令
    mysql数据_查询操作
    list 和 tuple——python基础学习
    python-格式化
    python-字符串
    数学——变上限积分的应用
    python-交互模式
    蓝桥杯——汉诺塔问题
  • 原文地址:https://www.cnblogs.com/fczbk/p/14314066.html
Copyright © 2011-2022 走看看