Switched JSON endpoint to the chart itself to avoid using a separate controller action