draw and undraw chart