Format a time as hours:minutes on a Google Charts y-axis

前端 未结 2 1655
借酒劲吻你
借酒劲吻你 2021-01-06 03:33

I have a Google Chart where the y-axis is measured in minutes.

How can I format the y-axis so the labels display the time in a format like 2hrs40

2条回答
  •  遥遥无期
    2021-01-06 04:34

    Google lets you do that....I'm doing this to show data like "5 mins". In your options do this:

                vAxis: {
                format: 'm \'mins\''
            },
    

提交回复
热议问题