Hi Jeff,
You can use the DateFormat to format a column of your data, as shown in
this example: https://jsfiddle.net/dlaliberte/cxkh14sj/3/
However, that doesn't format your tick values, and unfortunately, the
format option for the axes does not currently accommodate the 'timeZone'
option, as the DateFormat supports. We need to fix that.
As a workaround, you can use the DateFormat formatValue method to format
any date value using the same formatter, and use that to generate a list of
formatted tick values, to set the 'ticks' option.
ticks: [{v: date1, f: formattedDate1} {v: date2, f: formattedDate2}, ...]
The main problem in doing it this way is that you have to determine which
date values to use based on what is appropriate for your data, and that can
be difficult if your dates vary each time you draw the chart.
On Fri, Jul 10, 2020 at 5:05 PM Jeff LaTray <[email protected]> wrote:
> These are the options I'm providing for hAxis on a line chart:
>
> hAxis : {maxValue: startTime,
> minValue: endTime,
> viewWindowMode: 'maximized',
> textPosition: 'in',
> format: 'HH:mm:ss',
> }
>
>
> This produces the look that I like but I want all the times in the chart
> to be UTC rather than local.
> I see references to DateFormat being able to take a timezone parameter (In
> this case 0) but I am not seeing how I can apply this to the hAxis or to
> the table on a whole.
>
> How do I do this?
>
> Thank you
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/4b110bf0-47a3-484a-8a91-a4948a9a682co%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/4b110bf0-47a3-484a-8a91-a4948a9a682co%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]> Cambridge 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 view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOXjWsg9GkcuXODt-aBLwdkZY4tZRP8nzY-5a3hzL240w%40mail.gmail.com.