add chart function mock