Hi BAforBI,
There were a number of errors in your code, but it was really close to
working. For future reference, in Chrome, you can press F12 to pull up the
Developer Tools which will show you the most recent errors that occurred.
1. When you load multiple packages, you should not do it via multiple
google.load calls. Simply specify all the packages in the packages array.
Like so: google.load("visualization", "1", {packages:["orgchart",
"table"]});
2. When specifying a listener for an event, you need to pass it the
function, which is done by just writing the function name. What you did was
call the function with a variable ("e") that did not exist at that time.
Here is the fixed line: google.visualization.events.addListener(chart,
'select', getXY);
3. JavaScript is case-sensistive, so getselection is a different
function from getSelection. So is setcell.
4. The final error you made is that the columns are 0-indexed. That
means that the first column index is 0, not 1. That means that the relevant
columns to you aren't 4 and 5, but 3 and 4. Column with the index "5" does
not exist.
I have attached the fixed version of your code.
On Sun Sep 28 2014 at 4:41:05 PM BAforBI <[email protected]> wrote:
> Hello, I am a business analyst (not a developer) and have created a simple
> application using google charts to generate the X,Y coordinates. I need to
> capture this data as input for another application.
> It does display the X,Y coordinate values on the web page but does not set
> the values the data table.
>
>
> --
> 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.