Updated chart global functions