Use ajax to update charts.