fix bug in anonymous function and return chart