且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Google图表工具会截断y轴标签

更新时间:2021-10-18 06:09:00

我相信您正在寻找chartArea.left选项.尝试这样的操作,并弄乱chartArea.left和chartArea.width值(虽然应该合计为500的总宽度),直到您的y标签全部可见:

I believe the chartArea.left option is what you are looking for. Try something like this, and mess around with chartArea.left and chartArea.width values (should add up to your total width of 500 though) until your y labels are all visible:

var options = {
    width: 500, height: 240,
    legend : 'none',
    vAxis:{title:'Answers',textStyle:{color: '#005500',fontSize: '12', paddingRight: '100',marginRight: '100'}},
    hAxis: { title: 'Percentage', textStyle: { color: '#005500', fontSize: '12', paddingRight: '100', marginRight: '100'} },
    chartArea: {left:100, width: 400} 
 };