The best way to resolve your issue is to use Google Charts events . In the example below, I select the event (click event in one of the parts of the graph), inside it it is possible to access the data of the selected part and thus can create its treatments to redirect using window.location
, thus having the same function to a link. Follow jsfiddle
google.load('visualization', '1', {
'packages': ['corechart']
});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', 'Count');
data.addRows([
['MG', 5],
['SP', 61],
['RS', 53],
['DF', 22]
]);
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, {
width: 400,
height: 280,
is3D: true,
title: ''
});
//Seta o callback no gráfico
google.visualization.events.addListener(chart, 'select', selectHandler);
//função callback para evento de select
function selectHandler(e) {
//alerta com os dados selecionados
alert(data.getValue(chart.getSelection()[0].row, 0));
// aqui você pode adicionar um window.location para funcionar como o link
}
}