finishing media chart controller action and adding tests