当前位置:   article > 正文

Echarts普通横纵坐标柱形图_echarts柱状图纵坐标刻度

echarts柱状图纵坐标刻度

根据横纵坐标来设置柱形图
具体代码如下

 option = {
        color: ['#009CFF'],
        legend: {      //图例样式设置
          data: ['各省企业产量(辆)'],
          textStyle: {
            fontSize: 14,
            fontWeight: 'normal',
          },
          bottom: '15%',
          right: '3%',
        },
        tooltip: {    //鼠标放置在柱状图上的数据提示
          trigger: 'axis',
          axisPointer: {
            type: 'line',
          },
        },
        grid: {      //组件在容器中的样式设置
          left: '22%',
          right: '2%',
          bottom: '35%',
          top: '5%',
          containLabel: false,
        },
        xAxis: {
          data: nameData,
          axisLabel: {    //X轴刻度坐标文字样式
            textStyle: {
              fontSize: 12,
              fontWeight: 'normal',
            },
          },

        },
        yAxis: {
          type: 'value',
          axisLabel: {    //X轴刻度坐标文字样式
            textStyle: {
              fontSize: 14,
              fontWeight: 'normal',
            },
          },
        },
        series: [{
          name: '各省企业产量(辆)',
          data: Data,
          min: 0,
          barWidth: '12',
          type: 'bar',
          barGap: '5%',
        }],
    };
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读