Hi Dennis,

There is no method for determining what the date units are for the ticks.
The best you could do currently would be to get information about the
current viewWindow via the getChartLayoutInterface method and associated
methods.

It would be a good idea to provide this info somehow, or at least allow
customization of the axis title based on the units used.

On Wed, Dec 13, 2017 at 9:03 AM, Inquisitor <[email protected]> wrote:

> I have a written some generic JavaScript to zoom in/out on some time based
> line chart data using the mouse wheel.  I've set up the
> hAxis:gridlines:units properties to have the full range of units from years
> down to milliseconds...
>
>             units: {
>                 years: { format: ["yyyy"] },
>                 months: { format: ["M/dd/yy"] },
>                 days: { format: ["M/dd/yy"] },
>                 hours: { format: ["haa"] },
>                 minutes: { format: ["h:mmaa"] },
>                 seconds: { format: ["m:ss"] },
>                 milliseconds: { format: ["s.SSS"] }
>             }
>
> This, I have working fine and Google's chart code nicely formats the most
> appropriate range for the current viewWindow.  One minor issue... I'd like
> to improve clarity, by changing the hAxis:title when the Google chart code
> changes ranges...  ie   time (years), time (hours), etc.  How do I query
> the chart about what set of units it is currently using?
>
> --
> 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 google-visualization-api@
> googlegroups.com.
> 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/a0b35ae2-8c58-40ca-a40f-
> bd0c5780fb09%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/a0b35ae2-8c58-40ca-a40f-bd0c5780fb09%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   5CC, 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 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/CAOtcSJN%2Ba9zEGFhMy0kLv7vPZ77QRg0TL_yfGFtXW%2BWNcFEvPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to