Also, just noticed you said your axis was time, which should work fine:
Ran this in my console on a chart with time on the hAxis I had on a page,
with Aug 6, 1975 as the left-most point.
*chart.getChartLayoutInterface().getHAxisValue(171)*
Wed Aug 06 1975 12:04:14 GMT-0400 (EDT)
*chart.getChartLayoutInterface().getXLocation(new Date('Wed Aug 06 1975
0:00 GMT-0400 (EDT)')) // <= just use a JS Date Object.*
85.5
On Friday, May 24, 2013 1:58:17 PM UTC-4, Tom Rybka wrote:
>
> Hi Gabriele,
>
> I don't believe it's documented, (there is a bug open to do so), however
> it is part of the API, so here it is:
>
> Assuming you have a ComboChart object named chart:
>
> *chart*.getChartLayoutInterface().getHAxisValue(*x*)
>
> where x is the relative position from the left of the chart div.
>
> To get an idea, you can use the inverse function, getXLocation, on, say
> the 0 coordinate (or whatever is your lowest hAxis value):
>
> *chart*.getChartLayoutInterface().getXLocation(*val*)
>
> There are also getVAxisValue and getYLocation.
>
> Try it out,
> Tom
>
> On Friday, May 24, 2013 6:27:01 AM UTC-4, Gabriele Barni wrote:
>>
>> Hi all,
>>
>> Is there a method to get the value on the horizontal axis, starting from
>> the position of the mouse (for example on mouse over event), of a Combo
>> chart (on that axis I have time).
>>
>> Thanks to all!
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Chart 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-chart-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.