Can I add links in google chart api

2,691 views
Skip to first unread message

Don

unread,
Jun 1, 2011, 3:08:45 PM6/1/11
to Google Visualization API
Hi,

Can I add links in google chart api?

For example, in pie char( http://code.google.com/apis/chart/interactive/docs/gallery/piechart.html
), How could I add link to "Work" or "Eat" ?

Thanks!

Riccardo Govoni

unread,
Jun 2, 2011, 5:55:04 AM6/2/11
to google-visua...@googlegroups.com
I'm not sure you can render actual <a href> anchors in there, but for the pie chart case you can listen to selection events (when the user clicks on a slice or on a legend label) and use javascript code to mimic navigation to the link you'd have otherwise used.

Other visualizations, like the table, support an 'allowHtml' parameter which allows you use to use html markup in the data (including links).

/R.

Don

unread,
Jun 2, 2011, 2:30:58 PM6/2/11
to Google Visualization API
Thanks!

On Jun 2, 4:55 am, Riccardo Govoni <battleho...@gmail.com> wrote:
> I'm not sure you can render actual <a href> anchors in there, but for the
> pie chart case you can listen to selection events (when the user clicks on a
> slice or on a legend label) and use javascript code to mimic navigation to
> the link you'd have otherwise used.
>
> Other visualizations, like the table<http://code.google.com/apis/chart/interactive/docs/gallery/table.html>, support
Reply all
Reply to author
Forward
0 new messages