Get chart image function.