Updated chart example code