Well, without knowing the specifics of the data structure, the basics would look something like this:
google.load('visualization', '1', {'packages': ['corechart']});
google.setOnLoadCallback(drawCharts);
function drawCharts() {
var data1 = new google.visualization.DataTable();
// populate data table
var pie1 = new google.visualization.PieChart(document.getElementById('pie_chart_1'));
var pie2 = new google.visualization.PieChart(document.getElementById('pie_chart_2'));
google.visualization.events.addListener(pie1, 'select', function () {
var selection = pie1.getSelection();
// use selection to determine what you want to use for pie2
// create a DataView or DataTable for pie2
pie2.draw(data2, {/* options for pie2 */});
});
pie1.draw(data1, {/* options for pie1 */});
}
This can be extended to allow for multiple pie charts, going as many layers deep as you like.