Gviz has the ability to populate charts with JSON data, so you can do this with jquery quite simply by contacting your server to get a new dataset by returning JSON and then passing it to which it draws your charts.
Your jquery / javascript wil looks something like this:
function drawMyChart(data) {
var dt = new google.visualization.DataTable(data)
}
function makeAjaxCall() {
$.ajax({
url: '/path/to/data/json',
sucess: drawMyChart(a),
dataType: 'json'
});
}
<input type='button' onclick='makeAjaxCall()'>Go</input>
Regarding the proper formatting of your JSON response, there are several libraries that will help you, although I don't know anything specifically in the languages you mentioned. Here is one from python , for example.
If you are struggling, you can simply unload all your entries in the array as follows:
[[name, age],[john, 25],[paul, 20]]
and use google.visualization.arrayToDataTable to interpret it when it returns from your server as JSON.
Hope this helps.