Wow. We really need to have a better error message there. The issue isn't
that getXLocation is an undefined function. The failure happens deeper in
Charts. The actual issue here is that you're not giving getXLocation a Date
value, for a chart where the X axis is a Date. You're giving it the value
from getValue(2, 1), but column 1 isn't a Date column.

On Thu, May 14, 2015 at 3:20 PM Tim Lewis <[email protected]> wrote:

> So I've been trying to debug this and something very strange seems to be
> going on.  The error appears to occur on the line below that tries to use
> the cli.getXLocation() method.  Interestingly, the .getYLocation() method
> works perfectly fine, and when I replace the "X" with a "Y" in the below
> code (so that it references only getYLocation), it works exactly as I would
> expect.  Furthermore, when I output the cli object to the console, I can
> see a getXLocation method is included in the object right beside the
> corresponding getYLocation.
>
> Why would getYLocation be a defined function and getXLocation not be a
> defined function?
>
> function placeMarker(DataTable) {
>     $('.delay').show();
>
>     var cli = this.getChartLayoutInterface();
>     var chartArea = cli.getChartAreaBoundingBox();
>     document.querySelector('.overlay').style.top = Math.floor(cli.
> getYLocation(DataTable.getValue(2, 1))) - 50 + "px";
>     document.querySelector('.overlay').style.left = Math.floor(cli.
> getXLocation(1)) - 10 + "px";
> }
>
> google.visualization.events.addListener(cloud_chart_wrapper, 'ready',
> placeMarker.bind(cloud_chart_wrapper, cloud_datatable));
>
> --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to