Vertical labels with google charts API?

前端 未结 9 1647
傲寒
傲寒 2020-12-13 03:07

Anyone know how to get x-axis labels to be vertical with google charts API?

I need to fit a lot of labels in a small chart.

Thanks

9条回答
  •  一个人的身影
    2020-12-13 03:39

    The trick is in the chartArea.height = 300 and chartArea.top = 100, height:600

    var options = {
        title: 'Motivation and Energy Level Throughout the Day',
        isStacked: true,
        height:600,
        chartArea: {
            height:300,
            top:100,
        },
        hAxis: {
          title: 'Departamentos',
          titleTextStyle: {
            color: '#FF0000',            
          },
    
          slantedText:true,
          slantedTextAngle:45,
    
        },
        vAxis: {
          title: 'Kits'
        }
      };
    

提交回复
热议问题