add chart code to tests