Problem plotting duration with google chart

40 views
Skip to first unread message

Hitesh Jain

unread,
Mar 5, 2016, 2:32:45 AM3/5/16
to Google Visualization API
Hi 

I want to plot data on line chart where each rows corresponds to 1 month and columns contain duration.

Following sheet contain sample data and plotted chart. 

I want to plot duration on Y axis such that it starts at 0:00 but in the chart it starts at 16:00 (I think it is doing so because duration more than 24:00 rolls up back to next day). I know this can be solved by making duration a decimal value (like 01:30 can be change to 1.5) but I want data to remain in format hh:mm for better readability. Moreover MS excel plots this correctly (I've attached an image in the document itself)


Thanks


Daniel LaLiberte

unread,
Mar 7, 2016, 9:16:56 AM3/7/16
to Google Visualization API
Hi Hitesh,

The timeofday formatting doesn't currently know how to display values for hours outside the normal range of a day since we use the standard Google closure date/time formatting utilities that uses a subset of the ICU formatting rules documented here:  http://userguide.icu-project.org/formatparse/datetime . Probably the correct solution would be to add a formatting option to indicate you want unbounded hours.  The same would apply to each of the other date/time units: seconds, milliseconds, minutes, days and months. 

In the meantime, you can include a day number in the format to at least make the values be distinct and correct.    

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/625cf1b3-44b6-47b2-9a9d-ca61a6f9cef6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Hitesh Jain

unread,
Mar 7, 2016, 1:28:21 PM3/7/16
to google-visua...@googlegroups.com
Hi Dan

>>  In the meantime, you can include a day number in the format to at least make the values be distinct and correct.  
I tried including the day number in the format but it didn't helped. Sheet is updated to include the day number in the Format as <Day>, <Elapsed Hours>:<Elapsed Mins> 

Thanks
Hitesh

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/qFjRk9VP2Vw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
Reply all
Reply to author
Forward
0 new messages