Return stats when rendering a visualization to JSON