You can simply use $.get() or $.getJSON() method and in URL add parameter, for example:

$.getJSON('' + window.index, function(data) {        
    //create new chart with data from response

Then in your getpie.php you have access to this variable via:

$clickedindex = $_GET['index'];

The same way works it for Highcharts example lazy-loading and PHP file you can find here.

Related Query

More Query from same tag