Added loading indicator and error handling to charts page