更改字幕颜色Google Chart

时间:2016-08-12 17:23:18

标签: google-visualization

如何更改字幕和谷歌字体? 我已经在论坛上进行了足够的研究,我阅读了与谷歌相关的所有文档,但没有成功。

subtitle

我的代码是:

google.charts.load('current', {
'packages': ['bar']
});
google.charts.setOnLoadCallback(drawChart);

function drawChart() {
var data = google.visualization.arrayToDataTable([
    ['aqui em baixo', 'Ocupada', 'Disponível'],
    ['eq1', 10, 24],
    ['eq2', 16, 22],
    ['eq3', 28, 19]
]);

var options = {
    width: '100%',
    height: 500,
    isStacked: true,
    series: [{
        color: '#5fb560'
    }, {
        color: '#db4437'
    }],
    legend: {
        position: 'top',
        maxLines: 1
    },
    bar: {
        groupWidth: '75%'
    },
    chart: {
        title: 'Company Performance',
        subtitle: 'Sales, Expenses, and Profit: 2014-2017',
    },
    titleTextStyle: {
        color: '#333333'
    },
};

var chart = new google.charts.Bar(document.getElementById('chart_div'));

chart.draw(data, google.charts.Bar.convertOptions(options));
}

0 个答案:

没有答案