flask-chartist-example/app/templates/bokeh.js
2017-05-23 10:25:24 -05:00

19 lines
No EOL
424 B
JavaScript

function updateChart(){
console.log('updated div/scripts')
var nation = $("#nation option:selected").text()
var updatedData = $.get('/pybokeh/'.concat(nation));
updatedData.done(function(results){
$("#bokeh-pop-plot").html(results.div);
$("#bokeh-pop-script").html(results.script);
});
console.log('updated div/scripts')
}
$('#update').on('click', updateChart)
$('#nation').on('change', updateChart)