Added chart close event listener