如何更改堆叠的条形图颜色并隐藏y轴?

时间:2018-08-28 07:44:19

标签: javascript jquery pygooglechart

我想更改图形颜色并隐藏y轴值,但是我该怎么做。请帮我。这是我的代码-

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 个答案:

答案 0 :(得分:0)

条形颜色更改:

<form  #form="ngForm">
    //Your input fields with required paramets

  <button type="submit" [disabled]="form.invalid">Next</button>

</form>

隐藏Y轴:

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