sometimes I just need to walk away and try again later. You are absolutely correct. My div in my source is not called 'gauge1'. I was confused and thought I needed to use the chart variable, not the div id. Sorry. Thanks again for all the help. You got me on the right track!
On Mon, Jan 5, 2015 at 3:32 PM, 'Sergey Grabkovsky' via Google Visualization API <[email protected]> wrote: > It sounds like you don't have the 'gauge1' element at the time that the > code is run. I find it pretty odd that this would occur, since > google.setOnLoadCallback should only call the function when the DOM has > loaded. > > On Mon Jan 05 2015 at 3:29:35 PM <[email protected]> wrote: > >> I'm sorry I thought I posted a picture of the error. I am running IE >> v11. And fiddle does not reproduce the error. It runs as expected in js >> fiddle. Error is "unable to get property addEventListener of undefined or >> null reference. >> >> >> >> >> >> On Monday, January 5, 2015 11:23:22 AM UTC-5, [email protected] wrote: >>> >>> Hi everyone, >>> >>> I have a gage with a dropdown and would like to be able to click the >>> gauge and navigate to the record that was selected from the dropdown. I >>> found some help on your message board about how to make a chart emulate a >>> hyperlink and I've added the following code but it doesn't seem to do >>> anything. It doesn't cause an error or anything either. It just does >>> nothing: >>> >>> >>> google.visualization.events.addListener(gauge1, 'select', function >>> () { >>> var selection = gauge1.getSelection(); >>> // selection is an array of objects with {row, column} properties, >>> // use them to get data from your DataTable if you need to, ie: >>> var selectedValue = gaugeData.getValue(selection[0].row, >>> selection[0].column); >>> // you can then emulate clicking a link from here >>> alert('You clicked on ' + selectedValue ); >>> window.location.href = "http://www.google.com/"; >>> }); >>> >>> >>> Here is a jsfiddle with all my logic. Any advice you can offer is >>> greatly appreciated. >>> http://jsfiddle.net/sremias/y9nq2bqe/3/ >>> >>> >>> -- >> 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 a topic in the > Google Groups "Google Visualization API" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-visualization-api/dGs17vP4PLY/unsubscribe > . > To unsubscribe from this group and all its topics, 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.
