Chart.js: How to remove only the x-axis lines in Bar graph

Created on 15 Dec 2016  ·  2Comments  ·  Source: chartjs/Chart.js

Hi, I am using the BarChart (v2). I want to remove the x-axis lines in the graph.

I tried the following in options

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

But doing the above removes the x-axis labels also. How do I retain the x axis labels while removing the lines?

screen shot 2016-12-15 at 11 36 18 am

I want to remove the x-axis lines as shown in the pic, but I want the labels to show up.

support

Most helpful comment

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

All 2 comments

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

this does what i wanted, thanks

Was this page helpful?
0 / 5 - 0 ratings