Thanks Jré, will give this a try. D
On Aug 23, 9:33 pm, Jré Sarenac <[email protected]> wrote: > This is how I did it for my pie chart. > Hope this helps! > > Cheers, > Jré > > google.visualization.events.addListener(_pieChart, 'select', > mouseClickHandler); > > function mouseClickHandler() > { > > var selection = _pieChart.getSelection(); > var currentSelection = 0; > > //first selection has only length 1 because there is no > 'previous' selection > if(selection.length == 1) > { > currentSelection = selection[0].row; > } > //all other selections are: selection[0] = previous, > selection[1] = current > else > { > currentSelection = selection[1].row; > } > > switch(currentSelection) > { > case 1: > location.href = ('http://www.yoursite.com/'); > break; > case 2: > location.href = ('http://www.yoursite.com/'); > break; > case 3: > location.href = ('http://www.yoursite.com/'); > break; > case 4: > location.href = ('http://www.yoursite.com/'); > break; > default: > location.href = ('http://www.yoursite.com/'); > } > } > > > > On Mon, Aug 23, 2010 at 1:29 PM, Dario <[email protected]> wrote: > > Sorry for asking something probably trivial, but is there a simple way > > to open a URL when a user clicks a bar in an interactive bar chart? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Visualization API" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-visualization- > > api%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-visualization-api?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
