added refresh function to charts