moving google charts logic into chart service for common use