added togglechart to the buttons to fix the click issue