Do you want a link opened when someone clicks a data point, or do you want a
link added to the popup?
If you want a link opened on click, after you call draw() on your chart
object, add an event listener for the "select" event and use js to direct
your navigation from there:
// assuming you have a chart object called "chart"
google.events.addListener(chart, 'select', function () {
// whatever you want, ex:
window.location.href = "http://target.web.site/";
});
If you want the popups to have links in them, you need to set the formatted
values of your data. Either call the dataTable method #setFormattedValue
for each point, or set your values and formatted values in object notation
when you build your dataTable:
// assuming you have a dataTable object called "data"
data.setValue(0,1,{v: 6, f: '<a href="http://target.web.site">This is a link
for value 6</a>'});
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/oFeBqfQzlZkJ.
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.