How to display hyperlink inside bubble in bubble chart

378 views
Skip to first unread message

anu m

unread,
May 7, 2012, 2:31:34 PM5/7/12
to Google Visualization API
Hi,
I am Anu.I just want to know how to display hyperlink inside bubble
chart(Inside bubble with some value).I will be very greatful to you if
you help me.

asgallant

unread,
May 7, 2012, 4:20:50 PM5/7/12
to google-visua...@googlegroups.com
You can't put links into the charts.  You can however, emulate clicking a link with a 'select' event handler (which is triggered by a user clicking on a bubble).

hanjar

unread,
May 8, 2012, 7:19:13 PM5/8/12
to google-visua...@googlegroups.com
hi asgallant,

could you show the code how to add 'select' / listener for linechart?

asgallant

unread,
May 9, 2012, 9:27:16 AM5/9/12
to google-visua...@googlegroups.com
var chart new google.visualization.LineChart(document.getElementById('chart_div'));
google.visualization.events.addListener(chart'select'function ({
    var selection chart.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 data.getValue(selection[0].rowselection[0].column);
    // you can then emulate clicking a link from here
}); 
Reply all
Reply to author
Forward
0 new messages