Extract chart template into a partial