Duc Doan
Duc Doan

Reputation: 415

How to hide the percentage legends in google bar chart

I'm using google bar chart in my website, i want to hide the percentage legends but can't find the settings that can do that.

Here is my chart and the settings

enter image description here

optionsBar = {
            height      : 95,
            legend      : { position: 'none' },
            bar         : { groupWidth: '60%' },
            isStacked   : 'percent',
            backgroundColor: 'none',
            chartArea   : { left: 0, width: '100%'  },
            hAxis       : { baselineColor: 'none', gridlines: { color: 'none' } }
        };

Upvotes: 1

Views: 263

Answers (2)

Duc Doan
Duc Doan

Reputation: 415

My solution is set height = 70, the legends will be hidden because the chart will be lower and there is no place to display the legends.

Upvotes: 2

c0de
c0de

Reputation: 819

If I understood your question correctly, you want to hide the x values. I found a solution here , which says use:

hAxis: { textPosition: 'none' }

Hope this helps.

Upvotes: 2

Related Questions