Search code examples
javascriptchartschart.js

How to hide y axis line in ChartJs?


I am using bubble chart and gotta hide the y axis line. I've tried the following but it doesn't work.

yAxes: [{
  angleLines: {
    display: false
  }
}]

Solution

  • This disables the vertical Y axis line:

    options: {
      scales: {
        yAxes: [{
          gridLines: {
            drawBorder: false,
          },
        }]
      },
    },
    

    This can be combined with display to disable the vertical gridLines:

    xAxes: [{
      gridLines: {
        display: false,
      },
    }],
    

    Here's a working example: http://codepen.io/anon/pen/xqGGaV