Javascript – How to remove the x-axis from a bar chart produced by Google’s Visualization API


Referring to the kind of chart shown here:

There doesn't seem to be a simple switch, and changing the axis color to white (on a white background) didn't seem to do anything. I even tried jquery to hide the selectors produced by the api output but no dice.

Best Solution

You can set hAxis.textPosition to the value of 'none'

For example:

var options = {

                hAxis: { textPosition: 'none' },

chart.draw(data, options);