how to change stacked bar chart color and hide y-axis?

112 Views Asked by At

I want to change that graph color and hide y-axis values but how can I do this. Please help me. Here is my code-

var view = new google.visualization.DataView(datas);
      view.setColumns([0, 1,
                       { 
                        calc: "stringify",
                         sourceColumn: 1,
                         type: "string",
                         role: "annotation" 
                       },
                       2]);
var options2 = {
        width: 555,
        height: 400,
        bar: {groupWidth: "95%"},
        legend: { position: "none" },
        isStacked: true,
         vAxis: {
            baselineColor:'Black',
            textPosition: 'none',
            gridlines: {
                color: 'transparent'
            }
        }
      };

Graph Take some default color in it but I want to change that color

1

There are 1 best solutions below

3
regex On

Bar color change:

var options= {colors: ['red','green'],}

Hide Y Axis:

vAxis:{
     baselineColor: '#fff',
     gridlineColor: '#fff',
     textPosition: 'none'
}