2
votes

How can I select a slice in the pie chart so that it would have the hovered (highlighted) effect? Is it supported? setSelection doesn't seem to work in this manner:

var chart = new google.visualization.PieChart(element);
chart.draw(dataTable, options);

...
chart.setSelection({row: rowIdx});
1

1 Answers

5
votes

The selection is an array of objects, not a single object, so you need to set it like this:

chart.setSelection([{row: rowIdx}]);