score:1

Accepted answer

You need to set min/max values as workaround.

xAxis:{
      type:'categories',
      min:0.49,
      max: categories.length - 1.49,
      categories: categories,
      minPadding:0,
      maxPadding:0,
      gridLineWidth:0,
      tickmarkPlacement: 'between',//仅适用于类别轴categories值时候,刻度线位于在类别名称的中心
      labels: {
          align:'center',
          y:-3,//垂直偏移
          style:{
              color:'white'
          }
      }
    },

http://codepen.io/anon/pen/PZWxwa


Related Articles