Actually, the "timeofday" data type does support formatting, both on h- and
vAxes.  This might only be available (especially for vAxis) in the next
release, now 1.1, but you should be able to specify, e.g. vAxis: { format:
"HH:mm:ss" } to get the default format, and you can show milliseconds with
"HH:mm:ss.SSS".   Negative time and times greater than 24 hours should also
work.

dan


On Tue, Jun 11, 2013 at 11:51 AM, asgallant <[email protected]>wrote:

> Axis formatting for the "timeofday" data type is not supported.  If you
> convert your timeofday data to Date objects (picking an arbitrary date as
> the base), you can format the dates on the axis the way you want them, but
> you may encounter odd issues working with dates on the vAxis.
>
>
> On Tuesday, June 11, 2013 2:52:44 AM UTC-4, Uddhav Arote wrote:
>>
>> Hi, it helped in converting the epoch time to timestamp.
>> Now, I am able to get the time. But on X-axis i am unable to plot the
>> time in the format "hh::mm:ss" even after passing the values in
>> [h,m,s,milisec] format as the first column.In the tooltip it shows in the
>> format i asked for, but not on the X-axis.
>>
>> How can i resolve this?
>> Thank you !
>>
>> On Friday, 7 June 2013 22:29:29 UTC+5:30, asgallant wrote:
>>>
>>> You can transform epoch time into javascript Date objects in the Date
>>> object constructor:
>>>
>>> var date = new Date(epochTime);
>>>
>>> which you can use to input the epoch time into a DataTable; or, if you
>>> already have epoch time in your DataTable, you can use a DataView (or the
>>> "view" parameter of a ChartWrapper) to handle the transform and output Date
>>> objects for your chart:
>>>
>>> var view = new google.visualization.DataView(**data);
>>> view.setColumns([{
>>>     type: 'date',
>>>     label: 'date column label',
>>>     calc: function (dt, row) {
>>>         return new Date(dt.getValue(row, 0)); // assumes column 0 is the
>>> epoch time
>>>     }
>>> }, 1 /*[, 2 [, 3 [, etc]]]*/);
>>>
>>> On Friday, June 7, 2013 2:47:56 AM UTC-4, Uddhav Arote wrote:
>>>>
>>>> Hi all,
>>>>   I want to plot a real time per second data using Linechart. I get an
>>>> epoch time and 63 values at that time as string. How to convert my epoch
>>>> time,say 130567440 into timeofday or date or time format, accepted by the
>>>> visualization api
>>>>
>>>> Thank you !
>>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   562D 5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to