Re: Column chart v axis display format in 'hh:mm:ss'

894 views
Skip to first unread message

asgallant

unread,
Oct 3, 2012, 6:19:34 PM10/3/12
to google-visua...@googlegroups.com
Change your data type to "datetime" and enter the data as date objects.  You can then set the vAxis.format option to "HH:mm:ss" to format the data as you want.  See an example here: http://jsfiddle.net/asgallant/UrBLG/

On Wednesday, October 3, 2012 5:05:23 PM UTC-4, Arthur Shvetsov wrote:
Hello everyone!

I need to show time on vAxis in column chart. For example:

00:50:00
00:40:00
00:30:00
00:20:00
00:10:00
00:00:00-----------------------------------------------------
                  User 1      User 2      User 3

What is the best solution to my issue? I can build diagramm using seconds, but how show formatted string 'hh:mm:ss' insted of seconds (dataType: number) in vertical axes

Thanks

Arthur Shvetsov

unread,
Oct 4, 2012, 4:17:14 AM10/4/12
to google-visua...@googlegroups.com
Great solution, thanks!!!

четверг, 4 октября 2012 г., 1:19:34 UTC+3 пользователь asgallant написал:

Sandeep Ambekar

unread,
Nov 12, 2013, 9:38:53 AM11/12/13
to google-visua...@googlegroups.com
asgallant,

With this, the pop up shows date as 31 Dec 1899 along with time.. how to limit the pop up to just show time.

thanks in advance..

asgallant

unread,
Nov 12, 2013, 10:51:01 AM11/12/13
to google-visua...@googlegroups.com
Use a DateFormatter:

// format column 0 of DataTable "data"
var formatter = new google.visualization.DateFormat({pattern: 'HH:mm:ss'});
formatter.format(data, 0);
Reply all
Reply to author
Forward
0 new messages