There is a new feature coming soon (currently in the release candidate,
v1.1), that allows you to specify whatever formatting you want for the axis
labels, but you have to specify each label specifically, eg:
vAxis: {
ticks: [{v: 0, f: '00:00:00'}, {v: 30, f: '00:00:30'}, {v: 60, f:
'00:01:00'}, {v: 90, f: '00:01:30'}, {v: 120, f: '00:02:00'}]
}
You can load the release candidate like this:
google.load('visualization', '1.1', {packages: [/* list of packages */]});
On Tuesday, July 30, 2013 6:37:01 AM UTC-4, Виталий Мищенко wrote:
>
> Hi.
> For example I have this simple code.
>
> var data = [
> [new Date(1700), 60],
> [new Date(1800), 120]
> ]
>
> dataToRender = new google.visualization.DataTable();
> dataToRender.addColumn('string', 'Date');
> dataToRender.addColumn('number', 'Seconds');
>
> dataToRender.addRows(data)
>
> And I want to convert Seconds column to format like '00:01:00' and display
> on Y axis on AreaChart.
> The vAxis.format doesn't work.
> Please help, how I can do this ?
>
>
> I want to do something like google analitics.
> As I see from JSON from google analitics, they returned from server
> something like that value {v: 120, f: '00:02:00'} for rendering.
> Thanks.
>
> <http://img39.imageshack.us/img39/8631/jm1.png>
>
>
>
>
--
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.