reload chart data in javascript instead of rereshing the whole page