柱状图 渐变

描述:当前是关于Echarts图表中的 柱状图 示例。
 
            let total = 450;
  let option = {
    backgroundColor: 'white',
    title: [{
      show: true,    // 是否显示标题组件,(true/false)
      text: '企业概览',   // 主标题文本,支持使用\n换行
      textAlign: 'left',    //整体水平对齐(包括text和subtext)
      padding: [0, 0, 0, 35],  // 标题内边距 写法如[5,10]||[ 5,6, 7, 8] ,
      left: '0',    // title组件离容器左侧距离,写法如'5'||'5%'
      top: '8%',    // title组件离容器上侧距离
      textStyle: {    // 标题样式
        color: "#000",
        fontFamily: "Alibaba PuHuiTi",
        fontSize: 14,
        fontWeight: 600,
      },

    },
    {
      show: true,    // 是否显示标题组件,(true/false)
      text: '企业总数:' + total + '家',   // 主标题文本,支持使用\n换行
      // textAlign: 'right',    //整体水平对齐(包括text和subtext)
      padding: [0, 20, 0, 0],  // 标题内边距 写法如[5,10]||[ 5,6, 7, 8] ,
      right: '0',    // title组件离容器左侧距离,写法如'5'||'5%'
      top: '8%',    // title组件离容器上侧距离
      textStyle: {    // 标题样式
        color: "#000",
        fontFamily: "Alibaba PuHuiTi",
        fontSize: 14,
        fontWeight: 600,
      },
    }],

    grid: {
      top: '20%',
      left: '2%',
      right: '2%',
      bottom: '8%',
      containLabel: true,
    },

    tooltip: {
      trigger: "axis",
      backgroundColor: "rgba(1, 13, 19, 0.5)",
      borderWidth: 1,
      formatter: (params) => {
        let str = params[0].name + " : " + params[0].value + "家";
        return str;
      },

      textStyle: {
        color: "rgba(212, 232, 254, 1)",
        // fontSize: fontChart(0.24),
      },
      extraCssText: "z-index:2"
    },
    xAxis: {
      data: ['在地经营企业', '户管在本区企业', '户管在外区企业', '上市公司', '创新型企业', '独角兽企业', '瞪羚企业', '外资企业', '跨国公司'],
      axisLine: {
        show: true,
        lineStyle: {
          color: '#eeeeee',
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        color: '#393939',
        fontSize: 12,
        // rotate: "10"
      },
    },
    yAxis: [{
      type: 'value',
      // name: "企业概览",
      // nameTextStyle: {
      //   color: "#000",
      //   fontFamily: "Alibaba PuHuiTi",
      //   fontSize: 14,
      //   fontWeight: 600,
      //   // padding: [0, 0, 0, 35]
      // },
      // nameGap: 30,  // 表现为上下位置


      axisLine: {
        show: true,
        lineStyle: {
          color: '#eeeeee',
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        color: '#393939',
        fontSize: 14
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: '#eeeeee',
        }
      },
    }],
    series: [
      {
        // name: '采购项目提报',
        type: 'bar',
        barWidth: 20,
        zlevel: 2,
        itemStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#01B1FF'
            }, {
              offset: 1,
              color: '#033BFF'
            }], false)
          }
        },
        label: {
          normal: {
            show: true,
            fontSize: 13,
            color: '#14B6F3',
            position: 'top',
          }
        },
        data: [90, 70, 98, 97, 96, 70, 90, 70, 98]
      }]
  };