I'm creating a Timeline (which works okay), but I want to add links to the
Bars so when the user clicks on a bar he or she is redirected to another
page. The problem is that I don't know where to store and access the URL to
be used.
My Columns are:
1. type: 'string', id: 'DateTime' (which displays the Start date and time
as a string for the Bar ID in the first Column)
2. type: 'string', id: 'Title' (which displays as the label on the Bar)
3. type: 'string', role: 'tooltip', p: { html: true } (which is supposed
to display as the tooltip, but doesn't -- but this is another issue)
4. type: 'date', id: 'Start' (used for the Start location of the Bar)
5. type: 'date', id: 'End' (used for the End location of the Bar)
Then I Draw the chart and it displays just fine (except the tooltip thing).
So far, so good.
Then I add a Listener before the Draw, like this:
google.visualization.events.addListener(chart, 'select', function() {
window.location.ref = "http://www.Komando.com/";
} ) ;
This works, BUT I need it to go to a different URL for each different Bar.
I've read the docs and see where I can use chart.getSelection(),
getRowProperty( rowIndex, name ), setRowProperty( rowIndex, name ), and so
on, but I don't know what Property to use, or if I can create one to use
for the URL, or what. Everything I've tried so far just causes the Chart to
fail to be displayed.
Anyone have an idea of how to accomplish this (with code example, please)?
--
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.