moving code around in singlechartactivity