Hi, I I'm trying to work with duration of hours... but I gues it is not supported see link: http://stackoverflow.com/questions/41742517/sorted-duration-time-for-google-table-chart maybe you can find something usuful..
Em sexta-feira, 1 de fevereiro de 2013 06:33:00 UTC-2, Dmitry Filimonov escreveu: > > Yes, it would be nice to have not a "timeofday" but a "timespan" type for > column. I guess it much more usefull > > On Thursday, January 31, 2013 9:18:28 PM UTC+3, Daniel LaLiberte wrote: >> >> Dmitry, >> >> I didn't mean that specifying the viewWindow.max would help with allowing >> values in your datatable greater than 24 hours. Only that the value of >> [25, 0, 0] is allowed for the viewWindow.max. It might be considered a bug >> that such a value is allowed, but I think I will push for the opposite, >> allowing larger values everywhere. >> >> dan >> >> On Thu, Jan 31, 2013 at 12:44 PM, Dmitry Filimonov <[email protected]> >> wrote: >> >>> No chance. viewWindow.max didn't help. >>> It gives >>> >>> Error: Type mismatch. Value 25,0,0,0 does not match type timeofday in >>> column index 3 >>> >>> gives somewhere in corechart.js >>> >>> >>> On Thursday, January 31, 2013 7:59:48 PM UTC+3, Daniel LaLiberte wrote: >>> >>>> Dmitry, >>>> >>>> I'm thinking that timeofday should allow more than 24 hours. I just >>>> had an example where I only wanted to plot times up to 24 hours, and I >>>> can't specify [24, 0, 0] (though I could fudge it with [23, 59, 59, 999]) >>>> or get it to show the '24' hour gridline. Curiously, I could specify a >>>> viewWindow max of [25, 0, 0]. The best I could do was get another '0' >>>> gridline at the 24 hour point, with: >>>> >>>> viewWindowMode: 'explicit', >>>> viewWindow: { max: [24, 30, 0] } >>>> >>>> This also requires no explicit gridlines.count. >>>> >>>> Anyway, I think it should be easy to allow larger positive values. I >>>> wonder about negative values also, but there could be more complications. >>>> >>>> dan >>>> >>>> On Thu, Jan 31, 2013 at 11:31 AM, asgallant <[email protected]> >>>> wrote: >>>> >>>>> You can use a "datetime" column type, too, but there are limitations >>>>> on them that don't apply to timeofday (chiefly, you can't stack them and >>>>> the format of times > 24 hours will be messed up). Drop this code into >>>>> the >>>>> playground to see: >>>>> >>>>> function drawVisualization() { >>>>> // Create and populate the data table. >>>>> var data = new google.visualization.DataTable(); >>>>> data.addColumn('string', 'name'); >>>>> data.addColumn('datetime', 'duration'); >>>>> data.addRows([ >>>>> ['foo', new Date(0, 0, 0, 7, 23, 0, 0)], >>>>> ['bar', new Date(0, 0, 0, 5, 56, 0, 0)], >>>>> ['baz', new Date(0, 0, 0, 29, 20, 0, 0)], >>>>> ['cad', new Date(0, 0, 0, 14, 45, 0, 0)] >>>>> ]); >>>>> >>>>> var formatter = new google.visualization.DateFormat({pattern: >>>>> 'hh:mm:ss'}); >>>>> formatter.format(data, 1); >>>>> >>>>> >>>>> // Create and draw the visualization. >>>>> new google.visualization.BarChart(document.getElementById( >>>>> 'visualization')). >>>>> draw(data, { >>>>> width:600, >>>>> height:400 >>>>> }); >>>>> >>>>> } >>>>> >>>>> On Thursday, January 31, 2013 11:20:34 AM UTC-5, Dmitry Filimonov >>>>> wrote: >>>>>> >>>>>> Thank you for answer, but timeofday is not good. It gives an error if >>>>>> you out more than 24 hours for example. My durations can be more than 24 >>>>>> hours :( >>>>>> >>>>>> четверг, 31 января 2013 г., 18:58:49 UTC+3 пользователь asgallant >>>>>> написал: >>>>>>> >>>>>>> Yes, you can show time duration on the y-axis. Use a "timeofday" >>>>>>> column type for your duration data (each data point is an array [hour, >>>>>>> minute, second, millisecond]). I had an example done up, but jsfiddle >>>>>>> decided to go down, so here's one based on the Visualization >>>>>>> playground >>>>>>> <https://code.google.com/apis/ajax/playground/?type=visualization#bar_chart> >>>>>>> >>>>>>> (just replace the code with this and hit "run"): >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>> 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] 562D 5CC, Cambridge MA >>>> [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. >>> >>> >>> >> >> >> >> -- >> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> >> - 978-394-1058 >> [email protected] 562D 5CC, Cambridge MA >> [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 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/737830ec-5217-45cf-9267-a58b96e92146%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
