Flávio,

There are two changes to gviz that should show up within a couple weeks
which will help you do what you want.

First, the timeofday type has been generalized to allow more than 24 hours.
 So 98 hours, 30 minutes can be represented as [98, 30, 0, 0].

Second, you can provide any formatting of axis labels along with the
explicit tick values.  The option to specify an explicit array of ticks is
'ticks'.  The downside is that you'll have to compute and specify all the
tick values you want since it overrides the automatic calculations.  The
formatting of these values can be specified (in a future release) with the
object literal notation similar to what you can use in data tables.  E.g.
ticks: [ { v: [50, 0, 0, 0], f: "50:00" }, [75, 0, 0, 0], [100, 0, 0, 0] ].
 But the format option already lets you specify the formatting as you want:
format: "HH:mm", except that currently it wraps the hours around at 24
hours.  But the ICU formatting rules (
http://userguide.icu-project.org/formatparse/datetime) doesn't have a way
of specifying hours without wrapping, so I'm not sure what we'll do.

dan


On Mon, Jun 10, 2013 at 1:02 PM, asgallant <[email protected]>wrote:

> The relative inflexibility of axis formatting comes up rather frequently,
> so I made a feature request to expand formatting capabilities:
> https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1232.
>  You can "star" the issue to get notified of updates.
>
>
> On Monday, June 10, 2013 12:51:47 PM UTC-4, asgallant wrote:
>>
>> No, you can't customize the labels like that.
>>
>> On Friday, June 7, 2013 4:43:44 PM UTC-4, Flávio Tomazio wrote:
>>>
>>> And just change de label in vertical axis, is possible? Calcute the
>>> chart with total minutes, 93:30 become 5610, and display a customized
>>> label, in case, 93:30
>>>
>>> Em sexta-feira, 7 de junho de 2013 17h39min32s UTC-3, asgallant escreveu:
>>>>
>>>> There is no data type in the API for handling duration in hours and
>>>> minutes like that.  Probably the best you could do is convert all data to
>>>> one unit (eg, 98:30 becomes 98.5 hours).
>>>>
>>>> On Friday, June 7, 2013 4:25:36 PM UTC-4, Flávio Tomazio wrote:
>>>>>
>>>>> Hi, i tried create a chart for work time by month using Area Chart,
>>>>> but i don't know what parameters used to display this data like time.
>>>>>
>>>>> Example:
>>>>> Jan/13 - 98:30 hours and minutes
>>>>> Feb/13 - 50:30 hours and minutes
>>>>>
>>>>> MyScript:
>>>>>
>>>>> function drawVisualization() {
>>>>>     // Some raw data (not necessarily accurate)
>>>>>     var data = google.visualization.**arrayToDataTable([
>>>>>         ['Month/Year',   'Hours'],
>>>>>         ['Jan/13', '98:30'],
>>>>>         ['Feb/13', '50:30']
>>>>>     ]);
>>>>>
>>>>>     // Create and draw the visualization.
>>>>>     var ac = new google.visualization.**AreaChart(document.**
>>>>> getElementById('visualization-**time'));
>>>>>     ac.draw(data, {
>>>>>         title : 'Time',
>>>>>         isStacked: true,
>>>>>         width: '100%',
>>>>>         height: 400,
>>>>>         vAxis: {title: "Hours"},
>>>>>         hAxis: {title: "Month/Year"}
>>>>>     });
>>>>> }
>>>>>
>>>>> Whats is wrong?
>>>>>
>>>>  --
> 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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to