You need to format your data to get the tooltips to display properly.  If 
you are using a "date" or "datetime" data type, you can format it using a 
DateFormatter:

var formatter = new google.visualization.DateFormat({pattern: 'h:mm aa'});
formatter.format(data, 0);

If you are using a "timeofday" data type, you can hijack the DateFormatter 
to manually format the time by converting it to a date for formatting:

var formatter = new google.visualization.DateFormat({pattern: 'h:mm aa'});
for (var i = 0; i < data.getNumberOfRows(); i++) {
    var time = data.getValue(i, 0);
    if (time && time.length) {
        var tmpDate = new Date(0, 0, 0, time[0], time[1] || 0, time[2] || 
0, time[3] || 0);
        var timeStr = formatter.formatValue(tmpDate);
        data.setFormattedValue(i, 0, timeStr);
    }
}

On Wednesday, July 30, 2014 12:43:28 AM UTC-4, Neil Camara wrote:
>
> Hi folks,
>
> I currently have this code. it's only formatting the time that is on the 
> axis but not when we hover the mouse pointer on the column.
>
>         hAxis: { format:'h:mm aa',
>             "gridlines": {
>                 "count": 12
>             }
>         },
>
> In the axis, it shows the hour correctly like 3pm. However, it gets 
> displayed as 15:00 on the tooltips.
>
> Any help would be greatly appreciated.
>
> Thanks!
>

-- 
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-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to